Power sensor that requires at least 3.6V

Dear all,

I like Electron and its libraries behind.

In my first project, I need to power some sensors that require 3.6V at least in order to get reliable readings. I can power other 3.3V sensors fairly easy from 3.3V pin on Electron.

My current power source is using a 5V USB power bank without the LiPo battery. It works fine expect flashing red light.

Any suggestions and comments about using >3.3V sensors on Electron?

Thanks a lot.

Have you had a look at the Li+ solder eye?


But you’d need to take measures against draining your LiPo too much.

1 Like

I contacted with Tech Support about my intention. I got an replay saying " You should be very careful powering a sensor with 5V (VUSB) because you can very easily and permanently damage the Electron" and “It is recommended that you always connect the battery, especially when powering the Electron from a laptop by USB. The cellular modem can use bursts of current larger than the 500 mA provided by some laptops”.

Just making sure if there might be a better way.

The warning about damaging your Electron was because you asked about connecting an analog sensor to A0. Supplying more than 3.3V to an analog pin will damage your Electron.

Digital inputs (except A3 and DAC) are 5V tolerant. You must not use INPUT_PULLUP or INPUT_PULLDOWN with 5V inputs, however.

A resistor divider can be used to scale a 5V analog input to 3.3V, as well.

1 Like

Thanks a lot. I understand it more now from the pin-description datasheet. All Analog pins on Electron are not 5.0V tolerant pins.

The A0, A1, A2, A4, and A5 pins are 5V tolerant, in digital input mode, just not in analog input mode.

I just looked up the sensors, however, and you are safe using the THERM200 or VH400 on an analog input pin because the maximum output is 3V at maximum temperature (85°C) or moisture. Just be careful you never accidentally short or cross the voltage supply and analog output lines, because you can damage the Electron.

ScruffR’s suggestion of using the LI+ (3.6V from the LiPo battery) is a good option for a battery powered Electron.

1 Like

Thanks for your quick response. I’m working on it. :blush:

The other way is to use a step-up converter to convert 3.3V to a higher voltage. The VH400 sensor only uses 7mA, so you can use a small and inexpensive converter module (search for MT3608 on eBay). Since the current you’re dealing with is so small, you have the option of powering the step-up converter from an digital output pin (20 mA maximum). This would allow you to power down the sensor and put the Electron in sleep mode most of the time, and then when you wake up and want to take a reading, you power up converter and the sensor, wait a little while, then take a reading.


Hello I do have one question the Li+ is that not a pin where I can connect the lipo + cable to and the - cable to a ground pin and that would be the same as the lipo connector?

Yes, using Li+ (the hole where there isn’t a pin) and GND is the same as using the JST LiPo battery connector.


Thanks got confused there for a sec :sunglasses: :sweat_smile:

Hello rickkas7: I look into a step-up converter from 3.3V to 5V. I found that this (NCP1402) is a similar one to MT3608. I also found that the 3.3V output from Electron seems pretty stable. Do you want to comment about using a LM4040 Voltage Reference for converting analog sensor signals when using 5V input? For powering the step-up converter from an digital output pin allows me to power down the sensor and to save power on Electron. Do you have some tutorials about this? I learned from this post that also power sensor from digital pins, but I would like to know why this way can save power. Why is the sleeping Electron able to power sensors that are directly connected to the supply pins? One of sensors I used on Electron is Adafruit BME280. Is that possible to power this sensor directly from digital pins?

Thanks again.

While it is true that you can connect a LiPo to power the device and get the LiPo charged but that’s not the only possible use for it :wink:
Whatever you attach between Li+ and GND will be parallel to the Electron and the LiPo and can be any kind of load (that’s electrically compatible in that place ;-))

1 Like

Because you can switch the GPIO pin off when you don’t need the sensor and only on very briefly when you need it.
But in order to drive a sensor you need to check its current needs, since the GPIOs can only source up to 20mA (with this figure in mind you can check if your BME280 or any other 3.3V sensor would fit the bill yourself).
But what sensor do you have that “requires at least 3.6V”? The BME280 doesn’t.

Because the LiPo or USB or Vin pin will still feed the 3.3V regulator and that’s not powered down, otherwise the Electron wouldn’t be able to wake again :wink:

1 Like

Hello @ScruffR and @rickkas7:

I just try a 3.3V to 5V stepup board and it can offer a stable 5V from the 3.3V pin on Electron.

Can you help me out how to power sensor (3.3V) from one of analog/digital pins?

I’ve tried, but the pin only provides ~1.3V.


Here is what I did:

  int power_BME280 = D1;
 //int power_stepup5V = D2; 
  void setup() {

    digitalWrite(power_BME280,HIGH); // Turn on power source

  if (!bme.begin()) {
    Serial.println("Could not find a valid BME280 sensor, check wiring!");
    while (1) Particle.process();

// Set Pin Modes
//    pinMode(power_stepup5V,OUTPUT);

//    digitalWrite(power_stepup5V,HIGH);

// Wait for stabilize sensors


In order to use digitalWrite(power_BME280,HIGH), you’d need to set pinMode(power_BME280,OUTPUT) first.

And one other thing might be that you are calling bme.begin() before powering up the pin that should supply the step-up.
But when your code can’t find the sensor it’ll be stuck in that while() forever and never switch the power on :wink:

BTW, I assume you are using the BME280 in SPI mode, otherwise D1 would not be available for powering the sensor in I2C mode.

1 Like

It works. Thanks ScruffR.

Does the power source pin (i.e., D1 and D2) still offer 3.3V during the deep sleep mode?
I measure the pin and it shows 3.3V after uploading datasets (the moment that all lights go off. I think it is the deep sleep mode).
Should I use digitalWrite(power_BME280,LOW) after uploading datasets?

Any other comments/suggestions on saving power?


In deep sleep the pins should go off (high-z).
But I think in Stop Mode (System.sleep(pin, triggerMode [, timeout])) will keep the GPIOs (apart from the wake-pin) unaltered.
But that might defeat the purpose of sleeping to save power.

But I’d have to check, or someone who knows might chime in :wink:

This answer took me a while to find but I am glad I finally did. I ended up using a Pololu S7V8F5 connected to Li+ and GND on the Electron to drive a 5V PM2.5 sensor (PMS 7003).

However, out of curiosity, why does this not confuse the Fuel Guage and charge controller on the Electron? I remember trying to connect parallel to the battery when I was using a Photo + Power Shield, however, it was causing issues with the Fuel Guage as the SOC was going above 100% and the charge light would never go off.

Is there a way to tap into the power right before the 3.3 volt regulator? Much like how the UBLOX module is powered? If so I would rather do that as patching to Li+ is making me nervous of side effects (though after a few days of testing it is working great).