Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
G

gogopotato

@gogopotato
About
Posts
22
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • BME280 Temp/Hum sensor on battery power increasingly skips(?) operation
    G gogopotato

    @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...?

    http://www.ebay.com/itm/131576719166

    Troubleshooting

  • BME280 Temp/Hum sensor on battery power increasingly skips(?) operation
    G gogopotato

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

    Troubleshooting

  • BME280 Temp/Hum sensor on battery power increasingly skips(?) operation
    G gogopotato

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

    Troubleshooting

  • BME280 Temp/Hum sensor on battery power increasingly skips(?) operation
    G gogopotato

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

    Troubleshooting

  • BME280 Temp/Hum sensor on battery power increasingly skips(?) operation
    G gogopotato

    @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
    }
    
    Troubleshooting

  • BME280 Temp/Hum sensor on battery power increasingly skips(?) operation
    G gogopotato

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

    Troubleshooting

  • [SOLVED] Pro Mini 3.3v with DS18B20 sensor getting (-)127 Celsius!
    G gogopotato

    @AWI Turns out, I was using 47k resistor instead of 4.7k resistor. Now it's working with no issue :)

    Troubleshooting

  • [SOLVED] Pro Mini 3.3v with DS18B20 sensor getting (-)127 Celsius!
    G gogopotato

    @AWI I will try that. Thanks!

    Troubleshooting

  • BME280 Temp/Hum sensor on battery power increasingly skips(?) operation
    G gogopotato

    Hi,

    I have a battery-operated temp/humidty sensor running on 2x AA batteries. Components are:

    1. Arduino Pro 3.3v clone with 47uF bulk cap (LEDs and volt regulator removed)
    2. BME280
    3. NRF24L01+ radio with 47uF bulk cap
    4. 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!

    Troubleshooting

  • [SOLVED] Pro Mini 3.3v with DS18B20 sensor getting (-)127 Celsius!
    G gogopotato

    @AWI I'm using the example provided in https://www.mysensors.org/build/temp

    numSensors = sensors.getDeviceCount();
    

    The above statement is returning zero. So perhaps I have a faulty/dead sensor? I should have tested the sensor before soldering it in...

    Troubleshooting

  • [SOLVED] Pro Mini 3.3v with DS18B20 sensor getting (-)127 Celsius!
    G gogopotato

    I hooked up DS18B20 to Pro Mini 3.3v using Vcc (3.3v). But the temp reading is constant at -127 degree Celsius. Below is my wiring with 4k7 Ohm resistor across data and vcc. I did some googling and some say -127 C reading means incorrect wiring. Is my wiring wrong?

    alt text

    Troubleshooting

  • Do sleep() or smartsleep() also send sleep/power-down command to NRF24L01+ ?
    G gogopotato

    Nice. Thanks for the info. Just out of curiosity, is the radio sleep done by the mysensors library as part of the sleep()/smartsleep() or is it the radio HW's feature?

    Development

  • Do sleep() or smartsleep() also send sleep/power-down command to NRF24L01+ ?
    G gogopotato

    I'm using the latest MySensors library with NRF24L01+. The RF module is powered directly from two AA batteries via DC-DC booster. In fact, the arduino, wireless, and sensor are all connected directly to the booster.

    I understand that using sleep() and smartsleep() will make the arduino board to go into low-power mode, but what about the NRF24L01+ module? Do I have to send another wireless-module-specific sleep command to put the radio also to sleep?

    Development

  • I_DEBUG variable is sent via "set" command, instead of "internal" command
    G gogopotato

    @mfalkvidd Great. Thanks for the help!

    Bug Reports

  • I_DEBUG variable is sent via "set" command, instead of "internal" command
    G gogopotato

    @mfalkvidd Makes sense. Is there another "free-form" message type I can use instead?

    Bug Reports

  • I_DEBUG variable is sent via "set" command, instead of "internal" command
    G gogopotato

    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
    
    Bug Reports

  • BME280 failing to initialize after spikes in readings
    G gogopotato

    @DavidZH Thanks for your input.

    So am I calling BME.begin() for each sensor reading within the loop, and your startBME() is called only once during setup? Would the sensor remember the config values set during startBME() 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 and BMEaddr? Looks like it's part of a different BME280 library.

    Thanks!

    Troubleshooting bme280 i2c pro mini

  • !TSM:FPAR:FAIL
    G gogopotato

    Sorry, looks like some of the other files may actually need the MY_NODE_ID declared in order to function properly. Just comment it out from this file only and see what happens.

    C:\Users\Michael\Documents\Arduino\libraries\MySensors/MyConfig.h

    Troubleshooting

  • !TSM:FPAR:FAIL
    G gogopotato

    Open this file:

    C:\Users\Michael\Documents\Arduino\libraries\MySensors/MyConfig.h

    ...and comment out this line.

    #define MY_NODE_ID AUTO
    

    Compiler is complaining about "MY_NODE_ID" being defined multiple times (AUTO and 5). Actually, if you want to be absolutely sure, check other libraries (all .h files listed in your error msg) and comment out the same line if found.

    Troubleshooting
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular