Group Details Private

Contest Winner

 
  • RE: Battery powered fingerprint reader

    @scalz forgot to mention, other reason why I'm using a 1Mhz bootloader is because having other nodes at 1Mhz in my network for running on batteries below 2.8v, the gateway is 1Mhz as well and I've always noticed issues when mixing 1Mhz and 8Mhz nodes with RFM69 radio. Since 2.2.0 they can at least kind of communicate but due to the different speed I guess, sometimes something gets lost. With NRF24L01 mixing looks good instead.

    posted in My Project
  • RE: Clock with temperature, humidity and CO2 level sensors

    And if you don't like a hot MQ sensor just aside your bed, or want a 3.3v sensor or even something which can run on battery (even if not recommended) , you can try using a CCS811 which is more expensive (€7) than a MQ sensor but not as expensive as many other digital sensors for detecting e.g. CO2 (https://www.aliexpress.com/item/CJMCU-811-CCS811-Carbon-Monoxide-CO-VOCs-Air-Quality-Numerical-Gas-Sensor-Module/32846769569.html).
    There's a library on Adafruit. I'd not say it is that accurate for measurements but for sure way better than the MQ.

    posted in My Project
  • RE: MySensors 2.3.0 released

    @crankycoder We use semantic versioning based on the OTA protocol. That means that a major change require network wide updates. A minor change (like this one) means there are features added but they shouold be backwards compatible (OTA wize) and a patch change is just a bugfix (which might also be included in minor and major releases).

    To be more concise: No, you do not need to upgrade anything. 2.3.0 is fully 2.2.0 compatible. But some features are changed so you might need to do some changes to your sketch if you use 2.3.0 version (like signing flags, rPi configuration options and such).

    posted in Announcements
  • MySensors 2.3.0 released

    Changelog: https://github.com/mysensors/MySensors/releases/tag/2.3.0

    Thanks to all GitHub users who contributed to this release:

    d00616
    flopp999
    Kartik Arora
    kvoit
    Marcelo Aquino
    Marco Bakera
    Martin Hjelmare
    Mikael Falkvidd
    Miloslav Kazda
    Patrick Fallberg
    per1234
    seeers
    tekka
    thucar
    Tombula

    posted in Announcements
  • Clock with temperature, humidity and CO2 level sensors

    My bedside alarm clock recently got broken so I decided to build up one by myself.
    The prototype looks like that:
    0_1529326386412_1.png

    • 1: arduino pro mini 3.3v
    • 2: RFM69 radio
    • 3: MQ135 sensor to measure CO2 level
    • 4: 20k/10k voltage divider to connect the MQ AO pin to an analog pin of the arduino (the MQ sensor runs at 5v, the arduino at 3.3v so we need to "scale" the output)
    • 5: DS3231 RTC so when the power goes down the node will be able to restore its clock even without requesting time to the controller
    • 6: SHT21 sensor for temperature and humidity
    • 7: SSD1306 OLED display 128x64

    The "production" version looks like this:
    0_1529326672488_2.png
    I'm again using the versatile EasyPCB from @sundberg84, here in the middle. The voltage divider has been soldered on the board, where battery measurement level is used to be placed. Of course Vin is not connected but instead it is used for MQ's AO pin connection.
    The SH21 and MQ sensors are just outside the box so to have accurate readings. The project is powered by 0.5€ USB ttl Chinese key which allows to power both the board (3.3v) and the MQ sensor (5v).
    I've also added a push button, hidden within the case which will request the time to the controller for the first initialization of the RTC.

    As for the code this is what I'm using based on NodeManager (with the latest SensorMQ code change not yet merged into the development branch):

    /**********************************
     * MySensors node configuration
     */
    
    // General settings
    #define SKETCH_NAME "Clock"
    #define SKETCH_VERSION "1.0"
    //#define MY_DEBUG
    #define MY_NODE_ID 1
    
    // RFM69 radio settings
    #define MY_RADIO_RFM69
    //#define MY_RFM69_FREQUENCY RFM69_433MHZ
    #define MY_IS_RFM69HW
    #define MY_RFM69_NEW_DRIVER
    
    /***********************************
     * NodeManager modules for supported sensors
     */
    
    #define USE_SIGNAL
    #define USE_SHT21
    #define USE_INTERRUPT
    #define USE_MQ
    #define USE_SSD1306
    
    /***********************************
     * NodeManager built-in features
     */
    
    // Enable/disable NodeManager's features
    #define FEATURE_DEBUG OFF
    #define FEATURE_POWER_MANAGER OFF
    #define FEATURE_INTERRUPTS ON
    #define FEATURE_CONDITIONAL_REPORT OFF
    #define FEATURE_EEPROM OFF
    #define FEATURE_SLEEP OFF
    #define FEATURE_RECEIVE ON
    #define FEATURE_TIME ON
    #define FEATURE_RTC ON
    #define FEATURE_SD OFF
    #define FEATURE_HOOKING ON
    
    /***********************************
     * Load NodeManager Library
     */
    
    #include "NodeManagerLibrary.h"
    NodeManager node;
    
    /***********************************
     * Add your sensors below
     */
    
    // built-in sensors
    SensorSignal signal(node);
    
    // Attached sensors
    SensorSHT21 sht21(node);
    SensorMQ mq(node,A0);
    DisplaySSD1306 ssd1306(node);
    SensorInterrupt button(node,3);
    
    /***********************************
     * Main Sketch
     */
    
    void syncTime(Sensor* sensor) {
      // update the time with the controller
      node.syncTime();
      // update the display
      ssd1306.onLoop(ssd1306.children.get(1));
    }
    
    // before
    void before() {
      // setup the serial port baud rate
      Serial.begin(MY_BAUD_RATE);
      /*
      * Configure your sensors below
      */
    
      // temperature/humidity sensor
      sht21.setReportIntervalMinutes(5);
    
      // gas sensor
      mq.setReportIntervalMinutes(5);
      mq.setRoValue(56842);
      mq.setCurveScalingFactor(38.35);
      mq.setCurveExponent(-2.74);
      
      // display
      ssd1306.setReportIntervalSeconds(30);
    
      // button
      button.setInitialValue(HIGH);
      button.setInterruptMode(FALLING);
      button.setInterruptHook(&syncTime);
      
      /*
      * Configure your sensors above
      */
      node.before();
    }
    
    // presentation
    void presentation() {
      // call NodeManager presentation routine
      node.presentation();
    }
    
    // setup
    void setup() {
      // call NodeManager setup routine
      node.setup();
    }
    
    // loop
    void loop() {
      // call NodeManager loop routine
      node.loop();
    }
    
    #if FEATURE_RECEIVE == ON
    // receive
    void receive(const MyMessage &message) {
      // call NodeManager receive routine
      node.receive(message);
    }
    #endif
    
    #if FEATURE_TIME == ON
    // receiveTime
    void receiveTime(unsigned long ts) {
      // call NodeManager receiveTime routine
      node.receiveTime(ts);
    }
    #endif
    

    To show on the display only the information relevant for this project, I had to override DisplaySSD1306 onLoop() function in this way:

    void DisplaySSD1306::onLoop(Child* child) {
      long timestamp = now()+60*60*2;
      _oled->setCursor(0,0);
      // print the current date
      _oled->setFont(X11fixed7x14);
      _oled->print(F("    "));
      if (day(timestamp) < 10) _oled->print(F("0"));
      _oled->print(day(timestamp));
      _oled->print(F("-"));
      if (month(timestamp) < 10) _oled->print(F("0"));
      _oled->print(month(timestamp));
      _oled->print(F("-"));
      _oled->println(year(timestamp));
      // print the current time
      _oled->setFont(lcdnums12x16);
      _oled->set2X();
      if (hour(timestamp) < 10) _oled->print(F("0"));
      _oled->print(hour(timestamp));
      _oled->print(F(":"));
      if (minute(timestamp) < 10) _oled->print(F("0"));
      _oled->println(minute(timestamp));
      // print the sensors' data
      _oled->setFont(Adafruit5x7);
      _oled->set1X();
      _oled->println("");
      _oled->print(((ChildFloat*)_node->getChild(1))->getValueFloat());
      _oled->print(F("C "));
      _oled->print((int)((ChildFloat*)_node->getChild(2))->getValueFloat());
      _oled->print(F("% "));
      _oled->print(((ChildInt*)_node->getChild(3))->getValueInt());
      _oled->print(F("ppm"));
      _oled->clearToEOL();
    }
    

    Finally some pictures of the project once finalized:
    0_1529327416355_3.png

    0_1529327427911_4.png

    posted in My Project
  • RE: 💬 Gas Sensor

    I spent the last few days trying to get a sense out of the black magic behind the calculations used for this sensor.
    I got the math now but still there is something I feel like it is not completely accurate with the current implementation.
    First of all the resulting ppm seems like a sort of normalized value; since I know e.g. CO2 ppm in clean air is around 400, the code seems not to take this into consideration. Also, configure it with a different MQ sensor doesn't seem an easy task.
    For these reasons I've tried starting from scratch, inspired by http://davidegironi.blogspot.com/2014/01/cheap-co2-meter-using-mq135-sensor-with.html#.WyLQo6qFNn5.
    Starting point is the power function y = a*x^b. The way to make the code more generic is to let the user provide the coordinates of two points (like @APL2017 was suggesting a while ago) which is an easy task and let the code solve the two equations and derive the values of a and b. Then, since ppm = a(rs/ro)^b, with a known value of ppm (e.g. the concentration in clear air of the gas, for co2 is 411), the equation can be solved for Ro by measuring Rs from the adc. Once a, b and Ro are known, the ppm comes naturally by solving again ppm = a(rs/ro)^b.
    I'm not sure this is better than the other methods but at least I get the same results from the blog above, both in terms of values of a, b and Ro as well as a real value of CO2 ppm measured with a MQ135.
    The downside of this of course is the difficulty to provide a known value of ppm for the calibration for other gas like e.g. Ch4, but if I claim I'm showing a ppm value, I want to be sure this is a real ppm 🙂
    The code is here, within the dev branch of NodeManager, any feedback would be appreciated!
    https://github.com/user2684/NodeManager/blob/19e37a45792be4d698a1316bf6eb4f954a8455f5/NodeManagerLibrary.ino#L2441

    posted in Announcements
  • RE: 💬 EASY PIR multisensors box

    And final version of the enclosure 😃
    0_1528921238484_DSC06452.jpg
    It also has rubber 3d printed parts to protect the board from the environment but allow the sensor to work properly. Will show it later.

    posted in OpenHardware.io
  • RE: 💬 NodeManager

    @felix-haverkamp got it, thanks, I've opened this issue https://github.com/mysensors/NodeManager/issues/366.

    Regarding the sensor motion, weird, by default should attach to CHANGE interrupt so to intercept both. Any chance to share NodeManager's debug log as well? Thanks

    user2684 created this issue in mysensors/NodeManager

    open Improve the documentation #366

    posted in OpenHardware.io
  • RE: MPR121 or other capacitive touch sensor

    @nick-willis interesting thanks, adding it to the queue for the next release (https://github.com/mysensors/NodeManager/issues/365)

    posted in NodeManager
  • RE: NodeManager: TTP229 does not send Passcode

    @hard-shovel @igork hi guys, I've just come across this thread. Not sure if you got the problem solved, if not, please let me know or open an issue on the NodeManager's github page. Thanks!

    posted in Troubleshooting