Hi to all!
I did bootload an Atmega @8Mhz with BOD disabled. I feed it with 2XAA in series (~ 2.74volt when full charged and 1900mah).
I did read a DHT22 and send every 10 min data to a gateway (MySensors installation), all other time the Atmega sleeps.
The DHT22 min voltage is 3.3V, so I did buy this: https://www.amazon.it/gp/product/B06XHJCHX6/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1 and regulated exit to 3.3v.
So, battery direct to Atmega and Radio NRF24L01, both to 2.74 (and less) and fixed voltage at 3.3V for the DHT22.
All works in a breadboard, but I don't understand what's the quiescent current of MT3608 (here the datasheet: https://www.olimex.com/Products/Breadboarding/BB-PWR-3608/resources/MT3608.pdf ), cause data report different PFM and PWM.
So, I'm using the worst scenario: 2.2mA wasted. When full charged, battery last only for 1900/2.2 = 863h = ~ 35days . With data send ant other operation... not so efficient.
So, I thought to cut the ground of the booster with a NPN transistor (PN2222A , datasheet: https://www.onsemi.com/pub/Collateral/PN2222-D.PDF) and active from asleep the transistor, read, put outpit pin to low, send data and sleep.
Because the DHT22 only consume 1.5mA when reading (datasheet: https://cdn-shop.adafruit.com/datasheets/Digital+humidity+and+temperature+sensor+AM2302.pdf ) the PN2222A can supports the 5V from an Atmega PIN and the current beetween C-E.
I want connect the Ground of booster to the COLLECTOR of transistor and EMITTER to the rail ground, with a PIN moving the base.
1 - First question: is it right to put "ground" from booster to collector and base TO the ground rail of breadboard?
If I did understand, when I want saturate base the current need to be ~ 1/10 of the collector. All right? (From page 2 of datasheet, (IC = 150 mAdc, IB = 15 mAdc) under Collector−Emitter Saturation Voltage.
So, if all right, I can drive with max 20mA from Atmega (well below the 40mA max).
And so... final formula: ( 5V (Atmega) - 0.7V (drop) ) / 20mA (or 0.02A) == 215Ohm resistor.
Am I right?
Thank you very, very much!