Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. carlierd
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    carlierd

    @carlierd

    29
    Reputation
    192
    Posts
    1340
    Profile views
    1
    Followers
    0
    Following
    Joined Last Online

    carlierd Follow

    Best posts made by carlierd

    • Office plan monitor (advice required)

      Hello,

      Thanks to @mfalkvidd I implement my first plant monitor. As it's working perfectly I decided to create a specific design base on the following post.

      The schematic :
      0_1461932293283_2016-04-29 11.10.08.png

      The board (route by eagles):
      0_1461932385715_2016-04-29 10.18.30.png

      I tried to make the smaller board possible.

      Any comment / advice is really recommended 🙂

      David

      posted in My Project
      carlierd
      carlierd
    • RE: Office plant monitoring

      Hello,

      After several weeks I finally succeed to create a dedicated PCB ! It was started yesterday evening and works fine.

      Some pictures:
      0_1469782265724_Photo 1.jpg
      0_1469782279459_Photo 2.jpg
      0_1469782286758_Photo 3.jpg

      Measure is reported each two hours. So I expect more than two years on a CR2032 (using @GertSanders firmware).

      I can off course provide any information as PCB.

      Thanks @mfalkvidd for the idea and the code. The project is now WAF 😉

      David.

      posted in My Project
      carlierd
      carlierd
    • RE: Slim Node scene controller/ keypad

      Hello,

      Some pictures of my scene controller inspired by this post ! I modified the original sketch to have two functions: keyboard for my alarm (from key 1 to 9) and scene controller (from key 10 to 16). Thanks @awi for the idea and the original sketch !

      0_1471010520501_Scene controller 1.png

      0_1471010530511_Scene controller 2.png

      0_1471010539448_Scene controller 3.png

      0_1471010545316_Scene controller 4.png

      David.

      posted in My Project
      carlierd
      carlierd
    • RE: MySensors 1.5.3 Released

      Compilation OK !!

      Thanks !

      posted in Announcements
      carlierd
      carlierd
    • RE: [Solved] Soft signing issue

      So simple as soon as you give me the answer 😉

      Thanks a lot !

      posted in Troubleshooting
      carlierd
      carlierd
    • RE: Please add a guide for how to connect use the RFM69(H)W

      Thanks Hek !! Do you also add procedure for modification of librairie to use RFM69 ? I understood that something needs to be done ?

      posted in Feature Requests
      carlierd
      carlierd
    • RE: [Solved] How to check RFM69 is a HW model ?

      Autoreply !

      So I check the web and found interesting conversation from Lowpowerlab.

      It seems there is no software way to check the model (there is a version registry but as I don't have RFM69H to check if there is a difference it's difficult to conclude).
      But according to the Lowpowerlab thread both models looks really different!

      RFM69H:
      RFM69W-500x500.jpg

      RFM69HW:
      RFM69HW-500x500.jpg

      There is no doubt 😉

      posted in Hardware
      carlierd
      carlierd
    • RE: Slim Node Si7021 sensor example

      @ar91 Please find the code I used in 3 different nodes. The good thing with the playground lib is that there is error message if dialog with DHT22 failed.

      /**
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2015 Sensnology AB
       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       */
      
      /**************************************************************************************/
      /* Temperature, humidity and luminosity measurements.                                 */
      /*                                                                                    */
      /* Version     : 1.1.6                                                                */
      /* Date        : 10/01/2016                                                           */
      /* Modified by : David Carlier                                                        */
      /**************************************************************************************/
      /*                                ---------------                                     */
      /*                            RST |             |  A5                                 */
      /*                            RX  |             |  A4                                 */
      /*                            TX  |   ARDUINO   |  A3                                 */
      /*     RFM69 (DIO0) --------- D2  |     UNO     |  A2                                 */
      /*            DHT22 --------- D3  |             |  A1                                 */
      /*            Power --------- D4  | ATMEGA 328p |  A0 --------- Light dep. resistor   */
      /*              +3v --------- VCC |             | GND --------- GND                   */
      /*              GND --------- GND |  8MHz int.  | REF                                 */
      /*                            OSC |             | VCC --------- +3v                   */
      /*                            OSC |             | D13 --------- RFM69 (SCK)           */
      /*                            D5  |             | D12 --------- RFM69 (MISO)          */
      /*                            D6  |             | D11 --------- RFM69 (MOSI)          */
      /*                            D7  |             | D10 --------- RFM69 (NSS)           */
      /*                            D8  |             |  D9                                 */
      /*                                ---------------                                     */
      /*                                                                                    */
      /* Power = Vcc for LDR.                                                               */
      /* +3v = 2*AA                                                                         */
      /*                                                                                    */
      /**************************************************************************************/
      
      #include <SPI.h>
      #include <MySensor.h>
      #include <dht.h>
      #include <MyTransportRFM69.h>
      #include <MySigningAtsha204Soft.h>
      
      #define CHILD_ID_HUM 0
      #define CHILD_ID_TEMP 1
      #define CHILD_ID_LIGHT 2
      #define CHILD_ID_VOLTAGE 3
      #define LIGHT_SENSOR_ANALOG_PIN 0
      #define HUMIDITY_SENSOR_DIGITAL_PIN 3
      #define POWER_PIN 4
      //unsigned long SLEEP_TIME = 850000; // Sleep time between reads (in milliseconds) (close to 15')
      unsigned long SLEEP_TIME = 275000; // Sleep time between reads (in milliseconds) (close to 5')
      
      //Construct MySensors library
      MySigningAtsha204Soft signer;
      MyHwATMega328 hw;
      MyTransportRFM69 transport;
      MySensor gw(transport, hw, signer);
      dht DHT;
      MyMessage msgHum(CHILD_ID_HUM, V_HUM);
      MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
      MyMessage msgLum(CHILD_ID_LIGHT, V_LEVEL);
      MyMessage msgVolt(CHILD_ID_VOLTAGE, V_VOLTAGE);
      
      /**************************************************************************************/
      /* Initialization                                                                     */
      /**************************************************************************************/
      void setup()
        {
        //Get time (for setup duration)
        #ifdef DEBUG
          unsigned long startTime = millis();
        #endif
      
        //Start MySensors
        gw.begin();
      
        //Send the Sketch Version Information to the Gateway
        gw.sendSketchInfo("GHAS sensor", "1.1.5");
      
        //Register all sensors to gw (they will be created as child devices)
        gw.present(CHILD_ID_HUM, S_HUM);
        gw.present(CHILD_ID_TEMP, S_TEMP);
        gw.present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);
        gw.present(CHILD_ID_VOLTAGE, S_MULTIMETER);
      
        //Delay for DHT22
        delay(1500);
      
        //Print setup debug
        #ifdef DEBUG
          int duration = millis() - startTime;
          Serial.print("[Setup duration: "); Serial.print(duration, DEC); Serial.println(" ms]");
        #endif
        }
      
      /**************************************************************************************/
      /* Main loop                                                                          */
      /**************************************************************************************/
      void loop()
        {
        //Get time (for a complete loop)
        #ifdef DEBUG
          unsigned long startTime = millis();
        #endif
      
        //Power on
        powerOnPeripherals();
      
        //Get DHT22 data
        int dht22Result = DHT.read22(HUMIDITY_SENSOR_DIGITAL_PIN);
        switch (dht22Result)
          {
          case DHTLIB_OK:  
                      //Serial.println("OK,\t");
                      break;
          case DHTLIB_ERROR_CHECKSUM:
                      #ifdef DEBUG
                        Serial.println("Checksum error,\t");
                      #endif
                      break;
          case DHTLIB_ERROR_TIMEOUT:
                      #ifdef DEBUG
                        Serial.println("Time out error,\t");
                      #endif
                      break;
          case DHTLIB_ERROR_CONNECT:
                      #ifdef DEBUG
                        Serial.println("Connect error,\t");
                      #endif
                      break;
          case DHTLIB_ERROR_ACK_L:
                      #ifdef DEBUG
                        Serial.println("Ack Low error,\t");
                      #endif
                      break;
          case DHTLIB_ERROR_ACK_H:
                      #ifdef DEBUG
                        Serial.println("Ack High error,\t");
                      #endif
                      break;
          default:
                      #ifdef DEBUG
                        Serial.println("Unknown error,\t");
                      #endif
                      break;
          }
      
        //Get temperature and humidity
        float temperature = 0;
        float humidity = 0;
        if (dht22Result == DHTLIB_OK)
          {
          temperature = DHT.temperature;
          humidity = DHT.humidity;
          }
      
        //Get power before luminosity to use real voltage
        float realVoltage = getVoltage() / 100.0;
        int batteryPcnt = realVoltage * 100 / 3.0;
        if (batteryPcnt > 100) {batteryPcnt = 100;}
        int lux = computeIlluminance(realVoltage);
      
        //Power off
        powerOffPeripherals();
      
        //Send data to gateway
        gw.send(msgHum.set(humidity, 1));
        gw.send(msgTemp.set(temperature, 1));
        gw.send(msgLum.set(lux));
        gw.send(msgVolt.set(realVoltage, 2));
        gw.sendBatteryLevel(batteryPcnt);
      
        //Print debug
        #ifdef DEBUG
          Serial.print(temperature, 1);
          Serial.print(" degC");
          Serial.print("   ");
          Serial.print(humidity, 1);
          Serial.print(" %");
          Serial.print("   ");
          Serial.print(lux);
          Serial.print(" lx");
          Serial.print("   ");
          Serial.print(realVoltage);
          Serial.print(" v");
          int duration = millis() - startTime;
          Serial.print("   ");
          Serial.print("["); Serial.print(duration, DEC); Serial.println(" ms]");
          Serial.flush();
        #endif
      
        //Sleep
        gw.sleep(SLEEP_TIME);
        }
      
      /**************************************************************************************/
      /* Allows to compute illuminance (in LUX) from LIGHT_SENSOR_ANALOG_PIN.               */
      /**************************************************************************************/
      int computeIlluminance(float realVoltage)
        {
        //Get luminosity
        int luminosity = analogRead(LIGHT_SENSOR_ANALOG_PIN);
        //Calculating the voltage in the input of the ADC
        double voltage = realVoltage * ((double)luminosity / 1024.0);
        //Calculating the resistance of the photoresistor in the voltage divider
        double resistance = (10.0 * realVoltage) / voltage - 10.0;
        //Calculating the intensity of light in lux and return it
        int illuminance = 255.84 * pow(resistance, -10/9);
        return illuminance;
        }
      
      /**************************************************************************************/
      /* Allows to get the real Vcc (return value * 100).                                   */
      /**************************************************************************************/
      int getVoltage()
        {
        const long InternalReferenceVoltage = 1056L;
        ADMUX = (0<<REFS1) | (1<<REFS0) | (0<<ADLAR) | (1<<MUX3) | (1<<MUX2) | (1<<MUX1) | (0<<MUX0);
        delay(50);  // Let mux settle a little to get a more stable A/D conversion
        //Start a conversion  
        ADCSRA |= _BV( ADSC );
        //Wait for it to complete
        while (((ADCSRA & (1<<ADSC)) != 0));
        //Scale the value
        int result = (((InternalReferenceVoltage * 1023L) / ADC) + 5L) / 10L;
        return result;
        }
      
      /**************************************************************************************/
      /* Allows to power ON peripherals.                                                    */
      /**************************************************************************************/
      void powerOnPeripherals()
        {
        //Power-up
        pinMode (POWER_PIN, OUTPUT);
        digitalWrite (POWER_PIN, HIGH);
        delay(1);
        }
      
      /**************************************************************************************/
      /* Allows to power OFF peripherals.                                                   */
      /**************************************************************************************/
      void powerOffPeripherals()
        {
        //Power off
        digitalWrite (HUMIDITY_SENSOR_DIGITAL_PIN, LOW);
        digitalWrite (POWER_PIN, LOW);
        pinMode (HUMIDITY_SENSOR_DIGITAL_PIN, INPUT);
        pinMode (POWER_PIN, INPUT);
        }
      

      Hope it helps !

      David.

      posted in My Project
      carlierd
      carlierd
    • RE: Newbie: RFM69 serial gateway

      Arf ! Remove the cable between RFM and SMA connector. Use only RF cables. You can do the job with a cable of 17,3 cm directly connected to the antenna pin of the RFM. It's very good for testing and you can reach more than 100 meters with it.

      David.

      posted in Troubleshooting
      carlierd
      carlierd
    • RE: Ethernet gateway example in DEV branch

      Hello,

      I tried the SOFT SPI from Gieemek (see this post) and it's really better ! I done it with a UNO board on pin 7, 6, 5 and 4 (it seems that pin 13, 12, 11 and 10 are not a good choice with the Ethernet shield).

      So now I can ping the Gateway 🙂

      But (yes, there is a but), MYSController is not able to connect and there is no specific message on the serial link of the UNO board:

      0;0;3;0;9;Starting...
      IP: 192.1.1.66
      0;0;3;0;9;gateway started, id=0, parent=0, distance=0
      

      The IP address is the good one.
      What can I do ?

      Thanks !

      posted in Development
      carlierd
      carlierd

    Latest posts made by carlierd

    • RE: Clean looking sensor node

      Very interesting !! Thanks for the idea !

      David.

      posted in Enclosures / 3D Printing
      carlierd
      carlierd
    • RE: 💬 MyMultisensors

      Very good job !

      When will share the schematic ?
      How is responding the PIR ?

      And off course, how is the battery usage ? So many sensors could discharge it faster ...

      David.

      posted in OpenHardware.io
      carlierd
      carlierd
    • RE: Office plant monitor

      @scalz : I missed your reply ! Interesting withe paper !

      @scalz said:

      @Nca78 you can have brownout if the battery is near end of life and nothing has been designed to handle a bit the internal res. but with a fresh a coincell and some capa, you can do some chain tx but that's not the best for the battery life.

      The only case where i had issue with brownout at startup, plus it was a fresh coincell was with a crappy ali coincell batt!! very bad quality! now I'm using only good quality coincell like duracell, varta, maxell.. and that's day and night 😉

      @carlierd If you're interested this doc explains very well the capacitor calc etc... http://www.ti.com.cn/cn/lit/wp/swra349/swra349.pdf

      • capa ideally calculated/estimated (on mine I have 200uF, plus others for sensors, radio is 86uA etc..) and after multiple msg presentation on frsh coincell i don't fall under 2.85 (voltage starts 3.05V) because I can't recover voltage during this period.
        Hopefully a transmit is not 1sec! More something like says 30+ ms (depending if signing is needed, ack, retries.. etc). To not break capa benefits, it's better to sleep between tx during chains..to recover voltage and optimize battery life. Sleeping 200ms can be enough
      • For the capa leakage, it depends of capa. common good quality ceramic have not those leakage (few nano). Sure on this design it's not a ceramic.
      • You're right at runtime 1Mhz consumes less than 8Mhz; mA vs thousands uA. But at 1Mhz everything is slower, comms too (I mean code execution). During deep sleep, there is no difference in power consumption. Oscillator is stopped so mhz does not mean. Note: at 8Mhz you can wake in few uA, at 1Mhz it's slower of course.
      posted in OpenHardware.io
      carlierd
      carlierd
    • RE: Problem with RFM69 on homemade board

      Hello,

      What is the source of the 3,3 ? I got some issues with poor voltage converter. Using an arduino uno board which provides 5 and 3,3V solved my problem.

      David.

      posted in Hardware
      carlierd
      carlierd
    • RE: Slim Node scene controller/ keypad

      Hello,

      Some pictures of my scene controller inspired by this post ! I modified the original sketch to have two functions: keyboard for my alarm (from key 1 to 9) and scene controller (from key 10 to 16). Thanks @awi for the idea and the original sketch !

      0_1471010520501_Scene controller 1.png

      0_1471010530511_Scene controller 2.png

      0_1471010539448_Scene controller 3.png

      0_1471010545316_Scene controller 4.png

      David.

      posted in My Project
      carlierd
      carlierd
    • RE: rfm69 and atc

      @Fleischtorte So I am not the only one David waiting for ATC and RSSI 😉

      David.

      posted in Development
      carlierd
      carlierd
    • RE: Office plant monitor

      Interesting !
      I will check in few weeks the result. There is several capacitors to help the stability maybe it could be enough. If it's not the case I will replace the CR2032 by 2 * AAA.

      posted in OpenHardware.io
      carlierd
      carlierd
    • RE: Office plant monitor

      @Nca78 Like @mfalkvidd wrote, the expected life duration is greater than 2 years. But it's just theory. My first node (on 2*AA) was started several weeks ago and the battery level did not change. So I am confident 😉

      I measure the power consumption when working at 1 MHz and there was no difference between 1 or 8 MHz. As I have to decrease the transmission speed at 1 MHz, I got some issues. The main was probably with the signing feature.

      posted in OpenHardware.io
      carlierd
      carlierd
    • RE: 💬 MyMultisensors

      @scalz I will wait. I am curious to see the result on my nodes !

      posted in OpenHardware.io
      carlierd
      carlierd
    • RE: 💬 MyMultisensors

      Hello,

      Very complete board !

      How did you report RSSI ? It is RSSI of the node or the gateway ?

      David.

      posted in OpenHardware.io
      carlierd
      carlierd