United Kingdom
Asked — Edited
Resolved Resolved by CardboardHacker!

Reducing Speed For My Robot 12V Motors

Hi there.

My name is Steve and I am new to the forum so I would like to say hi to everyone. I do have a question I hope someone can help me with regarding my current robot build so I hope this is the right place to ask. I am in the middle of building my own version of a full size K-9 with a few differences that I will put up on the EZ Robots showcase pages when he is completed. I am currently waiting for my EZ goodies to arrive which are due sometime this month (June, 14) and so far I have pretty much completed his body and rolling chassis.

The question I want to pose has to do with the rolling chassis/drivetrain. The parts for the chassis have mainly come from a kiddies ride on car which has two 12v, 30w drive motors which produce two fixed forward and reverse speeds (slow 3MPH and fast 5MPH) and a single speed 12v steering motor, connected to a control/radio control receiver box, controlled by a R/C controller and powered by a 12v 7Ah rechargeable battery. The R/C controller will be located inside the body and 2 servos via the EZ-B will move the joysticks for the movement (one servo for forward and reverse, and the other for left and right).

I have this pretty much sorted, but hear is where I need the help confused. . I want to slow all 3 motors down a bit. I would like to have the steering motor turn slower so there is more precise movement via the servo control, and would like to be able to adjust the speed of the drive motors so I can have a slower, almost a crawl, speed while K-9 is roaming the house, and then be able to readjust the speed so he can move quicker around larger area or open spaces. The current "slow" speed is about 3 MPH but it is just a bit to quick to navigate autonomously around my house so I'm looking for a hopefully simple solution.

I had an idea of simply splicing through one of the motor wires on each motor and wiring in a 12v potentiometer which I could attach to his control panel and adjust it/them as needed (or even servo controlled, but first things first). Could it be as simple as that or would I need something more? I have also read online about maybe using a PWM but I wouldn't know how to wire it (or them as the case maybe) up. Would using a PWM do what I'm looking to do and would it even work on the set up I have?

I am not really experienced in using or installing resistors or soldering circuit boards ect so a simple "easy for me to do" solution would be great, so any help and advice or solutions anybody here can offer really would be appreciated, and thanks in advance ;).

Steve

User-inserted image

User-inserted image


ARC Pro

Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

#1  

Steve, I have seen people setup a motor controller for the ez-b and still use rc control while switching between ez-b and rc. servo control wouldn't be as accurate or safe, as the servo could get stuck. I will have to dig to see who did this setup but its do-able.

Slowing down the motors can be done 3 ways.

  1. Putting a regulator between the motors and the main power.
  2. putting resistors between the motors and main power, 3.Using a motor controller to manage the speed of the motor.

Yes I know its a fixed speed but if you decrease the voltage it will start to respond.

The l298n motor controller from ez-robot comes with ez-plug wires which remove soldering. there's one area you may need to solder put it isn't hard.

Tech.

#2  

A proper motor controller is your best bet... I prefer the Sabertooth because it doesn't get much eaier than that... Others like using (as Tech suggests) a l298n H Bridge....

United Kingdom
#3  

Thanks Technopro and Richard for the lightning speed responses. I do agree with your points regarding servo control. I must admit that was something I failed to think about and see your point. so as it stands at the mo, @ Technopro, when you say using a regulator, do you mean something like a potentiometer? I appreciate you looking for the R/C and EZ-B set up. Sounds interesting.

I would me more than happy to do away with the R/C side of things and use the existing motors and battery via a more accurate controller but I am very new at making a robot at this kind of level (this is my first infact) and have never used sabertooth, arduino or EZ-B (the developers kit I am waiting is my first) so not sure how it would go together and play nice with each other without it being to difficult for me to do.

I just had a look at the EZ Robots motor controller and looks interesting. Can I simple run my existing motors through that instead? If so, what about powering the motors. Can I run the 12v battery that came with the motors through it? And finally, if all this is possible would this give me full control over motor speed for example the steering motor (essentially turning it in to a servo of sorts)?

Thanks for the advice so far though guys.

Steve.

User-inserted image

User-inserted image

#4  

If your motors don't take more than 1.2 amps each your fine. When I say regulator I mean a voltage regulator like this one: www.ebay.com/itm/4-38V-to-1-25-36V-DC-Buck-Step-Down-Converter-DC-5V-12V-5A-Car-Voltage-Regulator-/141304859710?pt=Motors_Car_Truck_Parts_Accessories&hash=item20e66d0c3e&vxp=mtr

I think it was rgordon who made the rc/ez-b flip-flop setup for the sabertooth 2x12. I think his questor project used it. Not 100% though. Here's a link to where he explains it: ez-robot.com/Community/Forum/posts.aspx?threadId=4766

Yes, using a motor controller will allow you to do a tank like setup as well controlling the motor speed.

PRO
Synthiam
#5  

I recommend using the hbridge that we sell. It's based in the l298 chipset. It works well with the PWM hbridge control. That control lets you manage speed and very smooth arcing turns.

United Kingdom
#6  

Thanks for finding the info and for the links Technopro. I'll have a look.

Thanks for the info DJ. Forgive my ignorance but when you say hbridge, I take it you mean the 2.5 Amp Motor Controller? I'm still learning all the terminology ;). I do have a couple of other questions I would like to ask you if you don't mind. How would the motors be powered. Can I put the 12v battery I have through it, or is it powered via the EZ-B power pack?

Thanks in advance buddy.

Steve.

#7  

The l298 can run on the same battery as the ez-b. If the motors are 12Vs, attach the 12v from the battery to the motor controller.

#8  

This is basically how you hook an H Bridge motor controller up to motors and the ezb... There may be a few minor variances, but basically this is how it's done...

User-inserted image

United Kingdom
#9  

Really appreciate the help guys. You sure are a helpful lot and for that I thank you. Looks like I will have to invest in a ammeter (which I should do anyway) but I can't see the 12v motors drawing to high a amperage. But it does look like the new motor controller is the way to go and doesn't look to difficult:). Thanks for the diagram Richard. That will come in useful.

I would rather use the 12v battery for the motors and the EZ-B battery pack for the EZ-B, servos ect for longer run times.

Steve.

Canada
#10  

The motor controllers have the H bridge built in. This H bridge circuit protects your electronics from being damaged from the motors when they are stopping or reversing. Motors will produce electricity that flows back, kinda like a generator. the motor controller has a separate input for supply power and that is where I would hook up the 12v battery. The motor controller is hooked up to the EZ-B thru the logic( digital pins on the EZ-B). The EZ-B then tells the motor controller what speed and direction to run. The motor controller uses what they call pulse width modulation (pwm) to control speed with out dropping voltage so you don't lose torque. You would lose torque if you lowered the voltage to run your motors slower. Also the ARC has a nice interface to run the motor controller really user friendly.

#11  

The replies you've gotten so far about the Motor Controller (H-Bridge) are spot on and very helpful. If I may add one more thing:

If you end up buying the L298 motor controller from EZ Robot's store there is a very cool feature on this board. The white button on the L298 motor driver turns on and off an on board 5vdc regulator. If you can't or you don't want to feed 5vdc to the L298 through the 5vdc port you can push the button and the regulator and it will draw it's feed from the motors power feed at the VCC port. IN your case it will be the 12vdc your supplying your motors through this H-bridge.

Personally I have an external 12vcd power supply's positive wire attached to the VCC port, the 12 v power supply's ground to the L298 ground port (along with a common ground to EZB) and nothing attached to the 5+v port. Then I push the button and the unit powers up with the designed 5vdc to feed it's own logic part of the board and it also supplies 12dc to my motors.

The Sabertooth also has this feature (Kinda). You never supply 5vdc to it's logic/control side. It always makes it's own 5v power from what ever voltage your supplying to the motor through this driver (anything from 6 - 24vdc). There is a 5vdc port but that is a "OUTPUT" port that can supply other devices that may need 5vdc (a very useful thing to have).

If you want to keep your RC setup Demension Engineering (the ones that sell the Sabertooth) also has a little doughtier board called the Kangaroo X2 that plugs right into the control side of the Sabertooth. This will allow you to manually control your robot using a common handheld RC Controller, a Pot or a microcontroller like the EZB. This may add a level of compilation to your robot that you may not want to deal with right now but you never know what you can do till you push your limits. However the Sabertooth will work just fine with EZB without the Kangaroo. Also it's controlled a little differently then other motor controllers that can use PWM.

Here's a nice guide made by one of our "elate" members of this forum on how to set up and use a L298n H-Bridge:

Rich's guide on the L298n H-Bridge

Good luck and have fun. You've got a real cool rig there. Cant wait to see more of him!:)

United Kingdom
#12  

A BIG thanks to everyone who has responded so for with all your help and great advice. It won't go unused I promise. I would also like to thank Shamon and Dave Schulpius for there added input too.

@ Shamon. I get what your saying about the PWM. The way I understand it is that it sends pulses of current at varying intervals, the quicker the pulses, the faster the motor speed and the slower the pulses, the slower the motor speed. Do I have that right? I have also heard that reducing the voltage to the motors (not via PWM) can actually damage the motors in the long run as the get hot and burn out, as well as loosing torque as you mentioned.

@ Dave Schulpius. Thanks for the kind words and I look forward to sharing my little project when I'm done. It's nice to hear you have used a 12v battery the way I think I need to. It puts my mind at rest somewhat. I just want to confirm that I have this right if that's cool. 1.) I can wire my 12v battery to the motor controller, and that battery powers the motors. 2.) The controller then connects to the EZ-B. 3.) The EZ-B is powered via its own separate 7.4VDC battery pack which also powers servos ect that are connected to it.. 4.) I program the EZ-B to tell the controller what speeds I want the motors to run at, essentially turning the motors in to servos (for want of a better description).

Do I have this right so far? One thing I admit I'm not sure on is where you talk about the white button turning on and off an on board 5vdc regulator. Does that mean that the motor controller can be powered via the 12v battery thus giving 12 volts to the motors, but also takes what voltage it needs, i.e 5vdc to power the controller itself?

One last question about the motor controller to anyone who can help. Would it be possible to wire both motors (drive motors) together in to one side of the controller and use the other side for the steering motor, or would having both drive motors connected to one port be to much for the motor controller to handle?

Once again, any advice anyone is willing to offer really will be appreciated :)

Cheers, Steve.

#13  
  1. Yes 2.yep
  2. Correct 4.perfect.

If they are low amperage motors and don't exceed 1.2a together it should be good.

#14  

I'd like to validate Tech's reply. Your correct on all the points you asked about. As for the last question, he's also correct. As long as you don't overload the max amp spec on what ever motor controller you use there is no reason you cant do this.

United Kingdom
#15  

Thanks for the short and quick answers there Tech my friend. That has put my mind at rest, well almost. One think I hope you can help me with, or anyone else for that matter, and it is in regards to what you say about amperage and the EZ Robot's motor controller.

I tested one of the drive motors and the steering motor also with a multimeter, bypassing the R/C set up and going "battery---meter---motor" through the positive wire. The amps from the steering motor draws maxis out at about 0.35 when starting up or changing direction for about half a second, although it did hit 0.49 for a split second, then settles to about 0.24 amps while running (first photo), and so I'm happy with that.

Now the drive motor, and this is where I need the help. Same set up, so on running speed it draws about 0.56 amps (second photo), but on start up or direction change it hits about 1.42 amps for a split second (third photo), sometimes about 1.14, but as high as 1.85 again only for a split second and settles to the 0.56 running amp draw very quickly. Would this short, sharp, split second surge do any damage to the EZ motor controller, especially if, like I mentioned previously, I wire the 2 drive motors in to one side of the controller so I can keep the other side free for the steering motor?

If it is the case of "it may not be a good idea to hook both motors to one side of the controller" then it's not a real problem as I have seen electronic speed controllers on certain auction and shopping sites which I could use for the steering, that I believe can be plugged straight in to the EZ-B servo ports as they come with servo plugs, if so what would be the best way to power this. By running another pair of power leads from the 12v to the ESC or simply plug the servo leads in to the EZ-B and use it's 7.4 battery pack? I would much rather keep things simple and use the single EZ controller to control all 3 motors as I mentioned before but if this is a better, or should I say safer way, then that's what I would do.

I would be grateful for any advice on this as I would hate to damage the thing as soon as I receive it and hook it up, and thanks again everyone for the help so far.

Cheers, Steve.

User-inserted image

User-inserted image

User-inserted image

United Kingdom
#16  

The L298n driver can take peek loads of 3A per channel provided it isn't constant. In other words, on startup or change of direction when that blip of high load happens it can handle it as long as it is not above 3A total and not for very long.

You should be OK running the drive motors on one channel since it would hit just around the 3A mark momentarily which the H-Bridge should be able to handle.

