'Arduino'에 해당되는 글 103건

  1. 2016.09.18 2 Color(R,G) LED Module (KY-011) [D005]
  2. 2016.09.18 MF-A03 Knob + Sheet Scale (MF-A03) [S216]
  3. 2016.09.18 Linear Potentiometer B1K~B1M (B1K~B1M) [S070]
  4. 2016.09.18 Slide Pot 10K Module [S061]
  5. 2016.09.18 Taper Rotary Potentiometer B10K (B10K) [S060]
  6. 2016.09.18 Amp Pot B5K (B5K) [S027]
  7. 2016.09.17 3G Shield Call and Send SMS by AT Command [P011.1]
  8. 2016.09.17 HC Serial Bluetooth Module (HC-06) [S018]
  9. 2016.09.17 3DR Radio 915Mhz Telemetry Kit [S211]
  10. 2016.09.17 433Mhz Super-regenerative module (FS1000A,MX-JS-05V) [S081]
  11. 2016.09.17 ADXL335 3-axis Accelerometer (GY-61) [S057]
  12. 2016.09.17 Barometric Pressure Altitude BMP180 (BMP180) [S074]
  13. 2016.09.17 315Mhz 4Channel Remote Control Kit (PT2262/PT2272) [S054] 1
  14. 2016.09.17 PN532 NFC RFID module V3 (PN532) [S192]
  15. 2016.09.17 RFID-RC522 (MFRC-522) [S012]
  16. 2016.09.17 4 Channel IR Tracking Module [S075]
  17. 2016.09.17 Tracking Sensor Module Obstacle Avoidance (KY-033) [S026]
  18. 2016.09.17 Sharp Infrared Receiver (GP1UX311QS) [S016]
  19. 2016.09.17 Keyes Infrared Receiver Module (KY-022) [S014]
  20. 2016.09.17 Infrared Receiver VS1838 (VS1838B) [S013]
  21. 2016.09.17 4 Head Infrared Transmitter Module [S180]
  22. 2016.09.17 Two-way infrared transmitter module [S095]
  23. 2016.09.17 Keyes Infrared Transmitter Module (KY-005) [S015]
  24. 2016.09.17 IR Transmitter Module [S066]
  25. 2016.09.17 ENC28J60 Ethernet Module (ENC28J60) [S058]
  26. 2016.09.17 Finger Heartbeat Detection Sensor Module (KY-039) [S033]
  27. 2016.09.17 Pulse Sensor [S032]
  28. 2016.09.17 ISD 1820 Voice Recording Module (ISD1820) [S082]
  29. 2016.09.17 Small Sound Detection Module (KY-038) [S053]
  30. 2016.09.17 TEA5767 FM Stereo Radio Module (TEA5767) [S109]

2 Color(R,G) LED Module (KY-011) [D005]



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


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


* Specs

The Keyes 2 Color LED Module is a simple yet effective LED that is compatible with Arduino systems.  


Specs:

Material: FR4

Length: 35mm

Width: 15mm

Height: 13mm

Weight: 1.35g

Operating Voltage: 5v DC



* Contents

- Connect

- ----- GND

R ----- D11 (red)

G ----- D10 (green)


- Key Code

int R = 11; // OUTPUT PIN red

int G = 10; // OUTPUT PIN green

 

void setup()

{

 Serial.begin(115200); 

 pinMode(R, OUTPUT);

 pinMode(G, OUTPUT);

}

 

void loop()

 analogWrite(R, 0);

 analogWrite(G, 0);

 

 // RED

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

 {

 analogWrite(R, i);

 delay(10); 

 }

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

 {

 analogWrite(R, 255-i);

 delay(10);

 }

 

 // YELLOW

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

 {

 analogWrite(G, i);

 delay(10);

 }

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

 {

 analogWrite(G, 255 - i);

 delay(10);

 }

 

 // RED + Green

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

 {

 analogWrite(R, i);

 analogWrite(G, i);

 delay(10);

 }

 

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

 {

 analogWrite(R, 255 - i);

 analogWrite(G, 255 - i);

 delay(10);

 } 

}

'3) Actuator > LED' 카테고리의 다른 글

Magic Cup Light Module (KY-027) [D020]  (0) 2016.09.18
RGB LED Module SMD (KY-009) [D008]  (0) 2016.09.18
RGB LED Module DIP (KY-016) [D007]  (0) 2016.09.18
RGB LED (BL-L515) [D006]  (0) 2016.09.18
7 color flash LED Module (KY-034) [D010]  (0) 2016.09.18
Posted by RDIoT
|

MF-A03 Knob + Sheet Scale (MF-A03) [S216]



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


* Specs

A03 dial knob + MF-A03 bakelite knob with scale plate / sheet scale digital potentiometer

Posted by RDIoT
|

Linear Potentiometer B1K~B1M (B1K~B1M) [S070]




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


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



* Contents

- Connect

Left ----- D8

Middle ----- LED + 

 

LED (+) ----- Potentiometer Middle

LED (-) ----- GND


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


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

int pin=8;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

  pinMode(pin, OUTPUT);


  digitalWrite(pin,HIGH);

  delay(1000);


  lcd.clear();

}


void loop()

{

  lcd.setCursor(0,0);

  lcd.print("S070:B1K~B1M");


  lcd.setCursor(0,1);

  lcd.print("analog=" + (String)analogRead(A0) + " ");

}

Posted by RDIoT
|

Slide Pot 10K Module [S061]



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


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



* Specs

Two analog outputs, analog outputs 0-VCC voltage signals

Size: 90 * 20mm / 0.39*0.78"

Voltage: 3.3V or 5V

Port: Analog

Resistance: 10K

Quantity:1pc


* Contents

- Connect

GND ----- X 

VCC ----- X

OTB ----- A1

GND ----- GND

VCC -----5V

OTA -----  A0


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

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

int pot1Pin = A0;

int pot2Pin = A1;

 

int val;

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  delay(1000);

  lcd.clear();

}

 

void loop()

{

  lcd.setCursor(0,0);

  lcd.print("S061:Slide Pot");

 

  lcd.setCursor(0,1);

  lcd.print("OTA=" + (String)analogRead(pot1Pin) + " -> " + (String)map(analogRead(pot1Pin), 0, 1021, 0, 100)  + "     " );

 

  lcd.setCursor(0,2);

  lcd.print("OTB=" + (String)analogRead(pot2Pin) + " -> " + (String)map(analogRead(pot2Pin), 0, 1021, 0, 100)  + "     ");

 

  delay(10);

}

Posted by RDIoT
|

Taper Rotary Potentiometer B10K (B10K) [S060]



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


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


* Specs

Manufacturer: ALPHA

Manufacturer Part No: B10K OHM 17mm

Comes with Dust Seal


Specifications

Adjustment Type: Top Adjustment

Power: 1/2W

Resistance: 10K OHM OHMS

Type: Linear

Type B

Features

Knurled Shaft

Suits Most Standard knobs

Shaft Diameter: 6mm

Shaft Length: 10mm

Mounting Hole: 7.5mm

Base Diameter: 16mm


* Contents

- Connect

Left - 5V

Middle - A0 (OUT)

Right - GND


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


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

int potPin = A0;

int val;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  //pinMode(potPin, INPUT);

  delay(1000);


  lcd.clear();

}


void loop()

{

  lcd.setCursor(0,0);

  lcd.print("S060:B10K");


  val = analogRead(potPin);


  lcd.setCursor(0,1);

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


  val = map(val, 0, 1021, 100, 1);

 

  lcd.setCursor(0,2);

  lcd.print("val1~100=" + (String)val + "  " );


  delay(10);

}

Posted by RDIoT
|

Amp Pot B5K (B5K) [S027]



https://www.youtube.com/watch?v=7J1AMx28ROs


* Specs

5k

2W @ 70°C ambient

Non-rotational key

Temp. range: -55°C to +120°C

Shaft length: 0.875" 

Shaft dia.: 0.25"

Mounting hole: 0.375" 

Max. panel thickness: 0.25"


* Contents

- Connect

Potentiometer

LEFT - 5V

MIDDLE - A0 (OUT)

RIGHT - GND


Servo

Black - GND

Red - 5V

Red -  D12


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#include <Servo.h> 


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

Servo myservo; 

int servoPin = 12;

int potPin = A0;

int val;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  myservo.attach(servoPin); 

  delay(1000);


  lcd.clear();

}


void loop()

{


  val = analogRead(potPin);

  val = map(val, 0, 1023, 0, 179);

 

  lcd.setCursor(0,0);

  lcd.print("S027:B5K");


  myservo.write(val);

  lcd.setCursor(0,1);

  lcd.print("pos0~179=" + (String)val + "  " );


  delay(10); 

}

Posted by RDIoT
|

3G Shield Call and Send SMS by AT Command [P011.1]



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


*GitHubhttps://github.com/rdiot/rdiot-p011.1.git


* Parts

- Arduino UNO

ITEAD 3G Shield (IM121026002) [B014]

- Cell Phone 


* Contents

Send SMS and Call to my Cell Phone

AT+CMGF=1

AT+CPMS="SM","SM","SM"

AT+CMGW="01045625456"<CR>(TEXT MODE)

hi there. This is test for SMS.

Crtl+Z


AT+CMSS=3

AT+CMSS=4

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

ITEAD 3G Shield (IM121026002) [B014]  (0) 2016.09.01
Posted by RDIoT
|

HC Serial Bluetooth Module (HC-06) [S018]




HC Serial Bluetooth Module (HC-06) Phone to Slave [S018] 

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


