Git Product home page Git Product logo

arduino-mysensors-contribs's Introduction

arduino

MySensors scripts

Air Quality:

  • AirQuality-MQ135.ino : for CO2/COV ... validated
  • AirQuality-CO2-MH-Z14.ino: CO2 through calibrated MH-Z14, validated
  • AirQuality-Multiple_Gas_Sensor.ino : MQ2 MQ6 MQ131 MQ135 TGS2600 TGS2602 sensors
  • DustSensor-*.ino : Dust sensors from several providers, validated for DSM
  • AirQuality-MQ2.ino : for ethanol... ongoing
  • AirQuality-MICS2614.ino: on going
  • AirQuality-CO-NO2-NH3.ino: for Mics-6814 validated
  • AirQuality-HCHO.ino: for HSHO, validated

Environmental sensors:

  • PressureSensor.ino : validated, works well, too much temp reading given back
  • SoundSensor2.ino: tested ok (not SPL)
  • UVsensor.ino : validated
  • MotionSensor2.ino : motion sensor validated
  • VibrationSensor.ino : simple vibration sensor, tested
  • FloodSensor: tested
  • LeafWetnessSensor.ino: validated, need an immersion gold sensor
  • SoilMoistSensor.ino: validated
  • SoilMoistSensorSHT1x.ino: validated, sensor cannot be burried

Variants for ceech board (Solar pannel + LiOn/LiPo NRF24L compatible board):

  • PressureSensor-c.ino: validated
  • LuxUVSensor-c.ino : validated
  • LuxSensor-c.ino : validated

Energy sensors

  • WaterMeterPulseSensor2.ino : for use with water meter that have a reed switch, validated
  • WaterMeterPulseSensor2-gs.ino : water meter with GreyScale Dfrobot sensor for Residia Jet water meter

arduino-mysensors-contribs's People

Contributors

coder-ari avatar drsensor avatar empierre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduino-mysensors-contribs's Issues

mq2 curve value

Hi may i know how to get these value?
float COCurve[2] = {37793.94418, -3.24294658}; //MQ2
float H2Curve[2] = {957.1355042, -2.07442628}; //MQ2
float LPGCurve[2] = {591.6128784, -1.679699732}; //MQ2
float SmokeCurve[2] = {3426.376355, -2.225037973}; //MQ2

MySensor.h where is it?

Hi all
I'm trying to read an MQ131 but i have an error (missing library)

Where do i get this library
#include <MySensor.h>

I only found in MySensors library a file named "MySensors.h" with an s at the end.

thanks

DSM501 - Mistake between description and pin assignment

DustSensor_SamYoung_DSM501.ino

  • DESCRIPTION
  • Pin 2 of dust sensor PM1 -> Digital 3 (PMW)
  • Pin 4 of dust sensor PM2.5 -> Digital 6 (PWM)

Pin assignment, does not match the descriptin. Typo mistake...
#define DUST_SENSOR_DIGITAL_PIN_PM10 6 //there must be Digital 3 (PMW) - PM1
#define DUST_SENSOR_DIGITAL_PIN_PM25 3 //there must be Digital 6 (PWM) - PM2.5

Leaf Wetness vs. Soil Wetness

I was looking at the code for Leaf Wetness and it has variables that reference soil wetness (which is a completely different sensor)

Is the code correct aside from this incorrect variable name?

Also, what sensor are you using for Leaf Wetness? I do not see it on the site.

Ro co2 mq135 info

float           CO2Curve[2]     =  {113.7105289, -3.019713765};  //MQ135
float           CO_secCurve[2]  =  {726.7809737, -4.040111669};  //MQ135
float           NH4Curve[2]     =  {84.07117895, -4.41107687};   //MQ135
float           C2H50H_Curve[2] =  {74.77989144, 3.010328075};   //MQ135 
float           CH3Curve[2]     =  {47.01770503, -3.281901967};  //MQ135
float           CH3_2COCurve[2] =  {7.010800878, -2.122018939};  //MQ135

