'2) Sensor'에 해당되는 글 153건

  1. 2016.09.17 Walkie Talkie Module VHF 134-174Mhz 5Km (SA828) [S203]
  2. 2016.09.17 3DR Radio 915Mhz Telemetry Kit [S211]
  3. 2016.09.17 433Mhz Super-regenerative module (FS1000A,MX-JS-05V) [S081]
  4. 2016.09.17 RD-400 USB Magnetic Stripe Card Reader (RD-400) [S171]
  5. 2016.09.17 USB Smart IC Card Reader [S204]
  6. 2016.09.17 ADXL335 3-axis Accelerometer (GY-61) [S057]
  7. 2016.09.17 Barometric Pressure Altitude BMP180 (BMP180) [S074]
  8. 2016.09.17 315Mhz 4Channel Remote Control Kit (PT2262/PT2272) [S054] 1
  9. 2016.09.17 NFC TAG Sticker ISO14443A (Ntag213) [S208]
  10. 2016.09.17 PN532 NFC RFID module V3 (PN532) [S192]
  11. 2016.09.17 RFID-RC522 (MFRC-522) [S012]
  12. 2016.09.17 IR Wave sensor switch DC8-24V (HN-C009A) [S144]
  13. 2016.09.17 IR Infrared Obstacle Avoidance Sensor (IR-08H) [S017]
  14. 2016.09.17 4 Channel IR Tracking Module [S075]
  15. 2016.09.17 Tracking Sensor Module Obstacle Avoidance (KY-033) [S026]
  16. 2016.09.17 Sharp Infrared Receiver (GP1UX311QS) [S016]
  17. 2016.09.17 Keyes Infrared Receiver Module (KY-022) [S014]
  18. 2016.09.17 Infrared Receiver VS1838 (VS1838B) [S013]
  19. 2016.09.17 4 Head Infrared Transmitter Module [S180]
  20. 2016.09.17 Two-way infrared transmitter module [S095]
  21. 2016.09.17 Keyes Infrared Transmitter Module (KY-005) [S015]
  22. 2016.09.17 IR Transmitter Module [S066]
  23. 2016.09.17 ENC28J60 Ethernet Module (ENC28J60) [S058]
  24. 2016.09.17 SIM,USIM,LTE,CCID Card Reader Writer Tool [S206] 3
  25. 2016.09.17 Finger Heartbeat Detection Sensor Module (KY-039) [S033]
  26. 2016.09.17 Pulse Sensor [S032]
  27. 2016.09.17 Sound recordable module 10sec [S191]
  28. 2016.09.17 Sound Control LED Lamp Module [S175]
  29. 2016.09.17 ISD 1820 Voice Recording Module (ISD1820) [S082]
  30. 2016.09.17 Small Sound Detection Module (KY-038) [S053]

Walkie Talkie Module VHF 134-174Mhz 5Km (SA828) [S203]




https://www.youtube.com/watch?v=4AhNH8WA1YI


* Specs

SA828 is an all-in-one professional walkie-talkie module in small size. It is very easy to use with powerful function. This module has full function of a professional walkie-talkie and can talk with any analog walkie-talkie in the market. With the small size, it can be easily embedded into instrument, portable and handheld device. SA828 works well in the hot/cold environment with the KDS 1PPM TCXO. The features of excellent antenna match network, good RF amplifier, high RF sensitivity allow its communication easily to achieve over 3Km in open area.

 

Rotary switch for channel selection, EEPROM, Audio Amplifier, RF Amplifier, PTT key, Antenna socket are all included in such a small size module. Besides, all parameters (CTCSS, CDCSS, SQ, Predefined channels etc) can be easily modified either by PC software or command using UART interface. With the embedded audio volume turning circuit, user can only solder a variable resistor on Pin16, Pin17 to adjust the volume steplessly.

 

Features:

1ppm TCXO

Embedded EEPROM, data saved even power off 

High / low output power selection (500mW-1W)

8 SQ* 166 CDCSS, 38 CTCSS

High Integrated with ultra small size

High Sensitivity: -124dBm  

3~5Km distance in open aera

