Can I use a Voltage Divider or a Series Regulator with ATTiny85 ?

I'm doing a small project for my Niece and Nephew that requires the project to be portable, ie batteries to power it.

I've decided to use an ATTiny85 and a 74HC595 shift register in the relatively simple circuit. However, the absolute max voltage for the ATTiny85 given in the datasheet is 5.5v, and 5v is recommended max. I can get away with using 4.5v via 3 x AA or 3 x AAA batteries but using a triple AAA or AA battery holder increases the size of the project box considerably.

I was thinking of using a 3v coin cell battery, but after doing the maths, rejected that idea. I also thought of using 2 x 3v coin cell batteries, until I read the datasheet for the ATTiny85 and saw the absolute max voltage of 5.5v.

I haven't had the restriction of portability before, usually settling quite happily with using batteries or a small, portable power bank. So I had to delve back quite some years to when I was trying to come to terms with discreet electronic components, and I thought about voltage dividers.

In essence, my question is this: Using the standard formula of

Vout = Vin * ( R2 / ( R1 + R2 ) )

and using Vin = 6v ( from the coin cells ), is it feasible to just add this relatively small voltage divider before the main circuit, so that Vout goes to a common Vin for the ATTiny85 and the 74HC595 ?

It's one of those, "..in theory it should work", moments but I'm just not sure, being way out of practice with discreet components and associated maths. I'd run a test myself, but I only have 1 ATTiny85 left until my order for more comes through, and I don't want to use the one I have on a theory that may blow the chip.

If not the voltage divider, then would a 5v series regulator with a 6v or 9v ( via 2 or 3 x 3v coin cells ) supply, work ? Or should I just 'bite the bullet' and work towards using 4.5v from 3 x AA batteries or hook up to a 5v portable USB power bank?

Any constructive criticism is very much welcomed.

Regards

Is there a reason you are opposed to two AAA batteries?

No, you cannot ever use a voltage divider to provide power to something. That equation you posted only applies where the current going through the resistors is the same. Voltage divider is only good for level shifting signal lines, or for generating intermediate reference voltages.

Is there a reason you can't use a 5v LDO regulator?

How much current does your project draw? Coin cells can't provide much current, and don't last very long. Unless your project is sleeping most of the time, you probably won't be happy with the battery life of coin cells...

Thanks for the replies, guys.

Coding Badly - Yes, size, and the fact that 3v isn't enough, as I stated in the post when I was thinking of using a 3v coin cell.

DrAzzy - I was trying to reduce size, hence the thought on 2 x 3v coin cells. HOWEVER, you at right. I've done a rethink on the subject and decided to go with an LM7805 Voltage Regulator with 2 decoupling capacitors plus resistor and use a 9v battery.

The project box footprint is a little bigger than I wanted, but it's swings and roundabouts, so I'll settle with that.

Many thanks to you all for the suggestions.

Regards

An 7805 is a dinosaur. It needs 2volt across to work properly.
Modern low dropout regulators only need ~1volt, some or even <0.1volt.

But why a regulator.
An ATtiny85 + 74HC595 does't HAVE to run on 5volt.
Going as low as 2volt could work, if... clock speed is matched to that voltage.
Tell us more about your project.
Leo..

Hi,
Two 3V button cells in series= 6V

Put a diode, forward biased, in series with the positive lead to your ATTiny, it will drop 0.7V so supply will be 6.0 - 0.7 = 5.3V.

Will that help?

Tom.. :slight_smile:

Wawa:
But why a regulator.
An ATtiny85 + 74HC595 does't HAVE to run on 5volt.
Going as low as 2volt could work, if... clock speed is matched to that voltage.
Tell us more about your project.
Leo..

An ATtiny85 requires 2.7V minimum. To go down to 1.8V you need an ATtiny85V or 13A.

Converting a project to use battery power is not trivial, and requires a few things to be carefully planned. If you don't want to just shovel more battery at the problem, some thought is required. One thing you need to do is make a power profile, which is an accounting of how much power each part of your circuit uses, how long it uses that power, and how often. This requires looking up current consumption figures in datasheets and potentially measuring it with a multimeter.

Do you know how much current a 7805 uses? The spec to look for in the datasheet is quiescent current, and in my datasheet it's 3.2 mA typical. That's the amount of current it needs just to power the internal regulation circuitry, with no load on the output. At that current draw, it will suck a 9V battery (600 mAh capacity) dry in about a week just by itself. Adding your project to it will just tank the battery life even further.

Microprocessors have a great deal of features that allow you to save power, but if you are not already using them then you will need to rewrite your sketch for it.

So I ask you:

  • What is the average current consumption of your project?
  • What are the minimum and maximum voltage ranges of all the devices you're using?
  • What's the minimum amount of battery life you think you'll settle for?
  • How much space are you willing to devote for the batteries?

1416 - Low-Power Design Guide.pdf (274 KB)

Most lithium 3V coin cells (calculator batteries) are rated for a couple of mA max. If you need any significant current then use 3 alkaline button cells (LR44 or similar) for 4.5V, or 4 with a 5V LDO regulator.

To get the most out of battery power, learn how to use the various sleep modes available on the Tiny85. I find the Narcoleptic library (GitHub - brabl2/narcoleptic: Sleep library for Arduino (compatible with arduino-tiny core)) to be almost effortless to use.