@AWI Turns out, I was using 47k resistor instead of 4.7k resistor. Now it's working with no issue
gogopotato
@gogopotato
Best posts made by gogopotato
-
RE: [SOLVED] Pro Mini 3.3v with DS18B20 sensor getting (-)127 Celsius!
-
I_DEBUG variable is sent via "set" command, instead of "internal" command
In the latest version, I noticed that when a node is sending out a
I_DEBUG
type payload, it's being sent out as set (1) command instead of internal (3) command. The type value is correctly set to "28" in both cases.Example:
// Debug msg container declaration MyMessage msgE1(255, I_DEBUG); // Send Debug payload send(msgE1.set("BME280 INIT SUCCESS"));
Expected message sent to gateway:
mygateway1-out/11/255/3/0/28 BME280 INIT SUCCESS
Actual message sent to gateway:
mygateway1-out/11/255/1/0/28 BME280 INIT SUCCESS
-
RE: BME280 failing to initialize after spikes in readings
@DavidZH Thanks for your input.
So am I calling
BME.begin()
for each sensor reading within the loop, and yourstartBME()
is called only once during setup? Would the sensor remember the config values set duringstartBME()
after waking up from the sleep? As I understand the power to the sensor is cut during the sleep... maybe I'm mistaken.Also, can you please show me how you defined
I2C_Mode
andBMEaddr
? Looks like it's part of a different BME280 library.Thanks!
-
RE: I_DEBUG variable is sent via "set" command, instead of "internal" command
@mfalkvidd Great. Thanks for the help!
Latest posts made by gogopotato
-
RE: BME280 Temp/Hum sensor on battery power increasingly skips(?) operation
@AWI This is the BME280 module I'm using, and looks like it's got an LDO built-in, am I correct? Vin is 1.8 - 5V DC. Maybe I should just bypass the voltage booster and supply power to the module directly from the battery...?
-
RE: BME280 Temp/Hum sensor on battery power increasingly skips(?) operation
@warmaniac yeah I think my BME280 is about +2 F than real temp. Anyway, do you have any suggestions as to resolving the issue? Maybe I should just replace it with DHT22.
-
RE: BME280 Temp/Hum sensor on battery power increasingly skips(?) operation
@Yveaux If step-up converter would only reduce the battery lifetime, why does Mysensors.org page suggest using one to extend battery life? I'm new to electronics so please bear with me!
-
RE: BME280 Temp/Hum sensor on battery power increasingly skips(?) operation
@warmaniac hmm now that I am reviewing my code, I have "do nothing if value is error" logic.
if (TF < 0 || H == 100 || H == 0) { // if sensor values are in error, do nothing. } else { send(msgT1.set(TF, 1)); send(msgH1.set(H, 1));
Perhaps the voltage booster is causing BME280 to behave badly? But then why would it work fine for the first few days? Do you think adding a bulk capacitor to BME280 would to stabilize power hence reducing errant readings? If so how big of a capacitor would I need? The mystery continues....
-
RE: BME280 Temp/Hum sensor on battery power increasingly skips(?) operation
@warmaniac Here's my code:
// Enable and select radio type attached #define MY_RADIO_NRF24 #define MY_NODE_ID 11 //#define MY_PARENT_NODE_ID #include <SPI.h> #include <MySensors.h> #include <avr/wdt.h> //watchdog timer lib #include <Adafruit_Sensor.h> #include <Adafruit_BME280.h> // Change I2C address in Adafruit_BME280 library to "0x76" (line 32 in the library file) #include "Wire.h" Adafruit_BME280 bme; // I2C #define CHILD_ID_HUM 0 // RH #define CHILD_ID_TEMP_F 1 // temp in F // MyMessage to controler MyMessage msgT1(CHILD_ID_TEMP_F, V_TEMP); MyMessage msgH1(CHILD_ID_HUM, V_HUM); MyMessage msgE1(255, V_TEXT); // Debug message void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Nursery", "1.2"); present(CHILD_ID_TEMP_F, S_TEMP); present(CHILD_ID_HUM, S_HUM); } void setup() { startBME(); ServerUpdate(); // for first data reading and sending to controler } void loop() { smartSleep(600000); // sleep for 10 mins ServerUpdate(); } void startBME() { delay(1000); //just in case if (!bme.begin()) { send(msgE1.set("BME280 INIT FAIL")); #ifdef MY_DEBUG Serial.println("BME280 initialization failed!"); #endif while (1); } else send(msgE1.set("BME280 INIT SUCCESS")); delay(5000); //delay for 5 second before the 1st reading; prevents errant spike in sensor value #ifdef MY_DEBUG Serial.println("BME280 initialization success!"); #endif } void ServerUpdate() // used to read sensor data and send it to controller { bme.begin(); //re-initialize for each reading double TF, TC, P, H; TC = bme.readTemperature(); //read temp in C TF = TC * 9 / 5 + 32; // convert default Celcius reading to Fahrenheit H = bme.readHumidity(); if (TF < 0 || H == 100 || H == 0) { // if sensor values are in error, do nothing. } else { send(msgT1.set(TF, 1)); send(msgH1.set(H, 1)); } #ifdef MY_DEBUG Serial.print("T = \t"); Serial.print(TF, 1); Serial.print(" degF\t"); //Serial.print("T = \t"); Serial.print(TC, 1); Serial.print(" degC\t"); Serial.print("H = \t"); Serial.print(H, 1); Serial.print(" percent"); //Serial.print("P = \t"); Serial.print(P, 1); Serial.print(" mBar\t"); #endif }
-
RE: BME280 Temp/Hum sensor on battery power increasingly skips(?) operation
@Yveaux Are you running the system with only the LEDs removed, and you are using the Arduino built-in voltage regulator? My concern with this setup is that it wouldn't last long since you are starting at already-low 3.0v at max. How long do you think it would last?
I am thinking of just using 4x AAs with built-in regulator if all else fails.
-
RE: [SOLVED] Pro Mini 3.3v with DS18B20 sensor getting (-)127 Celsius!
@AWI Turns out, I was using 47k resistor instead of 4.7k resistor. Now it's working with no issue
-
RE: [SOLVED] Pro Mini 3.3v with DS18B20 sensor getting (-)127 Celsius!
@AWI I will try that. Thanks!
-
BME280 Temp/Hum sensor on battery power increasingly skips(?) operation
Hi,
I have a battery-operated temp/humidty sensor running on 2x AA batteries. Components are:
- Arduino Pro 3.3v clone with 47uF bulk cap (LEDs and volt regulator removed)
- BME280
- NRF24L01+ radio with 47uF bulk cap
- 3.3v voltage booster/regulator w/ 100uF bulk cap and 0.1uF ceramic cap
It's set to report temp/hum every 10 minutes. Upon reset, it works flawlessly for 3 to 4 days, and then it'd start skipping an operation maybe once every a few hours (i.e. no update received). As time progresses such skips get worse, sending updates once per hour to every few hours. Eventually it'd just stop updating. Funny thing is, upon reset it'd work fine again for another few days only to get worse again following the exact same pattern described above. I'm unsure whether it's "self-resetting" I do not see the typical MySensors presentation messages when the sensor goes live again. But the smartSleep() integer counter sometimes gets reset.
I have two other identical sensors that are each powered via a 5v wall wart, and they NEVER display this symptom. So I'm pretty sure it's related to it being battery powered.
The battery is connected to a 3.3v voltage booster along with 100uF electrolyte bulk capacitor AND 0.1uF ceramic capacitor, as instructed by MySensors.org website. All components (Arduino, sensor, and radio) are powered by the output from the same voltage booster.
Has anyone experience a similar issue? What could be the culprit, and what can I do to fix this?
Thanks!