HC Serial Bluetooth Module (HC-06) Mster to Slave [S018]

https://www.youtube.com/watch?v=y8-W5BIm6xU


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


* Specs

Serial port bluetooth, Drop-in replacement for wired serial connections, transparent usage. You can use it simply for a serial port replacement to establish connection between MCU and GPS, PC to your embedded project and etc.

And now, we provide HC-05 and HC-06. HC-05 could be setting to Master or Slave by user. HC-06 has be designed Master or Slave when the factory, user couldn't change the role.


Feature :

Bluetooth protocal:  Bluetooth Specification v2.0+EDR

Frequency:  2.4GHz ISM band

Modulation:  GFSK(Gaussian Frequency Shift Keying)

Emission power:  ≤4dBm, Class 2

Sensitivity:  ≤-84dBm at 0.1% BER

Speed: Asynchronous:  2.1Mbps(Max) / 160 kbps, Synchronous: 1Mbps/1Mbps

Security:  Authentication and encryption

Profiles:  Bluetooth serial port

Power supply: +3.3VDC 50mA

Working temperature: -20 ~ +75 Centigrade

Dimension: 26.9mm x 13mm x 2.2 mm


Default : Slave, 9600 baud rate, N, 8, 1. Pincode 1234


* Contents

- Connect

WAKEUP

VCC(3.6~6V) ----- 5V

GND ----- GND

TXD ----- RX

RXD ----- TX

STATE 


- Master Setup

AT

AT+ROLE=M

Arduino Reboot

AT+PIN1234

AT+BAUD4


- Slave Setup

AT

AT+ROLE=S

Arduino Reboot

AT+PIN1234

AT+BAUD4

AT+NAMEbtSlave


- Key Code

@Setup Master or Slave 

#include <SoftwareSerial.h>

 

SoftwareSerial BTSerial(2, 3);

 

void setup()  

{

  Serial.begin(9600);

  BTSerial.begin(9600);

}

void loop()

{

  if (BTSerial.available())

    Serial.write(BTSerial.read());

  if (Serial.available())

    BTSerial.write(Serial.read());

}  


@ Slave Test Source (Phone Master -> Slave)

#include "U8glib.h"

#include <SoftwareSerial.h>

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);

SoftwareSerial BTSerial(2, 3);

 

char data=NULL;

String str="";

int ledPin = 9;

 

void setup() {

 pinMode(ledPin,OUTPUT);

  Serial.begin(9600);

  BTSerial.begin(9600);

}

 

void loop(void) {

 

  if (BTSerial.available()) 

  {

   //Serial.write(BTSerial.read()); 

    data = (char)BTSerial.read();

   

    if(data == '1') {

      digitalWrite(ledPin,HIGH);

      str = "ON";

    } else if(data == '0') {

      digitalWrite(ledPin,LOW);

      str = "OFF";

    }

   }

 

  // picture loop

  u8g.firstPage();  

  do {

    draw();

  } while( u8g.nextPage() );

  

  // rebuild the picture after some delay

  delay(100);

 

}

 

void draw(void) {

  u8g.setFont(u8g_font_9x15B);

  u8g.setPrintPos(0, 12); 

  u8g.println("HC-06");

 

  u8g.setFont(u8g_font_helvB14);

  u8g.setPrintPos(0,40);

 

  u8g.print("data="+(String)data);

 

  u8g.setFont(u8g_font_helvB14);

  u8g.setPrintPos(0,60);

 

  u8g.print("cmd="+(String)str);

}

 


@ Master HC-06 <-> Slave HC-06 Test Source

#include <SoftwareSerial.h>

SoftwareSerial BT_Serial(2,3); //RX, TX

 

void setup()

{

  Serial.begin(9600);

  BT_Serial.begin(9600); // connect bluetooth

}

 

void loop()

{

  if(BT_Serial.available())

    Serial.write(BT_Serial.read()); // bluetooth read

    

  if(Serial.available())

    BT_Serial.write(Serial.read()); // bluetooth write  

}

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

Bluetooth 4.0 MP3 Decoding Board Module [B147]  (0) 2016.09.17
Bluetooth Module HC-05 (HC-05) [S128]  (0) 2016.09.17
Posted by RDIoT
|

3DR Radio 915Mhz Telemetry Kit [S211]




https://www.youtube.com/watch?v=8zU309jKdtc


* Specs

3DR Telemetry Kit Specifications

Very small size

Light weight (under 4 grams without antenna)

915MHz

Receiver sensitivity to -121 dBm

Transmit power up to 20dBm (100mW)

Transparent serial link

Air data rates up to 250kbps

MAVLink protocol framing and status reporting

Frequency hopping spread spectrum (FHSS)

Adaptive time division multiplexing (TDM)

Support for LBT and AFA

Configurable duty cycle

Built in error correcting code (can correct up to 25% data bit errors)

Demonstrated range of several kilometers with a small omni antenna

Can be used with a bi-directional amplifier for even more range

Open source firmware

AT commands for radio configuration

RT commands for remote radio configuration

Adaptive flow control when used with APM

Based on HM-TRP radio modules, with Si1000 8051 micro-controller and Si4432 radio module


* Contents

- Connect

5V ----- 5V

TXD ----- RX

RXD ----- TX

CTS

RTS 

GND ----- GND


- Key Code

void setup() {

  Serial.begin(57600);

}

void loop() {

  if (Serial.available()) {

    Serial.print((char) Serial.read());

    delay(10);

  }

}

Posted by RDIoT
|

433Mhz Super-regenerative module (FS1000A,MX-JS-05V) [S081]



https://www.youtube.com/watch?v=_h1i9cnf-ic


* Specs

Emission head (2SC3357 transistor):

The actual working distance 50-100m

Operating voltage 3-12V

Operating current :10-15mA

Ways of working: AM

Transfer rate: 4KB / S

Transmit power: 10mW

External antenna: 28cm ordinary multi-core or single core line

Pinout from left ? right: (DATA, VCC, GND)

Size: 1.9CM * 1.9CM * 0.9CM


Receiver Module Technical Data:

Model: MX-05V

Working voltage: DC5V

Quiescent Current: 4MA

Receiving frequency: 433.92MHZ

Receiver sensitivity:-105DB

Size: 30 * 14 * 7mm

External antenna: 32CM single wire, wound into a spiral


* Contents

- Connect

Emission 

ATA0 ----- D4

VCC ----- 5V

GND ----- GND


Receiver

VCC ----- 5V

DATA ----- D2 (data)

X

GD ----- GND


LED ----- D2


- Data Format Define

 : 1=1, 1=2



- Key Code

FS1000A

#include <Wire.h> 

#include <VirtualWire.h>       

#include <Bounce2.h>           

#include <LiquidCrystal_I2C.h>

 

LiquidCrystal_I2C lcd(0x27,16,2); 

 

int buttonPin = 2;  

int sendPin = 4;   

boolean oneTimeFlag = false;        

Bounce bouncer = Bounce();    

 

void setup() {

  lcd.init();                      // initialize the lcd 

 

  lcd.backlight();

  lcd.print("S081-FS1000A Snd");

  

   pinMode(buttonPin, INPUT);

   digitalWrite(buttonPin, HIGH);

   bouncer.attach( buttonPin );

   bouncer.interval(5);

    

   vw_setup(2000);        

   vw_set_tx_pin(sendPin);

   Serial.begin(9600);

}

 

void loop() {

 if ( bouncer.update() && bouncer.read() == LOW) {     

    if( oneTimeFlag == false) {                        

      lcd.setCursor(0, 1);

      lcd.print("ON = Send(1) ");

      Serial.println("on");

      sendMessage("1=1");  

      oneTimeFlag = true;

 

    } else {

      lcd.setCursor(0, 1);

      lcd.print("OFF = Send(2)");

      Serial.println("off");                 

      sendMessage("1=2");    

     oneTimeFlag = false;

 

     }         

  }

}

 

void sendMessage(char *data) {

  if (strlen(data) > 0) {     

   int msgSize = (strlen(data) + 1); 

   char packetData[msgSize];         

 

   vw_send((uint8_t *)data, msgSize);  

   vw_wait_tx();                       

 

  }  

}


MX-JS-05V

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#include <VirtualWire.h>

#include <string.h>

 

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

 

byte message[VW_MAX_MESSAGE_LEN];                    

byte messageLength = VW_MAX_MESSAGE_LEN; 

int rcvPin = 2; 

int ledPin = 8; // LED

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  delay(1000);

 

  lcd.clear();

  

  pinMode(ledPin, OUTPUT);

  digitalWrite(ledPin, HIGH);

  delay(1000);

  digitalWrite(ledPin, LOW);

 

  vw_setup(2000);

  vw_set_rx_pin(rcvPin);       

  vw_rx_start();               

 

}

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S081:MX-JS-05V Rev");

 

  if (vw_get_message(message, &messageLength)) {       

      

 

    int command = processResponse((char*)message, 1); 

 

 

    if (command) {

      switch (command) {

       case 1:                        

         lcd.setCursor(0,2);

         lcd.print("Receive Value= 1 ");

         digitalWrite(ledPin, HIGH);

         break;

       case 2:                         

         lcd.setCursor(0,2);

         lcd.print("Receive Value= 2 ");

         digitalWrite(ledPin, LOW);

         break;

      }

    }  

  }

 

}

 

