Help With My R2


Skip to comments

Hi Friends!. well I'm finally ready to put my full size R2 to roll...
But I need a tip from you.
What kind of H-Bridge or controller do I need (or can I use) to use with my ez-b ?
I believe that the regular one will not be able to power this Scooter motors that i'm using.. am I wrong ?!

User-inserted image

User-inserted image

By — Last update


Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

Please post the script your useing. Not the one I posted. I need to see the one you wrote. I'll see if I can see anything.
well.. this is what i've been trying...
my intention is to have a script that I can call to position the Dome. for example, if I want it turn rigth, then I call the script "rigth"and it will turn thru that position, no matter where it is at the start point.. (exactly like we do with servo and animation command..)



$adcCurrent = GetADC(adc0)
$stop= 125

if (($adcCurrent >($stop - 5) and $adcCurrent <($stop + 5)))

if(($adcCurrent > ($stop + 6)))
Goto (lookRigth)
ControlCommand("Soundboard", Track_1)

if(($adcCurrent <($stop - 6)))
Goto (lookLeft)


Set(d1, off)
Set(d2, off)
Goto (start)

Goto (Start)

Goto (start)
The code you have seems to be running right. It keeps going to the Lookleft section. It seems like it's reading your ADC port as less than 125. What is it that is not working for you? Do you have a ADC monitor installed for the port you're attached to so you can actually see what the reading is so you can set your values in the script properly?

EDIT : It goes to less than 125 for me because I don't have a ezb reading an adc port attached to ARC. Also how are you sending your movement command and setting the variable? You can use a separate script to as a trigger to start a movement script waiting for a variable and movement command.
I'm getting very poor results here..
I guess the pot is not reading very accurately the values..
Maybe because of the friction install (instead of a sprocket)...
Btw, I'm thinking about use a motor with encoder, or a stepping motor. What do you think ?
If you think using the pot is hard the other two ways will be even more of a challenge... If you switch to using a motor with an encoder you will need to buy the Kangaroo board to use with the sabertooth... That will require even more coding to get it up and running... Dave can help you with that... A stepper is even harder. Not too many people on here have really used a stepper in their projects to my knowledge...
Pot values change very quickly as you noticed... it is very easy to overshoot your position... This may be the problem you are having, I don't know... What you need to do is proportionally slow the motor as it approaches it's position and reverse it if it overshoots it... So what will happen is the motor will gradually slow down the closer it gets to the position you set it for...

I have done this with a vex robot arm I built using dc motors (with pot feedback) instead of servos and it worked pretty good....
Can you send me an exemple of a code, or a panel configuration, so I can start from ?
If overshooting your mark is the problem then increase the values in this statement :

if (($adcCurrent >($stop - 5) and $adcCurrent <($stop + 5)))

The difficulty of useing a pot and scripting with math along with poor accuracy is the reason I switched all my motor control of DC motors over to a Sabertooth with a Kangaroo X2 daughter board. Once this combonation is set up properly and you understand how to send the simple serial commands through ezb's Uart port , it's very easy to write code for it. Accuracy of position and speed is great. I've found that useing an encoder with this combo gives me the best results. The Bata version I have of the software needed to make fine tune adjustments (use is optional but recommend ) also gives it speed ramping if enabled in the "All Controls" tab. Your milage may vary. ;)

I have to warn that unless you have your system built in the way the kangaroo is expecting and everything is connected and working properly (power, feedback, connectivity ) this controller is a pain to get working. That's not necessarily a bad thing. You don't want to run your motors on a improper system. *eek*
Ok Friends, I get the Kangaroo and another sabertooth...
Now.. I still need an encoder ?!?! Or a pot?! Because the motor I'm using does not have that..
Kinda of lost again
If you are going to use the kangaroo you need a motor with an encoder built in...
Oh boy... Now I have to buy another motor...
But, I'm confused.. if I use a motor with encoder I do not need the Kangaroo.. Am I right? Because if I get the feedback from the motor, I can just use that value to setup the limits..
Am I being stupid ?!
What's the point about the kangaroo/sabertooth combination after all?
Sheesh ... you need to do some research dude LOL...The encoder which is attached to the motor plugs into the kangaroo. The kangaroo then plugs into the sabretooth... You need a kangaroo because you can't use a motor with an encoder with just a sabretooth... The (without the kangaroo) sabertooth by itself has no ability to read positional feedback from motor encoders....
I see...
But the Ez-b can read that the same way it reads the pot...
But, well, I understand that once tuned, the kangaroo will allow me to command the motor to any position.. Almost like a servo ...
I'll try to see what happens.
EZB can not read an encoder. That's why you need a motor controller like the Kangaroo that will read the pulses sent by the encoder and control the Sabertooth.

EZB can read a pot because a pot measures the differences in voltage from one side of the rotation to the other. A common encoder sends out a puses as it reads and counts light passing through holes in a wheel as it turns. EZB can't accept though puse readings.

You can use either a pot or an encoder with the Kangaroo.
friends.. here I am again asking for your help!
ok, I got the sabertooth (2x12) I got the Kangaroo, and, instead of an encoder, I got a POT - the blue one, with 10 turns..

I figure out how to connect everything. it's not that hard.
but I'm stuck again at the script point.
Where do I go now ?
How to control it from ARC ?

help please!

Friends,after a painfull learning process, I have finally get my system with the sabertooth and kangaroo to work properly!

Well, after lots of frustrating attempts to set up using a pot, I decide to buy some motors with encoders. Then I found out that my Sabertooh board was defective.

One of it's channels was not working. I got in touch with Dimmension folks and they were very helpfull !
After a lot of configuration guided try outs, we saw the sabertooth BURN to death!..
then, DImmension Engenering sent me another one, FOR FREE!.

And, this one is working great! I simply connected the motors and encoders, did the tune on both motors, and... THAt's it. It worked with servo COMMAND in ARC.
So, my conclusion is that my board was broken at first, an here Is my thanks to Dimmension for the perfect support.
Someone should make a User Tutorial in the learn section on how to setup a kangaroo + sabertooth to work with servo Command in ARC. *hint hint*
Bom trabalho tevans, bom tutorial.
Obrigado amigo!
Grande abraço.