Disconnect power remotely for hard reset: BME280 problem

electron
Tags: #<Tag:0x00007fe21ecc4838>

#1

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.


#2

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


#3

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 :smiley:


#4

this timer is amazing ! but honestly, this solution looks like from old school mechanic shop :grin:
— “we cannot find the issue, lets use the hammer :+1:


#5

@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:

    
    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!


#6

@peekay123, This is only proof and indication to avoid using BME280 :slightly_smiling_face:
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 :thinking:
when there’s Si7020-A20 on the market, for example :stuck_out_tongue_winking_eye:


#7

@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!