The two robots I’m currently working on (the mapbot and a 12 servo quadroped) I plan to power with 4 x NiMH AA batteries, and probably a 9V NiMH battery + regulator for the Arduino.
The 2 AA battery booster solution I had in mind for the swarmbots we were talking about recently. I’ll be getting a couple of standalone Atmega168 chips soon and I think I’ll start working on a prototype. I want these bots to be as small and cheap as possible so I was thinking about powering them with a 9V battery + regulator like fritsl’s little 8, but I don’t much like the idea of wasting 30-40% of the power on the regulation.
So it seems 2 AA batteries + booster is a better solution. I’m not gonna buy neither the Mintbooster nor the Polulo booster though. Both are way too expensive. Besides it seems fairly simple to make you own circuit based on the MAX756 chip (or similar):
I seems that the chip is also capable of detecting when the batteries need to be recharged, though I'm not sure?! It would be perfect if you're planning do let the swarmbots auto-dock/recharge...
UPDATE: Avnet seems to sell the chips for as little as 2.90$ :)
Darn it! I just built the Adafruit motor shield this afternoon and debated whether to use sockets or not and decided not to. I knew I shoulda used 'em, lol…oh well, I can always un-solder later. Now that the motor shield is done, I’ll figure out the code and make a new video of Herbert running off the shield…should be a couple days at most!
Hey Annie you did fine. You went the factory recomended way! I asked this question on the Adafruit forum and was told the L293D chips use the board as a heat sink. OK to use chip sockets but add the heatsink as a safety feature.
Herbert will really be responsive when you can use the zero turn radius available with this shield.
Really cool to see your progress reports, helps folks see how to learn and experiment in building a robot.
About 9 volts, they are not a good battery to be used in powering motors or servos in robots. Battery capacity can be compared to battery volume, so the smaller the case, the less power they have to drive power hungry parts like motors. They can be adequate at powering a microcontroller like the Arduino, but even just adding sensors to be powered can drain them quickly. Rechargables are generally the best to have, to provide good current (due to smaller internal resistance) and be re0usable rather than just be thrown away. Your robot is driving alright at 5 volts, so maybe running an 4 or 6 pack of AA NiMh for 4.8 to 7.2 volts would provide a good runtime. I’ve run 10 on a robot before to get speed up, but that was because the motors were rated for that voltage. The specs on the DFrobot say the motors are rated at 6 volts, so I’d be careful going much higher.
I just wanted to thank you all for the input! I really appreciate everything. The Robot Shop finally put up specs for the motors! The page was empty earlier this month, lol…Here’s what they put:
• 4WD Mobile platform Motors: 3-12V DC • Speed: 90cm/s • Dimensions: 200mm x 170mm x 105mm • Weight: 660g
• Working Voltage:12V • DC Motor: 10300 RPM • Gear Ratio:1:48 • rpm@6V: 200 rpm • rpm@12V: 400 rpm • 0.55 Kgf.cm torque (6V) • 0.95 kgf.cm torque (12v) • No-load current = 71 mA, • Stall current = 680 mA • Weight:32g
So, hope that helps some of you…as for Herbert, I built his motor shield yesterday and I just wired it up to the chassis and 12 volts of batteries (8 AA batteries in a holder …I will be getting rechargeables later) and I just need to write some code and I’ll post video! Hopefully by tomorrow…
I’ve just run into my first hurdle! Let’s see…I’ll take a deep breath and try to explain what is going on, lolzors…
I built the AdaFruit motor shield yesterday. For you Arduino fans out there it’s a little board that plops right on the Arduino and has two H bridges and a latch IC and can control all 4 of the DC motors at one time. So, I found time to wire it up and test this afternoon and it’s giving me problems. I’m guessing it’s something to do with current, but I’m not sure because Herbert was running fine for short periods of time just using transistor circuits and a 9 volt battery…
Here is some sample code I have been trying:
#include <AFMotor.h>
AF_DCMotor motor1(1, MOTOR12_64KHZ); // create motor #1, 64KHz pwm
I can’t run all 4 motors at once, they don’t move at all…I can run two at a time but they are weak, very weak. I tried D Cells in series (9volts), AA in series (12 volts), a 6 volt lantern battery…weak weak weak…motors 1 and 2 run okay forward but in reverse they are like malaria victims or something, heh. Motors 3 and 4 can only run at 1 KHZ so they are like chronic fatigue patients…nooooo umph!
In the videos above I powered all 4 motors from 1 9 volt battery and everything was fine…oh, by the way…all batteries I tried were brand new and I put new batteries in the Minty Boost for the Arduino and I even tried powering the Arduino from the computer’s USB just to rule out some weird, weak signal from the motor board…
I was trying at 250…but I’ll pump it up to 255 and see what happens! Also, I’ll just try one motor at a time to see if they all work okay on their own…then I’ll know something is up somewhere else…
I’m at a loss to understand what is going on with the motor shield. I’ve checked my wiring, checked all of the different batteries that I’ve tried just to test it( see above) and this morning I commented out the code so I only tested 1 motor at a time. It is acting weird and gutless…on the Adafruit tutorial it mentioned puttinga .1 uf cap across the motor to guard against noise in the circuit, that didn’t help.
Is it possible that the H bridges in the motor shield aren’t powerful enough for my motors? On the Adafruit website it says:
“Note that the H-bridge chip is not really meant for driving loads over 0.6A or that peak over 1.2A so this is for small motors. Check the datasheet for information about the motor to verify its OK.”
I don’t really understand all the data above (in this post) about the motors…all the current ratings frighten and confuse me, I’m just a cave girl…
Bottom line: I’m going to buy some nimh rechargeables tomorrow…then I can rule out the batteries once and for all! In the mean time I am going to put my breadboard Darlington transistor circuits back onto Herbert so I can at least drive the motors forward while I work on the code for the ping sensor eyes…the motors work great (for short periods of time) with a 9 volt battery through the Darlingtons.
Question: Has anyone ever heard of a BA6886N motor driver chip? I have one and I was wondering if I should make my own motor controller board with 4 of those…just a thought!
Just a thought because I often overlook the obvious when doing a debug. When you wired your shield for external power did you remove the jumper?
Have not heard of your motor driver chip. I have used the L293D and The SN754410 chips. I should have posted earlier about the chip sockets. You could have borrowed the L293D chips on your shield.
Yeah…I took off the jumper before even starting the whole thing
I was just going through the component section of Let’s Make Robots and they link to a dual motor driver that may work for me (I’d need to buy 2 of course) if the motor shield doesn’t work out…
Transistor saturation voltage loss and switching frequency
One possible culprit is the BJT transistors in the devices. I don’t know what Darlington had been used initially, but a datasheet for a TIP102 shows a 2 volt loss across the transistor when saturated, the Vce-sat spec. An L293D datasheet shows a possible 1.8 volt loss across the upper sourcing transistor, as well as a possible 1.8 volt loss across the lower sinking transistor for a total of 3.6 volts possibly unavailable for the motor, from the supply voltage. So initially, the motors were running on 9 volts - 2 volts or 7 volts, and with the L293D they are trying to run on 5.4 volts. Note also that the ST datasheet mentions a maximum switching frequency of 5 kHz. It might be rounding or cutting the output even further if trying to PWM too fast. Other manufacturers L293D devices will probably have similar limits. I believe the SN754410 can be switched much higher, but still has the BJT saturation losses.
If using the TB6612FNG device, the losses would be minimized as it appears to use FET transistors rather than BJT. The TB6612FNG datasheet shows a 0.5 ohm on resistance, which would amount to a loss of only 0.3 volts at 600 mA of current used.
The other driver, BA6886N datasheet appears to be a BJT device with higher possible losses (up to 3.3 volts)
Ok, just re-read your description, and am not that sure that transistors are the culprit, as voltage levels were changed without much change in drive results. So maybe it is the type of batteries, may be that everything will work better with NiMh rechargeables that can deliver more current (for all 4 motors at once) Could be a combo, the motors drawing down the batteries and the driver taking more volts away. Also was thinking of the MintyBoost, it will try to actively maintain a higher voltage level, where a battery will passively reduce voltage at higher current draws. Interesting situation to think through.
Another approach for driving larger motors is to use relays instead of an IC based H-bridge. Then you can switch power to the motors directly from the batteries.
An example designed and sold by DAGU is here, but you could make one yourself if desired.
Just wired (4) motors to the AdaFruit Motor Driver, plugged it into my Duemilanove. I pasted your code in a new program and connected (4) AAA size NiMH rechargeable to the Motor board. All (4) motors ran and the program worked perfectly. I did not have the same motors as you but everything worked as expected. I feel either you have a solder error or the motors draw more current than the L293D chips will pass.
While your motors ran did the chip get hot??
Did you check whether the gearboxes turned freely?
Even with the Yellow motors the stall current is 680mA x 2 = 1360mA = 1.36 amps thru each chip. This exceeds the chips rating of 1.2 amps but that would only happen at full power while stalled.
Maybe you would need a L298 based motor driver but it just don’t seem like it.