As you are close to the limit I would advise the use of two L298n H-Bridges, one for the drive motors (which can be set for forwards and reverse actions only) and the other for the steering. This will not only spread the load and leave a nice ceiling for the current draw but will also allow independent speed control of each drive motor for accurate movement (if one motor spins faster than the other, and it probably will, you can adjust it easily).

To set up two H-Bridges in ARC is a little bit more complex than adding the H-Bridge Movement Panel but it's not difficult and if you ask for help I will jump right on it with the required controls and scripts needed.

P.S. Welcome to the forum:)

United Kingdom
#17  

Thanks for that Rich. I would like to air on the side of caution and leave a little safety margin. Yes the surges are very quick, less than 1/2 a second so it all sounds good.

Having never used EZ Robots equipment before I didn't realise that you could connect two L298n motor controllers in to one EZ-B so that certainly does sound like the way to go.

Thanks again buddy.

Steve.

United Kingdom
#18  

Yeah, running two isn't something that's done often but it's pretty simple to do. The main issue is the number of digital ports two will take up, however if you only use 1 channel on the steering one then you can cut the ports used down by 3.

Basically, it takes 2 digital ports to tell a H-Bridge to move a motor. My tutorial that Dave linked to explains it all in the truth tables but to be honest, this sounds like a fun little project to work on so I may wind up knocking up an Example Project for this scenario later:)

United Kingdom
#19  

Sorry Rich, just to clarify, when you say digital ports, are these the same ports the servos plug in to? Still waiting for my EZ goodies to arrive so I'm only going by photos and what I have read so far.

I did have a quick look at your tutorial the other day but didn't quite take it all in. Will deffo have another look.

And thanks for the welcome. :)

Steve.

United Kingdom
#20  

Yes that's correct, digital ports are where the servos plug in.

Each digital port has a ground, Vcc and Signal pin. The signal pins are what basically control things through various methods such as "highs and lows", "PWM" and Serial communication. As crazy at it now sounds to me, I have always expected people to just know what digital ports are, what highs and lows are, what PWM is etc. yet I should know better since I came here with no knowledge of anything to do with microcontrollers, no idea what a digital high was (I thought it was something you get from watching an awesome 3d movie) or what PWM is.

When you have time have a read through the Learn section of the site and check out each of the tutorial pages (open ARC, add a control and click on the ?). This should help you learn and understand what everything does and how everything works.

United Kingdom
#21  

Nice one, thanks for that. This sure is a learning curve for me but enjoying it never the less. Hey, I know what a PWM is already so that's a start:D

Seriously though, I'm good with all the practical side of things, always have been ever since I was old enough to hold a screwdriver (the right way up), but it's the terminology and technical theory I'm still trips me up from time to time and using micro controllers really is a first for me, but thanks to people like yourself, you all make it that little bit easier.

Anyway back to the matter at hand, I don't really have a problem loosing a few digital ports. My original idea that I mentioned at the start of this thread was to have 2 servos moving joysticks on a radio controller, but now with the motor controller idea, that will be 2 less servos I will be using so I will have plenty of room to connect two motor controllers so just added 2 controllers to my order.

I will have another look at your tutorial and when the goodies arrive, sometime this month I hope, I may check back with you Rich, about scripting the 2 controllers if I get stuck.

Thanks again for the advice yourself and everybody else here has offered up and I look forward to sharing my little project soon.

Steve.

:)

United Kingdom
#22  

Just wanted to say that I have ordered two 2.5 motor controllers so I'll let you know how I get on.

Steve.

United Kingdom
#23  

I have another question I would like to ask regarding using two 2.5 amp motor controllers through one EZ-B, but I am going to start another thread as my original question about reducing the speed of my 12v motors has now been answered and this is going slightly off subject. Another thread asking about this may also help other people who may need help and may be easier to find.

I'm going to close this now but as I can only select one member to "Thank" resolving this question who will be Technopro as he was the first one who answered my initial question, but I also wanted to thank everybody who replied as you were all very helpful, especially Rich for his suggestions and who helped make things a little easier to understand.

All the best and thanks again.

Steve.

:)

#24  

Steve- I am glad you came to the forum! Looks like you got quite a bit of info! :)

United Kingdom
#25  

Hi Aislinn. Yes I certainly got some great info and answered a lot if my questions. This is a great forum (on of the best I have ever come across) and the knowledge and response times from the members really are first class.

Thanks for the email too. I've had a nightmare with my ISP regarding there "email maintenance". Just glad it's all working now, so thanks for the information. Much appreciated. :)

Steve.