0

I intend to power three ATTiny45 chips (each requiring around 3.5V) in parallel with 2 pill batteries (namely Maxwell's CR2032) in series (which would come to around 6V). They will each play a sound with a piezo buzzer when a button is pressed.

Now maybe my thinking is wrong but I think dividing the power between the three chips may result in only around 2V delivered to each chip? Does the other components play a role?

So my question is this:

  • How much voltage is delivered across elements in parallel?
  • What changes should I do to the wiring to make the most of the voltage?
  • What kind of resources should I get to make sense of what to do? Cause I thought I was more advanced but this stomped me.

In any case I've added the schematic of what's intended.

[This schematic used to contain resistors to pull the switch but this need was removed with the help of jsotola's input_pullup comment]

schematic

simulate this circuit – Schematic created using CircuitLab

15
  • 1
    the Vcc pin of all three ATTiny45 chips are connected to the same power point ... what voltage would you expect to appear at each Vcc pin?
    – jsotola
    Jan 8, 2021 at 4:00
  • 1
    why don't you enable data pin internal pullup resistor, remove the external pulldown resistor, and connect the switch between data pin and ground?
    – jsotola
    Jan 8, 2021 at 4:17
  • 1
    if you are measuring 2 V, then it is because the battery is overloaded ... your schematic shows all three ATTinys connected to the same voltage, which is 6 V
    – jsotola
    Jan 8, 2021 at 4:40
  • 3
    it is the same arrangement as all of the lightbulbs and power outlets in your house ... they all have the same voltage no matter how many are turned on
    – jsotola
    Jan 8, 2021 at 6:48
  • 3
    The term "pill battery" is pretty ambiguous. Please update your question and add the specific batteries being used. Also, why are you using 100 Ohm resistors on the switches? When you close the switch you are going to pull WAY more power from the battery than you need to signal an input. Try something more reasonable like 10K Ohm.
    – jwh20
    Jan 8, 2021 at 11:56

1 Answer 1

1

If you connect the AtTiny chips in parallel, they will all receive the full voltage from your battery. If you exceed the current output of your battery the voltage will droop.

If the AtTiny chips need 3.5V and you give them 6V instead, it will likely destroy the chips.

The short answer: Don't try to drive microcontrollers directly from batteries. You should get a 3.5V switching power supply. Then you will be able to drive all 3 chips cleanly from your battery. (Switching power supplies are very efficient. They don't waste much power at all.)

Note that button cells produce very small total power (in milliwatt/hours) so they won't drive your processors for very long before they are exhausted. I suggest using 4 AA batteries and a switching regulator instead. The 4 AA batteries would give you a 6V VIN to your voltage regulator, but a lot more total power.

5
  • Thank you! I am looking into switching power supplies but they do seem bulky. I also understand that button cells are not very powerful, but what is your thoughts on its lifespan if, say, the chip is mostly asleep?
    – B7th
    Jan 12, 2021 at 4:54
  • 1
    The math is pretty easy. Calculate current drawn over time. If you draw 1/10 amp for an hour, you have consumed 100 milliamp-hours (mAh) of power from the battery. Batteries are rated by their capacity in milliamp-hours. Voltage regulators waste a little, so you should add some slop for that (look up a given regulator's efficiency to figure out how much waste to calculate.) Look at the "in use" current of your system, and the "asleep" current. Figure out what percentage of the time it will be in each state, and do some algebra to figure out the current used over time.
    – Duncan C
    Jan 12, 2021 at 13:35
  • 1
    Here is an article that talks about using sleep mode on an AtTiny45 to reduce power: re-innovation.co.uk/docs/sleep-modes-on-attiny85. Note that you also need to turn off various subsystems and set the digital pins to input mode in order to get the lowest power consumption in sleep mode. It sounds like if you do all that, you can get the power consumption down to around 0.2mA. So yes, you can greatly increase the lifespan of your button cells if the AtTiny spends most of its time asleep.
    – Duncan C
    Jan 12, 2021 at 13:40
  • thank you kindly for such a complete answer with side quests too! I've researched a bit the subject around sleep modes but I didn't know it was best to turn pins to input, will do that! Unfortunately the article at jira.kdc.capitalone.com/browse/AOM-1290 can't connect? Says Server not found. Thanks a lot again!
    – B7th
    Jan 13, 2021 at 4:37
  • 1
    Sorry, that was the wrong link.Here is what I meant to post: Note that the more current you draw from a battery, the shorter its lifespan. That is a complex subject. Check this article if your interested: embedded.com/…
    – Duncan C
    Jan 13, 2021 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.