Would a 7805 5 V regulator drain a 9 V battery?Battery powered sensor node power down circuitCan a linear regulator in shutdown mode have the output in parallel with a switching regulatorCurrent limiting voltage regulator to power 12VDC fansDC 5V USB to replace AAA-battery source: down converterWays to maximize battery lifeWhich kind of regulator/battery setup should I use for 5 volt microcontroller and transmitter circuitry for optimum performance?Android Device Using Buck Converter (Voltage Regulator) instead of Li-Ion BatteryBattery selection for a robotHow can software give an accurate estimation of remaining usage time for a worn battery?Correct power supply for my project

Is it possible to save a (science) PhD in 10 months?

Why is the HTTP protocol more susceptible to being intercepted than the BitTorrent protocol?

How to control the padding below a BarLegend?

Why is the air inside airliners so dry (low humidity)?

Peano's dot notation

A question about modulus for polynomials

What does "T.O." mean?

Why did Google not use an NP problem for their quantum supremacy experiment?

I was mistakenly identified as a criminal, and this has caused rumors. How can I convince my friends that it is all a mistake?

Does cashing a 3% share harm the company itself?

In what way were Renaissance battles like chess matches?

/etc/shadow permissions security best practice (000 vs. 600 vs. 640)

Is it worth delving deep outside my field to revise a paper?

Why the real and imaginary parts of a complex analytic function are not independent?

Instant coffee melts like chocolate

How should chips with pins on bottom be drawn?

Would the US government of the 1960’s be able to feasibly recreate a modern laptop?

Can Alter Self be used to enter an enemy's body and destroy it from the inside?

What is the speed of "electricity"?

Disable memory refresh on Z80

During a log backup is the data backed up to the start or end of the operation?

What spacing difference is acceptable with tile?

If someone orders a pizza in the US and doesn't pay for it, could they be arrested?

Is it possible to be admitted to CS PhD programs (in US) with scholarship at age 18?



Would a 7805 5 V regulator drain a 9 V battery?


Battery powered sensor node power down circuitCan a linear regulator in shutdown mode have the output in parallel with a switching regulatorCurrent limiting voltage regulator to power 12VDC fansDC 5V USB to replace AAA-battery source: down converterWays to maximize battery lifeWhich kind of regulator/battery setup should I use for 5 volt microcontroller and transmitter circuitry for optimum performance?Android Device Using Buck Converter (Voltage Regulator) instead of Li-Ion BatteryBattery selection for a robotHow can software give an accurate estimation of remaining usage time for a worn battery?Correct power supply for my project






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









9














$begingroup$


Doing some DIY as a hobby, I'm making a small humidity-temperature radio sensor.



An ATmega328 is reading from a DHT11 sensor and then transmitting data to a Raspberry Pi by an STX882 radio transmitter. It is powered by a 9 V battery using a 7805 5 V regulator with 10 µF and 100 µF capacitances.



The C code on the ATmega is reading humidity and temperature and then sending it every 30 minutes:



const unsigned long DELAY = 30*60*1000UL; // 30 minutes
void loop()
delay(DELAY);
send_data(); // Maybe a little overcomplicated, but I think it is not the point



This was working like a charm, but the battery life has been unexpectedly short. It was brand new, and I made some sporadic tests with a short delay, with no abnormal heat coming from anywhere.



When I was satisfied, I put the 30 minutes delay and leave it alone (which was maybe a bit hazardous?), but after less than 24 hours the battery was 5.4 V dead. The 30 minutes delay was approximately respected for its lifespan though.



What could explain such a short battery life? Could it be the 5 V regulator? How could I build a long-lasting circuit?



PS: I'm still trying to Fritzing some diagram, but this takes age for noobs like me...



I used a 6lp3146 generic brand alkaline 9 V battery which apparently provided 300-500 mAh at 100 mA current, which is far more than what my circuit use.



Here is all information I could gather from the datasheet:



+-----------------+-------------+----------+-----------+---------+
| | DHT11 | STX882 | ATmega328 | 7805reg |
+-----------------+-------------+----------+-----------+---------+
| Voltage | 3-5.5 V | 1.2-6 V | 2.7-5.5 V | |
+-----------------+-------------+----------+-----------+---------+
| Active current | 0.5-2.5 mA | 34 mA | 1.5 mA | |
+-----------------+-------------+----------+-----------+---------+
| Standby current | 0.1-0.15 mA | <0.01 µA | 1 µA | 4-8 mA* |
+-----------------+-------------+----------+-----------+---------+
*"bias current"


If I understand correctly, my system is active for a few seconds every 30 minutes, so the standby current is all that should matter, and it is indeed driven by the 7805 regulator.



So yes, in the worst case, with 300 mAh I should be able to keep the system alive for only 40 hours.



Is there a way I could feed my system 5 V for a much longer time without a much bigger size?



For the record, here is a very good video about LM regulators vs. buck converters: Buck converter vs. linear voltage regulator - practical comparison










share|improve this question












$endgroup$










  • 3




    $begingroup$
    I suggest using the LowPower library or similar to put the ATmega to sleep between measurements.
    $endgroup$
    – calcium3000
    Jun 14 at 19:11






  • 2




    $begingroup$
    How short is short?
    $endgroup$
    – Scott Seidman
    Jun 14 at 19:34






  • 1




    $begingroup$
    @Jasen According to this link, 78L05 has 3mA bias current, which is lower but far from being enough to correct my problem.
    $endgroup$
    – Dan Chaltiel
    Jun 15 at 10:11






  • 4




    $begingroup$
    LP2950 is <140uA. MCP1703 is 2uA. "Here is all information I could gather from the datasheet:" - don't rely on datasheets, measure the standby currents.
    $endgroup$
    – Bruce Abbott
    Jun 15 at 12:55






  • 4




    $begingroup$
    Are you absolutely married to the 9v battery? Why?
    $endgroup$
    – Harper
    Jun 15 at 14:35

















9














$begingroup$


Doing some DIY as a hobby, I'm making a small humidity-temperature radio sensor.



An ATmega328 is reading from a DHT11 sensor and then transmitting data to a Raspberry Pi by an STX882 radio transmitter. It is powered by a 9 V battery using a 7805 5 V regulator with 10 µF and 100 µF capacitances.



The C code on the ATmega is reading humidity and temperature and then sending it every 30 minutes:



const unsigned long DELAY = 30*60*1000UL; // 30 minutes
void loop()
delay(DELAY);
send_data(); // Maybe a little overcomplicated, but I think it is not the point



This was working like a charm, but the battery life has been unexpectedly short. It was brand new, and I made some sporadic tests with a short delay, with no abnormal heat coming from anywhere.



When I was satisfied, I put the 30 minutes delay and leave it alone (which was maybe a bit hazardous?), but after less than 24 hours the battery was 5.4 V dead. The 30 minutes delay was approximately respected for its lifespan though.



What could explain such a short battery life? Could it be the 5 V regulator? How could I build a long-lasting circuit?



PS: I'm still trying to Fritzing some diagram, but this takes age for noobs like me...



I used a 6lp3146 generic brand alkaline 9 V battery which apparently provided 300-500 mAh at 100 mA current, which is far more than what my circuit use.



Here is all information I could gather from the datasheet:



+-----------------+-------------+----------+-----------+---------+
| | DHT11 | STX882 | ATmega328 | 7805reg |
+-----------------+-------------+----------+-----------+---------+
| Voltage | 3-5.5 V | 1.2-6 V | 2.7-5.5 V | |
+-----------------+-------------+----------+-----------+---------+
| Active current | 0.5-2.5 mA | 34 mA | 1.5 mA | |
+-----------------+-------------+----------+-----------+---------+
| Standby current | 0.1-0.15 mA | <0.01 µA | 1 µA | 4-8 mA* |
+-----------------+-------------+----------+-----------+---------+
*"bias current"


If I understand correctly, my system is active for a few seconds every 30 minutes, so the standby current is all that should matter, and it is indeed driven by the 7805 regulator.



So yes, in the worst case, with 300 mAh I should be able to keep the system alive for only 40 hours.



Is there a way I could feed my system 5 V for a much longer time without a much bigger size?



For the record, here is a very good video about LM regulators vs. buck converters: Buck converter vs. linear voltage regulator - practical comparison










share|improve this question












$endgroup$










  • 3




    $begingroup$
    I suggest using the LowPower library or similar to put the ATmega to sleep between measurements.
    $endgroup$
    – calcium3000
    Jun 14 at 19:11






  • 2




    $begingroup$
    How short is short?
    $endgroup$
    – Scott Seidman
    Jun 14 at 19:34






  • 1




    $begingroup$
    @Jasen According to this link, 78L05 has 3mA bias current, which is lower but far from being enough to correct my problem.
    $endgroup$
    – Dan Chaltiel
    Jun 15 at 10:11






  • 4




    $begingroup$
    LP2950 is <140uA. MCP1703 is 2uA. "Here is all information I could gather from the datasheet:" - don't rely on datasheets, measure the standby currents.
    $endgroup$
    – Bruce Abbott
    Jun 15 at 12:55






  • 4




    $begingroup$
    Are you absolutely married to the 9v battery? Why?
    $endgroup$
    – Harper
    Jun 15 at 14:35













9












9








9





$begingroup$


Doing some DIY as a hobby, I'm making a small humidity-temperature radio sensor.



An ATmega328 is reading from a DHT11 sensor and then transmitting data to a Raspberry Pi by an STX882 radio transmitter. It is powered by a 9 V battery using a 7805 5 V regulator with 10 µF and 100 µF capacitances.



The C code on the ATmega is reading humidity and temperature and then sending it every 30 minutes:



const unsigned long DELAY = 30*60*1000UL; // 30 minutes
void loop()
delay(DELAY);
send_data(); // Maybe a little overcomplicated, but I think it is not the point



This was working like a charm, but the battery life has been unexpectedly short. It was brand new, and I made some sporadic tests with a short delay, with no abnormal heat coming from anywhere.



When I was satisfied, I put the 30 minutes delay and leave it alone (which was maybe a bit hazardous?), but after less than 24 hours the battery was 5.4 V dead. The 30 minutes delay was approximately respected for its lifespan though.



What could explain such a short battery life? Could it be the 5 V regulator? How could I build a long-lasting circuit?



PS: I'm still trying to Fritzing some diagram, but this takes age for noobs like me...



I used a 6lp3146 generic brand alkaline 9 V battery which apparently provided 300-500 mAh at 100 mA current, which is far more than what my circuit use.



Here is all information I could gather from the datasheet:



+-----------------+-------------+----------+-----------+---------+
| | DHT11 | STX882 | ATmega328 | 7805reg |
+-----------------+-------------+----------+-----------+---------+
| Voltage | 3-5.5 V | 1.2-6 V | 2.7-5.5 V | |
+-----------------+-------------+----------+-----------+---------+
| Active current | 0.5-2.5 mA | 34 mA | 1.5 mA | |
+-----------------+-------------+----------+-----------+---------+
| Standby current | 0.1-0.15 mA | <0.01 µA | 1 µA | 4-8 mA* |
+-----------------+-------------+----------+-----------+---------+
*"bias current"


If I understand correctly, my system is active for a few seconds every 30 minutes, so the standby current is all that should matter, and it is indeed driven by the 7805 regulator.



So yes, in the worst case, with 300 mAh I should be able to keep the system alive for only 40 hours.



Is there a way I could feed my system 5 V for a much longer time without a much bigger size?



For the record, here is a very good video about LM regulators vs. buck converters: Buck converter vs. linear voltage regulator - practical comparison










share|improve this question












$endgroup$




Doing some DIY as a hobby, I'm making a small humidity-temperature radio sensor.



An ATmega328 is reading from a DHT11 sensor and then transmitting data to a Raspberry Pi by an STX882 radio transmitter. It is powered by a 9 V battery using a 7805 5 V regulator with 10 µF and 100 µF capacitances.



The C code on the ATmega is reading humidity and temperature and then sending it every 30 minutes:



const unsigned long DELAY = 30*60*1000UL; // 30 minutes
void loop()
delay(DELAY);
send_data(); // Maybe a little overcomplicated, but I think it is not the point



This was working like a charm, but the battery life has been unexpectedly short. It was brand new, and I made some sporadic tests with a short delay, with no abnormal heat coming from anywhere.



When I was satisfied, I put the 30 minutes delay and leave it alone (which was maybe a bit hazardous?), but after less than 24 hours the battery was 5.4 V dead. The 30 minutes delay was approximately respected for its lifespan though.



What could explain such a short battery life? Could it be the 5 V regulator? How could I build a long-lasting circuit?



PS: I'm still trying to Fritzing some diagram, but this takes age for noobs like me...



I used a 6lp3146 generic brand alkaline 9 V battery which apparently provided 300-500 mAh at 100 mA current, which is far more than what my circuit use.



Here is all information I could gather from the datasheet:



+-----------------+-------------+----------+-----------+---------+
| | DHT11 | STX882 | ATmega328 | 7805reg |
+-----------------+-------------+----------+-----------+---------+
| Voltage | 3-5.5 V | 1.2-6 V | 2.7-5.5 V | |
+-----------------+-------------+----------+-----------+---------+
| Active current | 0.5-2.5 mA | 34 mA | 1.5 mA | |
+-----------------+-------------+----------+-----------+---------+
| Standby current | 0.1-0.15 mA | <0.01 µA | 1 µA | 4-8 mA* |
+-----------------+-------------+----------+-----------+---------+
*"bias current"


If I understand correctly, my system is active for a few seconds every 30 minutes, so the standby current is all that should matter, and it is indeed driven by the 7805 regulator.



So yes, in the worst case, with 300 mAh I should be able to keep the system alive for only 40 hours.



Is there a way I could feed my system 5 V for a much longer time without a much bigger size?



For the record, here is a very good video about LM regulators vs. buck converters: Buck converter vs. linear voltage regulator - practical comparison







voltage-regulator battery-operated low-battery






share|improve this question
















share|improve this question













share|improve this question




share|improve this question








edited Jun 16 at 9:31







Dan Chaltiel

















asked Jun 14 at 19:07









Dan ChaltielDan Chaltiel

1651 silver badge9 bronze badges




1651 silver badge9 bronze badges










  • 3




    $begingroup$
    I suggest using the LowPower library or similar to put the ATmega to sleep between measurements.
    $endgroup$
    – calcium3000
    Jun 14 at 19:11






  • 2




    $begingroup$
    How short is short?
    $endgroup$
    – Scott Seidman
    Jun 14 at 19:34






  • 1




    $begingroup$
    @Jasen According to this link, 78L05 has 3mA bias current, which is lower but far from being enough to correct my problem.
    $endgroup$
    – Dan Chaltiel
    Jun 15 at 10:11






  • 4




    $begingroup$
    LP2950 is <140uA. MCP1703 is 2uA. "Here is all information I could gather from the datasheet:" - don't rely on datasheets, measure the standby currents.
    $endgroup$
    – Bruce Abbott
    Jun 15 at 12:55






  • 4




    $begingroup$
    Are you absolutely married to the 9v battery? Why?
    $endgroup$
    – Harper
    Jun 15 at 14:35












  • 3




    $begingroup$
    I suggest using the LowPower library or similar to put the ATmega to sleep between measurements.
    $endgroup$
    – calcium3000
    Jun 14 at 19:11






  • 2




    $begingroup$
    How short is short?
    $endgroup$
    – Scott Seidman
    Jun 14 at 19:34






  • 1




    $begingroup$
    @Jasen According to this link, 78L05 has 3mA bias current, which is lower but far from being enough to correct my problem.
    $endgroup$
    – Dan Chaltiel
    Jun 15 at 10:11






  • 4




    $begingroup$
    LP2950 is <140uA. MCP1703 is 2uA. "Here is all information I could gather from the datasheet:" - don't rely on datasheets, measure the standby currents.
    $endgroup$
    – Bruce Abbott
    Jun 15 at 12:55






  • 4




    $begingroup$
    Are you absolutely married to the 9v battery? Why?
    $endgroup$
    – Harper
    Jun 15 at 14:35







3




3




$begingroup$
I suggest using the LowPower library or similar to put the ATmega to sleep between measurements.
$endgroup$
– calcium3000
Jun 14 at 19:11




$begingroup$
I suggest using the LowPower library or similar to put the ATmega to sleep between measurements.
$endgroup$
– calcium3000
Jun 14 at 19:11




2




2




$begingroup$
How short is short?
$endgroup$
– Scott Seidman
Jun 14 at 19:34




$begingroup$
How short is short?
$endgroup$
– Scott Seidman
Jun 14 at 19:34




1




1




$begingroup$
@Jasen According to this link, 78L05 has 3mA bias current, which is lower but far from being enough to correct my problem.
$endgroup$
– Dan Chaltiel
Jun 15 at 10:11




$begingroup$
@Jasen According to this link, 78L05 has 3mA bias current, which is lower but far from being enough to correct my problem.
$endgroup$
– Dan Chaltiel
Jun 15 at 10:11




4




4




$begingroup$
LP2950 is <140uA. MCP1703 is 2uA. "Here is all information I could gather from the datasheet:" - don't rely on datasheets, measure the standby currents.
$endgroup$
– Bruce Abbott
Jun 15 at 12:55




$begingroup$
LP2950 is <140uA. MCP1703 is 2uA. "Here is all information I could gather from the datasheet:" - don't rely on datasheets, measure the standby currents.
$endgroup$
– Bruce Abbott
Jun 15 at 12:55




4




4




$begingroup$
Are you absolutely married to the 9v battery? Why?
$endgroup$
– Harper
Jun 15 at 14:35




$begingroup$
Are you absolutely married to the 9v battery? Why?
$endgroup$
– Harper
Jun 15 at 14:35










10 Answers
10






active

oldest

votes


















26
















$begingroup$


What could explain such a short battery life? Could it be the 5v regulator?




As mentioned, the 7805 has about 4mA of quiescent current. You need to find a data sheet for the battery (Eveready has nice battery datasheets, if you're using an alkaline cell). It's probably no more than 100mAh -- 100mAh / 4mA = 25 hours, so that should say something to you.




How could I build a long-lasting circuit?




The 7805 is old technology. There are better newer linear regulators out there. You should be able to easily find something that uses 10 times less quiescent current, and with digging even less than that.



To use even less power you'd use a buck converter that's specifically designed for low quiescent current -- but I gather that you're not ready to design one into a board at the component level. There may be a module out there that'll do the job, but you'll need to shop around for it. TI does have some buck converter modules, but you'll want to pay a lot of attention to their capabilities, both for maximum current delivery and quiescent current.



To use less power yet, do everything that you can to minimize the current consumption of your circuit when it is quiescent. This will require careful use of the microprocessor's sleep function, as well as managing how the board is powered (for example, if it only comes on once every 30 minutes, you may well want to turn off power to the radio and the humidity-reading portions of the circuit).



Measure the current consumption in all modes of operation, and use this to determine which modes are the worst offenders overall, then concentrate on minimizing the currents in those modes if you can.






share|improve this answer












$endgroup$










  • 2




    $begingroup$
    The thing sitting quiet for 30 minutes then taking a measurement and sending it, then going back to sleep. So the quiescent current can't be ignored.
    $endgroup$
    – TimWescott
    Jun 14 at 20:13






  • 3




    $begingroup$
    I meant: in idle mode, the 7805 will still be loaded, so it is not only drawing its own quiescent current but also some load current in a inefficient way.
    $endgroup$
    – Huisman
    Jun 14 at 20:30






  • 6




    $begingroup$
    I googled about buck converters and I think I am indeed not ready for this! I think I'm going to try with a LM2936 (15µA of quiescent current), does it seem good to you? Turning of the current of other components when idling is very interesting too, I'm going to see if it is simple enough to implement.
    $endgroup$
    – Dan Chaltiel
    Jun 14 at 21:57






  • 2




    $begingroup$
    @DanChaltiel You can get buck converters marketed as "linear regulator replacements" which contain all the circuitry pre-made for you, including the inductor, and are used exactly the same as you would use a linear regulator. They're not as flexible as making your own, but very handy little things to have when you're not familiar with the design process or just can't be bothered.
    $endgroup$
    – Hearth
    Jun 15 at 18:11






  • 4




    $begingroup$
    @Michael it's always good to do a quick web search before saying something definitive in these ever-changing times. The very first hit I got on a search for "low quiescent current buck converter" came up with one that has a 360nA quiescent current. And a 9V to 5V conversion via a linear regulator is, by definition, 55% efficient while this thing is 90% efficient.
    $endgroup$
    – TimWescott
    Jun 16 at 18:27


















12
















$begingroup$

All those parts can run from 3 to 5V so use a battery that doesn't need a regulator, a 16500 Li-ion cell, or a 3xAAA battery pack are about the same size as the 9V and produce voltages in that range. (or even a Li-po cell)



Without the regulator the microcontroller can shut down and the circuit will only need a few microamps.






share|improve this answer












$endgroup$










  • 2




    $begingroup$
    Or three “D” cells and change them once a season... D cells are the sweetspot for durability vs cost...
    $endgroup$
    – Harper
    Jun 15 at 14:27







  • 1




    $begingroup$
    @Harper: or 3x NiMH rechargeable AA batteries. You only have to buy them once, and modern low-self-discharge cells are widely available. +1 this answer: a 9V is good for a smoke detector that actually wants the voltage, and the burst power capability, but bad if you need to regulate it down.
    $endgroup$
    – Peter Cordes
    Jun 15 at 15:03






  • 2




    $begingroup$
    Careful using a lipo, make sure you get a protected cell or have in-circuit overdischarge protection. At least if you want to ever be able to recharge it again. Then again, if your circuit's load cuts out due to undervoltage you may be fine without it.
    $endgroup$
    – Hearth
    Jun 15 at 18:12


















11
















$begingroup$

The idle current of a 7805 regulator is around 4 mA so, armed with the ampere hour capacity of your battery, work out how long it will last with a continuous drain of 4 mA.



If you establish that is the problem, you will find that there are plenty of regulators having a significantly lower quiescent current.



Once the battery drops to about 7 volts you are on a slippery declining slope because the 7805 regulator requires a couple of volts headroom to regulate properly and I would estimate (a quick guess) that at round about 6.5 volts the circuit will fail.



Given what I’ve just mentioned, I estimate that only 50% of the battery’s stated capacity is usable before the circuit gives up. Bear that in mind.






share|improve this answer












$endgroup$






















    10
















    $begingroup$

    I'm running similar sensor nodes with much better results. My setup has a few differences to yours:



    • I'm running the µc directly (no regulator) from rechargable 1S LiPo batteries (3.7 V nominal) originally sold (very cheap and with a matching USB charger) for mini-drones. The whole voltage range (4.3 V - 3.5 V) is acceptable for the µc. 1

    • I power the peripherals (the sensor and the transmitter in your case) from a port pin that I can turn on before measurement and turn off afterwards. (I'm using BME280 instead of DHT11 but the power draw shouldn't be a problem.)

    • After transmitting the measurement and switching off the peripherals, I send the µc to deep sleep. 2

    1 I'm successfully using ESP8266s, although of course I would never recommend that because their documented absolute maximum Vcc is 3.6 V I think.
    2 For my ESP8266 waking up from deep sleep is a reboot, so the code will start running at the top of setup(), but with your ATmega328 this isn't an issue.






    share|improve this answer












    $endgroup$














    • $begingroup$
      Would you mind giving me the reference of your battery? Powering the whole sensor with a port pin is a great idea! (I'd think it would be too much current for the µc to handle). Thanks for the DeepSleep ref too, it will help a lot.
      $endgroup$
      – Dan Chaltiel
      Jun 15 at 18:43







    • 1




      $begingroup$
      @DanChaltiel Just search your local shopping platform for "1S LiPo" and you should find something like this (4 x 1200 mAh) or this (10000 mAh).
      $endgroup$
      – AndreKR
      Jun 15 at 19:28











    • $begingroup$
      @DanChaltiel The datasheets you linked say the sensor needs 2.5 mA, the transmitter 34 mA and the µc can handle 40, so no issue there. (And usually they can handle even more for short periods of time.)
      $endgroup$
      – AndreKR
      Jun 15 at 19:32











    • $begingroup$
      Did you consider putting a diode or something in series with your batteries to drop a fraction of a volt? Or is the current so low that even a diode doesn't drop much?
      $endgroup$
      – Peter Cordes
      Jun 16 at 3:09






    • 2




      $begingroup$
      One thing apart from current to consider when powering peripherals (sensors etc.) with I/O pins: Make sure the peripheral is not unintentionally powered via bus interface lines etc. We had issues where an I²C sensor was still receiving current from the I²C pull-up resistors.
      $endgroup$
      – Michael
      Jun 16 at 16:13


















    4
















    $begingroup$

    Very similar to "how come my solar/battery/inverter system has so little range?" > because the inverter is spun up all the time. Use different loads that work on direct battery and eliminate unnecessary voltage conversion.



    You've done engineering 101, you've slapped the bits together and they work. Engineering 202 is making them work efficiently enough to be useful.




    As above, junk the inverte-—I mean regulator. Select batteries that can run it straight, such as three 1.5V batteries @ 4.5 volts. (Two would not suffice as they would drop below 3V too soon; or maybe; try it!)



    Also think about larger batteries - - 9Vs are stupid-small capacity, especially when throwing away 2/3 of the capacity! (The electronics needs 3V, you are taking 9V and throwing the rest away as heat). Think big - D cells are your friend if you want longevity.



    Deer cameras typically have two complete banks of D-cells, you can use either or both, and can run a whole season.



    Also, the ATMega's sleep current draw is very impressive, but the STX882 and the sensor, not so much. See if you can find a way to have the ATMega physically shut off power to the other devices when not needed. The cheapest, scungiest way to do this is a small relay, but a power transistor should also do the trick.




    One last trick. It may not be worth doing depending on what duty cycle the system is powered up, but it's worth mentioning. In recent years CPUs went from 5V to 3.3V. Why? Because they operate on current; voltage beyond minimums doesn't aid operation and just dissipates more heat. As CPUs got more powerful, thermal issues became the limiting factor, so dropping voltage to minimums allowed cooler running and more performance on the same heat sink. The same applies to your electronics.



    You are aiming to run at 5V, the high side of the allowable voltage range. My 3xAA proposal puts you at 4.5V but consider making a different battery choice that goes even lower: such as Lithium batteries or three NiCd/NiMH (3.6V). NiMH has more capacity, but NiCD has truly amazing resistance to abuse and deep discharge.






    share|improve this answer












    $endgroup$














    • $begingroup$
      You are absolutely right, I'm heading to 202 and your answer is very instructive in this way. I always thought recommended voltage was 5V, being able to operate at 3V will simplify things a lot. Just a thing, how come "ATMega's sleep current draw is very impressive, but the STX882 not so much", when it is 100 times lower?
      $endgroup$
      – Dan Chaltiel
      Jun 15 at 16:56










    • $begingroup$
      Whoops, my bad.
      $endgroup$
      – Harper
      Jun 15 at 17:23










    • $begingroup$
      In recent years CPUs went from 5V to 3.3V. That was a few years ago now :P These days CPUs program the voltage regulators on the mobo to run at the bare minimum voltage possible for the current frequency, barely more than the band-gap. Power scales with V^2 for CMOS logic (pumping charge into capacitive gate loads). e.g. my desktop runs its i7-6700 Skylake CPU at something like 1.25V depending on turbo vs. idle clock speed.
      $endgroup$
      – Peter Cordes
      Jun 16 at 3:29










    • $begingroup$
      There was a good talk at IDF2015 about Skylake power management that got into some of the tradeoffs of modern (high end desktop/laptop, not microcontroller) CPU power management. en.wikichip.org/w/images/8/83/…. There used to be audio to go with those slides (from an Intel architect), but that seems to have disappeared :( Maybe still worth flipping through the slides if you're curious about that sort of thing.
      $endgroup$
      – Peter Cordes
      Jun 16 at 3:30











    • $begingroup$
      Anyway, since CPUs want a programmable load-varying amount of voltage, but at high current, mobos power the CPU voltage regulars from the +12V supply. Most of the current demand on a modern PC power supply is on the 12V line, with CPU and GPU having their own DC-DC converters. (Modern DRAM runs at 1.2V for DDR4, down from 1.35V for DDR3L.) So again mobos power that from a DC-DC converter located near the DRAM. Or when you said CPUs, were you just talking about microcontrollers like the one the OP is using? If so, sorry for the tangent. :P
      $endgroup$
      – Peter Cordes
      Jun 16 at 3:37



















    3
















    $begingroup$

    Use step up converter instead



    This is how I do similar projects. I use 3xAA which gives me 2.5V-4.8V this is within the operational range of atmega, I connect this to a step up converter with disable pin, when disabled the converter consumes near to nothing and passes the voltage through. When atmega wakes up and needs to make measurement it will turn the converter on, finds 5V on VCC, do measurements and transmit, disable converter, go back to sleep. It lasts years.






    share|improve this answer










    $endgroup$






















      2
















      $begingroup$

      According to your numbers, you're getting expected behavior, between your sensor, your microcontroller, and your regulator (8ma). If you want better, sleep the controller, switch the sensor off, and get a more suitable regulator.






      share|improve this answer










      $endgroup$






















        2
















        $begingroup$

        1. Measure what's the actual current drain in the idle and active states. Use an ammeter between the battery and the 7805 input. A typical new 9V battery has more than 300 mAh, and the 7805 quiescent current alone couldn't really consume it all - something's fishy!
          I've measured a lot of 9V batteries and they are typically 500-600 mAh. The caveat is that they are all alkaline, and if you're interested in getting the longest lifespan, of course you need to use alkaline batteries.


        2. Is there a real reason to use disposable 9V batteries in your application? Have you considered something like 3× or 4× AA?






        share|improve this answer










        $endgroup$














        • $begingroup$
          I genuinely thought that 9v battery would last longer. I was apparently wrong.
          $endgroup$
          – Dan Chaltiel
          Jun 15 at 16:29










        • $begingroup$
          Isn't there a mistake in the sentence (alkaline twice)? "The caveat is that they are all alkaline, and if you're interested in getting the longest lifespan, of course you need to use alkaline batteries."
          $endgroup$
          – Dan Chaltiel
          Jun 15 at 16:39






        • 1




          $begingroup$
          It's confusing, sorry. I meant that my measurements are alkaline only, which is the one you should use if you want the longest life. Your battery might have been zinc-carbon, which could partly explain its quick death, yet I think you should first verify what the actual consumption is.
          $endgroup$
          – anrieff
          Jun 15 at 19:28


















        1
















        $begingroup$

        From the delay and loop functions looks like you are using Arduino code.
        The delay function is a active loop, it will not put the microcontroller to sleep!
        The Arduino API doesn't have support for sleep mode.



        Read the ATmega328P datasheet and see page 34 for how to put the device to sleep mode.






        share|improve this answer










        $endgroup$














        • $begingroup$
          What about deepsleep?
          $endgroup$
          – Dan Chaltiel
          Jun 16 at 14:53






        • 1




          $begingroup$
          @dan-chaltiel That's only for the SAMD21 MCUs like MKRZero, MKR1000 and MKRFox1200. (arduino.cc/en/Reference/ArduinoLowPower)
          $endgroup$
          – paf.goncalves
          Jun 16 at 22:56


















        1
















        $begingroup$

        IMPORTANT: If you can power down the DHT11 humidity sensor between uses you MAY be able to extend the battery life by a factor of 3 or 4.



        The DHT11 has a quiescent current of 100-150 uA in sleep mode. You have to design to the worst case value.

        On power up it requires 1 second "to clear its head" (note 4. page 5)

        and then there is interface setup time (maybe a few 10's of ms).

        It is not obvious from the data sheet whether response time is affected by being powered down, but probably not .



        Depending on the time between activations the powering down of the DHT11 could reduce system quiescent current from around 200 uA to around 50 uA.

        Well worth looking at.




        LM2936 Regulator:



        The LM2936 that you mention is a superb regulator if it meets your requirements. Low dropout, low quiescent current, range of output voltages available.



        I used them long ago in a product which needed their low Iq and was very pleased with them. Hmmm - that was about 1993 - 25+ years - an oldie but a goody.



        Iout max is nominally 50 mA - which meets your tabulated need.

        Iq is 10 uA at 100 uA load - and less at much lower loads.

        Vin is 5.5 - 40V and in fact probably closer than that to Vout.
        You can get 5V and 3V3 versions.



        Your sleep mode load current is easily under 200 uA.

        At 200 uA you'd get 100/.2 = 500 hours sleep operation per 100 mAh of battery.

        So about 20 days per 100 mAh.

        So say 60 days or two months with an Alkaline "9V" 300 - 500 mAH battery erring on the conservative side.
        Use 6 x 1.5V Alkaline AA cells (about 3000 mAh) and you should get approaching 2 years.




        Direct operation from 3 x AA alkalines gives Vin from 5V initial (up to 1.65V/cell) and 3.3V at 1.1V/cell (about dead). So about as long as 6 AA Alkalines with comnstant voltage output. If you can tolerate 3.3 - 5V input 'just use 3 x Alkalines. AA for almost 2 year operation. AAA for less.






        share|improve this answer












        $endgroup$
















          Your Answer






          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("schematics", function ()
          StackExchange.schematics.init();
          );
          , "cicuitlab");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "135"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f443657%2fwould-a-7805-5-v-regulator-drain-a-9-v-battery%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown


























          10 Answers
          10






          active

          oldest

          votes








          10 Answers
          10






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          26
















          $begingroup$


          What could explain such a short battery life? Could it be the 5v regulator?




          As mentioned, the 7805 has about 4mA of quiescent current. You need to find a data sheet for the battery (Eveready has nice battery datasheets, if you're using an alkaline cell). It's probably no more than 100mAh -- 100mAh / 4mA = 25 hours, so that should say something to you.




          How could I build a long-lasting circuit?




          The 7805 is old technology. There are better newer linear regulators out there. You should be able to easily find something that uses 10 times less quiescent current, and with digging even less than that.



          To use even less power you'd use a buck converter that's specifically designed for low quiescent current -- but I gather that you're not ready to design one into a board at the component level. There may be a module out there that'll do the job, but you'll need to shop around for it. TI does have some buck converter modules, but you'll want to pay a lot of attention to their capabilities, both for maximum current delivery and quiescent current.



          To use less power yet, do everything that you can to minimize the current consumption of your circuit when it is quiescent. This will require careful use of the microprocessor's sleep function, as well as managing how the board is powered (for example, if it only comes on once every 30 minutes, you may well want to turn off power to the radio and the humidity-reading portions of the circuit).



          Measure the current consumption in all modes of operation, and use this to determine which modes are the worst offenders overall, then concentrate on minimizing the currents in those modes if you can.






          share|improve this answer












          $endgroup$










          • 2




            $begingroup$
            The thing sitting quiet for 30 minutes then taking a measurement and sending it, then going back to sleep. So the quiescent current can't be ignored.
            $endgroup$
            – TimWescott
            Jun 14 at 20:13






          • 3




            $begingroup$
            I meant: in idle mode, the 7805 will still be loaded, so it is not only drawing its own quiescent current but also some load current in a inefficient way.
            $endgroup$
            – Huisman
            Jun 14 at 20:30






          • 6




            $begingroup$
            I googled about buck converters and I think I am indeed not ready for this! I think I'm going to try with a LM2936 (15µA of quiescent current), does it seem good to you? Turning of the current of other components when idling is very interesting too, I'm going to see if it is simple enough to implement.
            $endgroup$
            – Dan Chaltiel
            Jun 14 at 21:57






          • 2




            $begingroup$
            @DanChaltiel You can get buck converters marketed as "linear regulator replacements" which contain all the circuitry pre-made for you, including the inductor, and are used exactly the same as you would use a linear regulator. They're not as flexible as making your own, but very handy little things to have when you're not familiar with the design process or just can't be bothered.
            $endgroup$
            – Hearth
            Jun 15 at 18:11






          • 4




            $begingroup$
            @Michael it's always good to do a quick web search before saying something definitive in these ever-changing times. The very first hit I got on a search for "low quiescent current buck converter" came up with one that has a 360nA quiescent current. And a 9V to 5V conversion via a linear regulator is, by definition, 55% efficient while this thing is 90% efficient.
            $endgroup$
            – TimWescott
            Jun 16 at 18:27















          26
















          $begingroup$


          What could explain such a short battery life? Could it be the 5v regulator?




          As mentioned, the 7805 has about 4mA of quiescent current. You need to find a data sheet for the battery (Eveready has nice battery datasheets, if you're using an alkaline cell). It's probably no more than 100mAh -- 100mAh / 4mA = 25 hours, so that should say something to you.




          How could I build a long-lasting circuit?




          The 7805 is old technology. There are better newer linear regulators out there. You should be able to easily find something that uses 10 times less quiescent current, and with digging even less than that.



          To use even less power you'd use a buck converter that's specifically designed for low quiescent current -- but I gather that you're not ready to design one into a board at the component level. There may be a module out there that'll do the job, but you'll need to shop around for it. TI does have some buck converter modules, but you'll want to pay a lot of attention to their capabilities, both for maximum current delivery and quiescent current.



          To use less power yet, do everything that you can to minimize the current consumption of your circuit when it is quiescent. This will require careful use of the microprocessor's sleep function, as well as managing how the board is powered (for example, if it only comes on once every 30 minutes, you may well want to turn off power to the radio and the humidity-reading portions of the circuit).



          Measure the current consumption in all modes of operation, and use this to determine which modes are the worst offenders overall, then concentrate on minimizing the currents in those modes if you can.






          share|improve this answer












          $endgroup$










          • 2




            $begingroup$
            The thing sitting quiet for 30 minutes then taking a measurement and sending it, then going back to sleep. So the quiescent current can't be ignored.
            $endgroup$
            – TimWescott
            Jun 14 at 20:13






          • 3




            $begingroup$
            I meant: in idle mode, the 7805 will still be loaded, so it is not only drawing its own quiescent current but also some load current in a inefficient way.
            $endgroup$
            – Huisman
            Jun 14 at 20:30






          • 6




            $begingroup$
            I googled about buck converters and I think I am indeed not ready for this! I think I'm going to try with a LM2936 (15µA of quiescent current), does it seem good to you? Turning of the current of other components when idling is very interesting too, I'm going to see if it is simple enough to implement.
            $endgroup$
            – Dan Chaltiel
            Jun 14 at 21:57






          • 2




            $begingroup$
            @DanChaltiel You can get buck converters marketed as "linear regulator replacements" which contain all the circuitry pre-made for you, including the inductor, and are used exactly the same as you would use a linear regulator. They're not as flexible as making your own, but very handy little things to have when you're not familiar with the design process or just can't be bothered.
            $endgroup$
            – Hearth
            Jun 15 at 18:11






          • 4




            $begingroup$
            @Michael it's always good to do a quick web search before saying something definitive in these ever-changing times. The very first hit I got on a search for "low quiescent current buck converter" came up with one that has a 360nA quiescent current. And a 9V to 5V conversion via a linear regulator is, by definition, 55% efficient while this thing is 90% efficient.
            $endgroup$
            – TimWescott
            Jun 16 at 18:27













          26














          26










          26







          $begingroup$


          What could explain such a short battery life? Could it be the 5v regulator?




          As mentioned, the 7805 has about 4mA of quiescent current. You need to find a data sheet for the battery (Eveready has nice battery datasheets, if you're using an alkaline cell). It's probably no more than 100mAh -- 100mAh / 4mA = 25 hours, so that should say something to you.




          How could I build a long-lasting circuit?




          The 7805 is old technology. There are better newer linear regulators out there. You should be able to easily find something that uses 10 times less quiescent current, and with digging even less than that.



          To use even less power you'd use a buck converter that's specifically designed for low quiescent current -- but I gather that you're not ready to design one into a board at the component level. There may be a module out there that'll do the job, but you'll need to shop around for it. TI does have some buck converter modules, but you'll want to pay a lot of attention to their capabilities, both for maximum current delivery and quiescent current.



          To use less power yet, do everything that you can to minimize the current consumption of your circuit when it is quiescent. This will require careful use of the microprocessor's sleep function, as well as managing how the board is powered (for example, if it only comes on once every 30 minutes, you may well want to turn off power to the radio and the humidity-reading portions of the circuit).



          Measure the current consumption in all modes of operation, and use this to determine which modes are the worst offenders overall, then concentrate on minimizing the currents in those modes if you can.






          share|improve this answer












          $endgroup$




          What could explain such a short battery life? Could it be the 5v regulator?




          As mentioned, the 7805 has about 4mA of quiescent current. You need to find a data sheet for the battery (Eveready has nice battery datasheets, if you're using an alkaline cell). It's probably no more than 100mAh -- 100mAh / 4mA = 25 hours, so that should say something to you.




          How could I build a long-lasting circuit?




          The 7805 is old technology. There are better newer linear regulators out there. You should be able to easily find something that uses 10 times less quiescent current, and with digging even less than that.



          To use even less power you'd use a buck converter that's specifically designed for low quiescent current -- but I gather that you're not ready to design one into a board at the component level. There may be a module out there that'll do the job, but you'll need to shop around for it. TI does have some buck converter modules, but you'll want to pay a lot of attention to their capabilities, both for maximum current delivery and quiescent current.



          To use less power yet, do everything that you can to minimize the current consumption of your circuit when it is quiescent. This will require careful use of the microprocessor's sleep function, as well as managing how the board is powered (for example, if it only comes on once every 30 minutes, you may well want to turn off power to the radio and the humidity-reading portions of the circuit).



          Measure the current consumption in all modes of operation, and use this to determine which modes are the worst offenders overall, then concentrate on minimizing the currents in those modes if you can.







          share|improve this answer















          share|improve this answer




          share|improve this answer








          edited Jun 14 at 21:27

























          answered Jun 14 at 19:28









          TimWescottTimWescott

          15.6k1 gold badge14 silver badges29 bronze badges




          15.6k1 gold badge14 silver badges29 bronze badges










          • 2




            $begingroup$
            The thing sitting quiet for 30 minutes then taking a measurement and sending it, then going back to sleep. So the quiescent current can't be ignored.
            $endgroup$
            – TimWescott
            Jun 14 at 20:13






          • 3




            $begingroup$
            I meant: in idle mode, the 7805 will still be loaded, so it is not only drawing its own quiescent current but also some load current in a inefficient way.
            $endgroup$
            – Huisman
            Jun 14 at 20:30






          • 6




            $begingroup$
            I googled about buck converters and I think I am indeed not ready for this! I think I'm going to try with a LM2936 (15µA of quiescent current), does it seem good to you? Turning of the current of other components when idling is very interesting too, I'm going to see if it is simple enough to implement.
            $endgroup$
            – Dan Chaltiel
            Jun 14 at 21:57






          • 2




            $begingroup$
            @DanChaltiel You can get buck converters marketed as "linear regulator replacements" which contain all the circuitry pre-made for you, including the inductor, and are used exactly the same as you would use a linear regulator. They're not as flexible as making your own, but very handy little things to have when you're not familiar with the design process or just can't be bothered.
            $endgroup$
            – Hearth
            Jun 15 at 18:11






          • 4




            $begingroup$
            @Michael it's always good to do a quick web search before saying something definitive in these ever-changing times. The very first hit I got on a search for "low quiescent current buck converter" came up with one that has a 360nA quiescent current. And a 9V to 5V conversion via a linear regulator is, by definition, 55% efficient while this thing is 90% efficient.
            $endgroup$
            – TimWescott
            Jun 16 at 18:27












          • 2




            $begingroup$
            The thing sitting quiet for 30 minutes then taking a measurement and sending it, then going back to sleep. So the quiescent current can't be ignored.
            $endgroup$
            – TimWescott
            Jun 14 at 20:13






          • 3




            $begingroup$
            I meant: in idle mode, the 7805 will still be loaded, so it is not only drawing its own quiescent current but also some load current in a inefficient way.
            $endgroup$
            – Huisman
            Jun 14 at 20:30






          • 6




            $begingroup$
            I googled about buck converters and I think I am indeed not ready for this! I think I'm going to try with a LM2936 (15µA of quiescent current), does it seem good to you? Turning of the current of other components when idling is very interesting too, I'm going to see if it is simple enough to implement.
            $endgroup$
            – Dan Chaltiel
            Jun 14 at 21:57






          • 2




            $begingroup$
            @DanChaltiel You can get buck converters marketed as "linear regulator replacements" which contain all the circuitry pre-made for you, including the inductor, and are used exactly the same as you would use a linear regulator. They're not as flexible as making your own, but very handy little things to have when you're not familiar with the design process or just can't be bothered.
            $endgroup$
            – Hearth
            Jun 15 at 18:11






          • 4




            $begingroup$
            @Michael it's always good to do a quick web search before saying something definitive in these ever-changing times. The very first hit I got on a search for "low quiescent current buck converter" came up with one that has a 360nA quiescent current. And a 9V to 5V conversion via a linear regulator is, by definition, 55% efficient while this thing is 90% efficient.
            $endgroup$
            – TimWescott
            Jun 16 at 18:27







          2




          2




          $begingroup$
          The thing sitting quiet for 30 minutes then taking a measurement and sending it, then going back to sleep. So the quiescent current can't be ignored.
          $endgroup$
          – TimWescott
          Jun 14 at 20:13




          $begingroup$
          The thing sitting quiet for 30 minutes then taking a measurement and sending it, then going back to sleep. So the quiescent current can't be ignored.
          $endgroup$
          – TimWescott
          Jun 14 at 20:13




          3




          3




          $begingroup$
          I meant: in idle mode, the 7805 will still be loaded, so it is not only drawing its own quiescent current but also some load current in a inefficient way.
          $endgroup$
          – Huisman
          Jun 14 at 20:30




          $begingroup$
          I meant: in idle mode, the 7805 will still be loaded, so it is not only drawing its own quiescent current but also some load current in a inefficient way.
          $endgroup$
          – Huisman
          Jun 14 at 20:30




          6




          6




          $begingroup$
          I googled about buck converters and I think I am indeed not ready for this! I think I'm going to try with a LM2936 (15µA of quiescent current), does it seem good to you? Turning of the current of other components when idling is very interesting too, I'm going to see if it is simple enough to implement.
          $endgroup$
          – Dan Chaltiel
          Jun 14 at 21:57




          $begingroup$
          I googled about buck converters and I think I am indeed not ready for this! I think I'm going to try with a LM2936 (15µA of quiescent current), does it seem good to you? Turning of the current of other components when idling is very interesting too, I'm going to see if it is simple enough to implement.
          $endgroup$
          – Dan Chaltiel
          Jun 14 at 21:57




          2




          2




          $begingroup$
          @DanChaltiel You can get buck converters marketed as "linear regulator replacements" which contain all the circuitry pre-made for you, including the inductor, and are used exactly the same as you would use a linear regulator. They're not as flexible as making your own, but very handy little things to have when you're not familiar with the design process or just can't be bothered.
          $endgroup$
          – Hearth
          Jun 15 at 18:11




          $begingroup$
          @DanChaltiel You can get buck converters marketed as "linear regulator replacements" which contain all the circuitry pre-made for you, including the inductor, and are used exactly the same as you would use a linear regulator. They're not as flexible as making your own, but very handy little things to have when you're not familiar with the design process or just can't be bothered.
          $endgroup$
          – Hearth
          Jun 15 at 18:11




          4




          4




          $begingroup$
          @Michael it's always good to do a quick web search before saying something definitive in these ever-changing times. The very first hit I got on a search for "low quiescent current buck converter" came up with one that has a 360nA quiescent current. And a 9V to 5V conversion via a linear regulator is, by definition, 55% efficient while this thing is 90% efficient.
          $endgroup$
          – TimWescott
          Jun 16 at 18:27




          $begingroup$
          @Michael it's always good to do a quick web search before saying something definitive in these ever-changing times. The very first hit I got on a search for "low quiescent current buck converter" came up with one that has a 360nA quiescent current. And a 9V to 5V conversion via a linear regulator is, by definition, 55% efficient while this thing is 90% efficient.
          $endgroup$
          – TimWescott
          Jun 16 at 18:27













          12
















          $begingroup$

          All those parts can run from 3 to 5V so use a battery that doesn't need a regulator, a 16500 Li-ion cell, or a 3xAAA battery pack are about the same size as the 9V and produce voltages in that range. (or even a Li-po cell)



          Without the regulator the microcontroller can shut down and the circuit will only need a few microamps.






          share|improve this answer












          $endgroup$










          • 2




            $begingroup$
            Or three “D” cells and change them once a season... D cells are the sweetspot for durability vs cost...
            $endgroup$
            – Harper
            Jun 15 at 14:27







          • 1




            $begingroup$
            @Harper: or 3x NiMH rechargeable AA batteries. You only have to buy them once, and modern low-self-discharge cells are widely available. +1 this answer: a 9V is good for a smoke detector that actually wants the voltage, and the burst power capability, but bad if you need to regulate it down.
            $endgroup$
            – Peter Cordes
            Jun 15 at 15:03






          • 2




            $begingroup$
            Careful using a lipo, make sure you get a protected cell or have in-circuit overdischarge protection. At least if you want to ever be able to recharge it again. Then again, if your circuit's load cuts out due to undervoltage you may be fine without it.
            $endgroup$
            – Hearth
            Jun 15 at 18:12















          12
















          $begingroup$

          All those parts can run from 3 to 5V so use a battery that doesn't need a regulator, a 16500 Li-ion cell, or a 3xAAA battery pack are about the same size as the 9V and produce voltages in that range. (or even a Li-po cell)



          Without the regulator the microcontroller can shut down and the circuit will only need a few microamps.






          share|improve this answer












          $endgroup$










          • 2




            $begingroup$
            Or three “D” cells and change them once a season... D cells are the sweetspot for durability vs cost...
            $endgroup$
            – Harper
            Jun 15 at 14:27







          • 1




            $begingroup$
            @Harper: or 3x NiMH rechargeable AA batteries. You only have to buy them once, and modern low-self-discharge cells are widely available. +1 this answer: a 9V is good for a smoke detector that actually wants the voltage, and the burst power capability, but bad if you need to regulate it down.
            $endgroup$
            – Peter Cordes
            Jun 15 at 15:03






          • 2




            $begingroup$
            Careful using a lipo, make sure you get a protected cell or have in-circuit overdischarge protection. At least if you want to ever be able to recharge it again. Then again, if your circuit's load cuts out due to undervoltage you may be fine without it.
            $endgroup$
            – Hearth
            Jun 15 at 18:12













          12














          12










          12







          $begingroup$

          All those parts can run from 3 to 5V so use a battery that doesn't need a regulator, a 16500 Li-ion cell, or a 3xAAA battery pack are about the same size as the 9V and produce voltages in that range. (or even a Li-po cell)



          Without the regulator the microcontroller can shut down and the circuit will only need a few microamps.






          share|improve this answer












          $endgroup$



          All those parts can run from 3 to 5V so use a battery that doesn't need a regulator, a 16500 Li-ion cell, or a 3xAAA battery pack are about the same size as the 9V and produce voltages in that range. (or even a Li-po cell)



          Without the regulator the microcontroller can shut down and the circuit will only need a few microamps.







          share|improve this answer















          share|improve this answer




          share|improve this answer








          edited Jun 17 at 3:28

























          answered Jun 15 at 12:22









          JasenJasen

          14.6k1 gold badge18 silver badges36 bronze badges




          14.6k1 gold badge18 silver badges36 bronze badges










          • 2




            $begingroup$
            Or three “D” cells and change them once a season... D cells are the sweetspot for durability vs cost...
            $endgroup$
            – Harper
            Jun 15 at 14:27







          • 1




            $begingroup$
            @Harper: or 3x NiMH rechargeable AA batteries. You only have to buy them once, and modern low-self-discharge cells are widely available. +1 this answer: a 9V is good for a smoke detector that actually wants the voltage, and the burst power capability, but bad if you need to regulate it down.
            $endgroup$
            – Peter Cordes
            Jun 15 at 15:03






          • 2




            $begingroup$
            Careful using a lipo, make sure you get a protected cell or have in-circuit overdischarge protection. At least if you want to ever be able to recharge it again. Then again, if your circuit's load cuts out due to undervoltage you may be fine without it.
            $endgroup$
            – Hearth
            Jun 15 at 18:12












          • 2




            $begingroup$
            Or three “D” cells and change them once a season... D cells are the sweetspot for durability vs cost...
            $endgroup$
            – Harper
            Jun 15 at 14:27







          • 1




            $begingroup$
            @Harper: or 3x NiMH rechargeable AA batteries. You only have to buy them once, and modern low-self-discharge cells are widely available. +1 this answer: a 9V is good for a smoke detector that actually wants the voltage, and the burst power capability, but bad if you need to regulate it down.
            $endgroup$
            – Peter Cordes
            Jun 15 at 15:03






          • 2




            $begingroup$
            Careful using a lipo, make sure you get a protected cell or have in-circuit overdischarge protection. At least if you want to ever be able to recharge it again. Then again, if your circuit's load cuts out due to undervoltage you may be fine without it.
            $endgroup$
            – Hearth
            Jun 15 at 18:12







          2




          2




          $begingroup$
          Or three “D” cells and change them once a season... D cells are the sweetspot for durability vs cost...
          $endgroup$
          – Harper
          Jun 15 at 14:27





          $begingroup$
          Or three “D” cells and change them once a season... D cells are the sweetspot for durability vs cost...
          $endgroup$
          – Harper
          Jun 15 at 14:27





          1




          1




          $begingroup$
          @Harper: or 3x NiMH rechargeable AA batteries. You only have to buy them once, and modern low-self-discharge cells are widely available. +1 this answer: a 9V is good for a smoke detector that actually wants the voltage, and the burst power capability, but bad if you need to regulate it down.
          $endgroup$
          – Peter Cordes
          Jun 15 at 15:03




          $begingroup$
          @Harper: or 3x NiMH rechargeable AA batteries. You only have to buy them once, and modern low-self-discharge cells are widely available. +1 this answer: a 9V is good for a smoke detector that actually wants the voltage, and the burst power capability, but bad if you need to regulate it down.
          $endgroup$
          – Peter Cordes
          Jun 15 at 15:03




          2




          2




          $begingroup$
          Careful using a lipo, make sure you get a protected cell or have in-circuit overdischarge protection. At least if you want to ever be able to recharge it again. Then again, if your circuit's load cuts out due to undervoltage you may be fine without it.
          $endgroup$
          – Hearth
          Jun 15 at 18:12




          $begingroup$
          Careful using a lipo, make sure you get a protected cell or have in-circuit overdischarge protection. At least if you want to ever be able to recharge it again. Then again, if your circuit's load cuts out due to undervoltage you may be fine without it.
          $endgroup$
          – Hearth
          Jun 15 at 18:12











          11
















          $begingroup$

          The idle current of a 7805 regulator is around 4 mA so, armed with the ampere hour capacity of your battery, work out how long it will last with a continuous drain of 4 mA.



          If you establish that is the problem, you will find that there are plenty of regulators having a significantly lower quiescent current.



          Once the battery drops to about 7 volts you are on a slippery declining slope because the 7805 regulator requires a couple of volts headroom to regulate properly and I would estimate (a quick guess) that at round about 6.5 volts the circuit will fail.



          Given what I’ve just mentioned, I estimate that only 50% of the battery’s stated capacity is usable before the circuit gives up. Bear that in mind.






          share|improve this answer












          $endgroup$



















            11
















            $begingroup$

            The idle current of a 7805 regulator is around 4 mA so, armed with the ampere hour capacity of your battery, work out how long it will last with a continuous drain of 4 mA.



            If you establish that is the problem, you will find that there are plenty of regulators having a significantly lower quiescent current.



            Once the battery drops to about 7 volts you are on a slippery declining slope because the 7805 regulator requires a couple of volts headroom to regulate properly and I would estimate (a quick guess) that at round about 6.5 volts the circuit will fail.



            Given what I’ve just mentioned, I estimate that only 50% of the battery’s stated capacity is usable before the circuit gives up. Bear that in mind.






            share|improve this answer












            $endgroup$

















              11














              11










              11







              $begingroup$

              The idle current of a 7805 regulator is around 4 mA so, armed with the ampere hour capacity of your battery, work out how long it will last with a continuous drain of 4 mA.



              If you establish that is the problem, you will find that there are plenty of regulators having a significantly lower quiescent current.



              Once the battery drops to about 7 volts you are on a slippery declining slope because the 7805 regulator requires a couple of volts headroom to regulate properly and I would estimate (a quick guess) that at round about 6.5 volts the circuit will fail.



              Given what I’ve just mentioned, I estimate that only 50% of the battery’s stated capacity is usable before the circuit gives up. Bear that in mind.






              share|improve this answer












              $endgroup$



              The idle current of a 7805 regulator is around 4 mA so, armed with the ampere hour capacity of your battery, work out how long it will last with a continuous drain of 4 mA.



              If you establish that is the problem, you will find that there are plenty of regulators having a significantly lower quiescent current.



              Once the battery drops to about 7 volts you are on a slippery declining slope because the 7805 regulator requires a couple of volts headroom to regulate properly and I would estimate (a quick guess) that at round about 6.5 volts the circuit will fail.



              Given what I’ve just mentioned, I estimate that only 50% of the battery’s stated capacity is usable before the circuit gives up. Bear that in mind.







              share|improve this answer















              share|improve this answer




              share|improve this answer








              edited Jun 16 at 11:06

























              answered Jun 14 at 19:10









              Andy akaAndy aka

              256k11 gold badges197 silver badges453 bronze badges




              256k11 gold badges197 silver badges453 bronze badges
























                  10
















                  $begingroup$

                  I'm running similar sensor nodes with much better results. My setup has a few differences to yours:



                  • I'm running the µc directly (no regulator) from rechargable 1S LiPo batteries (3.7 V nominal) originally sold (very cheap and with a matching USB charger) for mini-drones. The whole voltage range (4.3 V - 3.5 V) is acceptable for the µc. 1

                  • I power the peripherals (the sensor and the transmitter in your case) from a port pin that I can turn on before measurement and turn off afterwards. (I'm using BME280 instead of DHT11 but the power draw shouldn't be a problem.)

                  • After transmitting the measurement and switching off the peripherals, I send the µc to deep sleep. 2

                  1 I'm successfully using ESP8266s, although of course I would never recommend that because their documented absolute maximum Vcc is 3.6 V I think.
                  2 For my ESP8266 waking up from deep sleep is a reboot, so the code will start running at the top of setup(), but with your ATmega328 this isn't an issue.






                  share|improve this answer












                  $endgroup$














                  • $begingroup$
                    Would you mind giving me the reference of your battery? Powering the whole sensor with a port pin is a great idea! (I'd think it would be too much current for the µc to handle). Thanks for the DeepSleep ref too, it will help a lot.
                    $endgroup$
                    – Dan Chaltiel
                    Jun 15 at 18:43







                  • 1




                    $begingroup$
                    @DanChaltiel Just search your local shopping platform for "1S LiPo" and you should find something like this (4 x 1200 mAh) or this (10000 mAh).
                    $endgroup$
                    – AndreKR
                    Jun 15 at 19:28











                  • $begingroup$
                    @DanChaltiel The datasheets you linked say the sensor needs 2.5 mA, the transmitter 34 mA and the µc can handle 40, so no issue there. (And usually they can handle even more for short periods of time.)
                    $endgroup$
                    – AndreKR
                    Jun 15 at 19:32











                  • $begingroup$
                    Did you consider putting a diode or something in series with your batteries to drop a fraction of a volt? Or is the current so low that even a diode doesn't drop much?
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:09






                  • 2




                    $begingroup$
                    One thing apart from current to consider when powering peripherals (sensors etc.) with I/O pins: Make sure the peripheral is not unintentionally powered via bus interface lines etc. We had issues where an I²C sensor was still receiving current from the I²C pull-up resistors.
                    $endgroup$
                    – Michael
                    Jun 16 at 16:13















                  10
















                  $begingroup$

                  I'm running similar sensor nodes with much better results. My setup has a few differences to yours:



                  • I'm running the µc directly (no regulator) from rechargable 1S LiPo batteries (3.7 V nominal) originally sold (very cheap and with a matching USB charger) for mini-drones. The whole voltage range (4.3 V - 3.5 V) is acceptable for the µc. 1

                  • I power the peripherals (the sensor and the transmitter in your case) from a port pin that I can turn on before measurement and turn off afterwards. (I'm using BME280 instead of DHT11 but the power draw shouldn't be a problem.)

                  • After transmitting the measurement and switching off the peripherals, I send the µc to deep sleep. 2

                  1 I'm successfully using ESP8266s, although of course I would never recommend that because their documented absolute maximum Vcc is 3.6 V I think.
                  2 For my ESP8266 waking up from deep sleep is a reboot, so the code will start running at the top of setup(), but with your ATmega328 this isn't an issue.






                  share|improve this answer












                  $endgroup$














                  • $begingroup$
                    Would you mind giving me the reference of your battery? Powering the whole sensor with a port pin is a great idea! (I'd think it would be too much current for the µc to handle). Thanks for the DeepSleep ref too, it will help a lot.
                    $endgroup$
                    – Dan Chaltiel
                    Jun 15 at 18:43







                  • 1




                    $begingroup$
                    @DanChaltiel Just search your local shopping platform for "1S LiPo" and you should find something like this (4 x 1200 mAh) or this (10000 mAh).
                    $endgroup$
                    – AndreKR
                    Jun 15 at 19:28











                  • $begingroup$
                    @DanChaltiel The datasheets you linked say the sensor needs 2.5 mA, the transmitter 34 mA and the µc can handle 40, so no issue there. (And usually they can handle even more for short periods of time.)
                    $endgroup$
                    – AndreKR
                    Jun 15 at 19:32











                  • $begingroup$
                    Did you consider putting a diode or something in series with your batteries to drop a fraction of a volt? Or is the current so low that even a diode doesn't drop much?
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:09






                  • 2




                    $begingroup$
                    One thing apart from current to consider when powering peripherals (sensors etc.) with I/O pins: Make sure the peripheral is not unintentionally powered via bus interface lines etc. We had issues where an I²C sensor was still receiving current from the I²C pull-up resistors.
                    $endgroup$
                    – Michael
                    Jun 16 at 16:13













                  10














                  10










                  10







                  $begingroup$

                  I'm running similar sensor nodes with much better results. My setup has a few differences to yours:



                  • I'm running the µc directly (no regulator) from rechargable 1S LiPo batteries (3.7 V nominal) originally sold (very cheap and with a matching USB charger) for mini-drones. The whole voltage range (4.3 V - 3.5 V) is acceptable for the µc. 1

                  • I power the peripherals (the sensor and the transmitter in your case) from a port pin that I can turn on before measurement and turn off afterwards. (I'm using BME280 instead of DHT11 but the power draw shouldn't be a problem.)

                  • After transmitting the measurement and switching off the peripherals, I send the µc to deep sleep. 2

                  1 I'm successfully using ESP8266s, although of course I would never recommend that because their documented absolute maximum Vcc is 3.6 V I think.
                  2 For my ESP8266 waking up from deep sleep is a reboot, so the code will start running at the top of setup(), but with your ATmega328 this isn't an issue.






                  share|improve this answer












                  $endgroup$



                  I'm running similar sensor nodes with much better results. My setup has a few differences to yours:



                  • I'm running the µc directly (no regulator) from rechargable 1S LiPo batteries (3.7 V nominal) originally sold (very cheap and with a matching USB charger) for mini-drones. The whole voltage range (4.3 V - 3.5 V) is acceptable for the µc. 1

                  • I power the peripherals (the sensor and the transmitter in your case) from a port pin that I can turn on before measurement and turn off afterwards. (I'm using BME280 instead of DHT11 but the power draw shouldn't be a problem.)

                  • After transmitting the measurement and switching off the peripherals, I send the µc to deep sleep. 2

                  1 I'm successfully using ESP8266s, although of course I would never recommend that because their documented absolute maximum Vcc is 3.6 V I think.
                  2 For my ESP8266 waking up from deep sleep is a reboot, so the code will start running at the top of setup(), but with your ATmega328 this isn't an issue.







                  share|improve this answer















                  share|improve this answer




                  share|improve this answer








                  edited Jun 17 at 10:37

























                  answered Jun 15 at 17:56









                  AndreKRAndreKR

                  2,4382 gold badges14 silver badges27 bronze badges




                  2,4382 gold badges14 silver badges27 bronze badges














                  • $begingroup$
                    Would you mind giving me the reference of your battery? Powering the whole sensor with a port pin is a great idea! (I'd think it would be too much current for the µc to handle). Thanks for the DeepSleep ref too, it will help a lot.
                    $endgroup$
                    – Dan Chaltiel
                    Jun 15 at 18:43







                  • 1




                    $begingroup$
                    @DanChaltiel Just search your local shopping platform for "1S LiPo" and you should find something like this (4 x 1200 mAh) or this (10000 mAh).
                    $endgroup$
                    – AndreKR
                    Jun 15 at 19:28











                  • $begingroup$
                    @DanChaltiel The datasheets you linked say the sensor needs 2.5 mA, the transmitter 34 mA and the µc can handle 40, so no issue there. (And usually they can handle even more for short periods of time.)
                    $endgroup$
                    – AndreKR
                    Jun 15 at 19:32











                  • $begingroup$
                    Did you consider putting a diode or something in series with your batteries to drop a fraction of a volt? Or is the current so low that even a diode doesn't drop much?
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:09






                  • 2




                    $begingroup$
                    One thing apart from current to consider when powering peripherals (sensors etc.) with I/O pins: Make sure the peripheral is not unintentionally powered via bus interface lines etc. We had issues where an I²C sensor was still receiving current from the I²C pull-up resistors.
                    $endgroup$
                    – Michael
                    Jun 16 at 16:13
















                  • $begingroup$
                    Would you mind giving me the reference of your battery? Powering the whole sensor with a port pin is a great idea! (I'd think it would be too much current for the µc to handle). Thanks for the DeepSleep ref too, it will help a lot.
                    $endgroup$
                    – Dan Chaltiel
                    Jun 15 at 18:43







                  • 1




                    $begingroup$
                    @DanChaltiel Just search your local shopping platform for "1S LiPo" and you should find something like this (4 x 1200 mAh) or this (10000 mAh).
                    $endgroup$
                    – AndreKR
                    Jun 15 at 19:28











                  • $begingroup$
                    @DanChaltiel The datasheets you linked say the sensor needs 2.5 mA, the transmitter 34 mA and the µc can handle 40, so no issue there. (And usually they can handle even more for short periods of time.)
                    $endgroup$
                    – AndreKR
                    Jun 15 at 19:32











                  • $begingroup$
                    Did you consider putting a diode or something in series with your batteries to drop a fraction of a volt? Or is the current so low that even a diode doesn't drop much?
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:09






                  • 2




                    $begingroup$
                    One thing apart from current to consider when powering peripherals (sensors etc.) with I/O pins: Make sure the peripheral is not unintentionally powered via bus interface lines etc. We had issues where an I²C sensor was still receiving current from the I²C pull-up resistors.
                    $endgroup$
                    – Michael
                    Jun 16 at 16:13















                  $begingroup$
                  Would you mind giving me the reference of your battery? Powering the whole sensor with a port pin is a great idea! (I'd think it would be too much current for the µc to handle). Thanks for the DeepSleep ref too, it will help a lot.
                  $endgroup$
                  – Dan Chaltiel
                  Jun 15 at 18:43





                  $begingroup$
                  Would you mind giving me the reference of your battery? Powering the whole sensor with a port pin is a great idea! (I'd think it would be too much current for the µc to handle). Thanks for the DeepSleep ref too, it will help a lot.
                  $endgroup$
                  – Dan Chaltiel
                  Jun 15 at 18:43





                  1




                  1




                  $begingroup$
                  @DanChaltiel Just search your local shopping platform for "1S LiPo" and you should find something like this (4 x 1200 mAh) or this (10000 mAh).
                  $endgroup$
                  – AndreKR
                  Jun 15 at 19:28





                  $begingroup$
                  @DanChaltiel Just search your local shopping platform for "1S LiPo" and you should find something like this (4 x 1200 mAh) or this (10000 mAh).
                  $endgroup$
                  – AndreKR
                  Jun 15 at 19:28













                  $begingroup$
                  @DanChaltiel The datasheets you linked say the sensor needs 2.5 mA, the transmitter 34 mA and the µc can handle 40, so no issue there. (And usually they can handle even more for short periods of time.)
                  $endgroup$
                  – AndreKR
                  Jun 15 at 19:32





                  $begingroup$
                  @DanChaltiel The datasheets you linked say the sensor needs 2.5 mA, the transmitter 34 mA and the µc can handle 40, so no issue there. (And usually they can handle even more for short periods of time.)
                  $endgroup$
                  – AndreKR
                  Jun 15 at 19:32













                  $begingroup$
                  Did you consider putting a diode or something in series with your batteries to drop a fraction of a volt? Or is the current so low that even a diode doesn't drop much?
                  $endgroup$
                  – Peter Cordes
                  Jun 16 at 3:09




                  $begingroup$
                  Did you consider putting a diode or something in series with your batteries to drop a fraction of a volt? Or is the current so low that even a diode doesn't drop much?
                  $endgroup$
                  – Peter Cordes
                  Jun 16 at 3:09




                  2




                  2




                  $begingroup$
                  One thing apart from current to consider when powering peripherals (sensors etc.) with I/O pins: Make sure the peripheral is not unintentionally powered via bus interface lines etc. We had issues where an I²C sensor was still receiving current from the I²C pull-up resistors.
                  $endgroup$
                  – Michael
                  Jun 16 at 16:13




                  $begingroup$
                  One thing apart from current to consider when powering peripherals (sensors etc.) with I/O pins: Make sure the peripheral is not unintentionally powered via bus interface lines etc. We had issues where an I²C sensor was still receiving current from the I²C pull-up resistors.
                  $endgroup$
                  – Michael
                  Jun 16 at 16:13











                  4
















                  $begingroup$

                  Very similar to "how come my solar/battery/inverter system has so little range?" > because the inverter is spun up all the time. Use different loads that work on direct battery and eliminate unnecessary voltage conversion.



                  You've done engineering 101, you've slapped the bits together and they work. Engineering 202 is making them work efficiently enough to be useful.




                  As above, junk the inverte-—I mean regulator. Select batteries that can run it straight, such as three 1.5V batteries @ 4.5 volts. (Two would not suffice as they would drop below 3V too soon; or maybe; try it!)



                  Also think about larger batteries - - 9Vs are stupid-small capacity, especially when throwing away 2/3 of the capacity! (The electronics needs 3V, you are taking 9V and throwing the rest away as heat). Think big - D cells are your friend if you want longevity.



                  Deer cameras typically have two complete banks of D-cells, you can use either or both, and can run a whole season.



                  Also, the ATMega's sleep current draw is very impressive, but the STX882 and the sensor, not so much. See if you can find a way to have the ATMega physically shut off power to the other devices when not needed. The cheapest, scungiest way to do this is a small relay, but a power transistor should also do the trick.




                  One last trick. It may not be worth doing depending on what duty cycle the system is powered up, but it's worth mentioning. In recent years CPUs went from 5V to 3.3V. Why? Because they operate on current; voltage beyond minimums doesn't aid operation and just dissipates more heat. As CPUs got more powerful, thermal issues became the limiting factor, so dropping voltage to minimums allowed cooler running and more performance on the same heat sink. The same applies to your electronics.



                  You are aiming to run at 5V, the high side of the allowable voltage range. My 3xAA proposal puts you at 4.5V but consider making a different battery choice that goes even lower: such as Lithium batteries or three NiCd/NiMH (3.6V). NiMH has more capacity, but NiCD has truly amazing resistance to abuse and deep discharge.






                  share|improve this answer












                  $endgroup$














                  • $begingroup$
                    You are absolutely right, I'm heading to 202 and your answer is very instructive in this way. I always thought recommended voltage was 5V, being able to operate at 3V will simplify things a lot. Just a thing, how come "ATMega's sleep current draw is very impressive, but the STX882 not so much", when it is 100 times lower?
                    $endgroup$
                    – Dan Chaltiel
                    Jun 15 at 16:56










                  • $begingroup$
                    Whoops, my bad.
                    $endgroup$
                    – Harper
                    Jun 15 at 17:23










                  • $begingroup$
                    In recent years CPUs went from 5V to 3.3V. That was a few years ago now :P These days CPUs program the voltage regulators on the mobo to run at the bare minimum voltage possible for the current frequency, barely more than the band-gap. Power scales with V^2 for CMOS logic (pumping charge into capacitive gate loads). e.g. my desktop runs its i7-6700 Skylake CPU at something like 1.25V depending on turbo vs. idle clock speed.
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:29










                  • $begingroup$
                    There was a good talk at IDF2015 about Skylake power management that got into some of the tradeoffs of modern (high end desktop/laptop, not microcontroller) CPU power management. en.wikichip.org/w/images/8/83/…. There used to be audio to go with those slides (from an Intel architect), but that seems to have disappeared :( Maybe still worth flipping through the slides if you're curious about that sort of thing.
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:30











                  • $begingroup$
                    Anyway, since CPUs want a programmable load-varying amount of voltage, but at high current, mobos power the CPU voltage regulars from the +12V supply. Most of the current demand on a modern PC power supply is on the 12V line, with CPU and GPU having their own DC-DC converters. (Modern DRAM runs at 1.2V for DDR4, down from 1.35V for DDR3L.) So again mobos power that from a DC-DC converter located near the DRAM. Or when you said CPUs, were you just talking about microcontrollers like the one the OP is using? If so, sorry for the tangent. :P
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:37
















                  4
















                  $begingroup$

                  Very similar to "how come my solar/battery/inverter system has so little range?" > because the inverter is spun up all the time. Use different loads that work on direct battery and eliminate unnecessary voltage conversion.



                  You've done engineering 101, you've slapped the bits together and they work. Engineering 202 is making them work efficiently enough to be useful.




                  As above, junk the inverte-—I mean regulator. Select batteries that can run it straight, such as three 1.5V batteries @ 4.5 volts. (Two would not suffice as they would drop below 3V too soon; or maybe; try it!)



                  Also think about larger batteries - - 9Vs are stupid-small capacity, especially when throwing away 2/3 of the capacity! (The electronics needs 3V, you are taking 9V and throwing the rest away as heat). Think big - D cells are your friend if you want longevity.



                  Deer cameras typically have two complete banks of D-cells, you can use either or both, and can run a whole season.



                  Also, the ATMega's sleep current draw is very impressive, but the STX882 and the sensor, not so much. See if you can find a way to have the ATMega physically shut off power to the other devices when not needed. The cheapest, scungiest way to do this is a small relay, but a power transistor should also do the trick.




                  One last trick. It may not be worth doing depending on what duty cycle the system is powered up, but it's worth mentioning. In recent years CPUs went from 5V to 3.3V. Why? Because they operate on current; voltage beyond minimums doesn't aid operation and just dissipates more heat. As CPUs got more powerful, thermal issues became the limiting factor, so dropping voltage to minimums allowed cooler running and more performance on the same heat sink. The same applies to your electronics.



                  You are aiming to run at 5V, the high side of the allowable voltage range. My 3xAA proposal puts you at 4.5V but consider making a different battery choice that goes even lower: such as Lithium batteries or three NiCd/NiMH (3.6V). NiMH has more capacity, but NiCD has truly amazing resistance to abuse and deep discharge.






                  share|improve this answer












                  $endgroup$














                  • $begingroup$
                    You are absolutely right, I'm heading to 202 and your answer is very instructive in this way. I always thought recommended voltage was 5V, being able to operate at 3V will simplify things a lot. Just a thing, how come "ATMega's sleep current draw is very impressive, but the STX882 not so much", when it is 100 times lower?
                    $endgroup$
                    – Dan Chaltiel
                    Jun 15 at 16:56










                  • $begingroup$
                    Whoops, my bad.
                    $endgroup$
                    – Harper
                    Jun 15 at 17:23










                  • $begingroup$
                    In recent years CPUs went from 5V to 3.3V. That was a few years ago now :P These days CPUs program the voltage regulators on the mobo to run at the bare minimum voltage possible for the current frequency, barely more than the band-gap. Power scales with V^2 for CMOS logic (pumping charge into capacitive gate loads). e.g. my desktop runs its i7-6700 Skylake CPU at something like 1.25V depending on turbo vs. idle clock speed.
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:29










                  • $begingroup$
                    There was a good talk at IDF2015 about Skylake power management that got into some of the tradeoffs of modern (high end desktop/laptop, not microcontroller) CPU power management. en.wikichip.org/w/images/8/83/…. There used to be audio to go with those slides (from an Intel architect), but that seems to have disappeared :( Maybe still worth flipping through the slides if you're curious about that sort of thing.
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:30











                  • $begingroup$
                    Anyway, since CPUs want a programmable load-varying amount of voltage, but at high current, mobos power the CPU voltage regulars from the +12V supply. Most of the current demand on a modern PC power supply is on the 12V line, with CPU and GPU having their own DC-DC converters. (Modern DRAM runs at 1.2V for DDR4, down from 1.35V for DDR3L.) So again mobos power that from a DC-DC converter located near the DRAM. Or when you said CPUs, were you just talking about microcontrollers like the one the OP is using? If so, sorry for the tangent. :P
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:37














                  4














                  4










                  4







                  $begingroup$

                  Very similar to "how come my solar/battery/inverter system has so little range?" > because the inverter is spun up all the time. Use different loads that work on direct battery and eliminate unnecessary voltage conversion.



                  You've done engineering 101, you've slapped the bits together and they work. Engineering 202 is making them work efficiently enough to be useful.




                  As above, junk the inverte-—I mean regulator. Select batteries that can run it straight, such as three 1.5V batteries @ 4.5 volts. (Two would not suffice as they would drop below 3V too soon; or maybe; try it!)



                  Also think about larger batteries - - 9Vs are stupid-small capacity, especially when throwing away 2/3 of the capacity! (The electronics needs 3V, you are taking 9V and throwing the rest away as heat). Think big - D cells are your friend if you want longevity.



                  Deer cameras typically have two complete banks of D-cells, you can use either or both, and can run a whole season.



                  Also, the ATMega's sleep current draw is very impressive, but the STX882 and the sensor, not so much. See if you can find a way to have the ATMega physically shut off power to the other devices when not needed. The cheapest, scungiest way to do this is a small relay, but a power transistor should also do the trick.




                  One last trick. It may not be worth doing depending on what duty cycle the system is powered up, but it's worth mentioning. In recent years CPUs went from 5V to 3.3V. Why? Because they operate on current; voltage beyond minimums doesn't aid operation and just dissipates more heat. As CPUs got more powerful, thermal issues became the limiting factor, so dropping voltage to minimums allowed cooler running and more performance on the same heat sink. The same applies to your electronics.



                  You are aiming to run at 5V, the high side of the allowable voltage range. My 3xAA proposal puts you at 4.5V but consider making a different battery choice that goes even lower: such as Lithium batteries or three NiCd/NiMH (3.6V). NiMH has more capacity, but NiCD has truly amazing resistance to abuse and deep discharge.






                  share|improve this answer












                  $endgroup$



                  Very similar to "how come my solar/battery/inverter system has so little range?" > because the inverter is spun up all the time. Use different loads that work on direct battery and eliminate unnecessary voltage conversion.



                  You've done engineering 101, you've slapped the bits together and they work. Engineering 202 is making them work efficiently enough to be useful.




                  As above, junk the inverte-—I mean regulator. Select batteries that can run it straight, such as three 1.5V batteries @ 4.5 volts. (Two would not suffice as they would drop below 3V too soon; or maybe; try it!)



                  Also think about larger batteries - - 9Vs are stupid-small capacity, especially when throwing away 2/3 of the capacity! (The electronics needs 3V, you are taking 9V and throwing the rest away as heat). Think big - D cells are your friend if you want longevity.



                  Deer cameras typically have two complete banks of D-cells, you can use either or both, and can run a whole season.



                  Also, the ATMega's sleep current draw is very impressive, but the STX882 and the sensor, not so much. See if you can find a way to have the ATMega physically shut off power to the other devices when not needed. The cheapest, scungiest way to do this is a small relay, but a power transistor should also do the trick.




                  One last trick. It may not be worth doing depending on what duty cycle the system is powered up, but it's worth mentioning. In recent years CPUs went from 5V to 3.3V. Why? Because they operate on current; voltage beyond minimums doesn't aid operation and just dissipates more heat. As CPUs got more powerful, thermal issues became the limiting factor, so dropping voltage to minimums allowed cooler running and more performance on the same heat sink. The same applies to your electronics.



                  You are aiming to run at 5V, the high side of the allowable voltage range. My 3xAA proposal puts you at 4.5V but consider making a different battery choice that goes even lower: such as Lithium batteries or three NiCd/NiMH (3.6V). NiMH has more capacity, but NiCD has truly amazing resistance to abuse and deep discharge.







                  share|improve this answer















                  share|improve this answer




                  share|improve this answer








                  edited Jun 15 at 15:18

























                  answered Jun 15 at 15:11









                  HarperHarper

                  8,41711 silver badges33 bronze badges




                  8,41711 silver badges33 bronze badges














                  • $begingroup$
                    You are absolutely right, I'm heading to 202 and your answer is very instructive in this way. I always thought recommended voltage was 5V, being able to operate at 3V will simplify things a lot. Just a thing, how come "ATMega's sleep current draw is very impressive, but the STX882 not so much", when it is 100 times lower?
                    $endgroup$
                    – Dan Chaltiel
                    Jun 15 at 16:56










                  • $begingroup$
                    Whoops, my bad.
                    $endgroup$
                    – Harper
                    Jun 15 at 17:23










                  • $begingroup$
                    In recent years CPUs went from 5V to 3.3V. That was a few years ago now :P These days CPUs program the voltage regulators on the mobo to run at the bare minimum voltage possible for the current frequency, barely more than the band-gap. Power scales with V^2 for CMOS logic (pumping charge into capacitive gate loads). e.g. my desktop runs its i7-6700 Skylake CPU at something like 1.25V depending on turbo vs. idle clock speed.
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:29










                  • $begingroup$
                    There was a good talk at IDF2015 about Skylake power management that got into some of the tradeoffs of modern (high end desktop/laptop, not microcontroller) CPU power management. en.wikichip.org/w/images/8/83/…. There used to be audio to go with those slides (from an Intel architect), but that seems to have disappeared :( Maybe still worth flipping through the slides if you're curious about that sort of thing.
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:30











                  • $begingroup$
                    Anyway, since CPUs want a programmable load-varying amount of voltage, but at high current, mobos power the CPU voltage regulars from the +12V supply. Most of the current demand on a modern PC power supply is on the 12V line, with CPU and GPU having their own DC-DC converters. (Modern DRAM runs at 1.2V for DDR4, down from 1.35V for DDR3L.) So again mobos power that from a DC-DC converter located near the DRAM. Or when you said CPUs, were you just talking about microcontrollers like the one the OP is using? If so, sorry for the tangent. :P
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:37

















                  • $begingroup$
                    You are absolutely right, I'm heading to 202 and your answer is very instructive in this way. I always thought recommended voltage was 5V, being able to operate at 3V will simplify things a lot. Just a thing, how come "ATMega's sleep current draw is very impressive, but the STX882 not so much", when it is 100 times lower?
                    $endgroup$
                    – Dan Chaltiel
                    Jun 15 at 16:56










                  • $begingroup$
                    Whoops, my bad.
                    $endgroup$
                    – Harper
                    Jun 15 at 17:23










                  • $begingroup$
                    In recent years CPUs went from 5V to 3.3V. That was a few years ago now :P These days CPUs program the voltage regulators on the mobo to run at the bare minimum voltage possible for the current frequency, barely more than the band-gap. Power scales with V^2 for CMOS logic (pumping charge into capacitive gate loads). e.g. my desktop runs its i7-6700 Skylake CPU at something like 1.25V depending on turbo vs. idle clock speed.
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:29










                  • $begingroup$
                    There was a good talk at IDF2015 about Skylake power management that got into some of the tradeoffs of modern (high end desktop/laptop, not microcontroller) CPU power management. en.wikichip.org/w/images/8/83/…. There used to be audio to go with those slides (from an Intel architect), but that seems to have disappeared :( Maybe still worth flipping through the slides if you're curious about that sort of thing.
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:30











                  • $begingroup$
                    Anyway, since CPUs want a programmable load-varying amount of voltage, but at high current, mobos power the CPU voltage regulars from the +12V supply. Most of the current demand on a modern PC power supply is on the 12V line, with CPU and GPU having their own DC-DC converters. (Modern DRAM runs at 1.2V for DDR4, down from 1.35V for DDR3L.) So again mobos power that from a DC-DC converter located near the DRAM. Or when you said CPUs, were you just talking about microcontrollers like the one the OP is using? If so, sorry for the tangent. :P
                    $endgroup$
                    – Peter Cordes
                    Jun 16 at 3:37
















                  $begingroup$
                  You are absolutely right, I'm heading to 202 and your answer is very instructive in this way. I always thought recommended voltage was 5V, being able to operate at 3V will simplify things a lot. Just a thing, how come "ATMega's sleep current draw is very impressive, but the STX882 not so much", when it is 100 times lower?
                  $endgroup$
                  – Dan Chaltiel
                  Jun 15 at 16:56




                  $begingroup$
                  You are absolutely right, I'm heading to 202 and your answer is very instructive in this way. I always thought recommended voltage was 5V, being able to operate at 3V will simplify things a lot. Just a thing, how come "ATMega's sleep current draw is very impressive, but the STX882 not so much", when it is 100 times lower?
                  $endgroup$
                  – Dan Chaltiel
                  Jun 15 at 16:56












                  $begingroup$
                  Whoops, my bad.
                  $endgroup$
                  – Harper
                  Jun 15 at 17:23




                  $begingroup$
                  Whoops, my bad.
                  $endgroup$
                  – Harper
                  Jun 15 at 17:23












                  $begingroup$
                  In recent years CPUs went from 5V to 3.3V. That was a few years ago now :P These days CPUs program the voltage regulators on the mobo to run at the bare minimum voltage possible for the current frequency, barely more than the band-gap. Power scales with V^2 for CMOS logic (pumping charge into capacitive gate loads). e.g. my desktop runs its i7-6700 Skylake CPU at something like 1.25V depending on turbo vs. idle clock speed.
                  $endgroup$
                  – Peter Cordes
                  Jun 16 at 3:29




                  $begingroup$
                  In recent years CPUs went from 5V to 3.3V. That was a few years ago now :P These days CPUs program the voltage regulators on the mobo to run at the bare minimum voltage possible for the current frequency, barely more than the band-gap. Power scales with V^2 for CMOS logic (pumping charge into capacitive gate loads). e.g. my desktop runs its i7-6700 Skylake CPU at something like 1.25V depending on turbo vs. idle clock speed.
                  $endgroup$
                  – Peter Cordes
                  Jun 16 at 3:29












                  $begingroup$
                  There was a good talk at IDF2015 about Skylake power management that got into some of the tradeoffs of modern (high end desktop/laptop, not microcontroller) CPU power management. en.wikichip.org/w/images/8/83/…. There used to be audio to go with those slides (from an Intel architect), but that seems to have disappeared :( Maybe still worth flipping through the slides if you're curious about that sort of thing.
                  $endgroup$
                  – Peter Cordes
                  Jun 16 at 3:30





                  $begingroup$
                  There was a good talk at IDF2015 about Skylake power management that got into some of the tradeoffs of modern (high end desktop/laptop, not microcontroller) CPU power management. en.wikichip.org/w/images/8/83/…. There used to be audio to go with those slides (from an Intel architect), but that seems to have disappeared :( Maybe still worth flipping through the slides if you're curious about that sort of thing.
                  $endgroup$
                  – Peter Cordes
                  Jun 16 at 3:30













                  $begingroup$
                  Anyway, since CPUs want a programmable load-varying amount of voltage, but at high current, mobos power the CPU voltage regulars from the +12V supply. Most of the current demand on a modern PC power supply is on the 12V line, with CPU and GPU having their own DC-DC converters. (Modern DRAM runs at 1.2V for DDR4, down from 1.35V for DDR3L.) So again mobos power that from a DC-DC converter located near the DRAM. Or when you said CPUs, were you just talking about microcontrollers like the one the OP is using? If so, sorry for the tangent. :P
                  $endgroup$
                  – Peter Cordes
                  Jun 16 at 3:37





                  $begingroup$
                  Anyway, since CPUs want a programmable load-varying amount of voltage, but at high current, mobos power the CPU voltage regulars from the +12V supply. Most of the current demand on a modern PC power supply is on the 12V line, with CPU and GPU having their own DC-DC converters. (Modern DRAM runs at 1.2V for DDR4, down from 1.35V for DDR3L.) So again mobos power that from a DC-DC converter located near the DRAM. Or when you said CPUs, were you just talking about microcontrollers like the one the OP is using? If so, sorry for the tangent. :P
                  $endgroup$
                  – Peter Cordes
                  Jun 16 at 3:37












                  3
















                  $begingroup$

                  Use step up converter instead



                  This is how I do similar projects. I use 3xAA which gives me 2.5V-4.8V this is within the operational range of atmega, I connect this to a step up converter with disable pin, when disabled the converter consumes near to nothing and passes the voltage through. When atmega wakes up and needs to make measurement it will turn the converter on, finds 5V on VCC, do measurements and transmit, disable converter, go back to sleep. It lasts years.






                  share|improve this answer










                  $endgroup$



















                    3
















                    $begingroup$

                    Use step up converter instead



                    This is how I do similar projects. I use 3xAA which gives me 2.5V-4.8V this is within the operational range of atmega, I connect this to a step up converter with disable pin, when disabled the converter consumes near to nothing and passes the voltage through. When atmega wakes up and needs to make measurement it will turn the converter on, finds 5V on VCC, do measurements and transmit, disable converter, go back to sleep. It lasts years.






                    share|improve this answer










                    $endgroup$

















                      3














                      3










                      3







                      $begingroup$

                      Use step up converter instead



                      This is how I do similar projects. I use 3xAA which gives me 2.5V-4.8V this is within the operational range of atmega, I connect this to a step up converter with disable pin, when disabled the converter consumes near to nothing and passes the voltage through. When atmega wakes up and needs to make measurement it will turn the converter on, finds 5V on VCC, do measurements and transmit, disable converter, go back to sleep. It lasts years.






                      share|improve this answer










                      $endgroup$



                      Use step up converter instead



                      This is how I do similar projects. I use 3xAA which gives me 2.5V-4.8V this is within the operational range of atmega, I connect this to a step up converter with disable pin, when disabled the converter consumes near to nothing and passes the voltage through. When atmega wakes up and needs to make measurement it will turn the converter on, finds 5V on VCC, do measurements and transmit, disable converter, go back to sleep. It lasts years.







                      share|improve this answer













                      share|improve this answer




                      share|improve this answer










                      answered Jun 15 at 19:06









                      Cano64Cano64

                      6325 silver badges15 bronze badges




                      6325 silver badges15 bronze badges
























                          2
















                          $begingroup$

                          According to your numbers, you're getting expected behavior, between your sensor, your microcontroller, and your regulator (8ma). If you want better, sleep the controller, switch the sensor off, and get a more suitable regulator.






                          share|improve this answer










                          $endgroup$



















                            2
















                            $begingroup$

                            According to your numbers, you're getting expected behavior, between your sensor, your microcontroller, and your regulator (8ma). If you want better, sleep the controller, switch the sensor off, and get a more suitable regulator.






                            share|improve this answer










                            $endgroup$

















                              2














                              2










                              2







                              $begingroup$

                              According to your numbers, you're getting expected behavior, between your sensor, your microcontroller, and your regulator (8ma). If you want better, sleep the controller, switch the sensor off, and get a more suitable regulator.






                              share|improve this answer










                              $endgroup$



                              According to your numbers, you're getting expected behavior, between your sensor, your microcontroller, and your regulator (8ma). If you want better, sleep the controller, switch the sensor off, and get a more suitable regulator.







                              share|improve this answer













                              share|improve this answer




                              share|improve this answer










                              answered Jun 15 at 11:59









                              Scott SeidmanScott Seidman

                              24.5k4 gold badges33 silver badges94 bronze badges




                              24.5k4 gold badges33 silver badges94 bronze badges
























                                  2
















                                  $begingroup$

                                  1. Measure what's the actual current drain in the idle and active states. Use an ammeter between the battery and the 7805 input. A typical new 9V battery has more than 300 mAh, and the 7805 quiescent current alone couldn't really consume it all - something's fishy!
                                    I've measured a lot of 9V batteries and they are typically 500-600 mAh. The caveat is that they are all alkaline, and if you're interested in getting the longest lifespan, of course you need to use alkaline batteries.


                                  2. Is there a real reason to use disposable 9V batteries in your application? Have you considered something like 3× or 4× AA?






                                  share|improve this answer










                                  $endgroup$














                                  • $begingroup$
                                    I genuinely thought that 9v battery would last longer. I was apparently wrong.
                                    $endgroup$
                                    – Dan Chaltiel
                                    Jun 15 at 16:29










                                  • $begingroup$
                                    Isn't there a mistake in the sentence (alkaline twice)? "The caveat is that they are all alkaline, and if you're interested in getting the longest lifespan, of course you need to use alkaline batteries."
                                    $endgroup$
                                    – Dan Chaltiel
                                    Jun 15 at 16:39






                                  • 1




                                    $begingroup$
                                    It's confusing, sorry. I meant that my measurements are alkaline only, which is the one you should use if you want the longest life. Your battery might have been zinc-carbon, which could partly explain its quick death, yet I think you should first verify what the actual consumption is.
                                    $endgroup$
                                    – anrieff
                                    Jun 15 at 19:28















                                  2
















                                  $begingroup$

                                  1. Measure what's the actual current drain in the idle and active states. Use an ammeter between the battery and the 7805 input. A typical new 9V battery has more than 300 mAh, and the 7805 quiescent current alone couldn't really consume it all - something's fishy!
                                    I've measured a lot of 9V batteries and they are typically 500-600 mAh. The caveat is that they are all alkaline, and if you're interested in getting the longest lifespan, of course you need to use alkaline batteries.


                                  2. Is there a real reason to use disposable 9V batteries in your application? Have you considered something like 3× or 4× AA?






                                  share|improve this answer










                                  $endgroup$














                                  • $begingroup$
                                    I genuinely thought that 9v battery would last longer. I was apparently wrong.
                                    $endgroup$
                                    – Dan Chaltiel
                                    Jun 15 at 16:29










                                  • $begingroup$
                                    Isn't there a mistake in the sentence (alkaline twice)? "The caveat is that they are all alkaline, and if you're interested in getting the longest lifespan, of course you need to use alkaline batteries."
                                    $endgroup$
                                    – Dan Chaltiel
                                    Jun 15 at 16:39






                                  • 1




                                    $begingroup$
                                    It's confusing, sorry. I meant that my measurements are alkaline only, which is the one you should use if you want the longest life. Your battery might have been zinc-carbon, which could partly explain its quick death, yet I think you should first verify what the actual consumption is.
                                    $endgroup$
                                    – anrieff
                                    Jun 15 at 19:28













                                  2














                                  2










                                  2







                                  $begingroup$

                                  1. Measure what's the actual current drain in the idle and active states. Use an ammeter between the battery and the 7805 input. A typical new 9V battery has more than 300 mAh, and the 7805 quiescent current alone couldn't really consume it all - something's fishy!
                                    I've measured a lot of 9V batteries and they are typically 500-600 mAh. The caveat is that they are all alkaline, and if you're interested in getting the longest lifespan, of course you need to use alkaline batteries.


                                  2. Is there a real reason to use disposable 9V batteries in your application? Have you considered something like 3× or 4× AA?






                                  share|improve this answer










                                  $endgroup$



                                  1. Measure what's the actual current drain in the idle and active states. Use an ammeter between the battery and the 7805 input. A typical new 9V battery has more than 300 mAh, and the 7805 quiescent current alone couldn't really consume it all - something's fishy!
                                    I've measured a lot of 9V batteries and they are typically 500-600 mAh. The caveat is that they are all alkaline, and if you're interested in getting the longest lifespan, of course you need to use alkaline batteries.


                                  2. Is there a real reason to use disposable 9V batteries in your application? Have you considered something like 3× or 4× AA?







                                  share|improve this answer













                                  share|improve this answer




                                  share|improve this answer










                                  answered Jun 15 at 12:22









                                  anrieffanrieff

                                  2,08615 silver badges28 bronze badges




                                  2,08615 silver badges28 bronze badges














                                  • $begingroup$
                                    I genuinely thought that 9v battery would last longer. I was apparently wrong.
                                    $endgroup$
                                    – Dan Chaltiel
                                    Jun 15 at 16:29










                                  • $begingroup$
                                    Isn't there a mistake in the sentence (alkaline twice)? "The caveat is that they are all alkaline, and if you're interested in getting the longest lifespan, of course you need to use alkaline batteries."
                                    $endgroup$
                                    – Dan Chaltiel
                                    Jun 15 at 16:39






                                  • 1




                                    $begingroup$
                                    It's confusing, sorry. I meant that my measurements are alkaline only, which is the one you should use if you want the longest life. Your battery might have been zinc-carbon, which could partly explain its quick death, yet I think you should first verify what the actual consumption is.
                                    $endgroup$
                                    – anrieff
                                    Jun 15 at 19:28
















                                  • $begingroup$
                                    I genuinely thought that 9v battery would last longer. I was apparently wrong.
                                    $endgroup$
                                    – Dan Chaltiel
                                    Jun 15 at 16:29










                                  • $begingroup$
                                    Isn't there a mistake in the sentence (alkaline twice)? "The caveat is that they are all alkaline, and if you're interested in getting the longest lifespan, of course you need to use alkaline batteries."
                                    $endgroup$
                                    – Dan Chaltiel
                                    Jun 15 at 16:39






                                  • 1




                                    $begingroup$
                                    It's confusing, sorry. I meant that my measurements are alkaline only, which is the one you should use if you want the longest life. Your battery might have been zinc-carbon, which could partly explain its quick death, yet I think you should first verify what the actual consumption is.
                                    $endgroup$
                                    – anrieff
                                    Jun 15 at 19:28















                                  $begingroup$
                                  I genuinely thought that 9v battery would last longer. I was apparently wrong.
                                  $endgroup$
                                  – Dan Chaltiel
                                  Jun 15 at 16:29




                                  $begingroup$
                                  I genuinely thought that 9v battery would last longer. I was apparently wrong.
                                  $endgroup$
                                  – Dan Chaltiel
                                  Jun 15 at 16:29












                                  $begingroup$
                                  Isn't there a mistake in the sentence (alkaline twice)? "The caveat is that they are all alkaline, and if you're interested in getting the longest lifespan, of course you need to use alkaline batteries."
                                  $endgroup$
                                  – Dan Chaltiel
                                  Jun 15 at 16:39




                                  $begingroup$
                                  Isn't there a mistake in the sentence (alkaline twice)? "The caveat is that they are all alkaline, and if you're interested in getting the longest lifespan, of course you need to use alkaline batteries."
                                  $endgroup$
                                  – Dan Chaltiel
                                  Jun 15 at 16:39




                                  1




                                  1




                                  $begingroup$
                                  It's confusing, sorry. I meant that my measurements are alkaline only, which is the one you should use if you want the longest life. Your battery might have been zinc-carbon, which could partly explain its quick death, yet I think you should first verify what the actual consumption is.
                                  $endgroup$
                                  – anrieff
                                  Jun 15 at 19:28




                                  $begingroup$
                                  It's confusing, sorry. I meant that my measurements are alkaline only, which is the one you should use if you want the longest life. Your battery might have been zinc-carbon, which could partly explain its quick death, yet I think you should first verify what the actual consumption is.
                                  $endgroup$
                                  – anrieff
                                  Jun 15 at 19:28











                                  1
















                                  $begingroup$

                                  From the delay and loop functions looks like you are using Arduino code.
                                  The delay function is a active loop, it will not put the microcontroller to sleep!
                                  The Arduino API doesn't have support for sleep mode.



                                  Read the ATmega328P datasheet and see page 34 for how to put the device to sleep mode.






                                  share|improve this answer










                                  $endgroup$














                                  • $begingroup$
                                    What about deepsleep?
                                    $endgroup$
                                    – Dan Chaltiel
                                    Jun 16 at 14:53






                                  • 1




                                    $begingroup$
                                    @dan-chaltiel That's only for the SAMD21 MCUs like MKRZero, MKR1000 and MKRFox1200. (arduino.cc/en/Reference/ArduinoLowPower)
                                    $endgroup$
                                    – paf.goncalves
                                    Jun 16 at 22:56















                                  1
















                                  $begingroup$

                                  From the delay and loop functions looks like you are using Arduino code.
                                  The delay function is a active loop, it will not put the microcontroller to sleep!
                                  The Arduino API doesn't have support for sleep mode.



                                  Read the ATmega328P datasheet and see page 34 for how to put the device to sleep mode.






                                  share|improve this answer










                                  $endgroup$














                                  • $begingroup$
                                    What about deepsleep?
                                    $endgroup$
                                    – Dan Chaltiel
                                    Jun 16 at 14:53






                                  • 1




                                    $begingroup$
                                    @dan-chaltiel That's only for the SAMD21 MCUs like MKRZero, MKR1000 and MKRFox1200. (arduino.cc/en/Reference/ArduinoLowPower)
                                    $endgroup$
                                    – paf.goncalves
                                    Jun 16 at 22:56













                                  1














                                  1










                                  1







                                  $begingroup$

                                  From the delay and loop functions looks like you are using Arduino code.
                                  The delay function is a active loop, it will not put the microcontroller to sleep!
                                  The Arduino API doesn't have support for sleep mode.



                                  Read the ATmega328P datasheet and see page 34 for how to put the device to sleep mode.






                                  share|improve this answer










                                  $endgroup$



                                  From the delay and loop functions looks like you are using Arduino code.
                                  The delay function is a active loop, it will not put the microcontroller to sleep!
                                  The Arduino API doesn't have support for sleep mode.



                                  Read the ATmega328P datasheet and see page 34 for how to put the device to sleep mode.







                                  share|improve this answer













                                  share|improve this answer




                                  share|improve this answer










                                  answered Jun 16 at 14:48









                                  paf.goncalvespaf.goncalves

                                  1111 bronze badge




                                  1111 bronze badge














                                  • $begingroup$
                                    What about deepsleep?
                                    $endgroup$
                                    – Dan Chaltiel
                                    Jun 16 at 14:53






                                  • 1




                                    $begingroup$
                                    @dan-chaltiel That's only for the SAMD21 MCUs like MKRZero, MKR1000 and MKRFox1200. (arduino.cc/en/Reference/ArduinoLowPower)
                                    $endgroup$
                                    – paf.goncalves
                                    Jun 16 at 22:56
















                                  • $begingroup$
                                    What about deepsleep?
                                    $endgroup$
                                    – Dan Chaltiel
                                    Jun 16 at 14:53






                                  • 1




                                    $begingroup$
                                    @dan-chaltiel That's only for the SAMD21 MCUs like MKRZero, MKR1000 and MKRFox1200. (arduino.cc/en/Reference/ArduinoLowPower)
                                    $endgroup$
                                    – paf.goncalves
                                    Jun 16 at 22:56















                                  $begingroup$
                                  What about deepsleep?
                                  $endgroup$
                                  – Dan Chaltiel
                                  Jun 16 at 14:53




                                  $begingroup$
                                  What about deepsleep?
                                  $endgroup$
                                  – Dan Chaltiel
                                  Jun 16 at 14:53




                                  1




                                  1




                                  $begingroup$
                                  @dan-chaltiel That's only for the SAMD21 MCUs like MKRZero, MKR1000 and MKRFox1200. (arduino.cc/en/Reference/ArduinoLowPower)
                                  $endgroup$
                                  – paf.goncalves
                                  Jun 16 at 22:56




                                  $begingroup$
                                  @dan-chaltiel That's only for the SAMD21 MCUs like MKRZero, MKR1000 and MKRFox1200. (arduino.cc/en/Reference/ArduinoLowPower)
                                  $endgroup$
                                  – paf.goncalves
                                  Jun 16 at 22:56











                                  1
















                                  $begingroup$

                                  IMPORTANT: If you can power down the DHT11 humidity sensor between uses you MAY be able to extend the battery life by a factor of 3 or 4.



                                  The DHT11 has a quiescent current of 100-150 uA in sleep mode. You have to design to the worst case value.

                                  On power up it requires 1 second "to clear its head" (note 4. page 5)

                                  and then there is interface setup time (maybe a few 10's of ms).

                                  It is not obvious from the data sheet whether response time is affected by being powered down, but probably not .



                                  Depending on the time between activations the powering down of the DHT11 could reduce system quiescent current from around 200 uA to around 50 uA.

                                  Well worth looking at.




                                  LM2936 Regulator:



                                  The LM2936 that you mention is a superb regulator if it meets your requirements. Low dropout, low quiescent current, range of output voltages available.



                                  I used them long ago in a product which needed their low Iq and was very pleased with them. Hmmm - that was about 1993 - 25+ years - an oldie but a goody.



                                  Iout max is nominally 50 mA - which meets your tabulated need.

                                  Iq is 10 uA at 100 uA load - and less at much lower loads.

                                  Vin is 5.5 - 40V and in fact probably closer than that to Vout.
                                  You can get 5V and 3V3 versions.



                                  Your sleep mode load current is easily under 200 uA.

                                  At 200 uA you'd get 100/.2 = 500 hours sleep operation per 100 mAh of battery.

                                  So about 20 days per 100 mAh.

                                  So say 60 days or two months with an Alkaline "9V" 300 - 500 mAH battery erring on the conservative side.
                                  Use 6 x 1.5V Alkaline AA cells (about 3000 mAh) and you should get approaching 2 years.




                                  Direct operation from 3 x AA alkalines gives Vin from 5V initial (up to 1.65V/cell) and 3.3V at 1.1V/cell (about dead). So about as long as 6 AA Alkalines with comnstant voltage output. If you can tolerate 3.3 - 5V input 'just use 3 x Alkalines. AA for almost 2 year operation. AAA for less.






                                  share|improve this answer












                                  $endgroup$



















                                    1
















                                    $begingroup$

                                    IMPORTANT: If you can power down the DHT11 humidity sensor between uses you MAY be able to extend the battery life by a factor of 3 or 4.



                                    The DHT11 has a quiescent current of 100-150 uA in sleep mode. You have to design to the worst case value.

                                    On power up it requires 1 second "to clear its head" (note 4. page 5)

                                    and then there is interface setup time (maybe a few 10's of ms).

                                    It is not obvious from the data sheet whether response time is affected by being powered down, but probably not .



                                    Depending on the time between activations the powering down of the DHT11 could reduce system quiescent current from around 200 uA to around 50 uA.

                                    Well worth looking at.




                                    LM2936 Regulator:



                                    The LM2936 that you mention is a superb regulator if it meets your requirements. Low dropout, low quiescent current, range of output voltages available.



                                    I used them long ago in a product which needed their low Iq and was very pleased with them. Hmmm - that was about 1993 - 25+ years - an oldie but a goody.



                                    Iout max is nominally 50 mA - which meets your tabulated need.

                                    Iq is 10 uA at 100 uA load - and less at much lower loads.

                                    Vin is 5.5 - 40V and in fact probably closer than that to Vout.
                                    You can get 5V and 3V3 versions.



                                    Your sleep mode load current is easily under 200 uA.

                                    At 200 uA you'd get 100/.2 = 500 hours sleep operation per 100 mAh of battery.

                                    So about 20 days per 100 mAh.

                                    So say 60 days or two months with an Alkaline "9V" 300 - 500 mAH battery erring on the conservative side.
                                    Use 6 x 1.5V Alkaline AA cells (about 3000 mAh) and you should get approaching 2 years.




                                    Direct operation from 3 x AA alkalines gives Vin from 5V initial (up to 1.65V/cell) and 3.3V at 1.1V/cell (about dead). So about as long as 6 AA Alkalines with comnstant voltage output. If you can tolerate 3.3 - 5V input 'just use 3 x Alkalines. AA for almost 2 year operation. AAA for less.






                                    share|improve this answer












                                    $endgroup$

















                                      1














                                      1










                                      1







                                      $begingroup$

                                      IMPORTANT: If you can power down the DHT11 humidity sensor between uses you MAY be able to extend the battery life by a factor of 3 or 4.



                                      The DHT11 has a quiescent current of 100-150 uA in sleep mode. You have to design to the worst case value.

                                      On power up it requires 1 second "to clear its head" (note 4. page 5)

                                      and then there is interface setup time (maybe a few 10's of ms).

                                      It is not obvious from the data sheet whether response time is affected by being powered down, but probably not .



                                      Depending on the time between activations the powering down of the DHT11 could reduce system quiescent current from around 200 uA to around 50 uA.

                                      Well worth looking at.




                                      LM2936 Regulator:



                                      The LM2936 that you mention is a superb regulator if it meets your requirements. Low dropout, low quiescent current, range of output voltages available.



                                      I used them long ago in a product which needed their low Iq and was very pleased with them. Hmmm - that was about 1993 - 25+ years - an oldie but a goody.



                                      Iout max is nominally 50 mA - which meets your tabulated need.

                                      Iq is 10 uA at 100 uA load - and less at much lower loads.

                                      Vin is 5.5 - 40V and in fact probably closer than that to Vout.
                                      You can get 5V and 3V3 versions.



                                      Your sleep mode load current is easily under 200 uA.

                                      At 200 uA you'd get 100/.2 = 500 hours sleep operation per 100 mAh of battery.

                                      So about 20 days per 100 mAh.

                                      So say 60 days or two months with an Alkaline "9V" 300 - 500 mAH battery erring on the conservative side.
                                      Use 6 x 1.5V Alkaline AA cells (about 3000 mAh) and you should get approaching 2 years.




                                      Direct operation from 3 x AA alkalines gives Vin from 5V initial (up to 1.65V/cell) and 3.3V at 1.1V/cell (about dead). So about as long as 6 AA Alkalines with comnstant voltage output. If you can tolerate 3.3 - 5V input 'just use 3 x Alkalines. AA for almost 2 year operation. AAA for less.






                                      share|improve this answer












                                      $endgroup$



                                      IMPORTANT: If you can power down the DHT11 humidity sensor between uses you MAY be able to extend the battery life by a factor of 3 or 4.



                                      The DHT11 has a quiescent current of 100-150 uA in sleep mode. You have to design to the worst case value.

                                      On power up it requires 1 second "to clear its head" (note 4. page 5)

                                      and then there is interface setup time (maybe a few 10's of ms).

                                      It is not obvious from the data sheet whether response time is affected by being powered down, but probably not .



                                      Depending on the time between activations the powering down of the DHT11 could reduce system quiescent current from around 200 uA to around 50 uA.

                                      Well worth looking at.




                                      LM2936 Regulator:



                                      The LM2936 that you mention is a superb regulator if it meets your requirements. Low dropout, low quiescent current, range of output voltages available.



                                      I used them long ago in a product which needed their low Iq and was very pleased with them. Hmmm - that was about 1993 - 25+ years - an oldie but a goody.



                                      Iout max is nominally 50 mA - which meets your tabulated need.

                                      Iq is 10 uA at 100 uA load - and less at much lower loads.

                                      Vin is 5.5 - 40V and in fact probably closer than that to Vout.
                                      You can get 5V and 3V3 versions.



                                      Your sleep mode load current is easily under 200 uA.

                                      At 200 uA you'd get 100/.2 = 500 hours sleep operation per 100 mAh of battery.

                                      So about 20 days per 100 mAh.

                                      So say 60 days or two months with an Alkaline "9V" 300 - 500 mAH battery erring on the conservative side.
                                      Use 6 x 1.5V Alkaline AA cells (about 3000 mAh) and you should get approaching 2 years.




                                      Direct operation from 3 x AA alkalines gives Vin from 5V initial (up to 1.65V/cell) and 3.3V at 1.1V/cell (about dead). So about as long as 6 AA Alkalines with comnstant voltage output. If you can tolerate 3.3 - 5V input 'just use 3 x Alkalines. AA for almost 2 year operation. AAA for less.







                                      share|improve this answer















                                      share|improve this answer




                                      share|improve this answer








                                      edited Jul 30 at 11:37

























                                      answered Jul 30 at 11:23









                                      Russell McMahonRussell McMahon

                                      124k11 gold badges172 silver badges312 bronze badges




                                      124k11 gold badges172 silver badges312 bronze badges































                                          draft saved

                                          draft discarded















































                                          Thanks for contributing an answer to Electrical Engineering Stack Exchange!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid


                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.

                                          Use MathJax to format equations. MathJax reference.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function ()
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f443657%2fwould-a-7805-5-v-regulator-drain-a-9-v-battery%23new-answer', 'question_page');

                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown









                                          Popular posts from this blog

                                          Tamil (spriik) Luke uk diar | Nawigatjuun

                                          Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                                          Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?