'RDIoT Demo'에 해당되는 글 354건

  1. 2016.09.12 Solar Panel 2A 1A Battery Power Bank 18000mAh [S118]
  2. 2016.09.12 LED Solar Outdoor Light [S172]
  3. 2016.09.12 6V 3.5W 580~600mA Solar Panel Socket Battery Charger (GH165X135) [S150]
  4. 2016.09.12 5V 0.8W 160mA Solar Cell Panel 100x70 (HD-99X69mm) [S113]
  5. 2016.09.12 6V 1W 166mA Solar Cell Panel 115x70 [S086]
  6. 2016.09.12 Flame Sensor Module (KY-026) [S038]
  7. 2016.09.12 GP2Y1010AU0F Compact Optical Dust Sensor + Adapter (GP2Y1010AU0F,DFR0280) [S065]
  8. 2016.09.12 MQ-2 Sensitive for Methane, Butane, LPG, Smoke (MQ-2) [S100]
  9. 2016.09.12 Google Cardboard VR 3D Viewing Glasses [B158]
  10. 2016.09.11 TPM-300 Air Quality Module (TPM-300) [S092]
  11. 2016.09.11 Air Quality Sensor (MQ135) [S037]
  12. 2016.09.11 Micro SD TF Card Memory Module [S059]
  13. 2016.09.11 DS3231 AT24C32 IIC Clock Module (DS3231SN) [S174]
  14. 2016.09.11 SiteMap
  15. 2016.09.11 RTC DS1302 Module (DS1302) [S030]
  16. 2016.09.11 Tiny RTC DS1307 I2C Module (DS1307) [S029]
  17. 2016.09.09 8 Channel Solid State Relay Module [S168]
  18. 2016.09.09 12V Delay Timer Adjustable Relay Module (NE555) [S165]
  19. 2016.09.09 5V Relay Low Level Trigger [S155]
  20. 2016.09.09 5V 4-Channel Relay Module [S147]
  21. 2016.09.09 5V 2-Channel Relay Module [S116]
  22. 2016.09.09 5V Relay Module (KY-019) [S076]
  23. 2016.09.09 Mini Reed Switch Module (KY-021) [S045]
  24. 2016.09.09 Reed Swtich Module (KY-025) [S044]
  25. 2016.09.09 Photo Interrupter Module LM393 Comparator (FC-03) [S158]
  26. 2016.09.09 Photo Interrupter Module (KY-010) [S041]
  27. 2016.09.09 Linear magnetic Hall sensor (KY-024) [S048]
  28. 2016.09.09 Hall Magnetic Sensor Module (KY-003) [S047]
  29. 2016.09.09 Analog Hall Magnetic Sensor Module (KY-035) [S046]
  30. 2016.09.09 Ceramic Piezo Vibration Sensor [S133]

Solar Panel 2A 1A Battery Power Bank 18000mAh [S118]



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


* Specs

Features:

100% Brand new and high quality!

This Solar Battery Charger Power Bank is used in polymer batteries, performance is excellent, safe and practical, especially when you are traveling.

The solar panel can make full use of solar energy, convenience and environmental protection.

2 output ports,allows you charge two devices at the same time,or you can share your backup power with your friend,convenient and sweet.

Not only can use the solar panels to charge,but also can charge just like other usual battery. Pay attention to avoid being under the Blazing sun for quite a long time.


Specifications:

Battery Type: Polymer lithium battery

Capacity: 18000mAh

Input: DC 5.0V/1A

Output 1: DC 5.0V/2A

Output 2 :DC 5.0V/1A



Posted by RDIoT
|

LED Solar Outdoor Light [S172] 



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



* Specs

16 LED Solar Power Motion Sensor solar garden light Lamp Security Outdoor Lighting garden solar light led solar light outdoor

Feature

1. Light sensor and sensitive motion sensor, save energy.

2. 16 LED Lights, high brightness.

3. Automatically sense day or night.

4. Solar powered, easy to install and easy to maintain with detachable solar panel and LED Lamp body to the  supporting cover.

5. 0.55 Watt solar panel, 17% efficiency, can use more than 5 years.

6. Aluminum body, never fade, IP-65 waterproof and heatproof.

7. Great useful light for your garden, yard, aisle, porch, patio, or driveway etc...

8. More robust and brighter design than the first generation.

Specifications:

1. Li-ion battery:3.7V 1000mAh

2. LED: 16pcs, SMD 3528,1W

3. Lumens: 100 lm.

4. LED life span: 50,000 hrs.

5. Solar charging time:6- 8 hrs.

6. Three Lighting modes: Off/Dim/Bright; Off during the daytime; Dim light and Bright light is switched by  PIR to save power at night, i.e, Dim light at night time to save power, but will be switched to Bright light for about 30 seconds if PIR motion sensor is activated. The motion-sensing light is triggered when someone or    something enters its 3-5 meters range within a 120 degree sensing angle.

7. Protection functions: over charging, over discharging, over current, and short circuit.

8. Package size: 175 * 115 * 53 mm / 6 * 4.53 * 2.09”.

9. Product size: 136 * 90 * 45 mm / 5.35 * 3.54 * 1.77”.

10. Package weight: 250g / 8.8oz.

Package includes:

1 * Solar Lamp

2 * Expansion Pillar-hinges

2 * Big Screws ( for attaching the supporting cover to the wall )

1 * Pin ( for On/Off switch)

1 * User Manual

1 * retail box



Posted by RDIoT
|

6V 3.5W 580~600mA Solar Panel Socket Battery Charger (GH165X135) [S150] 



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


* Specs

The mining height are broken light transmittance high quality toughened glass

Unique technology makes the component beautiful strong wind resistance, installation is convenient

Unique technology to avoid water accumulation in the frame freeze and deformation

Operating voltage: 6 v

Power:3.5W

Work: current 0-580mA

output:USB 2.0  Net weight: about 100  gSize: 165 * 135 * 2 mm


Applications:

Suitable for: digital products charge ,phone MP3 MP4 PDA Tablet

Note:

This device can not store electricity, but only can charge Ur cell phones in the sun.And this item must Under the strong light , Otherwise the voltage is very small

and many smartphone have Battery protection maybe can't charge it.

Phone is not included

Posted by RDIoT
|

5V 0.8W 160mA Solar Cell Panel 100x70 (HD-99X69mm) [S113]



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


* Specs

:Features

High conversion rate

High efficiency output

Excellent weak light effect

Dimension: 10 x 7 cm

Voltage: 5V

Current: 160mA

Power: 0.8W

:Application:

To charge cell phones

For home lighting

Suitable for solar powered water pump, small solar power system, etc.

For DIY solar power toys


* Contents

5V 0.8W 160mA Solar Panel

Posted by RDIoT
|