int processResponse(char* message, int pinCode) {

  char *p = message;

  char *buf;

  int o = 0;

  int pin;

  int command;

 

      lcd.setCursor(0,1);

      lcd.print("RF msg:"+String(message));

 

  while ((buf = strtok_r(p, "=", &p)) != NULL)  {  

   if (o == 0) {                                 

     pin = atoi(buf);                            

   } else {

     command = atoi(buf);                        

   }

    o++;

  }

 

  if (pinCode == pin && command > 0) {                   

    return command;

  } else {

    return 0; 

  }

}

Posted by RDIoT
|

ADXL335 3-axis Accelerometer (GY-61) [S057]



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


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


* Specs

This is a very low cost break out module for the ADXL335 tripple axis accelerometer. This module includes optional header pins and provides easy access to the X, Y and Z axis analogue outputs from the accelerometer. 

It is capable of sensing forces up to 3g in all axis. A 3.3V on-board regulator is also provided allowing the module to be powered from a 3.3 to 5V power supply source.


Model number: HCMODU0070

Supply Range: 3V ~ 5V

3 Axis sensing

Full scale range: +/-3g

Sensitivity: 300mV/g (Typ)

Pinout, schematic and datasheet available after purchase.


* Contents

- Connect

Arduino Uno 

3.3V ----- VCC 

      ----- AREF

ADXL335 

VCC ----- 3.3V 

X-OUT ----- A0 

Y-OUT ----- A1 

Z-OUT ----- A2 

GND ----- GND


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

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

const int xpin = A0;                  // x-axis of the accelerometer

const int ypin = A1;                  // y-axis

const int zpin = A2;                  // z-axis (only on 3-axis models)

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  analogReference(EXTERNAL);

  pinMode(xpin, INPUT);

  pinMode(ypin, INPUT);

  pinMode(zpin, INPUT);

 

  delay(1000);

 

  lcd.clear();

}

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S057:ADXL335 3axisA");

 

  int x = analogRead(xpin);

    delay(1);

  int y = analogRead(ypin);

    delay(1);

  int z = analogRead(zpin);

  //zero_G is the reading we expect from the sensor when it detects

  //no acceleration.  Subtract this value from the sensor reading to

  //get a shifted sensor reading.

  float zero_G = 512.0;

  

  //scale is the number of units we expect the sensor reading to

  //change when the acceleration along an axis changes by 1G.

  //Divide the shifted sensor reading by scale to get acceleration in Gs.

  float scale = 102.3;

 

  float xp = ((float)x - zero_G)/scale;

  float yp = ((float)y - zero_G)/scale;

  float zp = ((float)z - zero_G)/scale;

 

  lcd.setCursor(0,1);

  lcd.print("ax="+ (String)x +" x=" + (String)xp);

 

  lcd.setCursor(0,2);

  lcd.print("ay="+ (String)y +" y=" + (String)yp);

 

  lcd.setCursor(0,3);

  lcd.print("az="+ (String)z +" z=" + (String)zp);

 

  delay(500); 

}

Posted by RDIoT
|

Barometric Pressure Altitude BMP180 (BMP180) [S074]



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


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


* Specs

Measuring the absolute pressure of the enviroment using a digital barometer such as this has some interesting applications. By converting the pressure measured into altitude, you have a reliable sensor for determining the height of your robot, plane or projectile!

Using a sensor as capable as the BMP180 you can achieve accurary of 1m, with noise of only 17cm in ultra high resolution noise. The device will operate at only 0.3uA meaning low current draw for battery powered applications.


The BMP180 comes fully calibrated and ready to use. As the device operates over I2C we've added optional I2C pull ups that can be enabled using the PU (pull up) jumper on the board for your convenience and ease during breadboarding.


Using I2C, the device provides pressure and temperature as 16bit values, which are used along with calibration data within the device are used to provide a temperature compensated altitude calculation.


This device is really easy to use, if your thinking of using it with an  then you need to check out our BMP180 tutorial! 

Features:

1.8V to 3.6V Supply Voltage

Low power consumption - 0.5uA at 1Hz

I2C interface

Max I2C Speed: 3.5Mhz

Very low noise - up to 0.02hPa (17cm)

Full calibrated

Pressure Range: 300hPa to 1100hPa (+9000m to -500m)

Weight: 1.18g

Size: 21mm x 18mm


* Contents

- Connect

VIN ----- 5V

GND ------ GND

SCL ----- A5

SDA ----- A4


- Library : https://github.com/jrowberg/i2cdevlib

 : Sample Test : BMP085, I2Cdev


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

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

 

// Arduino Wire library is required if I2Cdev I2CDEV_ARDUINO_WIRE implementation

// is used in I2Cdev.h

#include "Wire.h"

 

// I2Cdev and BMP085 must be installed as libraries, or else the .cpp/.h files

// for both classes must be in the include path of your project

#include "I2Cdev.h"

#include "BMP085.h"

 

// class default I2C address is 0x77

// specific I2C addresses may be passed as a parameter here

// (though the BMP085 supports only one address)

BMP085 barometer;

 

float temperature;

float pressure;

float altitude;

int32_t lastMicros;

 

#define LED_PIN 13 // (Arduino is 13, Teensy is 11, Teensy++ is 6)

bool blinkState = false;

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  // join I2C bus (I2Cdev library doesn't do this automatically)

  Wire.begin();

  barometer.initialize();

 

  pinMode(LED_PIN, OUTPUT);

  delay(1000);

 

  lcd.clear();

}

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S074:BMP180");

 

    // request temperature

    barometer.setControl(BMP085_MODE_TEMPERATURE);

    

    // wait appropriate time for conversion (4.5ms delay)

    lastMicros = micros();

    while (micros() - lastMicros < barometer.getMeasureDelayMicroseconds());

 

    // read calibrated temperature value in degrees Celsius

    temperature = barometer.getTemperatureC();

 

    // request pressure (3x oversampling mode, high detail, 23.5ms delay)

    barometer.setControl(BMP085_MODE_PRESSURE_3);

    while (micros() - lastMicros < barometer.getMeasureDelayMicroseconds());

 

    // read calibrated pressure value in Pascals (Pa)

    pressure = barometer.getPressure();

 

    // calculate absolute altitude in meters based on known pressure

    // (may pass a second "sea level pressure" parameter here,

    // otherwise uses the standard value of 101325 Pa)

    altitude = barometer.getAltitude(pressure);

 

    // display measured values if appropriate

    lcd.setCursor(0,1);

    lcd.print("Temperature=" + (String)temperature + "  ");

 

    lcd.setCursor(0,2);

    lcd.print("Pressure=" + (String)pressure + "  ");

 

    lcd.setCursor(0,3);

    lcd.print("Altitude=" + (String)altitude + "  ");

 

    // blink LED to indicate activity

    blinkState = !blinkState;

    digitalWrite(LED_PIN, blinkState);

    

    // delay 100 msec to allow visually parsing blink and any serial output

    delay(100); 

}

Posted by RDIoT
|

315Mhz 4Channel Remote Control Kit (PT2262/PT2272) [S054]



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


* Specs

1.Operating voltage: DC12V (27A/12V battery x1)

2.Operating Current: 10mA @ 12V 

3.Radiated power: 10mw @ 12V

4.Modulation mode: ASK (Amplitude Modulation) 

5.Transmitting frequency: 315MHZ 

6.Transmission distance :50-100M (Open field, the receiver sensitivity of -100dbm) 

7.Encoder types: fixed code


* Contents

- Connect

VT ------ D6

D3 ----- D5

D2 ----- D4

D1 ----- D3

D0 ------ D2

5V ----- 5V

GND ----- GND


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


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


int pinD0 = 2;

int pinD1 = 3;

int pinD2 = 4;

int pinD3 = 5;

int pinVT = 6;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(pinD0,INPUT);

  pinMode(pinD1,INPUT);

  pinMode(pinD2,INPUT);

  pinMode(pinD3,INPUT);

  pinMode(pinVT,INPUT);


  delay(1000);


  lcd.clear();

}


void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S054:RF 315Mhz T/R");


  int valD0 = digitalRead(pinD0);

  int valD1 = digitalRead(pinD1);

  int valD2 = digitalRead(pinD2);

  int valD3 = digitalRead(pinD3);

  int valVT = digitalRead(pinVT);


  lcd.setCursor(0,1);

  lcd.print("D0=" + (String)valD0 + "(D) D1="+ (String)valD1 + "(C)");

  lcd.setCursor(0,2);

  lcd.print("D2=" + (String)valD2 + "(B) D3="+ (String)valD3 + "(A)");

  lcd.setCursor(0,3);

  lcd.print("VT=" + (String)valVT + "  " );


}

Posted by RDIoT
|

PN532 NFC RFID module V3 (PN532) [S192]




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


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



* Specs

PN532 is high-quality and reliable module that enables RFID and NFC communication with external devices: 

cards, smart phones etc. NFC itself supports two-way communication and data exchange, so possibilities are numerous. It connects with Croduino/Arduino through IIC or SPI communication.

 

IC: NXP PN532

Voltage: 5V

Communication: SPI or I2C

Max. device distance from reader: up to 7cm

It works with all most popular standards for RFID



* Contents

- Library : https://github.com/elechouse/PN532


- Connect

GND ----- GND

VCC ----- 5V

SDA ----- SDA

SCL ----- SCL


- Key Code

#include <Wire.h>

#include <PN532_I2C.h>

#include <PN532.h>

#include <NfcAdapter.h>

  

PN532_I2C pn532i2c(Wire);

PN532 nfc(pn532i2c);

 

