Pages: [1]   Go Down
Author Topic: Power supply design  (Read 1088 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello all,

I am in the process of building yet another self-balancing robot (just because) and I am now confronted with the problem of designing a proper power supply.

Basically, the question is:
1) Should I use two 9V batteries, short their ground connectors and use one to power the arduino board + sensors, and the other to power the motors? That sounds like a reasonable solution, but maybe overkill.
2) Can I use just one 9V battery and have the arduino + sensor part in parallel with the motors ? The odd thing here is that I would have the arduino board's voltage regulator on one side of the circuit, and a DC-DC converter (or even another 5V regulator) to power the motors.
Is there any reason I should not do that? Specifically, should I expect the voltage to vary wildly on the low-power side when the motor start to draw a significant amount of current? Are there specific precautions I should take if I take that road?

Quite honestly, I understand very little about the way batteries behave and the way power supplies should be designed, so any pointers to learn more about the subject are more than welcome.

Thanks!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27386
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The little rectangular 9V batteries? They are only good for 200-300mAH, you won't get much life.
You are better off with 6 AAs.
How big are these motors?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The motors are fairly small: https://www.sparkfun.com/products/8911

They're rated at 32mA @ 6V, but considering they will mostly repeatedly change direction in short bursts, I don't know what the actual current consumption might be.

I was thinking using 522s (http://data.energizer.com/PDFs/522.pdf). I was expecting something in the vicinity of 500mAH, but maybe I'm optimistic.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27386
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

32mA is when its not moving anything.
The motor needs 100mA when its actually moving something, and 500mA when its stalled.

You'll also need a motor  H-bridge to control driving the motor in 2 directions.
Something L293 or L298 based. Search sparkfun, or pololu
or http://www.pololu.com/catalog/category/10
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you thinking to use the rectangular 9V batteries? You will not have a sufficient supply for your circuit especially the motor. The motor will just drained all the supply of the battery and you cannot able to make it last longer. Try using 6 batteries AA's or AAA's this will be enough to supply your circuit rather than the rectangular 9V battery
Logged


Offline Offline
God Member
*****
Karma: 4
Posts: 813
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Battery voltage sags when you draw more current than the battery can generate.
As long as the "sagged" voltage is still over the 5V + dropout value of the Arduino regulator, the Arduino won't see the voltage drop.
It may, however, see voltage spikes, depending on how good the filtering is in the regulator. Adding more capacitors before or after the regulator may help, as may spike/transient suppression diodes.

As everyone else has said, the 9V battery is puny. If you have two motors, they will easily draw 1A if you suddenly reverse direction on both at once. The 9V battery will croak, and the Arduino likely reset. (If you have two batteries with common ground, then the Arduino wouldn't be affected.)

I like to use a bench power supply while developing (saves on batteries :-) and then use LiPo when un-tethered. You can use a UBEC (which is a switching power converter for use on RC planes etc) to get 6V or 5V out of a 7.4V or 11.1V LiPo battery. If you output 5V, you may even pipe that straight into the 5V of the Arduino, instead of taking the losses from the linear regulator. This probably requires additional filtering, though -- both at the motor driver end, and on the output from the UBEC. You could also use a 6V UBEC and put that into the Vin of the Arduino, to reduce losses, and use the 6V to power the motors. Note that motors are very voltage forgiving, as long as you don't run them too hot. If you use PWM to control the motors, then you can use significantly higher voltage than the "rated" voltage for the motor. Same thing if you use a current controlling motor controller, and make sure to not exceed rated current of the motors. You can even use a 7.2V UBEC and a 11.1V LiPo battery for this.

One thing I don't like about the Arduino regulators: They are not ULDO. There exists parts that only need 0.3V over the regulated voltage (LF50ABV for example) as opposed to the 1.2 - 2.0V typically used by "normal" regulators. This translates to lower losses, and better ability to run on lower voltages. The Arduino is marginal on 6.0V in -- it really wants 6.5V in for a stable 5.0V out.

You can use an UBEC like this: http://www.hobbypartz.com/ub2liin.html
Or a DC DC converter like this: http://www.pololu.com/catalog/product/2110
With that, you can use a rechargeable LiPo battery like this: http://www.hobbypartz.com/83p-950mah-3s1p-111-15c.html or like this: http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=16772

Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I suggest 4 x alkaline AA cells or 5 or 6 x NiMH AA cells to power the motors, and a 9V battery to power the Arduino. Get this working first, then if you want you can try powering the Arduino from the same batteries as the motor.

If you use a L298 or L293D motor controller, then you will need a 9V motor supply and waste nearly 50% of the power in them due to the voltage drop in the controller. I suggest you use a mosfet-based motor controller instead, such as http://www.pololu.com/catalog/product/2503.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27386
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If you output 5V, you may even pipe that straight into the 5V of the Arduino, instead of taking the losses from the linear regulator.
Be careful about this - the new regulators being used are not tolerant of having 5V on their output and nothing on their input.  Datasheet would suggest a diode from output (anode) to input(cathode).
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
God Member
*****
Karma: 4
Posts: 813
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Be careful about this - the new regulators being used are not tolerant of having 5V on their output and nothing on their input.  Datasheet would suggest a diode from output (anode) to input(cathode).

Is this a design flaw in the Uno? That's unfortunate. It *is* intended as an experimentation platform :-(
The more I learn about it, the more I like the idea of the Ruggeduino :-)

Did they put in protection against over-volting inputs on the Due, or will that fry the chip, too?
Logged

Malaga
Offline Offline
Sr. Member
****
Karma: 6
Posts: 319
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Usually, LDOs suggest using such protection diode when your input could be short circuited when shutted down, and there is a high capacitive load after the regulator.

This is not always the case, and leaving the DC jack unconnected does not match the previoly commetted.
Logged

Vinciduino rocks!

Pages: [1]   Go Up
Jump to: