Hello,
This may be a very basic question. I am planning to use an analog sensor that requires 4-20V input power, but only outputs 0-3V analog signal.
My plan right now is to just use one of the digital pins as power, using a charge pump to boost the voltage from that pin from 3V to 5V. I plan to connect the common ground of the sensor to the common ground of the electron. Will this create any issues and potentially fry the electron or is it tolerant to a 5V ground?
Digital Pins are NOT meant to power things. To do so you would use the 3.3V output pin. That pin however has a max total load of 800ma. See the docs datasheet. Keep in mind the efficiency values and voltage difference when calculating the max load of your sensor through a charge pump.
There is no such thing as a “5V Gnd”. Your ground is your ground no matter what other voltages exist referenced to it. So it’s ok to share a common ground between 5V peripherals and the electron. However please be careful with putting 5V inputs to the electron. Not all pins are capable of accepting 5V and some configuration is required.
How are you powering your electron? Are you only on battery? If you have a 5V supply rail available you would be better off using that instead.
1 Like
Thank you for the response! The average current draw of this sensor is about 13mA with a occasionally peaks of 100, so I’m not worried about that.
As far as using digital pins to power things I’ve done it plenty of times in the past with low voltage sensors on arduino. Just set the pinMode to output and write to high whenever I need power. I usually do this when power consumption is an issue and need to turn power on and off within the loop. I thought this was fairly common practice.
As far as powering it goes I am using the battery with a solar panel plugged into the microUSB for charging during the day. It’s a couple of low current requirement sensors setup and I only transmit data once an hour.
Thanks for the insight!
The fact that something works on a different controller with entirely different electrical specs is no argument that it has to work on any other controller (max. output current on Electron GPIOs is 25mA, how would you supply peak 100mA@5V from a 25mA@3.3V pin?).
Also you are not powering a sensor but you intend to power a charge pump which is an entirely different beast especially on first charge.
You can get boost converters with enable/sleep pins. You'd drive that off the 3v3 pin but power them up or down via a dedicated GPIO against the enable/sleep pin.
3 Likes
Thanks! I'll read up on the docs some more and figure out what's best for my applications.