6V 1W 166mA Solar Cell Panel 115x70 [S086]




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


* Specs

High conversion rate 

High efficiency output 

Excellent weak light effect 

Product size: 115 x 70mm 

Output voltage: 6V 

Output current: 166mA 

Output power: 1W 

Application: 

To charge cell phones 

For home lighting 

Suitable for solar powered water pump, small solar power system, etc. 

For DIY solar power toys 



Posted by RDIoT
|

Flame Sensor Module (KY-026) [S038]



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


* Specs

Flame module Interface module and number 13 comes with LED build a simple circuit to produce flame warning lamp 13 comes with digital interfaces of the LED, the flame sensor connected digital three interfaces, when the flame sensor senses There are key signal detected, LED lights, otherwise off.


AO: analog output- real-time output voltage signal on the thermal resistance

DO: when the temperature reaches a certain threshold- the output high and low signal threshold adjustable via potentiometer



* Contents

- Connect

A0 ----- A0

G ----- GND

+ ----- 5V

D0 ----- X


- Key Code

sensor = analogRead(A0);

Posted by RDIoT
|

GP2Y1010AU0F Compact Optical Dust Sensor + Adapter  (GP2Y1010AU0F,DFR0280) [S065]



https://www.youtube.com/watch?v=539hINFrDHM


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


* Specs

GP2Y1010AU0F is a dust sensor by optical sensing system An infrared emitting diode (IRED) and an phototransistor are diagonally arranged into this device It detects the reflected light of dust in air. Especially, it is effective to detect very fine particle like the cigarette smoke In addition it can distinguish smoke from house dust by pulse pattern of output voltage Compact, thin package (46.0 × 30.0 × 17.6 mm) Low consumption current (Icc: MAX. 20 mA) The presence of dust can be detected by the photometry of only one pulse Enable to distinguish smoke from house dust Lead-free and RoHS directive compliant Compliant with RoHS directive (2002/95/EC)


* Contents

- Refer Source : ttps://github.com/Trefex/arduino-airquality/blob/master/Module_Dust-Sensor/dustSensor/dustSensor.ino


- Connect

:Adapter

A ----- A0

VCC ----- V5

GND ----- GND

 

D ----- D2

VCC ----- X (One of Two)

GND ----- X (One of Two)


: Dust Sensor

1 (V-LED) ---(P150)--- 5V 

2 (LED_GND) --(220uF 1 Number)--- GND 

3 (LED) ----- D12

4 (S-GND) ----- GND

5 (V0) ----- A0

6 (Vcc) ----- 5V 



- Key Code

int measurePin = A0;

int ledPower = 2;

 

int samplingTime = 280;

int deltaTime = 40;

int sleepTime = 9680;

 

float voMeasured = 0;

float calcVoltage = 0;

float dustDensity = 0;

 

int B = 9; // OUTPUT PIN blue

int R = 11; // OUTPUT PIN red

int G = 10; // OUTPUT PIN green

 


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

  pinMode(ledPower,OUTPUT);

  pinMode(R, OUTPUT);

  pinMode(G, OUTPUT);

  pinMode(B, OUTPUT);

 

  delay(1000);

  lcd.clear();

}


void loop()

{

  lcd.setCursor(0,0);

  lcd.print("S065:Dust GP2Y1010AU0F");

 

  digitalWrite(ledPower,LOW); // power on the LED

  delayMicroseconds(samplingTime);

 

  voMeasured = analogRead(measurePin); // read the dust value

  

  delayMicroseconds(deltaTime);

  digitalWrite(ledPower,HIGH); // turn the LED off

  delayMicroseconds(sleepTime);

 

  // 0 - 5.0V mapped to 0 - 1023 integer values 

  calcVoltage = voMeasured * (5.0 / 1024); 

  

  dustDensity = (0.17 * calcVoltage - 0.1)*1000; 

  

  lcd.setCursor(0,1);

  lcd.print("Signal=" + (String)voMeasured + " ");

  

  lcd.setCursor(0,2);

  lcd.print("Voltage=" + (String)calcVoltage + " ");

  

  lcd.setCursor(0,3);

  lcd.print("Density=" + (String)dustDensity + "ug/m3 ");

  

  if(dustDensity <= 40)

  {

   // GREEN

   digitalWrite(R, HIGH);

   digitalWrite(G, LOW);

   

  }

  else if(dustDensity <= 80)

  {

   // BLUE

   digitalWrite(G, HIGH);

   digitalWrite(B, LOW);

 

  }

  else if(dustDensity <= 120)

  {

    // RED + GREEN = YELLOW

    digitalWrite(B, HIGH);

    digitalWrite(R, LOW);

    digitalWrite(G, LOW);

  }

  else

  {

    // RED

    digitalWrite(R, LOW);

    digitalWrite(G, HIGH);

    digitalWrite(B, HIGH);   

  }

 

  delay(1000);

 

  // all off

  digitalWrite(B, HIGH);

  digitalWrite(R, HIGH);

  digitalWrite(G, HIGH);

}

Posted by RDIoT
|

MQ-2 Sensitive for Methane, Butane, LPG, Smoke (MQ-2) [S100]



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


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


* Specs

Sensitive for Methane, Butane, LPG, smoke.

This sensor is sensitive for flamable and combustible gasses.

The heater uses 5V.


Sensitive material of MQ-2 gas sensor is SnO2, which with lower conductivity in clean air. When the

target combustible gas exist, The sensor’s conductivity is more higher along with the gas concentration

rising. Please use simple electrocircuit, Convert change of conductivity to correspond output signal of

gas concentration.

MQ-2 gas sensor has high sensitity to LPG, Propane and Hydrogen, also could be used to Methane

and other combustible steam, it is with low cost and suitable for different application. 



* Contents

- The MQ-2 at seeed: http://www.seeedstudio.com/wiki/Grove_-_Gas_Sensor%28MQ2%29


- DataSheet : https://www.pololu.com/file/0J309/MQ2.pdf


- Key Code

const int gasPin = A0;

  

void setup()

{

    Serial.begin(9600);

}

 

void loop()

{

    Serial.println(analogRead(gasPin));

    

    if (analogRead(gasPin) > 400)  

    {                                     

        tone(12,2000,1000); 

    }  

    delay(1000);

}

'2) Sensor > Gas' 카테고리의 다른 글

TPM-300 Air Quality Module (TPM-300) [S092]  (0) 2016.09.11
Air Quality Sensor (MQ135) [S037]  (0) 2016.09.11
Posted by RDIoT
|

Google Cardboard VR 3D Viewing Glasses [B158]








* Specs

Your about to purchase the most unique yet such a simplified device to hit 2014. Your very own VIRTUAL REALITY device.This is a simple and inexpensive DIY virtual reality glasses; Installation process is simple and can be completed within 3 minutes; With Cardboard App, you can DIY a virtual reality glasses, like Oculus Rift VR glasses.

