Navigation

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

    epierre

    @epierre

    Hero Member

    26
    Reputation
    578
    Posts
    3075
    Profile views
    9
    Followers
    3
    Following
    Joined Last Online

    epierre Follow
    Hero Member

    Best posts made by epierre

    • New sketches: UV, WaterMeter for Reed sensors, Air quality ...

      Hello,

      Lost posts, but the sketches are still here:

      https://github.com/empierre/arduino

      • MQ135.ino : for CO2/COV ... validated
      • MQ2.ino : for ethanol... still ongoing...
      • PressureSensor.ino : validated, works well, too much temp reading given back
      • SoundSensor2.ino: not yet tested
      • UVsensor.ino : validated
      • WaterMeterPulseSensor2.ino : for use with water meter that have a reed switch, validated

      Next steps:

      • validate sound sensor
      • validate mq2 sensor (I dont smoke...hart to trigger...)
      • MQ6 sensor
      • MQ131 sensor
      • TGS2600 sensor
      posted in Development
      epierre
      epierre
    • RE: MySensors 1.5 Released

      @hek I have them all already:

      Water leak,Moisture : my leaf wetness
      Sound: I have stopped by waiting to have a real decibel algorithm... but I need FFT for that...
      Vibration: done it too 😉 help yourself !

      https://github.com/empierre/arduino/blob/master/FloodSensor.ino
      https://github.com/empierre/arduino/blob/master/LeafWetnessSensor.ino
      https://github.com/empierre/arduino/blob/master/SoundSensor2.ino
      https://github.com/empierre/arduino/blob/master/VibrationSensor.ino

      posted in Announcements
      epierre
      epierre
    • Water meter : grey scale sensor

      Hello,

      A friend of mine has a Sensus Residia Jet water meter, which can work through Z-wave with a "Secure SWM301 Water Meter Sensor".

      Only one domotic box support it but not the other at this time, so I tried to make it work with mysensors..

      I have found a way based on "DFRobot Analog Grayscale Sensor V2" that works !

      The sensor: http://www.dfrobot.com/index.php?route=product/product&product_id=81

      Simply scotch the sensor on the counter so that it detects the wheel (no magnet or visual signal on this counter... the zwave sensors uses VLF induction with two tors).

      IMG_20150630_172731.jpg

      /*
       Use this sensor to measure volume and flow of your house watermeter.
       You need to set the correct pulsefactor of your meter (pulses per m3).
       The sensor starts by fetching current volume reading from gateway (VAR 1).
       Reports both volume and flow back to gateway.
      
       Sensor on pin analog 0
       
       DFRobot Analog Grayscale Sensor V2
       Watermeter sensus Residia Jet
       
       http://www.dfrobot.com/index.php?route=product/product&product_id=81
      
      Contribution: Hek, adapted by epierre to greyscale sensor water meter
        License: Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0)
      
      
      */
      
      #include <MySensor.h>  
      #include <SPI.h>
      
      #define ANALOG_INPUT_SENSOR 0                   // The analog input you attached your sensor. 
      #define PULSE_FACTOR 1000                       // Nummber of blinks per m3 of your meter (One rotation/liter)
      #define SLEEP_MODE false                        // flowvalue can only be reported when sleep mode is false.
      #define MAX_FLOW 40                             // Max flow (l/min) value to report. This filetrs outliers.
      #define INTERRUPT DIGITAL_INPUT_SENSOR-2        // Usually the interrupt = pin -2 (on uno/nano anyway)
      #define CHILD_ID 5                              // Id of the sensor child
      unsigned long SEND_FREQUENCY = 20000;           // Minimum time between send (in seconds). We don't want to spam the gateway.
      
      MySensor gw;
      MyMessage flowMsg(CHILD_ID,V_FLOW);
      MyMessage volumeMsg(CHILD_ID,V_VOLUME);
      MyMessage pcMsg(CHILD_ID,V_VAR1);
       
      double ppl = ((double)PULSE_FACTOR)/1000;        // Pulses per liter
      
      volatile unsigned long pulseCount = 0;   
      volatile unsigned long lastBlink = 0;
      volatile double flow = 0;   
      boolean pcReceived = false;
      unsigned long oldPulseCount = 0;
      unsigned long newBlink = 0;   
      double oldflow = 0;
      double volume;                     
      double oldvolume;
      unsigned long lastSend;
      unsigned long lastPulse;
      unsigned long currentTime;
      boolean metric;
      long lastDebounce = 0;
      long debounceDelay = 500;    // Ignore bounces under 1/2 second
      int oldval =0;
      int val=0;
      
      
      void setup()  
      {  
        gw.begin(incomingMessage); 
        
        // Send the sketch version information to the gateway and Controller
        gw.sendSketchInfo("Water Meter", "1.0 greyscale");
      
        // Register this device as Waterflow sensor
        gw.present(CHILD_ID, S_WATER);       
      
        // Fetch last known pulse count value from gw
         gw.request(CHILD_ID, V_VAR1);
      
        //Serial.print("Last pulse count from gw:");
        //Serial.println(pulseCount);
        //  attachInterrupt(INTERRUPT, onPulse, RISING);
        lastSend = millis();
        
        //led blinking
        pinMode(13, OUTPUT);
      }
      
      
      void loop()     
      { 
        gw.process();
        currentTime = millis();
      
        val=analogRead(0);
        //Serial.println(val);
        if ((oldval <100) and (val >100)) {
          pulseCount++;
          oldval=val;
        } else {
              oldval=val;
        }
        delay(100);	
          // Only send values at a maximum frequency or woken up from sleep
        bool sendTime = currentTime - lastSend > SEND_FREQUENCY;
        
          // Pulse count has changed
          if (pulseCount != oldPulseCount) {
            gw.send(pcMsg.set(pulseCount));                  // Send  volumevalue to gw VAR1
            double volume = ((double)pulseCount/((double)PULSE_FACTOR));     
            oldPulseCount = pulseCount;
            if (volume != oldvolume) {
              gw.send(volumeMsg.set(volume, 3));               // Send volume value to gw
              //Serial.print("V=");
              //Serial.println(volume);
              oldvolume = volume;
            } 
          }
          lastSend = currentTime;
          if (sendTime && !pcReceived) {
          // No count received. Try requesting it again
          gw.request(CHILD_ID, V_VAR1);
          lastSend=currentTime;
          }
        
        
      }
      
      
      void incomingMessage(const MyMessage &message) {
        if (message.type==V_VAR1) {  
          pulseCount = oldPulseCount = message.getLong();
          Serial.print("Received last pulse count from gw:");
          Serial.println(pulseCount);
          pcReceived = true;
        }
      }
      
      

      Here a picture of the emitter, a Nano with high range antennae in a box !
      IMG_20150701_143623.jpg

      posted in Hardware
      epierre
      epierre
    • Viration sensor

      A new sketch using a simpler vibration sensor than the one on the store, this one has only one output to go into digital pin 3 hich is PWM.

      VibrationSensor.ino

      The sketch uses the interrupt to count the value between too sending to gateway (sleep time).

      Globally the sensor is not that much sensitive, some people use the piezzo one for seismic activity monitoring, this one is more door knock measurement. As I write, it is on my keyboard and does not report anything, but if I knock on the keyboard a value is reported.

      @hek I would need a value too for this one...

      posted in My Project
      epierre
      epierre
    • RE: serial reading

      Ok so today I've added a conf file reading, and started to work on the database model (hardware-device-sensor) in sqlite3 to keep track of last known value and last affected sensor id. This speeds up the whole thing at startup.

      Next step is to store all devices data in the table, and update them whenever they are received.

      Afterward, I'll try creating a new sensor automatically, and then try to extend it to other sensors type.

      If anyone is interrested in trying it (very beta yet...)...

      posted in Troubleshooting
      epierre
      epierre
    • RE: What did you build today (Pictures) ?

      not with mysensors, but could have been: CNY70 water sensor meter (rotating wheel) with extended wifi range, the heart of it is a Particle Photon pushing to domoticz

      0_1563895501049_1e1f491c-38c1-413e-89db-0d248b38f86c-image.png

      posted in General Discussion
      epierre
      epierre
    • RE: Soil Humidity and temperature sensor - Watermark / Davis granular matrix sensor

      Two ways of doing it:

      1 - With capacitors:
      http://forum.arduino.cc/index.php/topic,22250.0.html

      2- By alternating the voltage way:
      http://vanderleevineyard.com/1/category/vinduino/1.html

      4533105.jpg

      The resistance has to be moved to 4700ohms.

      The formula from the datasheet is known:
      http://www.kimberly.uidaho.edu/water/swm/Calibration_Watermark2.htm

      posted in My Project
      epierre
      epierre
    • RE: Ebyte nRF24L01P Wireless rf Transceiver E01-2G4M27D 27dBm SPI 2.4GHz Transmitter

      Hy there, added an AMS1117 regulator board and a 4,7uF and this works agains ! thanks all for your help !

      posted in Troubleshooting
      epierre
      epierre
    • RE: Air Quality Sensor

      I'm now testing the MICS-6814 (3 sensors in one) given for :
      Carbon monoxide CO 1 -1000ppm
      **Nitrogen dioxide NO2 0.05 –10ppm **
      Ethanol C2H5OH 10 –500ppm
      Hydrogen H2 1 –1000ppm
      Ammonia NH3 1 –500ppm
      Methane CH4 >1000ppm
      Propane C3H8 >1000ppm
      Iso-butane C4H10 >1000ppm

      Datasheet maionly speaks on CO, NO2 and NH3:
      http://www.seeedstudio.com/wiki/images/1/10/MiCS-6814_Datasheet.pdf

      Here is are scripts:
      http://www.seeedstudio.com/wiki/Grove_-_Multichannel_Gas_Sensor

      http://www.seeedstudio.com/wiki/images/1/10/MiCS-6814_Datasheet.pdf

      Some readings:

      The concentration of NH3 is 0.99 ppm
      The concentration of CO is 1.20 ppm
      The concentration of NO2 is 0.15 ppm
      The concentration of C3H8 is 1000.04 ppm
      The concentration of C4H10 is 999.98 ppm
      The concentration of CH4 is 2991.14 ppm
      The concentration of H2 is 1.09 ppm
      The concentration of C2H5OH is 1.40 ppm
      

      I guess I'll make a script soon...

      posted in Hardware
      epierre
      epierre

    Latest posts made by epierre

    • RE: 1.5.1 to 2.3.2 issues

      intermediary result: I have started a second gateway and now the nodes do communicate... puzzled...

      I remove the extra gateway... same situation...

      so reprogram gateway with:
      #define MY_RF24_PA_LEVEL RF24_PA_LOW

      so it seems this was the responsible for this !

      thanks !

      posted in Troubleshooting
      epierre
      epierre
    • RE: 1.5.1 to 2.3.2 issues

      will try to put it in debug mode. now I've added a 1u and 100u with no result

      posted in Troubleshooting
      epierre
      epierre
    • 1.5.1 to 2.3.2 issues

      Hello,

      Today I migrated my gateway from 1.5.1 to 2.3.2, tested it fine.

      Then I started trying to reprogram my sensors to 2.3.2 and none works. No wiring changed, previously fine working (CO2, DSM dust sensor)

      16 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=16,REL=255,VER=2.3.2
      26 TSM:INIT
      28 TSF:WUR:MS=0
      34 TSM:INIT:TSP OK
      36 TSF:SID:OK,ID=20
      38 TSM:FPAR
      41 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      2050 !TSM:FPAR:NO REPLY
      2052 TSM:FPAR
      2056 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      3899 TSF:MSG:READ,3-3-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      3904 TSF:MSG:BC
      4063 !TSM:FPAR:NO REPLY
      4065 TSM:FPAR
      4069 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      5923 TSF:MSG:READ,3-3-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      5928 TSF:MSG:BC
      6076 !TSM:FPAR:NO REPLY
      6078 TSM:FPAR
      6082 ?TSF:MSG:SEND,20-20-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      7947 TSF:MSG:READ,3-3-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      7952 TSF:MSG:BC
      8089 !TSM:FPAR:FAIL
      8090 TSM:FAIL:CNT=1
      8092 TSM:FAIL:DIS
      8094 TSF:TDI:TSL

      posted in Troubleshooting
      epierre
      epierre
    • RE: Ebyte nRF24L01P Wireless rf Transceiver E01-2G4M27D 27dBm SPI 2.4GHz Transmitter

      Hy there, added an AMS1117 regulator board and a 4,7uF and this works agains ! thanks all for your help !

      posted in Troubleshooting
      epierre
      epierre
    • RE: Ebyte nRF24L01P Wireless rf Transceiver E01-2G4M27D 27dBm SPI 2.4GHz Transmitter

      Hello,

      my box:
      https://photos.app.goo.gl/MQijz9SK8wBMnic47

      can AMS1117 be enough or not powerful enough (I have some).

      Not US sadly, but amazon has more stock than local providers as it seems, thanks for the hint !

      posted in Troubleshooting
      epierre
      epierre
    • RE: Ebyte nRF24L01P Wireless rf Transceiver E01-2G4M27D 27dBm SPI 2.4GHz Transmitter

      Hello,

      I have a basic arduino pro micro and the 3.3V is from the board. All is directly wired on it (arduino to ebyte module with antenna)

      I suspect maybe that the 5V may not be that powerfull, I will enquire (I modified something recently...not sure anymore). Usually it is from phone charger. I've seen I have not changed the gain in the radio too, same code for a long time, my whole network is still in 1.6

      I've searched for the ld1117d33 (retired) or its clone, seems difficult to find.

      posted in Troubleshooting
      epierre
      epierre
    • RE: Ebyte nRF24L01P Wireless rf Transceiver E01-2G4M27D 27dBm SPI 2.4GHz Transmitter

      Hello,

      I have a water counter that requires a value from the gateway.

      So the request is received but the answer is never received as it seems.

      Both are with a 5V 1A power generator, toward the arduino mini pro, then the 3.3V directly to the module.

      I've looked at the datasheet, I've seen nothing about a capacitor ?

      posted in Troubleshooting
      epierre
      epierre
    • Ebyte nRF24L01P Wireless rf Transceiver E01-2G4M27D 27dBm SPI 2.4GHz Transmitter

      Hi All,

      I wanted to use Ebyte nRF24L01P Wireless rf Transceiver E01-2G4M27D 27dBm SPI 2.4GHz with a bif antenna: TX2400-JKD-20 3.0dBi Flexible 2.4GHz RF

      But it seems an emission issue on the gateway side where I did put it.

      It is directly wired to the arduino.

      Any idea ?

      posted in Troubleshooting
      epierre
      epierre
    • RE: CO2 Sensor Senseair S8 - big values read

      maybe check what they did here:
      https://github.com/airgradienthq/arduino/blob/master/AirGradient.cpp

      posted in Hardware
      epierre
      epierre
    • RE: Ebyte nRF24 module comparison (2020)

      thanks for this survey !:

      posted in Hardware
      epierre
      epierre