void setup(void) {

  Serial.begin(115200);

  Serial.println("Hello!");


  nfc.begin();


  uint32_t versiondata = nfc.getFirmwareVersion();

  if (! versiondata) {

    Serial.print("Didn't find PN53x board");

    while (1); // halt

  }

  

  // Got ok data, print it out!

  Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX); 

  Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC); 

  Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);

  

  // Set the max number of retry attempts to read from a card

  // This prevents us from waiting forever for a card, which is

  // the default behaviour of the PN532.

  nfc.setPassiveActivationRetries(0xFF);

  

  // configure board to read RFID tags

  nfc.SAMConfig();

    

  Serial.println("Waiting for an ISO14443A card");

}


void loop(void) {

  boolean success;

  uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 };  // Buffer to store the returned UID

  uint8_t uidLength;                        // Length of the UID (4 or 7 bytes depending on ISO14443A card type)

  

  // Wait for an ISO14443A type cards (Mifare, etc.).  When one is found

  // 'uid' will be populated with the UID, and uidLength will indicate

  // if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)

  success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &uid[0], &uidLength);

  

  if (success) {

    Serial.println("Found a card!");

    Serial.print("UID Length: ");Serial.print(uidLength, DEC);Serial.println(" bytes");

    Serial.print("UID Value: ");

    String hex_value = "";

    for (uint8_t i=0; i < uidLength; i++) 

    {

      Serial.print(" 0x");Serial.print(uid[i], HEX);       

      //Serial.print(" ");Serial.print(uid[i], HEX);       

      hex_value += (String)uid[i];

    }


    Serial.println(", value="+hex_value);


    if(hex_value == "16517722582") {

      Serial.println("This is Key Tag. ");

    }

    else if(hex_value == "230522426") {

      Serial.println("This is Card Tag. ");

    }

    else if(hex_value == "63156295") {

      Serial.println("This is Phone Tag. ");

    }

    else

      Serial.println("I don't know.");



    Serial.println("");

    // Wait 1 second before continuing

    delay(1000);

  }

  else

  {

    // PN532 probably timed out waiting for a card

    Serial.println("Waiting for a card...");

  }

}

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

NFC TAG Sticker ISO14443A (Ntag213) [S208]  (0) 2016.09.17
RFID-RC522 (MFRC-522) [S012]  (0) 2016.09.17
Posted by RDIoT
|

RFID-RC522 (MFRC-522) [S012]



RFID-RC522 (MFRC-522) Check UID [S012] 

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


RFID-RC522 (MFRC-522) Check Hex Editor [S012] 

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


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


* Specs

The MFRC522 is a highly integrated reader/writer IC for contactless communication at 13.56 MHz. The MFRC522 reader supports ISO/IEC 14443 A/MIFARE and NTAG. 

The MFRC522’s internal transmitter is able to drive a reader/writer antenna designed to communicate with ISO/IEC 14443 A/MIFARE cards and transponders without additional active circuitry. The receiver module provides a robust and efficient implementation for demodulating and decoding signals from ISO/IEC 14443 A/MIFARE compatible cards and transponders. The digital module manages the complete ISO/IEC 14443 A framing and error detection (parity and CRC) functionality.

The MFRC522 supports MF1xxS20, MF1xxS70 and MF1xxS50 products. The MFRC522

supports contactless communication and uses MIFARE higher transfer speeds up to 848 kBd in both directions.


Highly integrated analog circuitry to demodulate and decode responses

 Buffered output drivers for connecting an antenna with the minimum number of

external components

 Supports ISO/IEC 14443 A/MIFARE and NTAG

 Typical operating distance in Read/Write mode up to 50 mm depending on the

antenna size and tuning

 Supports MF1xxS20, MF1xxS70 and MF1xxS50 encryption in Read/Write mode

 Supports ISO/IEC 14443 A higher transfer speed communication up to 848 kBd

 Supports MFIN/MFOUT

 Additional internal power supply to the smart card IC connected via MFIN/MFOUT

 Supported host interfaces

 SPI up to 10 Mbit/s

2C-bus interface up to 400 kBd in Fast mode, up to 3400 kBd in High-speed mode

 RS232 Serial UART up to 1228.8 kBd, with voltage levels dependant on pin

voltage supply

 FIFO buffer handles 64 byte send and receive

 Flexible interrupt modes

 Hard reset with low power function

 Power-down by software mode

 Programmable timer

 Internal oscillator for connection to 27.12 MHz quartz crystal

 2.5 V to 3.3 V power supply

 CRC coprocessor

 Programmable I/O pins

 Internal self-test



* Contents

- DataSheet : http://www.nxp.com/documents/data_sheet/MFRC522.pdf


- Connect : PinMap https://github.com/miguelbalboa/rfid#pin-layout

3.3V - 3.3V

RST - D9

GND - GND

IRQ - X

MISO - D12

MOSI - D11

SCK - D13

SDA - D10


- Library : https://github.com/miguelbalboa/rfid 

 : Key Reset : rfid_default_keys

 : Save Data : rfid_write_personal_data

 : Dump : DumpInfo


- Key Code

#include "U8glib.h"

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);


#include <SPI.h>

#include <MFRC522.h>


#define RST_PIN  9  // 

#define SS_PIN  10  //


MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance

String rfidUid = "";



void setup() {

  

 Serial.begin(9600);  // Initialize serial communications with the PC

 while (!Serial);  // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)

 SPI.begin();   // Init SPI bus

 mfrc522.PCD_Init();  // Init MFRC522

 ShowReaderDetails(); // Show details of PCD - MFRC522 Card Reader details

 Serial.println(F("Scan PICC to see UID, type, and data blocks..."));

}


void loop() {


  // picture loop

  u8g.firstPage();  

  do {

    draw();

  } while( u8g.nextPage() );

  

  // rebuild the picture after some delay

  //delay(500);

  

 // Look for new cards

 if ( ! mfrc522.PICC_IsNewCardPresent()) {

  return;

 }


 // Select one of the cards

 if ( ! mfrc522.PICC_ReadCardSerial()) {

  return;

 }

  mfrc522.PICC_DumpToSerial(&(mfrc522.uid));

rfidUid = "";

for (byte i = 0; i < mfrc522.uid.size; i++) {

  rfidUid += String(mfrc522.uid.uidByte[i] < 0x10 ? "0" : "");

  rfidUid += String(mfrc522.uid.uidByte[i], HEX);

}


 // Dump debug info about the card; PICC_HaltA() is automatically called


}


void ShowReaderDetails() {

 // Get the MFRC522 software version

 byte v = mfrc522.PCD_ReadRegister(mfrc522.VersionReg);

 Serial.print(F("MFRC522 Software Version: 0x"));

 Serial.print(v, HEX);

 if (v == 0x91)

  Serial.print(F(" = v1.0"));

 else if (v == 0x92)

  Serial.print(F(" = v2.0"));

 else

  Serial.print(F(" (unknown)"));

 Serial.println("");

 // When 0x00 or 0xFF is returned, communication probably failed

 if ((v == 0x00) || (v == 0xFF)) {

  Serial.println(F("WARNING: Communication failure, is the MFRC522 properly connected?"));

 }

}


void draw(void) {

  u8g.setFont(u8g_font_9x15B);

  u8g.setPrintPos(0, 12); 

  u8g.println("MFRC522");


  u8g.setFont(u8g_font_helvB14);

  u8g.setPrintPos(0,40);


  u8g.print("UID="+rfidUid);


  u8g.setFont(u8g_font_helvB14);

  u8g.setPrintPos(0,60);


  if(rfidUid == "3f0f3e5f")

  u8g.print("OPEN=YES");

  else if(rfidUid == "")

  u8g.print("NONE");

  else

  u8g.print("OPEN=NO");

  

}


- Result

ector Block   0  1  2  3   4  5  6  7   8  9 10 11  12 13 14 15  AccessBits

  15     63   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         62   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         61   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         60   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

  14     59   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         58   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         57   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         56   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

  13     55   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         54   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         53   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         52   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

  12     51   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         50   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         49   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         48   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

  11     47   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         46   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         45   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         44   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

  10     43   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         42   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         41   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         40   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   9     39   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         38   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         37   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         36   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   8     35   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         34   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         33   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         32   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   7     31   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         30   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         29   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         28   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   6     27   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         26   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         25   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         24   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   5     23   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         22   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         21   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         20   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   4     19   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         18   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         17   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         16   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   3     15   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         14   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         13   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

         12   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   2     11   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

         10   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

          9   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

          8   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

   1      7   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

          6   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  [ 0 0 0 ] 

          5   20 20 20 20  20 20 20 20  20 20 20 20  20 20 45 01  [ 0 0 0 ] 

          4   67 65 75 6E  79 6F 6E 67  20 20 20 20  20 20 20 20  [ 0 0 0 ] 

   0      3   00 00 00 00  00 00 FF 07  80 69 FF FF  FF FF FF FF  [ 0 0 1 ] 

          2   20 20 20 20  20 20 20 20  20 20 20 20  20 20 45 01  [ 0 0 0 ] 

          1   6B 69 6D 20  20 20 20 20  20 20 20 20  20 20 20 20  [ 0 0 0 ] 

          0   83 A2 5C 02  7F 88 04 00  85 00 B4 2E  F0 BB 6A A8  [ 0 0 0 ] 


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

NFC TAG Sticker ISO14443A (Ntag213) [S208]  (0) 2016.09.17
PN532 NFC RFID module V3 (PN532) [S192]  (0) 2016.09.17
Posted by RDIoT
|

4 Channel IR Tracking Module [S075]



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


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


* Specs

Working voltage: DC 3.3V-5V

Working current: try to choose more than 1A power supply

Working temperature: - 10oC - +50oC

Mounting aperture: M3 screws

Detection range: 1mm to 60 CM adjustable, the closer the performance more stable, white reflects the farthest distance.

Size: in the control panel of 42mm * 38mm * 12mm (length * width * height)

Small forward 25mm * 12mm * 12mm (length * width * height)

Output interface: 6 wire interface (1234 to 4 signal output ends, + positive power, - for the negative power is ground)

The output signal: TTL level (can be directly connected to I/0 microcontroller, infrared light reflected back to the sensor induction, the red indicator light, output low level; no infrared light, the indicator light does not shine, the output high.)


* Contents

- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


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

int IN1 = 2;

int IN4 = 5;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(IN1,INPUT);

  pinMode(IN4,INPUT);


  delay(1000);


  lcd.clear();

}


void loop()

{

  lcd.setCursor(0,0);

  lcd.print("S075:4CHIR Tracking");


  String val1str = "";

  String val4str = "";


  int in1_val = digitalRead(IN1);

  int in4_val = digitalRead(IN4);


  if(in1_val == 0)

    val1str = " detected";

  else 

    val1str = "         ";


  if(in4_val == 0)

    val4str = " detected";

  else

    val4str = "         ";


  lcd.setCursor(0,1);

  lcd.print("IN1=" + (String)in1_val + val1str);


  lcd.setCursor(0,2);

  lcd.print("IN4=" + (String)in4_val + val4str);

}

Posted by RDIoT
|

Tracking Sensor Module Obstacle Avoidance (KY-033) [S026]



https://www.youtube.com/watch?v=11V1Tuf-Sc8


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


* Specs

Operating voltage: 2.5V - 12V(cannot over 12V)

Working current: 18mA - 20mA at 5V

Output electrical level signal: low level when detecting objects / high level when no objects / 0 or 1 decides if objects exist.


* Contents

- Connect

GND ----- GND

OUT ----- D2

VCC ----- 5V


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


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


int T = 2; // INPUT PIN

int count = 0;

String dot = ".";


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(T, INPUT);

  delay(1000);


  lcd.clear();

}


void loop()

{


  if(count >= 20)

  {

    dot = "";

    lcd.clear();

    count = 0;

  }

 

  lcd.setCursor(0,0);

  lcd.print("S026:KY-033 Tracking");


  if (LOW == digitalRead(T))

  {

    dot += "Detected";


    lcd.setCursor(0,1);

    lcd.print(dot);

    count = count+8;

  }

  else

  {

    dot += ".";

    lcd.setCursor(0,1);

    lcd.print(dot);

    count++;

  }

  delay(100);


}

Posted by RDIoT
|

Sharp Infrared Receiver (GP1UX311QS) [S016]



https://www.youtube.com/watch?v=21SB3fJBSLg



* Specs

Product GP1UX311QS

Make Sharp

Type None

Lead Time Request Quote for Lead Time

Quantity in Stock Request Quote for Quantity in Stock


* Contents

- Connect

GND ----- GND

VCC ----- 5V

S ----- 2

EN ----- X


- Key Code

int T = 2; // INPUT PIN

 

void setup()

{

 Serial.begin(115200);

 Serial.println("Arduino Examples - IR Sensor");

 Serial.println(" http://docs.whiteat.com/?p=1142");

 pinMode(T, INPUT);

}

 

void loop()

{

 if (LOW == digitalRead(T))

 {

 Serial.println("IR Detected"); // Detected

 }

 else

 {

 Serial.print("."); 

 }

 delay(100);

}

Posted by RDIoT
|

Keyes Infrared Receiver Module (KY-022) [S014]


https://www.youtube.com/watch?v=2tx-SmOXR9Q


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


* Specs

Infrared remote control distance: more than 8 meters

Launch tube infrared wavelength: 940Nm

Crystal frequency: 455KHZ crystal

Carrier frequency: 38KHZ

Encoding: encoding format for the NEC

Size: 86 * 40 * 6mm

Power: CR2025/1600mAH


* Contents

- Connect

pin- ----- GND

middle pin ----- 5V

S ----- D11


- Key Code

#include "U8glib.h"

#include "IRremote.h"

 

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);

int receiver = 11; // pin 1 of IR receiver to Arduino digital pin 11

 

IRrecv irrecv(receiver);           // create instance of 'irrecv'

decode_results results;            // create instance of 'decode_results'

String str_hex = "";

String str_value = "";

 

void setup() {

  Serial.begin(9600);

  Serial.println("IR Receiver Raw Data + Button Decode Test");

  irrecv.enableIRIn(); // Start the receiver

}

 

void loop(void) {

 

  if (irrecv.decode(&results)) // have we received an IR signal?

  {

//    Serial.println(results.value, HEX);  UN Comment to see raw values

    translateIR(); 

    irrecv.resume(); // receive the next value

  }  

 

  // picture loop

  u8g.firstPage();  

  do {

    draw();

  } while( u8g.nextPage() );

  

  // rebuild the picture after some delay

  //delay(500);

}

 

void draw(void) {

  u8g.setFont(u8g_font_9x15B);

  u8g.setPrintPos(0, 12); 

  u8g.println("IR-VS1838B");

 

  u8g.setFont(u8g_font_helvB14);

  u8g.setPrintPos(0,40);

  u8g.print("hex="+str_hex);

 

  u8g.setFont(u8g_font_helvB14);

  u8g.setPrintPos(0,60);

  u8g.print("str="+str_value);

 

}

 

/*-----( Declare User-written Functions )-----*/

void translateIR() // takes action based on IR code received

 

// describing Car MP3 IR codes 

 

{

 

  switch(results.value)

  {

 

  case 0xFFA25D:  

    Serial.println(" CH-            "); 

    str_hex = "0xFFA25D";

    str_value = "CH-";

    break;

 

  case 0xFF629D:  

    Serial.println(" CH             "); 

    str_hex = "0xFFA25D";

    str_value = "CH-";

    break;

 

  case 0xFFE21D:  

    Serial.println(" CH+            "); 

    str_hex = "0xFFE21D";

    str_value = "CH+";

    break;

 

  case 0xFF22DD:  

    Serial.println(" PREV           "); 

    str_hex = "0xFF22DD";

    str_value = "PREV";

    break;

 

  case 0xFF02FD:  

    Serial.println(" NEXT           "); 

    str_hex = "0xFF02FD";

    str_value = "NEXT";

    break;

 

  case 0xFFC23D:  

    Serial.println(" PLAY/PAUSE     "); 

    str_hex = "0xFFC23D";

    str_value = "PLAY/PAUSE";

    break;

 

  case 0xFFE01F:  

    Serial.println(" VOL-           "); 

    str_hex = "0xFFE01F";

    str_value = "VOL-";

    break;

 

  case 0xFFA857:  

    Serial.println(" VOL+           "); 

    str_hex = "0xFFA857";

    str_value = "VOL+";

    break;

 

  case 0xFF906F:  

    Serial.println(" EQ             "); 

    str_hex = "0xFF906F";

    str_value = "EQ";

    break;

 

  case 0xFF6897:  

    Serial.println(" 0              "); 

    str_hex = "0xFF6897";

    str_value = "0";

    break;

 

  case 0xFF9867:  

    Serial.println(" 100+           "); 

    str_hex = "0xFF9867";

    str_value = "100+";

    break;

 

  case 0xFFB04F:  

    Serial.println(" 200+           "); 

    str_hex = "0xFFB04F";

    str_value = "200+";

    break;

 

  case 0xFF30CF:  

    Serial.println(" 1              "); 

    str_hex = "0xFF30CF";

    str_value = "1";

    break;

 

  case 0xFF18E7:  

    Serial.println(" 2              "); 

    str_hex = "0xFF18E7";

    str_value = "2";

    break;

 

  case 0xFF7A85:  

    Serial.println(" 3              "); 

    str_hex = "0xFF7A85";

    str_value = "3";

    break;

 

  case 0xFF10EF:  

    Serial.println(" 4              "); 

    str_hex = "0xFF10EF";

    str_value = "4";

    break;

 

  case 0xFF38C7:  

    Serial.println(" 5              "); 

    str_hex = "0xFF38C7";

    str_value = "5";

    break;

 

  case 0xFF5AA5:  

    Serial.println(" 6              "); 

    str_hex = "0xFF5AA5";

    str_value = "6";

    break;

 

  case 0xFF42BD:  

    Serial.println(" 7              "); 

    str_hex = "0xFF42BD";

    str_value = "7";

    break;

 

  case 0xFF4AB5:  

    Serial.println(" 8              "); 

    str_hex = "0xFF4AB5";

    str_value = "8";

    break;

 

  case 0xFF52AD:  

    Serial.println(" 9              "); 

    str_hex = "0xFF52AD";

    str_value = "9";

    break;

 

  default: 

    Serial.println(" other button   ");

    str_hex = "NONE";

    str_value = "NONE";

 

  }

 

  delay(500);

 

 

} //END translateIR

Posted by RDIoT
|

Infrared Receiver VS1838 (VS1838B)




Infrared Receiver VS1838 (VS1838B) Dump Value

https://www.youtube.com/watch?v=esL8Hr-H_mc


Infrared Receiver VS1838 (VS1838B) Print Value

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


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


* Specs

Typical distance 20m @ 45 degree angle, power 2.7-5.5V, typical current 0.4mA, -3db bandwidth 3.3kHz, output CMOS/TTL, response 600us.