Have amazing fun for the price of a few bags of peanuts.

Our kits are 100% top quality with the highest quality lenses ,For more details on what Google 


cardboard is, and where to get the app from see here:


Description:

Weight:100g

Type:3D Glasses

Material:Cardboard + resin lens

Color:Brown

Dimensions:13.5cm*9cm*8cm

Quantity:1 Piece

Suitable for every smart phone running Android 4.1 and above with a screen no greater than 5.1".

NFC compatible phones take advantage of the NFC feature of the kit. Non NFC phones will still work without this feature on your phone.

Installation process is very simple and inexpensive DIY Google virtual reality glasses

Note:This is an unofficial Google Cardboard VR Kit.This kit does not include NFC component.Cardboard applications can be run on most modern Android Android phones runing Android 4.1 (Jelly Bean) & late versions of Android. Google cardboard App can be downloaded from google play store.

 

Package included:

1 X Cardboard

2 X Lens

2 X Black ceramic magnets

1 X Rubber band

2 X Velcro (already fitted)

Posted by RDIoT
|

TPM-300 Air Quality Module (TPM-300) [S092]



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


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


* Specs

Module type: TPM-300

sensor: the air quality sensor

gas detection: ammonia, hydrogen, alcohol, carbon monoxide, methane, propane, Gan, styrene, propylene 

glycol, alkyl phenol, toluene, ethylbenzene, xylene, formaldehyde and other volatile organic gases, incense smoke, wood, paper burning smoke

physical interface: XH2.54-4 vertical socket

output data: TTL level (built in 200 ohm current limiting resistor)

input voltage: 5 + 0.2VDC (no reverse voltage protection)

working current: less than 80mA

the preheating time: less than 60 seconds

response time: less than 10 seconds

recovery time: less than 20 seconds

operating temperature: -10 - 40 C

the humidity: less than 95%RH

storage temperature: -20 - 60 C

storage humidity: less than 60%RH

dimensions: 24 x 20 x 15 (L * W * H)

module: weight of about 20 grams

sensitivity: 0.5ppm hydrogen

the sensitivity attenuation: less than 1%/ years

: more than 10 years service life


* Contents

- Connect 

B ----- D3

A ----- D2

5V ----- 5V

GND ----- GND


- Level

A              B            Level

Low            Low           0

Low            High          1

High           Low           2

High           High          3


- Key Code 

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


int pinA = 2; // A

int pinB = 3; // B


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


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(pinA, INPUT);

  pinMode(pinB, INPUT);  

  delay(1000);


  lcd.clear();

}

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S092:TPM-300 Air Q");


  int valueA = digitalRead(pinA);

  int valueB = digitalRead(pinB);

  int airGrade = -1;


  lcd.setCursor(0,1);

  lcd.print("pinA(H/L)=" + (String)valueA + " ");

  

  lcd.setCursor(0,2);

  lcd.print("pinB(H/L)=" + (String)valueB + " ");



  if(valueA == LOW && valueB == LOW)

  {

    airGrade = 0;

  }

  else if(valueA == LOW && valueB == HIGH)

  {

    airGrade = 1;

  }

  else if(valueA == HIGH && valueB == LOW)

  {

    airGrade = 2;

  }

  else if(valueA == HIGH && valueB == HIGH)

  {

    airGrade = 3;

  }


  lcd.setCursor(0,3);

  lcd.print("Air Grade 0~3=" + (String)airGrade + " ");


  delay(300);

}

'2) Sensor > Gas' 카테고리의 다른 글

MQ-2 Sensitive for Methane, Butane, LPG, Smoke (MQ-2) [S100]  (0) 2016.09.12
Air Quality Sensor (MQ135) [S037]  (0) 2016.09.11
Posted by RDIoT
|

Air Quality Sensor (MQ135) [S037]



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


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


* Specs

Sensitive material of MQ135 gas sensor is SnO2, which with lower conductivity in clean air. When the

target combustible gas exist, The sensor’s conductivity is more higher along with the gas concentration

rising. Please use simple electrocircuit, Convert change of conductivity to correspond output signal of

gas concentration.

MQ135 gas sensor has high sensitity to Ammonia, Sulfide and Benze steam, also sensitive to smoke

and other harmful gases. It is with low cost and suitable for different application. 



* Contents

- Library : https://github.com/GeorgK/MQ135


- DataSheet : http://www.cooking-hacks.com/skin/frontend/default/cooking/pdf/MQ-135.pdf


- Connect


- Key Code

#include <MQ135.h>

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


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

int pin = A0;

int sensorValue;

int ledPin = 13;


MQ135 gasSensor = MQ135(pin);

float rzero = gasSensor.getRZero();

int ppm = gasSensor.getPPM();


void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S037:MQ135");



  sensorValue = analogRead(pin);

  lcd.setCursor(0,1);

  lcd.print("A0=" + (String)sensorValue + " Resis="+(String)gasSensor.getResistance() +" ");


  float rzero = gasSensor.getRZero();

  digitalWrite(ledPin, HIGH);      // turn the ledPin on

  delay(100);                      // stop the program for some time

  digitalWrite(ledPin, LOW);       // turn the ledPin off

  delay(100);  // stop the program for some time

 

  lcd.setCursor(0,2);

  lcd.print("rzero=" + (String)rzero + "    ");

 


  float co2_ppm = gasSensor.getPPM();

  int ppm = co2_ppm / 4;

  //Vrl = val * ( 5.00 / 1024.0  );      // V

  //Rs = 20000 * ( 5.00 - Vrl) / Vrl ;   // Ohm 

  //ratio =  Rs/Ro;     

  lcd.setCursor(0,3);

  lcd.print("co2 ppm=" + (String)co2_ppm + "    ");

    

  delay(1000);

}

Posted by RDIoT
|

Micro SD TF Card Memory Module [S059]



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


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


* Specs

Features:

Support Micro SD Card, Micro SDHC card (high-speed card)

The level conversion circuit board that can interface level is 5V or 3.3V

Communication interface is a standard SPI interface

Control Interface: A total of six pins (GND, VCC, MISO, MOSI, SCK, CS), GND to ground,

VCC is the power supply, MISO, MOSI, SCK is the SPI bus, CS is the chip select signal pin;

3.3V regulator circuit: LDO regulator output 3.3V as level converter chip, Micro SD card supply;

Level conversion circuit: Micro SD card into the direction of signals into 3.3V, MicroSD card toward the direction of the control interface MISO signal is also converted to 3.3V, general AVR microcontroller system can read the signal;

Micro SD card connector: yes since the bomb deck for easy card insertion and removal.

Positioning holes: 4 M2 screws positioning hole diameter of 2.2mm, easy to install positioning, to achieve inter-module combination;


