I am working on a project that takes distance readings using an HC-SR04 sensor and communicates the data with a 433MHz transmitter. I am using an Arduino Nano v3.0. I have it working correctly. I would like to have it outdoors for 3 to 5 months without needing to replace the batteries. I worked with my multimeter to get an idea of the power requirements from the system.
When the system is fully operating, it uses about 35mA. When I put it to sleep (POWER_DOWN mode), it consumes 19mA. If I remove the HC-SR04 sensor, sleep mode consumes 7.8mA
Currently, I am powering the Nano using a 9 volt battery via Vin, which I know has some inefficiencies in it (on-board regulator from what I've read). I would be content as a first step to get it to the 7.8mA consuption level.
The SR04 appears to draw 9mA all on its own. So I was hoping to basically cut the power to it during the sleep periods and then turn it back on. 9-15mA sounds like it is within the realm of powering it from one of the Nano's digital pins set to OUTPUT and HIGH, and then set it to LOW to turn it off.
If I turn it to HIGH during setup and do not change it, it appears to power it correctly. But once I switch it LOW and then back HIGH, it only generates zero (0 cm) readings. Obviously I'm overlooking something. There are two other pins used by the SR04 (TRIGGER and ECHO) on the Nano for doing the readings, so I didn't know if it were somehow causing problems having the Vcc coming from a pin on the Nano also. Like a reference voltage getting out of whack.
My only other idea is to use a pin to make use of a transitor to control the current and see if that works, but I'm not sure it'll work any better if the TRIGGER and ECHO lines are getting 'confused' when I drop the voltage.
My minimum goal would be to get this all running for 4 months on some D cell batteries. Another option would be to setup a solar panel recharger. But I'd prefer to skip that option for a first run.
Thanks for any input!