I would like to know what type of battery setup I should use for my robot. I have 6 AA batteries powering my motors so it's just everything else... which currently consists of...
Arduino UNO
SN7...etc. H bridge motor driver chip
Mini Servo
Sharp IR sensor
It was working fine when connected via USB to my laptop but then I tried powering those things from the Arduino using a 9V battery and it didn't work properly. The RX or TX light was flashing and the servo was moving very slowly, one step at a time. I think the battery was pretty new but it's just a standard cheap shop bought battery, not a rechargable NiMH or something.. so maybe it's just the battery.
Although the robot is quite simple at the moment, I do want to make it a little more complex by adding a shift register to control LED's and maybe a buzzer and possibly a second servo... maybe another sensor... etc.
So I am wondering what kind of battery setup I need to supply enough current(?) to run all these things at the same time? Should a single 9V battery be able to power all those components (future additions included) or do I need a 9V battery for the Arduino on it's own and a seperate supply for all my chips, servo's, LED's and sensors? If so how would I create that seperate supply and what batteries would I use?
Thanks!
I have seen 1 robot here powered by a single 9v.
https://www.robotshop.com/letsmakerobots/node/27303
His only problem was short run time as 9v are not meant for high current draw. I find it difficult to believe that your issue is battery related. You do have all of the grounds tied together, right?
Yes
All my grounds are attached to the GND pin on the Arduino, including the grounds from my motor power supply.
A 9V will not be good for
A 9V will not be good for powering everything. I feel like this question has come up a lot lately. It simply cannot supply enough current.
If you have 6xAA alkaline batteries supplying 9V, that should be OK to power everything. Your Arduino has a 5V voltage regulator, and will work happily with an input voltage of 7-12V.
Note that if you are using rechargable batteries, they are only 1.2V each. So 6 x 1.2 = 7.2V, which is still enough for your needs.
As a basic rule motors,
As a basic rule motors, servos, solenoids etc should not be powered by the same source at the microcontroller and digital circuits. That said I think it’s a pain to have several power sources on one robot. With cap’s on the motors and cap’s on any voltage regulator I have had no problems running my small robots from the same power source.
So I would recommend using a LiPo battery like http://www.hobbyking.com/hobbyking/store/__9163__Turnigy_1000mAh_3S_20C_Lipo_Pack.html
They can deliver lots of current. I don’t know how much your robot is pulling for the USB port, but it can’t be more than 500mA. With a 1000mAh you should be able to run it for two hours before recharging. And believe me, your robot running around on the floor will start boring you a long time before the two hours are up
Dividing power
Perhaps in using one source, you can divide it so that each system gets what it needs.
On the positive line of the battery, attach a diode in series. A 1N4001 or any of that 4000 series should work well. The other side of the diode will be abou 0.7 volts lower than the battery voltage, but should be still sufficient to be regulated down for 5 volts for the microcontroller, and maybe a sensor or 2. At the bar side of the diode, the cathode, also attach the postive end of a large electrolytic capacitor, with the negative end of it to ground. Large can vary from 200 uFd on up as needed. In this configuration, the cap acts a a sort of mini-battery, holding up the supply voltage in something like a motor starting tries ot drop it on the outside of the diode. The diode prevents the cap from draining back into the battery on the other side. Motor power is to be taken directly from the battery, and if any servos are used, their power can also be taken from the battery side, but into a regulator to then supply the servos at an appropriate level.
I wouldn’t recommend using
I wouldn’t recommend using a diode as a voltage regulator. Then you’re probably better off with a zener diode in reverse. But a normal 78XX voltage regulator would be better in every respect.
Not a reg
Not using a diode as a regulator here, but as a block to keep the cap from discharging back to a battery that is being drawn down by motor start-up. This allows the capacitor to be a momentary supply to keep the micro from reseting. The micro would still use the normal reg it always did, just on the other side of the diode/cap circuit.
maybe the problem lies with
maybe the problem lies with the H-Bridge?