Specifications:

Power supply:4.5V - 5.5V, 3.3V voltage regulator circuit board

Positioning holes: 4 M2 screws positioning hole diameter of 2.2mm

Control Interface: GND, VCC, MISO, MOSI, SCK, CS

Size:45 x 28mm

Net weight:6g


* Contents

- Connect

CS   ----- D4

SCK  ----- D13

MOSI ----- D11

MISO ----- D12

VCC  ----- 5V

GND  ----- GND

 

- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#include <SPI.h>

#include <SD.h> // include the SD library


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


File myFile;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  delay(1000);

  lcd.clear();


  lcd.setCursor(0,0);

  lcd.print("S059:microSD Adapter");


  lcd.setCursor(0,1);

  lcd.print("Initializing SD Card");


  if (!SD.begin(4)) {

    lcd.setCursor(0,1);

    lcd.print("Initialize Failed   ");

    return;

  }


  lcd.setCursor(0,1);

  lcd.print("Initialization done");


  myFile = SD.open("test5.txt", FILE_WRITE);


  // if the file opened okay, write to it:

  if (myFile) {


    lcd.setCursor(0,1);

    lcd.print("Writing to test.txt ");

    myFile.println("text");

    

    // close the file:

    myFile.close();

    lcd.setCursor(0,2);

    lcd.print("writing done.");

  } else {


    lcd.setCursor(0,2);

    lcd.print("error opening test.txt");

  }


  // re-open the file for reading:

  myFile = SD.open("test5.txt");

  if (myFile) {

    lcd.setCursor(0,3);

    lcd.print("Read test.txt:");


    // read from the file until there's nothing else in it:

    while (myFile.available()) {

      lcd.write(myFile.read());


    } 

    // close the file:

    myFile.close();

  } else {

    // if the file didn't open, print an error:

    lcd.setCursor(0,2);

    lcd.print("error opening test.txt");

  }


}

Posted by RDIoT
|

DS3231 AT24C32 IIC Clock Module (DS3231SN) [S174] 




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


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


* Specs

Overview

DS3231 is a low cost and extremely accurate I2C real-time clock, with an integrated crystal and temperature-compensated crystal oscillator (TCXO).  DS3231 can be operated using supply voltages ranging from 2.3 V to 5.5 V and it also features battery backup capabilities.

The DS3231 features an integrated crystal, 2 programmable time-of-day alarms, a temperature sensor, and 32.768 kHz signal output pin.

The AT24C32 EEPROM is a 32K EEPROM that can be used to add non-volatile data storage to your electronic projects and prototypes.

The module also features a battery holder, allowing you to add a backup battery to ensure continuous operation.


Features

Can be connected directly to the microcontroller IO ports

Standard 2.54 mm pins for input and output connections

Two calendars and alarm clock

Two programmable square-wave outputs

Real time clock generator for seconds, minutes, hours, day, date, month, and year timing

Valid until 2100 with leap year compensation

Can be cascaded with other I2C devices

The address can be set using the pins A0/A1/A2 (the default address is 0x57)

Battery socket compatible with LIR2032 batteries

I2C interface

Specifications


Operating voltage: 3.3 V to 5.5 V

Real-time clock chip: DS3231

Clock accuracy: 2 ppm

Memory chip: AT24C32 (32 Kb storage capacity)

On-chip temperature sensor with an accuracy of ±3 ℃

I2C bus interface maximum speed: 400 kHz

Size: 38 x 22 x 14 mm



* Contents

- DataSheet : http://datasheets.maximintegrated.com/en/ds/DS3231.pdf

- Library : https://github.com/kriswiner/DS3231RTC

- Connect

DS3231 Breakout --------- Arduino

3.3V --------------------- 3.3V

SDA ----------------------- A4

SCL ----------------------- A5

GND ---------------------- GND


- Key Code

   // If device is not busy, read time, date, and temperature

   byte c = readByte(DS3231_ADDRESS, STATUS) & 0x04;

   if(!c) {  // if device not busy

 

  // These interrupts require constant polling of the STATUS register which takes a lot of time, 

  // which the microcontroller might not be able to spare. If the micrcontroller has a lot of other things to do

  // or we want to save power by only waking up the microcontroller when something requires its attention, use the 

  // hardware interrupt routine alarmChange().

   c = readByte(DS3231_ADDRESS, STATUS);           // Read STATUS register of DS3231 RTC

   if(c & 0x01) {                                  // If Alarm1 flag set, take some action

     digitalWrite(outPin1, HIGH);                  // Turn on extenal LED

 

  // play song1

     for (uint8_t entry = 0; entry < 32; entry++) {

       uint8_t data = readEEPROM(AT24C32_ADDRESS, 1, entry);

       tone(outPin2, data, 50);  delay(50);

     }

     noTone(outPin2);                              // End song1

 

     digitalWrite(outPin1, LOW);                   // Turn off external LED

     writeByte(DS3231_ADDRESS, STATUS, c & ~0x01); // clear Alarm 1 flag if already set

   }

   if(c & 0x02) {                                  // If Alarm 2 flag set, take some action

     digitalWrite(outPin1, HIGH);                  // Turn on extenal LED

 

  // play song1

     for (uint8_t entry = 0; entry < 32; entry++) {

       uint8_t data = readEEPROM(AT24C32_ADDRESS, 1, entry);

       tone(outPin2, data, 50); delay(50); 

     }

     noTone(outPin2);                              // End song1

     

     digitalWrite(outPin1, LOW);                   // Turn off extenal LED

     writeByte(DS3231_ADDRESS, STATUS, c & ~0x02); // clear Alarm 2 flag if already set

   }

 

    // get time

    seconds = readSeconds();

    minutes = readMinutes();

    hours   = readHours();

    PM      = readPM();

    

    day     = readDay();

    date    = readDate();

    month   = readMonth();

    year    = readYear();

    century = readCentury();

   

    // get temperature

    temperature = readTempData();  // Read the temperature

   }  

 

    // Serial print and/or display at 0.5 s rate independent of data rates

    delt_t = millis() - count;

    if (delt_t > 300) { // update LCD once per half-second independent of read rate

    digitalWrite(blinkPin, blinkOn);

    

    display.clearDisplay();

  

    display.setCursor(0, 0); display.print("DS3231 RTC");

    

    display.setCursor(0, 10); 

    if(hours < 10)   {display.print("0"); display.print(hours);}   else display.print(hours);

    display.print(":"); 

    if(minutes < 10) {display.print("0"); display.print(minutes);} else display.print(minutes);

    display.print(":"); 

    if(seconds < 10) {display.print("0"); display.print(seconds);} else display.print(seconds);

    if(PM) display.print(" PM"); else display.print(" AM"); 

    

    display.setCursor(0, 20); display.print(month); display.print("/"); display.print(date); display.print("/20"); display.print(year); 

 

    display.setCursor(0, 30); 

    if(day == 1) display.print("Monday");   

    if(day == 2) display.print("Tuesday");  

    if(day == 3) display.print("Wednesday");

    if(day == 4) display.print("Thursday");   

    if(day == 5) display.print("Friday");  

    if(day == 6) display.print("Saturday");  

    if(day == 7) display.print("Sunday");   

    

    display.setCursor(0, 40); display.print("T = "); display.print(temperature, 2); display.print(" C"); 

    display.display();

    

    blinkOn = ~blinkOn;

    count = millis();  

}

