Go Down

Topic: ATTiny85 Power (Read 777 times) previous topic - next topic

STDummy

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

Coding Badly


Why not just use a 5V wallwart?

STDummy


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

fungus

#3
Jan 04, 2013, 11:46 am Last Edit: Jan 04, 2013, 11:59 am by fungus Reason: 1

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... :)

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.

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

STDummy

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  :)

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 :) )  Or have I forgotten something?

Bernie

fungus


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 :) )  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

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

dhenry

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.

STDummy

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

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

fungus

#8
Jan 04, 2013, 03:00 pm Last Edit: Jan 04, 2013, 03:14 pm by fungus Reason: 1

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!).
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

fungus


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


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

STDummy

Consider yoursef Karma'd  :D

Bernie

Go Up