1W Output Power* 12.5/25KHz bandwidth selection

Solely TX and RX frequency

Frequency range: 134 -- 174MHz

 

Application: 

Audio tracking and control system 

Outdoor sport product

Instrument

Security system

Pocket / handheld device

Small size walkie-talkie

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
|

RD-400 USB Magnetic Stripe Card Reader (RD-400) [S171]




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




* Specs

Card standard: ISO7811-7815

Decoded mode: F2F(FM)

Swipe speed: 0-120cms

Head life: 600000times

Export export: Imitation XT, AT RS - 232 USB keyboard format

Identifiable decoding system: Code39 Code93 UPCEAN Codeabar Interleaved 2 of 5 Code128 Full ASCII Code39

Power: DC+5V 35mA

Use: Main supermarket.


Reading/writing magnetic stripe cards complies with ISO 7811 / 1~6 formats

Manual Swipe to read and/or write cards with PC standard RS-232 interface

Read/Write High and Low Coercive force of magnetic stripe (300~4000Oe)

5~35ips operational swipe speed of writing data

5~55ips operational swipe speed of reading data

+24VDC+/-10%, 2.0A Max., external power adapter attached

Writing and verifying data on single, dual, or triple track in one swipe

Programming software included for various read/write applications

Program software for DOS and Windows 98/Me

High/Low Coercivity encoding circuitry selectable on screen

Programmable leading bit, raw data, DMV/AAMVA, and user defined format

Compact size with dimensions of 90(L) x 26(W) x28(H) mm

Posted by RDIoT
|

USB Smart IC Card Reader [S204]



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


* Specs

This USB interface PC/SC Smart Card Reader reads both IC/ID card within a single device. With this integrated device, you can easily use your IC/ID card to pass the identification gate for e-commercial needs and maintain the mobile phone information of your SIM card


1) Support the Universal Serial Bus Specification

2) Compliance with Microsoft PC/SC specification and Plug-and-Play

3) Support Microsoft Smart Card for Windows

4) Windows 98SE/ME/2000/XP/VISTA, Windows 7, Windows 8; MAC 10.7 and above version, Linux

5) Power Supply: USB Powered

6) USB Type: USB 2.0 (1.1 Compatible)

7) IC Card (Smart Card): SLE4418/4428, SLE4432/4442, SLE4436/5536, 12C, Support 3V/5V IC Smart Card

OEM are Welcome! we can print customer's artwork and logo

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

SIM,USIM,LTE,CCID Card Reader Writer Tool [S206]  (3) 2016.09.17
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
|

NFC TAG Sticker ISO14443A (Ntag213) [S208]




* Specs

Chip: Ntag213

Physical capacity: 180 bytes

Usable capacity: 144 bytes

Protocol: ISO14443A

Working frequency: 13.56 MHZ

Reading and writing distance: 1 to 5 cm

Reading and writing time: 1 to 2 ms

Working temperature: -20 to 55 degree, humidity of 90%

Erase times : > 100000 times

Data storage: > 10 years

Reading time: 100000 times

Diameter: 27mm

Packaging materials: PE self-adhesive +  coated paper


Compatiability:

1) Support 13.56mhz RFID and NFC IC reader/writer, For example:Acr122u reader/writer

2) Support Smart mobile phones with NFC function.

Brand Smart phone: Sony, HTC, Samsung, Nokia, LG include blackberry,Nokia Lumia, Nexus4/10,Galaxy S4,and other mobile phone could support NFC function.

Andriod system Phone could download the NFC software, such as the Google play NFC Task Launcher, NFC ReTag Pro Security Software.

 

Application:

Check in, mobile payment, product information query, mobile identification, mobile marketing, social networking, business card sharing, access control, membership management, posters, healthcare,book borrowing etc.

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

PN532 NFC RFID module V3 (PN532) [S192]  (0) 2016.09.17
RFID-RC522 (MFRC-522) [S012]  (0) 2016.09.17
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
|

IR Wave sensor switch DC8-24V (HN-C009A) [S144]



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


* Specs

1.type:                   Close to the induction switch