'2) Sensor > RTC' 카테고리의 다른 글

RTC DS1302 Module (DS1302) [S030]  (0) 2016.09.11
Tiny RTC DS1307 I2C Module (DS1307) [S029]  (0) 2016.09.11
Posted by RDIoT
|

SiteMap

카테고리 없음 2016. 9. 11. 10:10
sitemap.xmlsitemap.xml


sitemap.xml

sitemap.xml



sitemap_20170828.xml


 

Posted by RDIoT
|

RTC DS1302 Module (DS1302) [S030]



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


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


* Specs

Color: Green

Material: PCB

Voltage: 2v ~ 5.5v

Length: 43mm

Width: 23mm


* Contents

- Connect

VCC ----- 5V

GND ----- GND

CLK ----- D6

DAT ----- D7

RST ----- D8

 

- Setup Default Value

#define SET_DATE_TIME_JUST_ONCE

  seconds    = 0;

  minutes    = 44;

  hours      = 9;

  dayofweek  = 2;  // Day of week, any day can be first, counts 1...7

  dayofmonth = 2; // Day of month, 1...31

  month      = 2;  // month 1...12

  year       = 2016;



- Key Code

// Set your own pins with these defines !

#define DS1302_SCLK_PIN   6    // Arduino pin for the Serial Clock

#define DS1302_IO_PIN     7    // Arduino pin for the Data I/O

#define DS1302_CE_PIN     8    // Arduino pin for the Chip Enable


#define bcd2bin(h,l)    (((h)*10) + (l))

#define bin2bcd_h(x)   ((x)/10)

#define bin2bcd_l(x)    ((x)%10)


#define DS1302_SECONDS           0x80

#define DS1302_MINUTES           0x82

#define DS1302_HOURS             0x84

#define DS1302_DATE              0x86

#define DS1302_MONTH             0x88

#define DS1302_DAY               0x8A

#define DS1302_YEAR              0x8C

#define DS1302_ENABLE            0x8E

#define DS1302_TRICKLE           0x90

#define DS1302_CLOCK_BURST       0xBE

#define DS1302_CLOCK_BURST_WRITE 0xBE

#define DS1302_CLOCK_BURST_READ  0xBF

#define DS1302_RAMSTART          0xC0

#define DS1302_RAMEND            0xFC

#define DS1302_RAM_BURST         0xFE

#define DS1302_RAM_BURST_WRITE   0xFE

#define DS1302_RAM_BURST_READ    0xFF


#define DS1302_D0 0

#define DS1302_D1 1

#define DS1302_D2 2

#define DS1302_D3 3

#define DS1302_D4 4

#define DS1302_D5 5

#define DS1302_D6 6

#define DS1302_D7 7


// Bit for reading (bit in address)

#define DS1302_READBIT DS1302_D0 // READBIT=1: read instruction


// Bit for clock (0) or ram (1) area, 

// called R/C-bit (bit in address)

#define DS1302_RC DS1302_D6


// Seconds Register

#define DS1302_CH DS1302_D7   // 1 = Clock Halt, 0 = start


// Hour Register

#define DS1302_AM_PM DS1302_D5 // 0 = AM, 1 = PM

#define DS1302_12_24 DS1302_D7 // 0 = 24 hour, 1 = 12 hour


// Enable Register

#define DS1302_WP DS1302_D7   // 1 = Write Protect, 0 = enabled


// Trickle Register

#define DS1302_ROUT0 DS1302_D0

#define DS1302_ROUT1 DS1302_D1

#define DS1302_DS0   DS1302_D2

#define DS1302_DS1   DS1302_D2

#define DS1302_TCS0  DS1302_D4

#define DS1302_TCS1  DS1302_D5

#define DS1302_TCS2  DS1302_D6

#define DS1302_TCS3  DS1302_D7


  ds1302_struct rtc;

  char buffer[80];     // the code uses 70 characters.


  // Read all clock data at once (burst mode).

  DS1302_clock_burst_read( (uint8_t *) &rtc);


  sprintf(buffer, "Date=%d-%d-%d [%d]", \

    2000 + bcd2bin( rtc.Year10, rtc.Year), \

    bcd2bin( rtc.Month10, rtc.Month), \

    rtc.Day, \

    bcd2bin( rtc.Date10, rtc.Date));


  lcd.print(buffer);

'2) Sensor > RTC' 카테고리의 다른 글

DS3231 AT24C32 IIC Clock Module (DS3231SN) [S174]  (0) 2016.09.11
Tiny RTC DS1307 I2C Module (DS1307) [S029]  (0) 2016.09.11
Posted by RDIoT
|

Tiny RTC DS1307 I2C Module (DS1307) [S029]



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


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


* Specs

DS1307 I2C real-time clock chip (RTC)

24C32 32K I2C EEPROM memory

The using LIR2032 rechargeable lithium battery with charging circuit

Solve the problem DS1307 with backup battery can not read and write.

Fully charged, it can provide the DS1307 timing 1.

Compact design, 27mm * 28mm * 8.4mm

Leads to the a DS1307 clock pin, to provide the clock signal for the microcontroller.

Other I2C devices can be cascaded


* Contents

- Library : https://github.com/adafruit/RTClib


- Connect

GND - GND

VCC - 5V

SDA - SDA

SCL - SCL


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#include "RTClib.h"

 

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

RTC_Millis rtc;

String dt;

String ut;

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

  

  rtc.begin(DateTime(F(__DATE__), F(__TIME__)));

 

  delay(1000);

  lcd.clear();

}

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S029:DS1307");

 

  DateTime now = rtc.now();

 

  dt = (String)now.year()+"/";

  dt += (String)now.month()+"/";

  dt += (String)now.day()+" ";

  dt += (String)now.hour()+":";

  dt += (String)now.minute()+":";

  dt += (String)now.second();

 

  lcd.setCursor(0,1);

  lcd.print(dt);

 

  ut = (String)now.unixtime();


  lcd.setCursor(0,2);

  lcd.print("unixtime="+ut);

}



'2) Sensor > RTC' 카테고리의 다른 글

