# Disconnect power remotely for hard reset: BME280 problem

**URL:** <https://community.particle.io/t/disconnect-power-remotely-for-hard-reset-bme280-problem/51803>\
**Category:** Hardware\
**Tags:** electron\
**Created:** [August 21, 2019, 3:04pm UTC](https://community.particle.io/t/disconnect-power-remotely-for-hard-reset-bme280-problem/51803 "2019-08-21T15:04:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enviro43](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@Enviro43](https://community.particle.io/u/Enviro43)\
**Post date:** [August 21, 2019, 3:04pm UTC](https://community.particle.io/t/disconnect-power-remotely-for-hard-reset-bme280-problem/51803/1 "2019-08-21T15:04:26Z")

</div>

Hello,

I have an electron based remote sensor that includes a BME280 for temperature and humidity. On occasion, the temperature will “stick” at either a very high (well over 100 degrees F) or very low (well below -100 degrees F). Resetting the system via my particle function soft reset will cause the sensor to hold at 32 degrees F, but ultimately doesn’t solve the problem. Manually disconnecting the battery and solar for a hard reset does solve the problem, but requires driving to the sensor. I am wondering if someone has made a circuit to disconnect all power from the particle to hard reset remotely.

From what I understand about watchdog circuits, they still do not provide a full power cutoff.

I have not been able to diagnose the problem with the BME280 (several units displaying this problem) and have been trying to work with Bosch to come up with a solution. If you have any suggestions about why the BME280 may be sticking, that would also be very helpful!

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![dreamER](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dreamer/32/26550_2.png) [@dreamER](https://community.particle.io/u/dreamER)\
**Post date:** [August 21, 2019, 3:44pm UTC](https://community.particle.io/t/disconnect-power-remotely-for-hard-reset-bme280-problem/51803/2 "2019-08-21T15:44:53Z")

</div>

Hi,  
Any example of your code approach will be appreciated 😉 and will be easier for us to track down your issue

---

<div class="post-metadata">

**Author:** ![shanevanj](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/shanevanj/32/21186_2.png) [@shanevanj](https://community.particle.io/u/shanevanj)\
**Post date:** [August 21, 2019, 4:58pm UTC](https://community.particle.io/t/disconnect-power-remotely-for-hard-reset-bme280-problem/51803/3 "2019-08-21T16:58:32Z")

</div>

So until you resolve your code and sensors - this provides a great “suicide” option - its triggered by an I/O, shuts off power to the downstream device for a preset time and then reconnects it 😃

> **[SparkFun Nano Power Timer - TPL5110 - PRT-15353 - SparkFun Electronics](https://www.sparkfun.com/products/15353)**
>
> The SparkFun Nano Power Timer will run while only consuming minimal power (approximately 35nA) and turn your project on after a set amount of time.

---

<div class="post-metadata">

**Author:** ![dreamER](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dreamer/32/26550_2.png) [@dreamER](https://community.particle.io/u/dreamER)\
**Post date:** [August 21, 2019, 5:38pm UTC](https://community.particle.io/t/disconnect-power-remotely-for-hard-reset-bme280-problem/51803/4 "2019-08-21T17:38:12Z")

</div>

this timer is amazing ! but honestly, this solution looks like from old school mechanic shop 😁  
— “we cannot find the issue, lets use the hammer 👍”

---

<div class="post-metadata">

**Author:** ![peekay123](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peekay123/32/810_2.png) [@peekay123](https://community.particle.io/u/peekay123)\
**Post date:** [August 21, 2019, 7:23pm UTC](https://community.particle.io/t/disconnect-power-remotely-for-hard-reset-bme280-problem/51803/5 "2019-08-21T19:23:17Z")

</div>

@dreamER, I had a similar problem with a BME280. You can power the BME280 directly from a GPIO pin since it uses so little current. If the BME280 doesn’t start up correctly, I cycle power to it until it does and then do the readings:

```auto
    
    do {
        if (!bme.begin()) {
            // Cycle power on BME280 board to reset it and try to initialize it again
            digitalWrite(BME_PWR, LOW);
            delay(50);
            digitalWrite(BME_PWR, HIGH);
        }
        else
            BMEstarted = true;
    } while (!BMEstarted);

```

In my case, on a Photon I read the BME280, send data to Blynk and the Particle Cloud and then go back to deep sleep. Prior to controlling the power to the BME280 I would regularly get the code trying to read the BME. Going to deep sleep didn’t reset the BME power. Now, using the GPIO for power control, I have not had a BME280 stall EVER!

---

<div class="post-metadata">

**Author:** ![dreamER](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dreamer/32/26550_2.png) [@dreamER](https://community.particle.io/u/dreamER)\
**Post date:** [August 21, 2019, 11:24pm UTC](https://community.particle.io/t/disconnect-power-remotely-for-hard-reset-bme280-problem/51803/6 "2019-08-21T23:24:59Z")

</div>

@peekay123, This is only proof and indication to avoid using BME280 🙂  
There are probably many solutions based on the “Goldberg machine”, yours is amazing ! And I have no doubt that is gonna works just great ! But why I have to bring tree in to the forest 🤔  
when there’s [Si7020-A20](https://www.silabs.com/documents/public/data-sheets/Si7020-A20.pdf) on the market, for example 😜

---

<div class="post-metadata">

**Author:** ![Enviro43](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@Enviro43](https://community.particle.io/u/Enviro43)\
**Post date:** [August 22, 2019, 2:05pm UTC](https://community.particle.io/t/disconnect-power-remotely-for-hard-reset-bme280-problem/51803/7 "2019-08-22T14:05:40Z")

</div>

@shanevanj Thank you, that could be a good option if powering off a GPIO doesn’t work.

@peekay123 This is great! This sounds like exactly what I needed, and I will be testing it today. Thank you!
