Pages: [1]   Go Down
Author Topic: ATTiny85 Power  (Read 689 times)
0 Members and 1 Guest are viewing this topic.
Gloucestershire, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 107
Outta Steam
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Guys,

I have a couple of questions regarding powering an ATTiny85 that I hope someone can help me answer.

I need to make a standalone circuit with one of these little guys fading an led up and down on demand and need to drop a 12v (wallwart) supply down to around 5V for the ATTiny and led supply.  What in your opinion is the best method bearing in mind that I'd like to keep the component count down and there is not a lot of space available? The restriction on space also means heat dissapation may be problematic.

I don't seem to be able to find the ATTiny's current consumption anywhere (at least not in a form I can recognise!), but the max load from the led is going to be 20mA.

The way I see it, the choices I have are to use a 7805 (bit too bulky and gets hot), use a voltage divider  (stability concerns), use an LM2575 switching regulator (higher cost and component count) or a 5.1v zener diode with say a 1K resistor.  Problem with the last option is that because I'm not sure of the ATTiny's power consumption, I don't know what wattage resistor to use - and how hot would it get.

Are any of the above ideas suitable do you think or what other options could I consider?

Thanks
Bernie
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12741
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Why not just use a 5V wallwart?
Logged

Gloucestershire, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 107
Outta Steam
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Quote
Why not just use a 5V wallwart?

Ah, perhaps I should have mentioned, this circuit is an add-on to an existing model led lighting installation that is running off the 12v wallwart, and the guy I'm making it for wants just one power source for the whole thing.

Bernie
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 143
Posts: 5302
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't seem to be able to find the ATTiny's current consumption anywhere (at least not in a form I can recognise!), but the max load from the led is going to be 20mA.

It varies a lot with things like clock speed, what parts of the chip are enabled and the amount of slumber you use. With the right programming it can be down in the nanoamps range... smiley

See the section "Power management and sleep modes" in the datasheet. You should definitely switch off the Analog circuitry, that's a big power hog. Switch off anything else you're not using, too, like USI and timers.

Just by running at 1mHz and switching off the unused parts of the chip power consumption will be a lot less than your LED, maybe a milliamp or two. By sleeping in between LED updates you could get it down to microamps.

Here's an article on AVR power optimization: http://www.gammon.com.au/forum/?id=11497
It's not a Tiny85 but the same principles apply.

« Last Edit: January 04, 2013, 05:59:03 am by fungus » Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Gloucestershire, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 107
Outta Steam
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Just by running at 1mHz and switching off the unused parts of the chip power consumption will be a lot less than your LED, maybe a milliamp or two. By sleeping in between LED updates you could get it down to microamps.

Thanks for that Fungus  smiley

Hmmmm, so say I was able to reduce the power consumption of the chip down to say 10mA giving a total load, including the led, of 30mA. Would the simple zener/resistor plan using a 1/2 watt series resistor of 150R be suitable for my needs? (calculated values from an online zener diode resistor calculator - I'm lazy smiley )  Or have I forgotten something?

Bernie
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 143
Posts: 5302
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmmmm, so say I was able to reduce the power consumption of the chip down to say 10mA giving a total load, including the led, of 30mA. Would the simple zener/resistor plan using a 1/2 watt series resistor of 150R be suitable for my needs? (calculated values from an online zener diode resistor calculator - I'm lazy smiley )  Or have I forgotten something?

For 30mA in a small space? I'd get a voltage regulator in a TO-92 package.

eg. http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00000446.pdf

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I don't seem to be able to find the ATTiny's current consumption anywhere

The datasheet is the best source for that.

A rough estimate would be 20ma, worst case scenario. Typically a few ma.
Logged

Gloucestershire, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 107
Outta Steam
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks dhenry that fits in well with Fungus's L78L05 suggestion - good shout Fungus smiley.

I was planning to use smd ATTiny85s so if I use the SOT-89 package for the regulator I can use the earth plane as the heat sink.  Have to check on prices and availability now....

Bernie
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 143
Posts: 5302
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I don't seem to be able to find the ATTiny's current consumption anywhere

The datasheet is the best source for that.

A rough estimate would be 20ma, worst case scenario. Typically a few ma.


I just had a look at the datasheet myself, it's quite detailed.

Worst case is actually about 14mA (running at 20MHz with everything turned on).

At 8MHz  ...  about 6mA, easily within a 10mA target.

At 1MHz with timer1 + ADC powered down...  more like 1mA.

PS: Turn off timer1 first! Timer1 actually uses about three times as much power as the ADC (and ten times as much as timer0 - weird!).
« Last Edit: January 04, 2013, 09:14:59 am by fungus » Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Valencia, Spain
Online Online
Faraday Member
**
Karma: 143
Posts: 5302
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks dhenry that fits in well with Fungus's L78L05 suggestion - good shout Fungus smiley.

Do I get karma?
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Gloucestershire, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 107
Outta Steam
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Consider yoursef Karma'd  smiley-grin

Bernie
Logged

Pages: [1]   Go Up
Jump to: