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

ARC Early Access will give you immediate updates and new features needed to unleash your robot's potential!

Sabertooth 2x12 is probably a good option. Without knowing the specs on the motors it is impossible to know though.
If you go the sabertooth route, and if your motors have encoders, I would also add a kangaroo.
I second what David said... A sabretooth is even easier to use than a cheap H bridge....
Thanks guys!
Hey.. By the way, I'll be traveling to California for the next days (finally got my 12 days vacation ! )
Do you know some good store where I can buy robotic supplies ?
Since is kink of hard to find it in Brazil, I'll use some time in my tripe to dig some stuff....
I'll be in LA and San Francisco ( and in the road between..) lol
Thank for any hint!
@tevans i went with the sabertooth 2x25 for my R2 it is hybrid wood and aluminium and other scraps so its not very light... from the looks i have the same motors you have and the sabertooth does fine at 12v
Thanks @jayutmb! It seems the sabertooth is the choice of you expert guys! So I'll look for that to buy..
Hi friends! I took your advice and installed a saber tooth.
It's great! It's working fine.
Now... I installed anothe h-bridge do run the 12v motor that drives the dome. My question for you my genius friends is: how do I set position on this motor... Since it is not a servo...
I'll post a phot of the sistem so you can have an idea..

User-inserted image

User-inserted image
You can use a potentiometer connected to one of the ezb's analog ports... A 5 or 10k pot should work fine... Connect it to the center of the dome (so that it rotates with the dome) and it should read the dome's position no problem....
I understand the concept. But I'm not Shure if I know how to do it.
Do you suggest any tutorial where I can start from ?
Since you're already familiar with the Sabertooth you can get a Kangaroo X2 daughter board and attach it to the Sabertooth at the control ports. This will add position and speed control to your DC motor. You will have to attach some kind of feedback device like a multi turn potentiometer or encoder to the pivot point of your dome. Either the center point of the dome where the motor shaft attaches or the shaft itself. This feedback device will tell the Kangaroo/Sabertooth where to stop and how fast to get there. You use simple serial commands to send that info from ARC just like you do the Sabertooth commands your sending now. Here's a couple pictures how I've mounted both a pot and an encoder to use with the Roo:

Here you can see I have two Sabertooth 2x32 with a Kangaroo x2 attached to each waiting to have the wiring completed.
User-inserted image

The motor is seen on the bottom, my pulleys are in the middle and the encoder is mounted on top to centered a shaft extension.
User-inserted image

Here I have a single turn pot attached to the motor shaft
User-inserted image

Here I have a multi turn pot (the little blue thing) running inline on a gear set next to the motor it's providing feedback for.
User-inserted image

Hope this helps. ;)
Thanks Dave!
I just ordered a Kangaroo.
As soon as I get it I'll try your solution. But.. Unfortunately,
Since I live in Brazil, only God knows when I'll receive that...

Anyway, here is a video showing how far I get until now...
Any suggestion of improvement will be very welcome.

Hey, he looks great! Looks like he's fully working. How do you want to use the Kangaroo?
Actually , what I need is control the position of the dome.. At this point he is working via remote control, but I want it to be autonomous... Btw, I've been thinking, I use the sabertooth to move the legs, and a small controller to drive the dome motor. Will the kangaroo work with this second controller or I'll have to buy another sabertooth?...
Kangaroo only works with Sabertooth controllers.

You could still use a pot on the dome plugged into an ADC port, and sue some scripting for position control. Won't be as precise or possibly as quick to react as a "roo" but would achieve the same effect.

The kangaroo works only with the sabertooth (possibly the Syren too)... I still think an easier solution is to use a pot for position control... as you mentioned that's all you need....
Well, then the pot seems the perfect solution... since the domo move does not need to be as accurate as an jaw or arm for example...
So I need to find an script that reads the pot value to determine the direction and how long the motor will run.. Am I right?
Can you point me such script?
I had that setup working nicely a few years ago before I switched over to the Sabertooth / Kangaroo combination. Have a read through my old thread where I got great help from a member and got it working. :

Remember, you will need to use a multi turn pot. Regular ones will only do one turn. If you go past it's limits it will break and if powered on it may catch fire.

Hope this helps.
Thanks Dave! I'm not Good in scripting... But I try hard! Lol
I'll try it so, and please allow me to get your help in the process, can I?
Once again,
Thank you.
I'll be happy to help if I can. I'm sure there's many others here that will beat me to the proper answers when you ask. ;)
David... another stupid question (if you don't mind..)
how should I wire the Pot ? I just got one 5K multiturn as you teach me..
since I connect the signal to the midle, it does not matter the positive and negative ?
Ok! I figured out how to wire and read the ADC value.
Now, i'm trying to write some script to control the position.
I start with that one you pointed me (the other thread), but not having sucess...
Once again, any help is highly appreciated!

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.