2. Model:                     HN-C009A

3. Power supply:             DC8-24V

4.  Output Voltage:           DC8-24V/4A

5.Power:                 24W(max)

6. Sensitive Angle:           10degrees

7. Super sensitivity:           0.1- 5CM Distance 

8. Working:                     5CM Something is blocking the sensor head,     The first wave open output,Second waved off the output.  The third wave open output,  Continuous cycle

9.Output line:                 15CM

10.Sensor line:               45CM

11. Product Size:                 77*10.8*8.5mm  (L x W x H)

12. Sensing probe Size:     13.4*6.8*10.3 (L x W x H)

13.IP Rating:             IP50

14.Housing Material:       PC

15. Housing Color:         Black 

Posted by RDIoT
|

IR Infrared Obstacle Avoidance Sensor (IR-08H) [S017]



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


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


* Specs

Working voltage: DC 3.3V-5V

Working current: ≥ 20mA

Operating temperature: -10 ℃ - +50 ℃

detection distance :2-40cm

IO Interface: 4-wire interfaces (- / + / S / EN)

Output signal: TTL level (low level there is an obstacle, no obstacle high)

Adjustment: adjust multi-turn resistance

Effective angle: 35 °

Size: 28mm × 23mm

Weight Size: 9g


* 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
|

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
|

SIM,USIM,LTE,CCID Card Reader Writer Tool [S206]






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


* Specs

Main Features:

Support EMV Level 1 specification

Support USB 2.0 full speed

Based on ISO7816 implementation

Support PC Smart Card industry standard ? PC/SC 2.0

Support Microsoft Smart Card for Windows

Meet Microsoft WHQL USB Smart Card Reader requirements

Meet US Federal Information Processing Standards (FIPS) Publication 201 requirements on smart card reader interoperability

Support single slot

Support T0, T1 protocol

Support I2C memory card, SLE4418, SLE4428, SLE4432, SLE4442, SLE4436, SLE5536, SLE6636, AT88SC1608, AT45D041 card and AT45DB041 card via external EEPROM

Support ISO7816 Class A, B and C (5V/3V/1.8V) card

Implemented as an USB full speed device with bulk transfer endpoint, Mass Storage endpoint

Built-in PLL for USB and Smart Card clocks requirement

Support EEPROM for USB descriptors customization (PID/VID/ iManufacturer/ iProduct/Serial Number), Direct Web Page Link, and accessing memory card module.

EEPROM programmable via USB interface

Support software update for memory card module

Support Direct Web Page Link via configuration in external EEPROM

Support short APDU and extended APDU

Compatible with Microsoft USB-CCID driver

Support remote wake up through inserting card/removing card

Support USB selective suspend

Support Power Saving Mode (Using one pin to select between Normal/PWR Saving Mode)

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

USB Smart IC Card Reader [S204]  (0) 2016.09.17
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
|

Sound recordable module 10sec [S191]



https://www.youtube.com/watch?v=67x7TpmRhlQ


* Specs

Features:

With speaker, microphone and button

Record your own message

Great for greeting cards

Convenient

Designed for cardmaking and other similar projects.

Allows you to add sound to custom made cards using your own papers and decorations.

Can also be used in printed card projects.

Mounted on a crystal clear backing for a cleaner, more look.

The built-in voice recorder allows you to record up to a 120 second message. If you make a mistake you can re-record your message


Specifications:

Play Life: 200 plays

Shelf Life: 2 years

Power: 2 button batteries (included)

Recording time: 10 seconds

Speaker diameter: 4cm

Color: Black

Material: Plastic + Metal

Net Weight: 17.6g


* Contents

- Connect

Mic

Recoding LED

Record Start/Stop

Play Start/Stop

0.5W 8Ohm Speaker

Posted by RDIoT
|

Sound Control LED Lamp Module [S175]



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


* Specs

Size: 52mm*75mm

Installing Hole: Φ3

Power Supply: Powered By USB (The input cannot exceed 12V)

Power Consumption: Max. 2W (Output: 5V, All LEDs are on.)


* Contents

- Connect

USB connect

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
|