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 ;).
Upgrade to ARC Pro
ARC Early Access will give you immediate updates and new features needed to unleash your robot's potential!
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.
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.
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!
@ 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
If they are low amperage motors and don't exceed 1.2a together it should be good.
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.
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
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.
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
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.
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.
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.
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.
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.