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

    25
    Reputation
    568
    Posts
    3074
    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: Dust Sensor (1.4)

      The Shinyei PPD42 has now its sketch :
      https://github.com/empierre/arduino/blob/master/DustSensor_Shinyei_PPD42NS.ino
      @hek either the SamYoung or Shinyei can be proposed, the sharp is definetly out of the race ...

      Both those sensors give similar values whih is a very good point.

      posted in Development
      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: Water meter : grey scale sensor

      it you remove plastic it is not water proof anymore, and greyscale was not precise enough....
      CNY70 has reflexion protection which is much better

      posted in Hardware
      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: Water meter : grey scale sensor

      here is a link with the schematics (so simple !):https://easydomoticz.com/forum/viewtopic.php?f=17&t=1737&start=70

      posted in Hardware
      epierre
      epierre
    • RE: Water meter : grey scale sensor

      Hello,

      I've dropped this approch to use the CNY70 ir on this water meter.

      I did that for a friend that has not the mysensors gateway (range issue) so I made it with a Particle Photon using a wifi extender, but it is quite straightforward reading the pulse up and down.

      posted in Hardware
      epierre
      epierre
    • RE: Carbon Monoxide Sensor

      MQ are always a bad choice, saturate air around with any gas and they will react ...

      Mics are used by sensely, but even them aren ot calibrated... and they are a hell to get working even when you have the pins soldered to them.

      posted in General Discussion
      epierre
      epierre
    • RE: Air Quality Sensor

      @lukรกcs-attila check wiring first, seems there are several sub version around thay may need other values from datasheet

      posted in Hardware
      epierre
      epierre
    • RE: Air Quality Sensor

      @ambuj please see the begining of the discussion regarding MQ like reliability

      posted in Hardware
      epierre
      epierre
    • RE: radio failure ?

      @gohan I would have too much work going to 2.0 on every node I have, but I have to do this as a background task since I'll have to upgrade all my sketches first...

      swapping hardware is an option, recabling everything is not my cup of tea ๐Ÿ˜‰

      posted in Troubleshooting
      epierre
      epierre
    • radio failure ?

      Hello,

      I am trying to get my sensors back, and I have one that goes off the road several time...

      board is a uno, with long antennae, mysensors lib is 1.5.

      send: 3-3-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,st=fail:1.5.1
      send: 3-3-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,st=fail:1.5.1

      sometime resetting the uno button is enough, other not, and unpowering several times is the only way to make it work. BTW is is less than 1m from the controller.

      sometimes, it goes well for 2h, then I have a 'fin parent' message on console and hten everything fail after.

      any idea ?

      posted in Troubleshooting
      epierre
      epierre
    • RE: Air Quality Sensor

      @jumping see just above on power regressin curves, this is the result from a power regression based on the data sheet provided by one maker. Sometime I leave the data points in the sketch, sometime not (based on history ๐Ÿ˜‰

      posted in Hardware
      epierre
      epierre