* Contents

- Library : https://github.com/z3t0/Arduino-IRremote

- Library Test : IRrecvDumpV2


- Connect

OUT ----- D11

GND ----- GND

VCC ----- 5V


- Key Code

#include "U8glib.h"

#include "IRremote.h"


U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);

int receiver = 11; // pin 1 of IR receiver to Arduino digital pin 11


IRrecv irrecv(receiver);           // create instance of 'irrecv'

decode_results results;            // create instance of 'decode_results'

String str_hex = "";

String str_value = "";


void setup() {

  Serial.begin(9600);

  Serial.println("IR Receiver Raw Data + Button Decode Test");

  irrecv.enableIRIn(); // Start the receiver

}


void loop(void) {


  if (irrecv.decode(&results)) // have we received an IR signal?

  {

//    Serial.println(results.value, HEX);  UN Comment to see raw values

    translateIR(); 

    irrecv.resume(); // receive the next value

  }  


  // picture loop

  u8g.firstPage();  

  do {

    draw();

  } while( u8g.nextPage() );

  

  // rebuild the picture after some delay

  //delay(500);

}


void draw(void) {

  u8g.setFont(u8g_font_9x15B);

  u8g.setPrintPos(0, 12); 

  u8g.println("IR-VS1838B");


  u8g.setFont(u8g_font_helvB14);

  u8g.setPrintPos(0,40);

  u8g.print("hex="+str_hex);


  u8g.setFont(u8g_font_helvB14);

  u8g.setPrintPos(0,60);

  u8g.print("str="+str_value);


}


/*-----( Declare User-written Functions )-----*/

void translateIR() // takes action based on IR code received


// describing Car MP3 IR codes 


{


  switch(results.value)

  {


  case 0xFFA25D:  

    Serial.println(" CH-            "); 

    str_hex = "0xFFA25D";

    str_value = "CH-";

    break;


  case 0xFF629D:  

    Serial.println(" CH             "); 

    str_hex = "0xFFA25D";

    str_value = "CH-";

    break;


  case 0xFFE21D:  

    Serial.println(" CH+            "); 

    str_hex = "0xFFE21D";

    str_value = "CH+";

    break;


  case 0xFF22DD:  

    Serial.println(" PREV           "); 

    str_hex = "0xFF22DD";

    str_value = "PREV";

    break;


  case 0xFF02FD:  

    Serial.println(" NEXT           "); 

    str_hex = "0xFF02FD";

    str_value = "NEXT";

    break;


  case 0xFFC23D:  

    Serial.println(" PLAY/PAUSE     "); 

    str_hex = "0xFFC23D";

    str_value = "PLAY/PAUSE";

    break;


  case 0xFFE01F:  

    Serial.println(" VOL-           "); 

    str_hex = "0xFFE01F";

    str_value = "VOL-";

    break;


  case 0xFFA857:  

    Serial.println(" VOL+           "); 

    str_hex = "0xFFA857";

    str_value = "VOL+";

    break;


  case 0xFF906F:  

    Serial.println(" EQ             "); 

    str_hex = "0xFF906F";

    str_value = "EQ";

    break;


  case 0xFF6897:  

    Serial.println(" 0              "); 

    str_hex = "0xFF6897";

    str_value = "0";

    break;


  case 0xFF9867:  

    Serial.println(" 100+           "); 

    str_hex = "0xFF9867";

    str_value = "100+";

    break;


  case 0xFFB04F:  

    Serial.println(" 200+           "); 

    str_hex = "0xFFB04F";

    str_value = "200+";

    break;


  case 0xFF30CF:  

    Serial.println(" 1              "); 

    str_hex = "0xFF30CF";

    str_value = "1";

    break;


  case 0xFF18E7:  

    Serial.println(" 2              "); 

    str_hex = "0xFF18E7";

    str_value = "2";

    break;


  case 0xFF7A85:  

    Serial.println(" 3              "); 

    str_hex = "0xFF7A85";

    str_value = "3";

    break;


  case 0xFF10EF:  

    Serial.println(" 4              "); 

    str_hex = "0xFF10EF";

    str_value = "4";

    break;


  case 0xFF38C7:  

    Serial.println(" 5              "); 

    str_hex = "0xFF38C7";

    str_value = "5";

    break;


  case 0xFF5AA5:  

    Serial.println(" 6              "); 

    str_hex = "0xFF5AA5";

    str_value = "6";

    break;


  case 0xFF42BD:  

    Serial.println(" 7              "); 

    str_hex = "0xFF42BD";

    str_value = "7";

    break;


  case 0xFF4AB5:  

    Serial.println(" 8              "); 

    str_hex = "0xFF4AB5";

    str_value = "8";

    break;


  case 0xFF52AD:  

    Serial.println(" 9              "); 

    str_hex = "0xFF52AD";

    str_value = "9";

    break;


  default: 

    Serial.println(" other button   ");

    str_hex = "NONE";

    str_value = "NONE";


  }


  delay(500);



} //END translateIR

Posted by RDIoT
|

4 Head Infrared Transmitter Module [S180]




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


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


* Specs

Dimensions : 35 * 35mm

Weight : 4g

Voltage : 5V

Ports : Digital Level

Modulation : Direct emission unmodulated

Emission head : 4

Transmitting distance : 1-3m

Wavelength : 940nm


Four launch, multi-directional signal synchronization

A wide range of signal radiation 

With the transmitted signal indicating LED, easy to observe debugging 

Small infrared signal transmitter can be used as the source


* Contents

- Connect

GND ----- GND

VCC ----- 5V

DAT ----- D3


- Key Code

#include <IRremote.h>

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


LiquidCrystal_I2C lcd(0x27,20,4);  // set the LCD address to 0x20 for a 16 chars and 2 line display


//* An IR LED must be connected to Arduino PWM pin 3.

IRsend irsend;

 

void setup()

{

  lcd.init();    // initialize the lcd 

  // Print a message to the LCD.

  lcd.backlight();

}


int count = 0;

void loop() {

 

  int khz = 38; // 38kHz carrier frequency for the NEC protocol

  unsigned int  rawData[67] = {4500,4400, 600,1650, 550,1650, 650,1600, 600,550, 550,550, 550,550, 550,550, 550,550, 550,1650, 600,1650, 550,1650, 600,550, 550,550, 550,550, 550,550, 550,550, 600,500, 600,1600, 600,550, 550,550, 550,550, 550,550, 550,550, 550,550, 600,1600, 600,550, 550,1650, 600,1650, 550,1650, 600,1650, 600,1650, 550,1650, 600};  // SAMSUNG E0E040BF

unsigned int  data = 0xE0E040BF;

 

  irsend.sendRaw(rawData, sizeof(rawData) / sizeof(rawData[0]), khz); //Note the approach used to 


automatically calculate the size of the array.

  

  lcd.setCursor(0,0);

  lcd.print("S180:4 Head IR Trans.");

  lcd.setCursor(0,1);

  count++;

  lcd.print("every 5sec count: "+(String)count+" ");

  lcd.setCursor(0,2);

  lcd.print("data=0xE0E040BF");

 

  delay(5000); //In this example, the signal will be repeated every 5 seconds, approximately.

}

Posted by RDIoT
|

Two-way infrared transmitter module [S095]




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


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


* Specs

This is an infrared transmitter very useful for any IR communication for your project. Infrared is a common, inexpensive, and easy to use wireless communication technology.

the module is ready to be connected to an MCU such as an Arduino.

It has two led transmitter to add visibility and an indicator led that shows when the module is transmitting.

Item Weight: 5 g

Boxed-product Weight: 5 g


* Contents

- Library : https://github.com/shirriff/Arduino-IRremote/

- Use : IRsendDemo


- Connect

DAT ----- D3

VCC ----- 5V

GND ----- GND


- Power Off Dump Code

Encoding  : SAMSUNG

Code      : E0E040BF (32 bits)

Timing[67]: 

     +4400, -4400     + 600, -1650     + 550, -1650     + 600, -1600

     + 600, - 500     + 550, - 550     + 550, - 550     + 550, - 550

     + 550, - 550     + 550, -1650     + 550, -1650     + 600, -1650

     + 600, - 500     + 600, - 500     + 600, - 450     + 600, - 500

     + 600, - 500     + 600, - 550     + 550, -1600     + 650, - 500

     + 550, - 550     + 550, - 550     + 550, - 550     + 550, - 500

     + 600, - 500     + 600, -1600     + 600, - 500     + 600, -1650

     + 600, -1600     + 600, -1600     + 600, -1650     + 600, -1600

     + 600, -1600     + 600


- Key Code

#include <IRremote.h>

//* An IR LED must be connected to Arduino PWM pin 3.

IRsend irsend;

  

void loop() {

 

  int khz = 38; // 38kHz carrier frequency for the NEC protocol

 

  unsigned int  rawData[67] = {4500,4400, 600,1650, 550,1650, 650,1600, 600,550, 550,550, 550,550, 550,550, 550,550, 550,1650, 600,1650, 550,1650, 600,550, 550,550, 550,550, 550,550, 550,550, 600,500, 600,1600, 600,550, 550,550, 550,550, 550,550, 550,550, 550,550, 600,1600, 600,550, 550,1650, 600,1650, 550,1650, 600,1650, 600,1650, 550,1650, 600};  // SAMSUNG E0E040BF

unsigned int  data = 0xE0E040BF;

 

  irsend.sendRaw(rawData, sizeof(rawData) / sizeof(rawData[0]), khz); //Note the approach used to automatically calculate the size of the array.

 

  delay(5000); //In this example, the signal will be repeated every 5 seconds, approximately.

}

Posted by RDIoT
|

Keyes Infrared Transmitter Module (KY-005) [S015]




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


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


* Specs

Transmit 38KHz modulating signal

MATERIAL PCB

ARCHITECTURE Arduino

BRAND KEYES

DEPTH 7 mm

HEIGHT 35 mm

WIDTH 15 mm

PRODUCT WEIGHT 1.3 g


* Contents

- Library : https://github.com/shirriff/Arduino-IRremote/

- Use : IRsendDemo


- Connect

S ----- D3

middle ----- 5V

- ----- GND


- Power Off Dump Code

Encoding  : SAMSUNG

Code      : E0E040BF (32 bits)

Timing[67]: 

     +4400, -4400     + 600, -1650     + 550, -1650     + 600, -1600

     + 600, - 500     + 550, - 550     + 550, - 550     + 550, - 550

     + 550, - 550     + 550, -1650     + 550, -1650     + 600, -1650

     + 600, - 500     + 600, - 500     + 600, - 450     + 600, - 500

     + 600, - 500     + 600, - 550     + 550, -1600     + 650, - 500

     + 550, - 550     + 550, - 550     + 550, - 550     + 550, - 500

     + 600, - 500     + 600, -1600     + 600, - 500     + 600, -1650

     + 600, -1600     + 600, -1600     + 600, -1650     + 600, -1600

     + 600, -1600     + 600


- Key Code

#include <IRremote.h>

//* An IR LED must be connected to Arduino PWM pin 3.

IRsend irsend;

  

void loop() {

 

  int khz = 38; // 38kHz carrier frequency for the NEC protocol

 

  unsigned int  rawData[67] = {4500,4400, 600,1650, 550,1650, 650,1600, 600,550, 550,550, 550,550, 550,550, 550,550, 550,1650, 600,1650, 550,1650, 600,550, 550,550, 550,550, 550,550, 550,550, 600,500, 600,1600, 600,550, 550,550, 550,550, 550,550, 550,550, 550,550, 600,1600, 600,550, 550,1650, 600,1650, 550,1650, 600,1650, 600,1650, 550,1650, 600};  // SAMSUNG E0E040BF

unsigned int  data = 0xE0E040BF;

 

  irsend.sendRaw(rawData, sizeof(rawData) / sizeof(rawData[0]), khz); //Note the approach used to automatically calculate the size of the array.

 

  delay(5000); //In this example, the signal will be repeated every 5 seconds, approximately.

}

Posted by RDIoT
|

IR Transmitter Module [S066]



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


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



* Specs

Product Name IR Transmitter Module

Working Voltage DC 5V

Pin Quantity 3

Body Size 21 x 22 x 5mm/0.83" x 0.87" x 0.2"(L*W*T)

Material Plastic, Electronic Part

Main Color As Picture Show

Net Weight 5g

Package Content 1 x IR Transmitter Module


* Contents

- Connect

Transmitter

GND - GND

VCC - 5V

DAT - D3 (When RAW)


Receiver

pin- - GND

middle pin - 5V

S - D11


- Key Code

Transmitter

#include <IRremote.h>

//* An IR LED must be connected to Arduino PWM pin 3.

IRsend irsend;

void loop() {

 

  int khz = 38; // 38kHz carrier frequency for the NEC protocol

 

  unsigned int  rawData[67] = {4500,4400, 600,1650, 550,1650, 650,1600, 600,550, 550,550, 550,550, 550,550, 550,550, 550,1650, 600,1650, 550,1650, 600,550, 550,550, 550,550, 550,550, 550,550, 600,500, 600,1600, 600,550, 550,550, 550,550, 550,550, 550,550, 550,550, 600,1600, 600,550, 550,1650, 600,1650, 550,1650, 600,1650, 600,1650, 550,1650, 600};  // SAMSUNG E0E040BF

  unsigned int  data = 0xE0E040BF;

 

  irsend.sendRaw(rawData, sizeof(rawData) / sizeof(rawData[0]), khz); //Note the approach used to automatically calculate the size of the array.

 

  delay(5000); //In this example, the signal will be repeated every 5 seconds, approximately.

}


Receiver

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#include "IRremote.h"

 

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

int receiver = 11; // pin 1 of IR receiver to Arduino digital pin 11

 

IRrecv irrecv(receiver);           // create instance of 'irrecv'

decode_results results;            // create instance of 'decode_results'

String str_hex = "";

String str_value = "";

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  irrecv.enableIRIn(); // Start the receiver

 

  delay(1000);

 

  lcd.clear();

}

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S066:IR Transmitter");

  

  if (irrecv.decode(&results)) // have we received an IR signal?

  {

    //    Serial.println(results.value, HEX);  UN Comment to see raw values

    translateIR(); 

 

    lcd.setCursor(0,1);

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

    lcd.setCursor(0,2);

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

 

    irrecv.resume(); // receive the next value

  }   

}

 

void translateIR() // takes action based on IR code received

{

  switch(results.value)

  {

 

  case 0xE0E040BF:  

    str_hex = "0xE0E040BF";

    str_value = "power off ";

    break;

 

  default: 

    str_hex = (String)results.value;

    str_value = "NONE      ";

 

  } 

  delay(500);

 

} //END translateIR

Posted by RDIoT
|

ENC28J60 Ethernet Module (ENC28J60) [S058]





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


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


* Specs

The ENC28J60 Ethernet Module utilizes the new Microchip ENC28J60 Stand-Alone Ethernet Controller IC featuring a host of features to handle most of the network protocol requirements. The board connects directly to most microcontrollers with a standard SPI interface with a transfer speed of up to 20MHz.

ENC28J60 Ethernet chips, SOP28 package

SPI Interface

2X5 connector, can be easily mounted with the MCU

Power indicator

Single Supply: +3.3 V

PCB size: 55x36 mm


* Contents

- Connect (Uno)

VCC -   3.3V

SCK - Pin 13

SO  - Pin 12

SI  - Pin 11

CS  - Pin  8 # Selectable with the ether.begin() function

GND - GND


- Connect (Mega)

VCC -   3.3V

GND -    GND

SCK - Pin 52

SO  - Pin 50

SI  - Pin 51

CS  - Pin 53 # Selectable with the ether.begin() function

# The default CS pin defaults to 8, so you have to set it on a mega:

ether.begin(sizeof Ethernet::buffer, mymac, 53)


- Library : https://github.com/ice3x2/ethercard

- Library Download : https://github.com/jcw/ethercard/archive/master.zip


- Key Code

#include <EtherCard.h>

#define REQUEST_RATE 5000 // milliseconds


// ethernet interface mac address

static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };

// remote website name

const char website[] PROGMEM = "sports.news.naver.com";


byte Ethernet::buffer[700];

static long timer;


  if (!ether.dhcpSetup())

    Serial.println("DHCP failed");

  

  ether.printIp("My IP: ", ether.myip);

  // ether.printIp("Netmask: ", ether.mymask);

  ether.printIp("GW IP: ", ether.gwip);

  ether.printIp("DNS IP: ", ether.dnsip);


  timer = - REQUEST_RATE; // start timing out right away


// called when the client request is complete

static void my_result_cb (byte status, word off, word len) {

  Serial.print("<<< reply ");

  int val = millis() - timer;

  Serial.print(val);

  Serial.println(" ms");

  Serial.println((const char*) Ethernet::buffer + off);


  lcd.setCursor(0,3);

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

}

Posted by RDIoT
|

Finger Heartbeat Detection Sensor Module (KY-039) [S033]




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


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


* Specs

KY-039 Finger Detector Heartbeat Detection Sensor Module For Arduino

Specification:

Working voltage: 5V

Use IR LED and optical transistor to detect pulsation in fingers

Used for synthesized teaching experiment

Dimensions: 25 x 22 x 17mm

Weight: 2g


* Contents 



- Connect

S ----- A0

Middle ----- 5V

- ----- GND


Schematic



- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#define HBDEBUG(i)

 

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

 

int sensorPin = A0;

double alpha = 0.75;

int period = 100;

double change = 0.0;

double minval = 0.0;

const int delayMsec = 60; // 100msec per sample


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

  Serial.begin(9600);

  delay(1000);

 

  lcd.clear();

}

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S033:KY-039");

 

 

  static double oldValue = 0;

  static double oldChange = 0;

  int rawValue = analogRead (sensorPin);

  double value = alpha * oldValue + (1 - alpha) * rawValue;

 

  lcd.setCursor(0,1);

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

 

  oldValue = value;

 

 

  static int beatMsec = 0;

  int heartRateBPM = 0;

  

  if (heartbeatDetected(sensorPin, delayMsec)) {

    heartRateBPM = 60000 / beatMsec;

    //digitalWrite(ledPin,1);

 

    // Print msec/beat and instantaneous heart rate in BPM

    //Serial.print(beatMsec);

    

    lcd.setCursor(0,2);

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

 

 

    lcd.setCursor(0,3); 

     lcd.print("BPM=" + (String)heartRateBPM + "    ");

 

    beatMsec = 0;

  } else {

    //digitalWrite(ledPin,0);

  }


  delay(delayMsec);

  beatMsec += delayMsec;

 

 

  //delay (period);

}

 

bool heartbeatDetected(int IRSensorPin, int delay)

{

  static int maxValue = 0;

  static bool isPeak = false;

  int rawValue;

  bool result = false;

    

  rawValue = analogRead(IRSensorPin);

  // Separated because analogRead() may not return an int

  rawValue *= (1000/delay);

  HBDEBUG(Serial.print(isPeak); Serial.print("p, "));

  HBDEBUG(Serial.print(rawValue); Serial.print("r, "));

  HBDEBUG(Serial.print(maxValue); Serial.print("m, "));

 

  // If sensor shifts, then max is out of whack.

  // Just reset max to a new baseline.

  if (rawValue * 4L < maxValue) {

    maxValue = rawValue * 0.8;

    HBDEBUG(Serial.print("RESET, "));

  }

  

  // Detect new peak

  if (rawValue > maxValue - (1000/delay)) {

    if (rawValue > maxValue) {

      maxValue = rawValue;

    }

    // Only return true once per peak.

    if (isPeak == false) {

      result = true;

      Serial.print(result); Serial.print(",  *");

    }

    isPeak = true;

  } else if (rawValue < maxValue - (3000/delay)) {

    isPeak = false;

    maxValue-=(1000/delay);

 }

  HBDEBUG(Serial.print("\n"));

  return result;

}

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

Pulse Sensor [S032]  (0) 2016.09.17
Posted by RDIoT
|

Pulse Sensor [S032]



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


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


* Specs

Heart rate data can be really useful whether you’re designing an exercise routine, studying your activity or anxiety levels or just want your shirt to blink with your heart beat. The problem is that heart rate can be difficult to measure. Luckily, the Pulse Sensor Amped can solve that problem!


The Pulse Sensor Amped is a plug-and-play heart-rate sensor for Arduino. It can be used by students, artists, athletes, makers, and game & mobile developers who want to easily incorporate live heart-rate data into their projects.It essentially combines a simple optical heart rate sensor with amplification and noise cancellation circuitry making it fast and easy to get reliable pulse readings. Also, it sips power with just 4mA current draw at 5V so it’s great for mobile applications.


Simply clip the Pulse Sensor to your earlobe or finger tip and plug it into your 3 or 5 Volt Arduino and you’re ready to read heart rate! The 24" cable on the Pulse Sensor is terminated with standard male headers so there’s no soldering required. Of course Arduino example code is available as well as a Processing sketch for visualizing heart rate data.


* Contents

- Arduino Source : https://github.com/WorldFamousElectronics/PulseSensor_Amped_Arduino (ZIP)

- Processing Source : https://github.com/WorldFamousElectronics/PulseSensor_Amped_Processing_Visualizer  (ZIP)


- Connect

White - A0

Black - 5V / 3V

Blue - GND


- in processing 

port = new Serial(this, "COM4", 115200);  // make sure Arduino is talking serial at this baud rate


- Key Code

//  Variables

int pulsePin = 0;                 // Pulse Sensor purple wire connected to analog 


pin 0

int blinkPin = 13;                // pin to blink led at each beat

int fadePin = 5;                  // pin to do fancy classy fading blink at each beat

int fadeRate = 0;                 // used to fade LED on with PWM on fadePin

 

// Volatile Variables, used in the interrupt service routine!

volatile int BPM;                   // int that holds raw Analog in 0. updated every 2mS

volatile int Signal;                // holds the incoming raw data

volatile int IBI = 600;             // int that holds the time interval between beats! Must be seeded! 

volatile boolean Pulse = false;     // "True" when User's live heartbeat is detected. "False" when not a "live beat". 

volatile boolean QS = false;        // becomes true when Arduoino finds a beat.

 

// Regards Serial OutPut  -- Set This Up to your needs

static boolean serialVisual = false;   // Set to 'false' by Default.  Re-set to 'true' to see Arduino Serial Monitor ASCII Visual Pulse 

 

 

/* interruptsetup */

volatile int rate[10];                    // array to hold last ten IBI values

volatile unsigned long sampleCounter = 0;          // used to determine pulse timing

volatile unsigned long lastBeatTime = 0;           // used to find IBI

volatile int P =512;                      // used to find peak in pulse wave, seeded

volatile int T = 512;                     // used to find trough in pulse wave, seeded

volatile int thresh = 525;                // used to find instant moment of heart 


beat, seeded

volatile int amp = 100;                   // used to hold amplitude of pulse 


waveform, seeded

volatile boolean firstBeat = true;        // used to seed rate array so we startup 


with reasonable BPM

volatile boolean secondBeat = false;      // used to seed rate array so we startup with reasonable BPM

 


interruptSetup();                 // sets up to read Pulse Sensor signal every 2mS 

Posted by RDIoT
|

ISD 1820 Voice Recording Module (ISD1820) [S082]



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


*GitHub : 


* Specs

ISD1820 Voice Recording Module is another very interesting stuff. You don't need to prepare a speaker and a mic - both are included in this module! After connecting to the power, you can press REC to record a 10 second voice. Press PLAYE to play the complete voice once. Press and hold PLAYL it will play the voice and it stop when the button is released. It can also be controlled by Arduino. Combined with Laser Detector and Laser Module, you can make a doorbell, security system, and power-saving light along corridor for instance.


* Contents

- Connect

VCC ----- 5V

GND ----- GND

P-E ----- D13

REC ----- D11


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


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


int Rec = 11;

int Play = 13;


void setup()

  pinMode(Rec, OUTPUT); 

  pinMode(Play, OUTPUT);


  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  delay(1000);


  lcd.clear();

}


void loop()

{

  lcd.setCursor(0,0);

  lcd.print("S082:ISD1820 Module");


  digitalWrite(Rec, HIGH); // record 10sec

  lcd.setCursor(0,1);

  lcd.print("Rec: HIGH ");


  delay(10000);

  digitalWrite(Rec, LOW); // end record 

  lcd.setCursor(0,1);

  lcd.print("Rec: LOW  ");

  delay(5000);


  digitalWrite(Play, HIGH); // play 

  lcd.setCursor(0,1);

  lcd.print("Play: HIGH");

  delay(100);


  digitalWrite(Play, LOW); // stop play

  lcd.setCursor(0,1);

  delay(10000);

  lcd.print("Play: LOW ");      

}

Posted by RDIoT
|

Small Sound Detection Module (KY-038) [S053]



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


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


* Specs

Dimensions: 1.38 in x 0.59 in x 0.51 in (3.5 cm x 1.5 cm x 1.3 cm)

Weight: 0.11 oz (3 g)

Main chip: LM393

Electret condenser microphone

Working voltage: DC 4-6V

Interface definition:

AO: analog output sensor

GND: ground

VCC: Power supply input range: 3V-24V.

DO: Digital Output (comparator output)

Two red LED indication: POWER and SENSOR. POWER: Power is off.

SENSOR: When the microphone senses sound reaches a certain value, this LED light.


Single channel signal output

Low level output signal used for sound control light

Great module for sound alarm system

LM393 main chip

Electric condenser microphone


* Contents

- Connect

A0 ----- A0

G ----- GND

+ ----- 5V

D0 ----- X


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


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


int threshold = 30; 


int led1 = 2;

int led2 = 3;

int led3 = 4;

int led4 = 5;

int led5 = 6;


int pin = A0;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(pin,INPUT);


  pinMode(led1,OUTPUT);

  pinMode(led2,OUTPUT);

  pinMode(led3,OUTPUT);

  pinMode(led4,OUTPUT);

  pinMode(led5,OUTPUT);


  delay(1000);


  lcd.clear();

}


void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S052:SoundDetect");


  int val = analogRead(pin);


  lcd.setCursor(0,1);

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


  if(val <= threshold)

  { 

    lcd.setCursor(0,2);

    lcd.print("                    ");

  }

  else

  {

    lcd.setCursor(0,2);

    lcd.print("Small Sound Detected");

    delay(100);  

  }


  digitalWrite(led1, LOW); 

  digitalWrite(led2, LOW); 

  digitalWrite(led3, LOW); 

  digitalWrite(led4, LOW); 

  digitalWrite(led5, LOW); 

 

  if(val > 30) { digitalWrite(led1, HIGH); }

  if(val > 31) { digitalWrite(led2, HIGH); }

  if(val > 32) { digitalWrite(led3, HIGH); }

  if(val > 35) { digitalWrite(led4, HIGH); }

  if(val > 40) { digitalWrite(led5, HIGH); }


  delay(50);

}

Posted by RDIoT
|

TEA5767 FM Stereo Radio Module (TEA5767) [S109]



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


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


* Specs

power supply: 5V

Frequency range: 76-108MHZ

PCB size: 31*30mm

With reverse polarity protection diode

With power output filtering sensor

Directly plug antenna interface

I2C bus communication

Multi capacitor combined filter

Blue LED power indicator

FM chip module TEA5767

Onboard 3.5mm audio interface

If connects with singlechip, only connect the Power Ground and two I2C communication cable

Features:

LC harmonic oscillator use low cost fixed chip

No need to adjust Intermediate frequency

High sensitivity(low noise RF input amplifier)

High power auto gain control AGC circuit

Soft mute



* Contents

- Library : http://playground.arduino.cc/Main/TEA5767Radio


- Connect

VCC ----- 5V

SDA ----- SDA / A5

SCL ----- SCL / A4

GND ----- GND


- Key Code

#include <Wire.h>

#include <TEA5767Radio.h>

 

TEA5767Radio radio = TEA5767Radio();

 

void setup()

{

  Wire.begin();

  radio.setFrequency(89.1); // pick your own frequency

}



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

FM Radio Receiver Module 87-108MHz with Serial Control [S222]  (0) 2016.09.17
Posted by RDIoT
|