I’m planing to build a (LiPo) battery powered ultrasonic sensor project controlled by one of my Photons.
The challenge here is, the ultrasonic sensor (HC-SR04) requires 5 volts. I testet it with an USB powered Photon which work fine.
But the final project will have the Photon is powered by a Sparkfun battery shield. Measurements taken once an hour, the rest of the time the Photon is going to deep sleep.
My questions is about the options, best practices to power the sensor with 5 volts. Especially in combination with only 3.7 volts from the LiPo and with the goal of maximum energy efficiency. If the Photon is in deep sleep the sensor should be without power to conserve energy.
Currently I have the following idea, but not sure if they might work at all:
use a 5V Step-Up module (like https://www.sparkfun.com/products/10968) connected to one of the Dx pins of the Photon and set that to HIGH to have full control about the sensor power
Power the sensor with a separated battery (4 Eneloop AA can give 4.8 volts) and use a relay to switch power on / off
Power the entire system Photon & sensor by 4 Eneloop AA batteries
Power the entire system Photon & sensor by USB Powerpack
Are the other options as well? Any help is appreciated.
1&2) The chip used in that sparkfun product have a enable pin, but its not broken out, if you can get access to it with some soldering/custom board, you can get the best of both options.
Connecting it directly to a pin may work, but it may also draw too much current when starting up, someone else may be able to calculate that.
Some USB powerbanks requires a button press to start charging and disconnects the load if it drops below a few mA, so that could be a concern with deep sleep.
@mhdevx, the Photon can peak at 140-150ma when connecting to wifi. You may want to consider a supply which can provide more current and operate within its high efficiency range. This is why I recommended the Pololu devices. The board you found can only supply 120ma and only has a voltage input range of 1.0 - 3.0 volts. The Pololu has a range of 0.5 - 5.5 volts giving you more supply options (3 vs 2 batteries or a LiPo for example) whereas the PowerPOD cannot.
Hi @mhdevx, Did you end up connecting the pololu step-up converter to the Vout of the photon? I want to do a similar thing using the sparkfun battery shield but need to power a micro servo.
@stoobee, the boost converter goes to Vin (5V) of the Photon! It needs to be powered directly from the battery or batteries due to the current limitation of the Photon’s regulator. I believe this is how @mhdevx did it.
@mhdevx, has that setup been working for you? I’ve been trying the same setup with the pololu circuit powering just the sensor, and I’m getting a huge drop in the max range of the sensor, as well as some weird readings even within the range.
Yes it works very well. Are you sure your ultrasonic sensor gets really 5V? The drop in max range and shaky unsteady readings sounds like the symptoms I had if the sensor was powered with 3.3 V only.
It seems to be getting 5V measured by my multimeter. and when I hook-up the ultrasonic sensor to the 3.3V source I get essentially zero for readings.
I read in the comments on this page, about some problems with the range and false reflections.
Your amplitude will decrease and so will your range. You'll have to check the datasheet for MAX232 and for the chinese uP to see how low can you go. If you use a step-up regulator unless you have very good filtering and decoupling the switching noise will probably get amplified and give you false reflections. A better choice would be to use 3 or ever 4 AA batteries instead.
@mhdevx or @samlroberts Would you mind posting a fritzing or circuit diagram for your setup? Or even a rough sketch would be great so I’m not making any mistakes.