Im using mq135 sensor. i get these values curve.

These are R0 and RL.

float Ro4 = 2.511;    //MQ135   2.51 this has to be tuned 10K Ohm
float RL4 = 0.990;    //MQ135   FC-22

I know that CO2 PPM default is about 400 ppm. so during calibration i have to use different R0 Value right? Ro value for co2 is 41763, so i will use r0 2.511 for other gases and 41763 for co2. Can i have an advice?

thanks

Connections in MHZ14

According to the datasheet of MHz14
MH-Z14.pdf
, I found Pad15 should be given input voltage and Pad5 gives output. The connections mentioned in your comment are false..

No output on Serial Monitor

I'm still a beginner in arduino and i'm trying to use a SamYoung Sensor with the code given on this site. I had to remove the gw. and add radio and gateaway to avoid error messages. I am not getting anything in the serial monitor.
Thank You

Here is my code:

/**

  • 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 [email protected]
  • 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.

#define MY_RADIO_NRF24
#define MY_RF24_PA_LEVEL RF24_PA_LOW
#define MY_GATEWAY_SERIAL

#include <MyConfig.h>
#include <MySensors.h>
#include <SPI.h>

#define CHILD_ID_DUST_PM10 0
#define CHILD_ID_DUST_PM25 1
#define DUST_SENSOR_DIGITAL_PIN_PM10 3
#define DUST_SENSOR_DIGITAL_PIN_PM25 6

unsigned long SLEEP_TIME = 30*1000; // Sleep time between reads (in milliseconds)
//VARIABLES
int val = 0; // variable to store the value coming from the sensor
float valDUSTPM25 =0.0;
float lastDUSTPM25 =0.0;
float valDUSTPM10 =0.0;
float lastDUSTPM10 =0.0;
unsigned long duration;
unsigned long starttime;
unsigned long endtime;
unsigned long sampletime_ms = 30000;
unsigned long lowpulseoccupancy = 0;
float ratio = 0;
long concentrationPM25 = 0;
long concentrationPM10 = 0;
int temp=20; //external temperature, if you can replace this with a DHT11 or better
float ppmv;

MyMessage dustMsgPM10(CHILD_ID_DUST_PM10, V_LEVEL);
MyMessage msgPM10(CHILD_ID_DUST_PM10, V_UNIT_PREFIX);
MyMessage dustMsgPM25(CHILD_ID_DUST_PM25, V_LEVEL);
MyMessage msgPM25(CHILD_ID_DUST_PM25, V_UNIT_PREFIX);

void setup()
{

// Send the sketch version information to the gateway and Controller
sendSketchInfo("Dust Sensor DSM501", "1.5");

// Register all sensors to gateway (they will be created as child devices)
present(CHILD_ID_DUST_PM10, S_DUST);
send(msgPM10.set("ppm"));
present(CHILD_ID_DUST_PM25, S_DUST);
send(msgPM25.set("ppm"));

pinMode(DUST_SENSOR_DIGITAL_PIN_PM10,INPUT);
pinMode(DUST_SENSOR_DIGITAL_PIN_PM25,INPUT);

}

void loop()
{

//get PM 2.5 density of particles over 2.5 μm.
concentrationPM25=(long)getPM(DUST_SENSOR_DIGITAL_PIN_PM25);
Serial.print("PM25: ");
Serial.println(concentrationPM25);
Serial.print("\n");
//ppmv=mg/m3 * (0.08205Tmp)/Molecular_mass
//0.08205 = Universal gas constant in atm·m3/(kmol·K)
ppmv=(float)(((concentrationPM25
0.0283168)/100) * ((0.08205*temp)/0.01))/1000;

if ((concentrationPM25 != lastDUSTPM25)&&(concentrationPM25>0)) {
send(dustMsgPM25.set(ppmv,3));
lastDUSTPM25 = ceil(concentrationPM25);
}
//get PM 1.0 - density of particles over 1 μm.
concentrationPM10=getPM(DUST_SENSOR_DIGITAL_PIN_PM10);
Serial.print("PM10: ");
Serial.println(concentrationPM10);
Serial.print("\n");
//ppmv=mg/m3 * (0.08205Tmp)/Molecular_mass
//0.08205 = Universal gas constant in atm·m3/(kmol·K)
ppmv=(((concentrationPM10
0.0283168/100) * (0.08205*temp)/0.01))/1000;

if ((ceil(concentrationPM10) != lastDUSTPM10)&&((long)concentrationPM10>0)) {
send(dustMsgPM10.set(ppmv,3));
lastDUSTPM10 = ceil(concentrationPM10);
}

//sleep to save on radio
sleep(SLEEP_TIME);

}

long getPM(int DUST_SENSOR_DIGITAL_PIN) {

starttime = millis();

while (1) {

duration = pulseIn(DUST_SENSOR_DIGITAL_PIN, LOW);
lowpulseoccupancy += duration;
endtime = millis();

if ((endtime-starttime) > sampletime_ms)
{
ratio = (lowpulseoccupancy-endtime+starttime)/(sampletime_ms*10.0);  // Integer percentage 0=>100
long concentration = 1.1*pow(ratio,3)-3.8*pow(ratio,2)+520*ratio+0.62; // using spec sheet curve
//Serial.print("lowpulseoccupancy:");
//Serial.print(lowpulseoccupancy);
//Serial.print("\n");
//Serial.print("ratio:");
//Serial.print(ratio);
//Serial.print("\n");
//Serial.print("DSM501A:");
//Serial.println(concentration);
//Serial.print("\n");

lowpulseoccupancy = 0;
return(concentration);    
}

}
}

[TGS2602] Wrong values for power regression

I think you do not used the correct values for power regression on Toluene with TGS2602 sensor.

float           C7H8Curve[2]    =  {37.22590719,   2.078062258}; //TGS2602     (0.3;1)( 0.8;10) (0.4;30)

I think correct values are :

(0.3;1)(0.08;10) (0.04;30)

MiCS-6814 Sensor seems able to read NO2 value only

Hi,

it seems that sensor (Grove version of MiCS-6814) does not read concentrations other than NO2.
NO2 is the only value changing over time while NH3 stands still even with a bottle of Ammonia placed below. By the way putting the ammonia bottle beside the sensor NO2 level decrease while NH3 stands still as said above.

The sensor is connected to a I2C port on arduino one Rev. 3 board thru Base Shield 2.

Thank you for support.
Regards

Aldo

senseboard

no radio comm: to be investigated with itead nrf24l01

Regarding RL value

#define RL_VALUE (990) -- Hi may i know the RL value of 990 ohm is suitable for all of the sensor that you used? Because for MQ2 when i refer to datasheet it mentioned the RL value around 5kohm but for the other MQ sensors such as 6 having a 20 kohm

PM10 vs. PM1.0?

Dear sir,

in the specs it is written that DSM501A measures particles of 1 micrometer. The PM10 is measuring particles in size of 10 micrometers. In your code, you seem to measure particles 1 micrometer, but in output you call it PM10. I think it is incorrect, can you clarify please?

//get PM 1.0 - density of particles over 1 μm.
concentrationPM10=getPM(DUST_SENSOR_DIGITAL_PIN_PM10);
Serial.print("PM10: ");

C2H5OH_terCurve instead of C2H5OH_secCurve for TGS2600

In the sketch AirQuality-Multiple_Gas_Sensor1_4.ino, function MQGetGasPercentage there is this line (553)

return MQGetPercentage(rs_ro_ratio, ro, C2H5OH_terCurve); //TGS2600

but in the float definitions for these curves C2H5OH_terCurve is referred to MQ138 (line 104) instead for the TGS2600 the curve should be C2H5OH_terCurve, line 106.

Since the curve coefficients are different, is this an error or not?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.