Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
clewiston
PostPosted: Mar 11, 2010 - 03:54 AM
Rookie


Joined: Sep 15, 2009
Posts: 29


I am measuring current drain on my circuit board that's powered with an atmega168, and my base current consumption is around 70 mA, which seems incredibly high for the components I have on board. I don't know what is draining this much current...I have put all my peripheral devices to sleep and configured the atmega168 for the lowest power consumption and put it in PWR DOWN sleep mode.

I am thinking now that it might be the I/O ports, and how they are configured. Is it possible for my I/O ports to drain around 10+mA each? and if so how do I configure my I/O ports so that they don't drain? (just for test conditions independent of functionality).
 
 View user's profile Send private message  
Reply with quote Back to top
ka7ehk
PostPosted: Mar 11, 2010 - 04:33 AM
Raving lunatic


Joined: Nov 22, 2002
Posts: 7176
Location: Tangent, OR, USA

Yes, I/O ports can do it.

The lowest is configured as an input with pullup turned on or an output. They can pull a lot of current if left floating inputs.

Don't forget that any load on an I/O pin will add to the current when the pin is high.

Jim

_________________
Jim Wagner
Oregon Research Electronics, Consulting Div.
Tangent, OR, USA
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
kk6gm
PostPosted: Mar 11, 2010 - 05:19 AM
Resident


Joined: Sep 12, 2009
Posts: 929


What kind of outputs is your m168 driving? Remember an output is essentially a low-value resistor to either Vcc or GND.
 
 View user's profile Send private message  
Reply with quote Back to top
clewiston
PostPosted: Mar 11, 2010 - 05:37 AM
Rookie


Joined: Sep 15, 2009
Posts: 29


I'm driving a number of peripherals: accelerometer, Flash memory, and another peripheral chip, all through SPI interface, so I have a separate CS line for each of the peripherals. I also have lines connected to a bluetooth chip for UART transmission(RX, TX, CTS, RTS & reset), as well as input lines from the accelerometer for external interrupts.

For Chip Select lines, which are generally active low lines, and therefore need to be helf high at all times when not being used....do they draw much current? I would figure that each end would be high impedance but this might be a mistaken assumption.

in total, i have 10 output lines, 5 input lines, and 4 NC lines.
 
 View user's profile Send private message  
Reply with quote Back to top
theusch
PostPosted: Mar 11, 2010 - 02:08 PM
10k+ Postman


Joined: Feb 19, 2001
Posts: 18830
Location: Wisconsin USA

When on that mission, start with the bare board and work up rather than the other way.

First, are you measuring AVR consumption, or input to a regulator?

See http://www.avrfreaks.net/index.php?name ... st+add+lee and links within.
 
 View user's profile Send private message  
Reply with quote Back to top
clewiston
PostPosted: Mar 11, 2010 - 04:35 PM
Rookie


Joined: Sep 15, 2009
Posts: 29


oh that's a good point...i'm measuring the input to a regulator right now...suppose i should at least be measuring the output of the regulator to get a better sense of how much the board is consuming
 
 View user's profile Send private message  
Reply with quote Back to top
ka7ehk
PostPosted: Mar 11, 2010 - 05:37 PM
Raving lunatic


Joined: Nov 22, 2002
Posts: 7176
Location: Tangent, OR, USA

Depending on your regulator, THAT can eat a lot of current.

The venerable 7805 has a quiescent current that is about 8mA. Even the 78L05 is about 3mA. Clearly, "low power" means low power handling capability, not low power consumption.

The input current of a linear regulator is load current + quiescent current.

Jim

_________________
Jim Wagner
Oregon Research Electronics, Consulting Div.
Tangent, OR, USA
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
clewiston
PostPosted: Mar 11, 2010 - 07:04 PM
Rookie


Joined: Sep 15, 2009
Posts: 29


ok....so this is the regulator i have in place:

NCP1400:
http://www.onsemi.com/pub_link/Collateral/NCP1400A-D.PDF

In the datasheet it says it's operating current is 37uA, but that it sources up to 100mA. When I originally read the datasheet I thought the 37uA was the power consumption. Am I wrong on that?

Any suggestions on a 3.3V regulator in a SOT23-5 package with lower power consumption?
 
 View user's profile Send private message  
Reply with quote Back to top
theusch
PostPosted: Mar 11, 2010 - 07:11 PM
10k+ Postman


Joined: Feb 19, 2001
Posts: 18830
Location: Wisconsin USA

If you are truly after low power consumption and are battery-operated, skip the regulator.
 
 View user's profile Send private message  
Reply with quote Back to top
jayjay1974
PostPosted: Mar 11, 2010 - 07:14 PM
Raving lunatic


Joined: Oct 30, 2002
Posts: 3903
Location: The Netherlands

You surely don't mean you expected the input current would be 37uA and the output current 100mA?

37uA is not too bad at all for a regulator, though there are types that go as low as requiring only 1.1uA for their own internal circuits. IIRC Holtek has a few, Seiko has the S-1167 series, and OnSemi has the MC78LC30NTRG.

_________________
Free e-books
Modern Mechanix: Yesterday's Tommorow Today
 
 View user's profile Send private message  
Reply with quote Back to top
clewiston
PostPosted: Mar 11, 2010 - 07:37 PM
Rookie


Joined: Sep 15, 2009
Posts: 29


no i understand that it's sourcing 100mA from the battery through the regulator, and that the regulator is consuming 37uA for its own operation.

So in that case 100mA would be sourced into my circuit from the battery through the regulator, and the unused current is returned to the battery through ground? Or is that current lost somehow? need some EE101 right here...

now that i think about it, i've gotten the unit to last for ~8 hours in testing. i'm powering with a 150mAh lithium polymer battery. So that would put consumption on the order of 18-20 mA/hour. I'm trying to get it down to ~5 mA. I was programming the ports last night and saw a difference of 20mA draw in two different states of configuration of the I/Os. So maybe that means that my actual current draw is in the ranges of 18-20mA, and that I can configure it to lower (at this point 15mA would be good enough for the application). That would make sense, and the amount of current read on the multimeter on the input to the voltage regulator would still read something high, but at least should reflect the relative difference in power savings. So, in other words, 88mA on the ampmeter input to the voltage regulator would be equivalent to ~18mA.

Since I only (at the moment) need to save 3mA, hopefully I can monitor how to do that without having to rip my whole board apart...


Last edited by clewiston on Mar 12, 2010 - 04:58 PM; edited 1 time in total
 
 View user's profile Send private message  
Reply with quote Back to top
jayjay1974
PostPosted: Mar 11, 2010 - 07:45 PM
Raving lunatic


Joined: Oct 30, 2002
Posts: 3903
Location: The Netherlands

Linear regulator: input current=output current+quiescent current. Superfluous volts are converted into heat.

The current specification is a maximum current that the regulator can deliver.

_________________
Free e-books
Modern Mechanix: Yesterday's Tommorow Today
 
 View user's profile Send private message  
Reply with quote Back to top
theusch
PostPosted: Mar 11, 2010 - 08:07 PM
10k+ Postman


Joined: Feb 19, 2001
Posts: 18830
Location: Wisconsin USA

Quote:

saw a difference of 20mA draw in two different states of configuration of the I/Os.


That depends on what >>you<< are powering from the ports, not anything inherent in the AVR. (well, if you had a bunch of floating inputs a few could be floating at mid-level and cause a high current draw)

Did you take the link I gave above, and look at the checklist: Start with the bare AVR, and get that going. IME starting with the full app you are going to be disconnecting one thing at a time anyway.

And if at all possible, skip the regulator. We run off 3.6V lithium often in battery apps just for that reason.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits