My project is to build a barebones sonarmote that works on battery. I have a Moteino, a HC-SR04 and a 5 volt battery (3 AAA's). The HC-SR04 has a quiescent current of roughly 1.5-2.5 Ma which is frankly still too high for me for the duration I'd like this to run. The HC-SR04 requires 5 volts to run, but the Motes are 3.3v.
So what I'd like to do would be:
* Have the moteino sleep most of the time, wake up once a day or so
* Moteino powers up the HC-SR04 via some kind of transistor (I have some 2N3904, but I don't know if that is workable), so that the HC still gets the full 5v
* Moteino does a ping with the HC-SR04
* Moteino powers down the HC-SR04
* Moteino sends results to Gateway
* Moteino goes to sleep for another day or so.
Here is the circuit I'm thinking from Falstad's circuit sim: http://tinyurl.com/y7qomjr2
Other thought was to drive the whole thing drive via a CMOS 555 lower power chip, and work out the timer cirtcuit that way. I don't need this to be time accurate, just roughly once a day is fine to check the salt level in my water softener.
Question is what's the best way to drive the HC-SR04 off the Moteino and save as much power as possible? Thanks for any help.
Drive the high side not the low side, with a p-fet, as it's done on the SonarMote.
Thanks Felix, I'm trying to understand why - you always do a good job of explaining the details in your blogs. Why is a p-fet good in this particular case, why would a 2N3904 be a poor choice (current? even with the sonar using so little?)? Is there any particular p-fet I should be looking for, like a logic level one for 3.3v? Should I be looking at an N Mosfet or a P Mosfet (based on googling its seems like I need a n so that the sonar is normally off unless the pin goes high?) I could see a lot of projects leveraging this kind of circuit with the Mote and so I'm trying to get a better understanding of the principals for future reference. Thanks for everyone's patience.
Regardless - I suspect if I use this: https://www.sparkfun.com/products/10213 I should be good to go then as per your recommendation.
See http://www.gammon.com.au/motors for some fairly easy to understand discussion of low side vs. high side switching.