CDS5MM~CDS20MM Value [S003~S006]



https://www.youtube.com/watch?v=660-OrdtU4E


*GitHubhttps://github.com/rdiot/rdiot-s003.git


* Contents

- Connect

A0, A1, A2, A3


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


LiquidCrystal_I2C lcd(0x27,20,4);  // LCD2004


int sensorPin1 = A0;

int sensorPin2 = A1;

int sensorPin3 = A2;

int sensorPin4 = A3;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

}


void loop()

{

  int rate1 = analogRead(sensorPin1);

  int rate2 = analogRead(sensorPin2);

  int rate3 = analogRead(sensorPin3);

  int rate4 = analogRead(sensorPin4);


  lcd.clear();

  lcd.setCursor(0,0);

  lcd.print("[1]CDS05MM=" + (String)rate1);

  lcd.setCursor(0,1);

  lcd.print("[2]CDS10MM=" + (String)rate2);

  lcd.setCursor(0,2);

  lcd.print("[3]CDS15MM=" + (String)rate3);

  lcd.setCursor(0,3);

  lcd.print("[4]CDS20MM=" + (String)rate4);


  delay(200);

}


Posted by RDIoT
|

Temperature and humidity DHT22 (DHT22) [S063]



https://www.youtube.com/watch?v=bVhOLJMloc4


*GitHubhttps://github.com/rdiot/rdiot-s063.git


* Specs

The DHT22 is a basic, low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and spits out a digital signal on the data pin (no analog input pins needed). Its fairly simple to use, but requires careful timing to grab data. The only real downside of this sensor is you can only get new data from it once every 2 seconds, so when using our library, sensor readings can be up to 2 seconds old.

Simply connect the first pin on the left to 3-5V power, the second pin to your data input pin and the right most pin to ground. Although it uses a single-wire to send data it is not Dallas One Wire compatible! If you want multiple sensors, each one must have its own data pin!

 

Compared to DHT11,this sensor is more precise, more accurate and works in a bigger range of temperature/humidity, but its larger and more expensive

Comes with a 4.7K - 10K resistor, which you will want to use as a pullup from the data pin to VCC.

 

Temperature

Resolution : 0.1°C

Accuracy : ±0.5℃

Measuring range : -40°C ~ 80°C

Humidity

Resolution : 0.1%RH

Accuracy : ±2%RH (25°C)

Measuring range : 0%RH ~ 99.9%RH

Operating voltage : 3.3V ~ 5.5 V

Recommended storage condition

Temperature : 10°C ~40°C

Humidity : 60%RH 



* Content

- Connect

1 ----- 5V

2 ----- D2

3 ----- X (NC Not connected)

4 ----- GND


- DataSheet : http://www.waveshare.com/wiki/File:AM2302.pdf


- Source : http://www.waveshare.com/wiki/File:DHT22-Temperature-Humidity-Sensor-code.7z 


- Key Code

#define DHTPIN 2


DHT dht(DHTPIN, DHT22);


  switch(dht.read())

  {

    case DHT_OK:


    lcd.setCursor(0,1);

    lcd.print("temperature=" + (String)dht.temperature + "'C");


    lcd.setCursor(0,2);

    lcd.print("humidity=" + (String)dht.humidity + "% ");



      break;

  }

Posted by RDIoT
|

Wind Speed Sensor 0~5V Voltage Type (JL-FSX2) [S163]



https://www.youtube.com/watch?v=ZmksejqugVs


*GitHub : https://github.com/rdiot/rdiot-s163.git


* Specs

Signal output, Current signal, Pulse signal, Voltage signal, RS485/232 signal

Signal output way: 4 ~ 20 mA, 1.5 / M * S, 0 ~ 5 V, 1 ~ 5 V, RS485/232

Input voltage: DC24V/DC12V/DC5V

Response time: < 1 S

Transmission distance: > 1km

Measurement range: 0 ~ 5 M/S, 0 ~ 30 M/S, 0 ~ 50 M/S ( choose)

Measurement accuracy: Plus or minus 3%

Start wind speed: < 0.6 M/S

Environment temperature: E: -35 ~ 85 C (often-used) L: -55 to 150 C

Level position: + 80 Rotation, with a hammer, automatically adjust the horizontal position

Potential lead: Three wire or two wire

Material: Aluminum alloy, the surface waterproof, prevent corrosion treatment.

Other matters: Optional configuration RS485 communication output or RS232 output


* Content

- Connect

LH (GND), RH(VCC) <- External VCC 9V~

RB (Volate) -----> A0

LH GND -----> Arduino GND


- Key Code

int sensorValue = analogRead(A0);

float outvoltage = sensorValue * (5.0 / 1023.0);

int Level = 6*outvoltage;//The level of wind speed is proportional to the output voltage.

lcd.print("wind speed " + (String)Level + " Level");


Posted by RDIoT
|