DS3231 AT24C32 IIC Clock Module (DS3231SN) [S174]  (0) 2016.09.11
RTC DS1302 Module (DS1302) [S030]  (0) 2016.09.11
Posted by RDIoT
|

8 Channel Solid State Relay Module [S168]




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



* Specs

Description:

5V Omron solid state relays 240V 2A, output with resistive fuse 240V 2A

Size: 103*53*21mm/4.05*2.08*0.82"

The input power supply: 5V DC (160mA)

The input control signal voltage:

(0-2.5V low state relays ON)

(3.3-5V state high relay OFF)

2.54cm pin and blue KF301 terminals connected to the control line is more convenient

Module interface:

Input section:

DC +: positive power supply (relay voltage power supply)

DC-: connect power negative

CH1: 1 signal to trigger the end of the relay module (low level trigger valid)

CH2: 2-way relay module signal triggering end (low level trigger valid)

CH3: 3 relay module signal triggering end (low level trigger valid)

CH4: 4-channel relay module signal triggering end (low level trigger valid)

CH5: 5-way relay module signal triggering end (low level trigger valid)

CH6: 6-way relay module signal triggering end (low level trigger valid)

CH7: 7-way relay module signal triggering end (low level trigger valid)

CH8: 8-channel relay module signal triggering end (low level trigger valid)

Voltage version   quiescent current   working current    trigger voltage     trigger current

   1-way 5V               0mA                  13.8mA                 0-2.5V                2mA

   2-way 5V               0mA                  26.8mA                 0-2.5V                2mA

   3-way 5V               0mA                    37mA                 0-2.5V                 2mA

   4-way 5V               0mA                    48mA                 0-2.5V                 2mA

   5-way 5V               0mA                    59mA                 0-2.5V                 2mA

   6-way 5V               0mA                    70mA                 0-2.5V                 2mA

   7-way 5V               0mA                    81mA                 0-2.5V                 2mA

   8-way 5V               0mA                    90mA                 0-2.5V                 2mA


* Contents

- Key Code

#define RELAY1  9

#define RELAY2  8

#define RELAY3  7

#define RELAY4  6

#define RELAY5  5

#define RELAY6  4

#define RELAY7  3

#define RELAY8  2


void setup()

{    

  pinMode(RELAY1, OUTPUT);       

  pinMode(RELAY2, OUTPUT);

  pinMode(RELAY3, OUTPUT);

  pinMode(RELAY4, OUTPUT);

  pinMode(RELAY5, OUTPUT);

  pinMode(RELAY6, OUTPUT);

  pinMode(RELAY7, OUTPUT);

  pinMode(RELAY8, OUTPUT);


  digitalWrite(RELAY1,LOW);           

  digitalWrite(RELAY2,LOW);           

  digitalWrite(RELAY3,LOW);           

  digitalWrite(RELAY4,LOW);           

  digitalWrite(RELAY5,LOW);           

  digitalWrite(RELAY6,LOW);           

  digitalWrite(RELAY7,LOW);           

  digitalWrite(RELAY8,LOW);           

  delay(2000);


  digitalWrite(RELAY1,HIGH);           

  digitalWrite(RELAY2,HIGH);           

  digitalWrite(RELAY3,HIGH);           

  digitalWrite(RELAY4,HIGH);           

  digitalWrite(RELAY5,HIGH);           

  digitalWrite(RELAY6,HIGH);           

  digitalWrite(RELAY7,HIGH);           

  digitalWrite(RELAY8,HIGH);           

}


void loop()

{

   digitalWrite(RELAY1,HIGH);          // Turns Relay 1 Off

   digitalWrite(RELAY2,HIGH);          // Turns Relay 2 Off


   delay(1000);                        // Wait 1 seconds

   digitalWrite(RELAY1,LOW);           // Turns ON Relays 1   

   digitalWrite(RELAY2,LOW);           // Turns ON Relays 2

   delay(1000); // Wait 1 seconds

}

Posted by RDIoT
|

12V Delay Timer Adjustable Relay Module (NE555) [S165]



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


* Specs

100% brand new and high quality

Input voltage: 12 V

Quantity : 1pcs

Size: 68mmX21mmX18mm

Color : red

Module based on: NE555 chip 

Adjustable time: 0 to 10 seconds

Max. load: 2200W


* Contents

- Connect

+ ----- 12V

- ----- GND

Posted by RDIoT
|

5V Relay Low Level Trigger [S155]



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


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


* Specs

1, the module complies with international safety standards, the load control area and regional isolation tank; 

2, using loose music authentic relay; 

3, with the power and relay instructions, pull off, disconnect does not shine; 

4, when the input signal is a signal, often beginning with a common terminal will be turned on; 

5, can be used as a microcontroller development board module that can be used as home appliance control; 

6, the control DC or AC signal, you can control 220V AC load; 

7, there is a normally open and one normally closed contact; 

8, blue KF301 terminals to the control line is more convenient. 

About  the high and low trigger description.if you don't understand .pls check below 

Means there is a high trigger voltage trigger, can be understood as a way to signal input terminal and VCC between the positive short trigger signal input and ground; 

Refers to a low voltage trigger signal input terminal and ground for OV trigger mode, can be understood as a way to signal input terminal and GND short circuit triggered the negative


* Contents

- Connect


- Key Code

int Relay = 2;


void setup()

{

  pinMode(Relay,OUTPUT);

}


void loop()

{

  for(int i=0;i<=1;i++) 

  {

    digitalWrite(Relay,i);

    delay(2000);

  }

}

Posted by RDIoT
|

5V 4-Channel Relay Module [S147]



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


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


* Specs

This item is a 5V 4 Channel Relay board, Can be able to control various appliances, and the other equipments with large current. It can be controlled directly by Microcontroller Arduino , 8051, AVR, PIC, DSP, ARM, ARM, MSP430, TTL logic.

4 Channel Relay interface board.

Each one needs 15-20mA Driver Current.

Equiped with high-current relay : DC30V 10A AC250V 10A AC125V 10A.

Standard interface that can be controlled directly by microcontroller.

Indication LED’s for Relay output status.

Size:75mm x 55mm x 20mm


* Contents

- Connect

VCC

IN4 ----- D8

IN3 ----- D9

IN2 ----- D10

IN1 ----- D11

GND


COM ----- 5V

RIGHT ----- LED+


- Key Code

#define RELAY1  8                        

#define RELAY2  9                        

#define RELAY3  10                        

#define RELAY4  11


void setup()

{    

  pinMode(RELAY1, OUTPUT);       

  pinMode(RELAY2, OUTPUT);

  pinMode(RELAY3, OUTPUT);

  pinMode(RELAY4, OUTPUT);

}

 void loop()

{

   digitalWrite(RELAY1,LOW);           // Turns ON Relays 1

   delay(2000);                        // Wait 2 seconds

   digitalWrite(RELAY1,HIGH);          // Turns Relay Off

   digitalWrite(RELAY2,LOW);           // Turns ON Relays 2

   delay(2000);                        // Wait 2 seconds

   digitalWrite(RELAY2,HIGH);          // Turns Relay Off

   digitalWrite(RELAY3,LOW);           // Turns ON Relays 3

   delay(2000);                        // Wait 2 seconds

   digitalWrite(RELAY3,HIGH);          // Turns Relay Off

   digitalWrite(RELAY4,LOW);           // Turns ON Relays 4

   delay(2000);                        // Wait 2 seconds

   digitalWrite(RELAY4,HIGH);          // Turns Relay Off        

}

Posted by RDIoT
|

5V 2-Channel Relay Module [S116]



https://www.youtube.com/watch?v=w-E8hqNFMdE


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


* Specs

Brand new and high quality.

This module can be used with Arduino Special Sensor Shield V4.0.

You can do some simple design about it.

This is 2-Channel 5V Relay Module for Arduino PIC ARM AVR DSP.

It can be able to control various appliances, and other equipments with large current.

Easy to be controlled by a lots of Microcontrollers.

Just use 5v input signal to control.

Equiped with high-current relay, AC250V 10A, AC150V 10A; DC30V 10A , DC28V 10A.

size:3.9cm x 5.1cm (1.54inch x 2.01inch).


* Contents

- Key Code

#define RELAY1  8                        

#define RELAY2  9                        


void setup()

{    

  pinMode(RELAY1, OUTPUT);       

  pinMode(RELAY2, OUTPUT);

}

 

 void loop()

{

   digitalWrite(RELAY1,LOW);           // Turns ON Relays 1

   delay(500);                         // Wait 

   digitalWrite(RELAY1,HIGH);          // Turns Relay Off

 

   digitalWrite(RELAY2,LOW);           // Turns ON Relays 2

   delay(500);                         // Wait

   digitalWrite(RELAY2,HIGH);          // Turns Relay Off

}



Posted by RDIoT
|

5V Relay Module (KY-019) [S076]




https://www.youtube.com/watch?v=nW7LC4X-6sc


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


* Specs

The company produces relay module can be connected to 240V AC or 28V DC power into a variety of other electrical parts. The relay can be used in anti-theft alarm, toys, etc. Relay is an electrically controlled device. It has a control system (also known as the input circuit) and the control system (Also known as the output circuit).

Commonly used in automation control circuit, it is actually a small Current to control a large current operation "automatic switch." Therefore, the circuit automatically adjusts the play, safety protection, transfer Conversion circuit and so on. Particularly suitable for single-chip control strong electric devices. In the control and use is also very convenient, just give input corresponding output relay different levels, you can Achieved by controlling the relay control purposes other devices, in addition, in the multi-channel relay PCB layout on the use of two lines Layout, user-lead connections. While in the circuit of a DC diode added greatly improved relay

Module to engage current ability to prevent the transistor being burned. In addition, we added a relay this power indicator Lights (except relay all the way), the indicator is red. In brightest relay also adds a status indicator.


* Contents

- Connect

Left

Middle ----- Connect

Right ----- Connect


S ----- D10

+ ----- 5V

- ----- GND


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


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

int pin = 10;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(pin,OUTPUT);

  delay(1000);


  lcd.clear();

}


void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S076:5V relay KY-019");


  lcd.setCursor(0,1);

  digitalWrite (pin, HIGH); // relay conduction;

  lcd.print("D10=" + (String)digitalRead(pin) + " - HIGH");

  delay (2000);

 

  lcd.setCursor(0,1); 

  digitalWrite (pin, LOW); // relay switch is turned off;

  lcd.print("D10=" + (String)digitalRead(pin) + " - LOW ");

  delay (2000);


}

Posted by RDIoT
|

Mini Reed Switch Module (KY-021) [S045]



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


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


* Specs

A reed module is a magnetic sensor that is normally open and get closed when exposed to a magnetic field.

In our example turn off the buildin LED on pin 13 if the sensor is closed. For this you need to keep a magnet near the sensor.

The module includes a 10 K Ohm resistor, so no additional parts needed.


* Contents

- Connect

S ----- D2

Middle ----- 5V

- ----- GND


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

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

int pin = 2;

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  pinMode(pin,INPUT);

  delay(1000);

 

  lcd.clear();

}

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S045:Mini ReadSwtich");

 

  int val = digitalRead(pin);

 

  lcd.setCursor(0,1);

  lcd.print("val=" + (String)val + "  ");

 

  if(val==LOW)

  {

    lcd.setCursor(0,2);

    lcd.print("detected");    

  }

  else

  {

    lcd.setCursor(0,2);

    lcd.print("        ");    

  } 

}

'2) Sensor > Reed' 카테고리의 다른 글

Reed Swtich Module (KY-025) [S044]  (0) 2016.09.09
Posted by RDIoT
|

Reed Swtich Module (KY-025) [S044]



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


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


* Specs

Reed module and the interface comes with digital 13 LED build a simple circuit to produce a Reed warning lamp 13 comes with digital interfaces of the LED, the Reed sensor access number 3 interface, when Reed sensors Sensed a key signal (magnetic field change near the module), LED lights, otherwise off.


* Contents

- Connect

A0 ----- X

G ----- GND

+ ----- 5V

D0 ----- D2


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


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

int pin = 2;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(pin,INPUT);

  delay(1000);


  lcd.clear();

}


void loop()

  lcd.setCursor(0,0);

  lcd.print("S044:Read Swtich");


  int val = digitalRead(pin);


  lcd.setCursor(0,1);

  lcd.print("val=" + (String)val + "  ");


  if(val==1)

  {

    lcd.setCursor(0,2);

    lcd.print("detected");    

  }

  else

  {

    lcd.setCursor(0,2);

    lcd.print("        ");    

  }

}

'2) Sensor > Reed' 카테고리의 다른 글

Mini Reed Switch Module (KY-021) [S045]  (0) 2016.09.09
Posted by RDIoT
|

Photo Interrupter Module LM393 Comparator (FC-03) [S158]




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


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


* Specs

Module Features:

Use imported groove coupler sensor

Groove Width: 5mm

Output state indicator lights

Obscured output high; unobstructed output low

The comparator output, the signal is clean, the waveform, driving ability, more than 15mA

Operating Voltage: 3.3V-5V

The output in the form: Digital switching outputs (0 and 1)

A fixed bolt hole for easy installation

Small plates PCB Dimensions: 3.2 x 1.4cm / 1.25 * 0.55"

Using a wide voltage LM393 comparator

Module Using The Instructions:

Module slot unobstructed, receiver tube conduction module DO output low, shelter, DO output high

Module DO connected to the relay, composed of the limit switch functions can also be connected to the active buzzer module, composed 


Pins Connection:

VCC: positive power supply 3.3-5V;

GND: Ground;

DO:  Output frequency pulses;

AO:  analog output, real-time output voltage signal. (not useful)


* Contents

- Connect

VCC ----- 5V

GND ----- GND

D0 ----- D2


- Key Code

#define encdpin   2

volatile int count, countold;

unsigned long ignoremilli = 10;  

unsigned long oldtime = 0;

unsigned long time = 0;


  count = 0;

  countold = 0; 

  oldtime = millis();


  attachInterrupt(digitalPinToInterrupt(encdpin), sensor1, FALLING);


  if(countold != count)

  {

    Serial.println(count);

    lcd.setCursor(0,1);

    lcd.print("CNT : "+(String)count+" ");

    countold = count;

  }

Posted by RDIoT
|

Photo Interrupter Module (KY-010) [S041]



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


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


* Specs

Photo interupter module use the buildin arduino led. If the sensor is broken the LED is turned on.

Device senses a signal, LED lights, otherwise off.


* Contents

- Connect

S ----- D2

Middle ----- 5V

G ----- GND


- Key Code

int pin = 2;


void loop()

{

  int val = digitalRead(pin);

  Serial.println("digital=" + (String)val + " ");


  if(HIGH == val)

  {

    Serial.println("interrupt=detected---------------------------------------------------------");

    delay(100);

  }

  else{

    Serial.println("interrupt=NONE   ");

    delay(100);

  }

}



Posted by RDIoT
|

Linear magnetic Hall sensor (KY-024) [S048]



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


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



* Specs

Linear Hall magnetic module and a digital interface, built-in 13 LED build a simple circuit to produce a magnetic field warning lamp 13 comes with digital interfaces of the LED, the linear Hall sensor magnetometer access number 3 interface, when linear Hall magnetometer Sensor senses a key signal, LED lights, otherwise off.


* Contents

- Connect

: Analog 

A0 ----- A0


G ----- GND

+ ----- 5V

D0 ----- X

 

: Digital

A0 ----- X

G ----- GND

+ ----- 5V

D0 ----- D2 



- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


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

int pin = A0;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(pin,INPUT);

  delay(1000);


  lcd.clear();

}


void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S048:Linear Mag Hall");


  int val = analogRead(pin);


  lcd.setCursor(0,1);

  lcd.print("val=" + (String)val + "  ");


  if(val >= 527 && val <= 528)

  {

    lcd.setCursor(0,2);

    lcd.print("nomally = 527~528");    

  }

  else if (val < 527)

  {

    lcd.setCursor(0,2);

    lcd.print("under 527 : N     ");    

  }

  else if (val > 528)

  { 

    lcd.setCursor(0,2);

    lcd.print("over 527 : S      ");       

  }

  delay(200);

}

Posted by RDIoT
|

Hall Magnetic Sensor Module (KY-003) [S047]



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


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



* Specs

The KY-003 is a magnetic switch. If no magnetic field is present, the signal line of the sensor is HIGH (3.5 V). If a magnetic field is presented to the sensor, the signal line goes LOW, at the same time the LED on the sensor lights up. The polarity of the magnetic field is of influence to the switching action. The front side of the sensor needs the opposite polarity as the back of the sensor to switch on.

In the example program the led on the Arduino (pin 13) will be turned on when a magnetic field is present.


* Contents

- Connect

- ----- GND

middle ----- 5V

S ----- A0


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

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

int pin = A0;

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  pinMode(pin,INPUT);

  delay(1000);

 

  lcd.clear();

}

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S047:Hall Magnetic");

 

  int val = analogRead(pin);

 

  lcd.setCursor(0,1);

  lcd.print("val=" + (String)val + "  ");

 

  if(val>=750)

  {

    lcd.setCursor(0,2);

    lcd.print("nomally >= 750      ");    

  }

  else

  {

    lcd.setCursor(0,2);

    lcd.print("detected : under 100");    

 

  } 

  delay(200); 

}

Posted by RDIoT
|

Analog Hall Magnetic Sensor Module (KY-035) [S046]



https://www.youtube.com/watch?v=knrf0orPK-w


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



* Specs

KY-035 is an analog magnetic field sensor module. The strength of the field is given by an analog voltage at the signal pin of the module KY-035. The sensor is connected to gnd and 5V of the Arduino board. The output voltage is measured by analog pin A5 on the Arduino board.

The example program measures the output voltage of the sensor en presents the measured value in the serial monitor of the Arduino.

The led on the board flashes in a speed depending on the strength of the magnetic field. With a small magnet this can be demonstrated.



* Contents

- Connect

- ----- GND

middle ----- 5V

S ----- A0


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


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

int pin = A0;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(pin,INPUT);

  delay(1000);


  lcd.clear();

}


void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S046:Analog Hall Mag");


  int val = analogRead(pin);


  lcd.setCursor(0,1);

  lcd.print("val=" + (String)val + "  ");


  if(val >= 527 && val <= 528)

  {

    lcd.setCursor(0,2);

    lcd.print("nomally = 527~528");    

  }

  else if (val < 527)

  {

    lcd.setCursor(0,2);

    lcd.print("under 527 : N     ");    

  }

  else if (val > 528)

  { 

    lcd.setCursor(0,2);

    lcd.print("over 527 : S      ");       

  }

  delay(200);

}

Posted by RDIoT
|

Ceramic Piezo Vibration Sensor [S133]



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


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



* Specs

his ALSRobotBase Ceramic Piezo Vibration Piece Sensor buffers a piezoelectric transducer that responds to strain changes by generating a measurable output voltage change which is propotional with the strength of vibration.So you can know the extent of vibration. Different from digital vibration sensor that only accounts times, this analog one can tell extent of vibration.

When the piezoelectric ceramic shocking will generate an electrical signal, Arduino Controller analog port can be perceived slight vibration signals, Also can be realized with vibration interactions related works, such as electronic drums.


Working Voltage: 3.3V or 5V

Working Current: <1mA

Operating Temperature Range: -10 ~ + 70

Interface Type: Analog Output

Item Size: 30mm x 23mm

Item Weight: 5g

GPIO: S; signal output, +; power supply (VCC), -; ground (GND)

Input: Positive electrode of the piezoelectric ceramic

Gnd: Negative electrode of the piezoelectric ceramic

S-port is connected with the controller\'s analog input pin

5V and GND are respectively connected the power supply of + 5V and GND

Input and Gnd are already connected with the piezoelectric ceramics\' positive and negative


* Contents

- Connect

S ----- D2

+ ----- 5V

- ----- GND


- Key Code

lcd.print("Value=" + (String)digitalRead(2) + " ");

Posted by RDIoT
|