Pages: [1]   Go Down
Author Topic: Power requirements for project  (Read 1171 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all-

I'm working on my first "real" Arduino project using an Uno, a GPS module, LCD screen, and microSD card; basically I'm building a specialized GPS receiver. Everything works - I've tested the functionality and I get a valid signal, data is written to the card, info is displayed on the screen, etc. The Uno has been getting all its power so far from the USB port; to make it portable I hooked up a 9V battery to the power jack and the screen started flashing dimly; it seems like it's not getting enough power. I have it plugged into the +5 pin on the Uno (through two shields, one for the microSD card and the other for the GPS), but when hooked up to the USB port everything is fine.

Checking the schematics, it says that the power draw from the USB port is 5V, so since that's all working (and when I plugged it back into the USB port it started working again), I figured that 9V was fine, especially since I had earlier plugged in the same battery/plug into a Duemilanove I have from an earlier learning project running a simple sketch to turn an LED on and off, and it worked just fine.

This is the part that I admit to knowing next to nothing about: external power. If the USB port only supplies 5V, and the board says it can handle up to 20V, and I attach a 9V battery...I'm stuck, what am I doing wrong?

Thanks for any help; this has definitely been a learning experience and I'm having a great time working with the equipment. I just need to make it portable and then figure out how to get into a box, but that's after I have it working externally.

Logged

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 444
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It's not voltage, it's amperage. The 5v regulator on the arduino is small and can only handle so much. You need to power the external things with another voltage regulator. Get your hands on a 7805 regulator and two 10uF(or similar) capacitors.
Logged

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

Hey, thanks for the quick reply! Let me see if I understand this (it's all about learning, right?): power comes in from the 9V battery, which is dispersed through the system, but the screen isn't getting enough, so it's flickering. The capacitors will store the current from the battery and the regulator parcels it out in a smooth fashion so it keeps the LCD always supplied with the power that it wants. Does that sound right?

Also, I noticed on the Uno spec sheet that it says to use the VIN pin when connecting to the power jack, and using the +5 was actually not a good idea. So, if that's correct, I should move the pin to VIN in addition to your suggestion; just trying to understand how it all fits together.

Thanks again!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
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

9V battery, the square kind?  They are not good for much current. If you then run it thru the 5V regulator, the upper 4v are just dissipated as heat too.
USB port can supply 500mA of current. Your 9V battery apparently can not!
Try 3 AAs connected to 5V and Gnd on the power header instead. This bypasses the reverse polarity protection diode and the 5V regulator, so do not get the leads reversed.
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: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the info, CrossRoads. It is indeed the standard smoke detector-type square 9V battery. I looked up the info on Wikipedia; a standard AA battery supplies something around 400 to 900 mAh, whereas the one 9V only has 565 mAh (according to Wikipedia). So as you said, putting three together gives me (~400*3) mAh which is plenty more power than the 9V. Does my logic sound right? If so, I guess it's back to Radio Shack to see if they have something like that!  smiley

One question though, should I be using Vin or 5V when running on external power on the Uno? The docs seem to suggest Vin is the way to go.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
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

Battery logic is not right.
3AAs in series to make 4.5V will only supply the 400 to 900mAH of current.
NiMH rechargable batteries can do 1600mAH of current. I think alkaline batteries are good for 2000-2500mAH.

Barrel Jack, Vin, or 5V:
If you have >=7.5V, then barrel jack and Vin are okay.
3.8V-5.5V: 5V on power header is okay for 16 MHz operation.
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
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the info, CrossRoads. It is indeed the standard smoke detector-type square 9V battery. I looked up the info on Wikipedia; a standard AA battery supplies something around 400 to 900 mAh, whereas the one 9V only has 565 mAh (according to Wikipedia). So as you said, putting three together gives me (~400*3) mAh which is plenty more power than the 9V. Does my logic sound right? If so, I guess it's back to Radio Shack to see if they have something like that!  smiley

One question though, should I be using Vin or 5V when running on external power on the Uno? The docs seem to suggest Vin is the way to go.

It depends on how your batteries are wired.

I'm still rather new to electronics myself but this is how I understand it:

In series, the voltage is cumulative but the capacity amount is not.  In parallel the capacity is cumulative but the voltage is not.  Think of it this way, in series (the most common way batteries are used) all 3 of the AA batteries will be drawn upon at the same time.  But in parallel it's more like only one battery is being drawn on at the a time.  So 3 AAs (1.5v each) will need to be wired in series to provide 4.5v to your arduino giving it enough power to operate normally.  If you wired them in parallel you'd only get 1.5v of power to the arduino board, which is not enough to power the board.  Wiring batteries in series is wiring them negative to positive with the end positive and negatives being your leads.  Most battery holders that you will find at radioshack are done in this fashion, that is why in a 3 battery holder, one will go in the opposite direction of the other two.

Really I would think your 9v would be enough to power the circuit unless the 9v is already depleted a good bit.  But it could also be something to do with the batteries maximum discharge rate.  Some batteries can discharge faster than others, and your entire circuit cannot draw more than the batteries maximum discharge rate or you will see power problems even if you have sufficient voltage.  The mAh ratings you are referring to is the total capacity of the battery.

This is how the capacity would work, lets say your circuit is drawing 150 mA.  Assuming your batteries are capable of discharging at least 150 mA rate, and it has a capacity of 600 mAh, you should be able to run your circuit for 4 hours (600 mAh/ 150mA basic algebra mA cancels out on top and bottom and you are left with hours) before the battery is dead (give or take a little depending on temperature and some other variables).

Again, I'm still learning, but that is my understanding.  If any of it wrong someone please correct me!
Logged

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

Hey, thanks a lot Steven!

I sheepishly have to report that, as it turns out, it *was* the battery: I checked the box, "Best if used by 2006". I understand that it had enough power to run a single led on the other board, but clearly not enough for the GPS. One new 9V later and I was walking around my neighborhood, staring at the screen and recording my GPS coords!

But thanks again to CrossRoads and stoopkid: it isn't always the battery, I know, and I'm also thinking of the next project where power will *definitely* be an issue with the Arduino, so everyone has given me a lot of info to learn about.

Thanks a lot all! I really appreciate it 
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
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

Cool.
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.

Pages: [1]   Go Up
Jump to: