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

  1. 2016.09.17 FM Radio Receiver Module 87-108MHz with Serial Control [S222]
  2. 2016.09.17 TEA5767 FM Stereo Radio Module (TEA5767) [S109]
  3. 2016.09.13 Logitech HD WebCam C310 (C310) [S084]
  4. 2016.09.13 Thermal Printer TTL (JP-QR701-TTL) [S221]
  5. 2016.09.13 VK-172 GMOUSE USB GPS GLONASS Module (VK-172) [S152]
  6. 2016.09.12 Optical Fingerprint Reader Sensor Module (LACC200640) [S078]
  7. 2016.09.12 32x64 RGB LED Matrix P4 (LM-P4-SMD-RGB-LED) Basic Test [D025]
  8. 2016.09.12 Wireless Charging Transmitter Receiver Solution Module 12V 60mA to 5V 1A (XKT412-1A) [B038]
  9. 2016.09.12 LED Light Voltage Alert Pen AC90-1000V [B132]
  10. 2016.09.12 LCR-T4 Graphical Multi-function Tester (LCR-T4) [B060]
  11. 2016.09.12 1-8S Lipo Li-ion Battery Voltage Tester [B058]
  12. 2016.09.12 Diode LED Tester 9V 2~150mA [B157]
  13. 2016.09.12 USB Logic Analyzer 24Mhz 8CH [B008]
  14. 2016.09.12 Classic Arcade Joystick Red Ball 4/8 Way [S207]
  15. 2016.09.12 XY-axis Joystick Module (KY-023) [S056]
  16. 2016.09.12 4x5 Matrix Array 20 Keypad [S187]
  17. 2016.09.12 TTP229 16 Key Capacitive Touch Keypad (TTP229) [S153]
  18. 2016.09.12 4x4 Matrix Keyboard Keypad [S188]
  19. 2016.09.12 4x4 Matrix Keyboard 16 Key Membrane Switch Keypad [S087]
  20. 2016.09.12 4x4 Matrix 16 Keypad Keyboard Module [S025]
  21. 2016.09.12 Metal Touch Sensor Module [S042]
  22. 2016.09.12 Catalex Capacitive Touch Sensor (TTP223B) [S009]
  23. 2016.09.12 Button Switch Module [S062]
  24. 2016.09.12 Key Switch Module (KY-004) [S024]
  25. 2016.09.12 Rotary Encoder Module (KY-040) [S120]
  26. 2016.09.12 Rotation Encoder Module (KY-040) [S043]
  27. 2016.09.12 433Mhz Button Smart Receiver Doorbell [S220]
  28. 2016.09.12 433Mhz Wireless Door Contact Sensor [S212]
  29. 2016.09.12 Electromagnetic Door Lock 12V [S182]
  30. 2016.09.12 Wired Door Window Sensor 330mm [S140]

FM Radio Receiver Module 87-108MHz with Serial Control [S222]



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


* Specs

Features

-adopt the advanced technology of DSP and FM modulation PLL to make sound more realistic, more stable performance,

long working hours without frequency offset.

-LCD display more intuitive and accurate, with very low power consumption and minimal noise interference.

-30 range digital volume adjustment, can be easily operated with keystrokes.

-Automatic memory data before the power failure.

-Automatically switched speaker and reciver output

-Adopt quartz crystal frequency stabilization, the temperature change is no longer receiving frequency drift.

-The professional audio DSP audio signal analysis and processing, automatic mute

no signal or weak when FM signal noise, get rid of traditional FM radio in the absence

of signal or weak signal when annoying rustling.

-Adopt digital incremental rotary encoder to adjust the volume and frequency, well handfelt,

precise positioning, stable and durable, 360°rotation without dead ends.

Support for serial communication control, able to use computer or MCU module device can control all functionality.


Specifications

Output power: 500mW (actuate reciver), 3Wx2 (actuate speaker)

Frequency range: 50Hz-18KHz

Receiving frequency range:

Close the campus radio 87.0MHz-108.0MHz

Open the campus radio 76.0MHz-108.0MHz

Equivalent noise: ≥30dB

Supply voltage: 3.0V-5.0V

Channel: Stereo

Supply Current: maximum volume 1000mA, minimum volume under 60mA (for reference only)


* Contents

- Connect

VCC ----- 3.3V (3~5V)

GND ----- GND

ANT ----- Line 

Audio ----- Speaker

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

TEA5767 FM Stereo Radio Module (TEA5767) [S109]  (0) 2016.09.17
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
|

Logitech HD WebCam C310 (C310) [S084]



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


* Specs

What you need:

Windows Vista®, Windows® 7 (32-bit or 64-bit) or Windows®  8


Basic requirements:

1 GHz

512 MB RAM or more

200 MB hard drive space

Internet connection

USB 1.1 port (2.0 recommended)


For HD 720p video calling and HD recording:

2.4 GHz Intel® Core™2 Duo

2 GB RAM

200 MB hard drive space

USB 2.0 port

1 Mbps upload speed or higher

1280 x 720 screen resolution


The specs:

HD Video calling (1280 X 720 pixels) with recommended system

HD video capture: Up to 1280 X 720 pixels 

Logitech Fluid Cyrstal™ Technology

Photos: Up to 5 megapixels (software enhanced)

Built-in mic with noise reduction

Hi-Speed USB 2.0 certified (recommended)

Universal clip fits laptops, LCD or CRT monitors

Logitech webcam software:

Pan, tilt, and zoom controls

Video and photo capture

Face tracking

Motion detection


Part Number : PN 960-000585



* Contents

- image capture : fswebcam test.jpg -r 800x600

- real streaming in the web : mipg-streamer & 

 : http://IP:8080/?action=stream


- UVC Camera Preparation

http://linuxtv.org/wiki/index.php/Webcam_Devices teaches us, that there are four types of web cams:

those that have UVC support →Linux UVC driver and tools

those that have GSPCA support →http://linuxtv.org/wiki/index.php/Gspca

those that have out-of-tree support

those that have no Linux support

Then there is the framework Video4Linux and a whole load of applications that work with V4L version 1 and/or version 2.

The Video4Linux2 API: an introduction

http://linuxtv.org/wiki/index.php/Main_Page

V4L2 API Specification



Posted by RDIoT
|

Thermal Printer TTL (JP-QR701-TTL) [S221]





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


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


* Specs

Product Features:

A. beautiful shape

B. Easy paper

C. Low noise thermal printing

E. Optional different interface

F. Replace the paper body front panel

G. easily embedded in a variety of different instruments and meters

H. supports ESC / POS print instruction set

 

Applications:

A. Medical Devices

B. Measuring Equipment

C. Safety Equipment

D. Analytical Instruments and Meters

 

Specifications:

Print

Printing method

Thermal

Print speed

60-80 mm / s

Resolution

8 dots / mm , 384 dots / line

Effective print width

48mm 48mm

Character

Character Set

ASCII, GB2312-80 ( Chinese )

Print Fonts

ANK: 5 × 7, Chinese : 12x24, 24 × 24

Paper Specifications

Paper Type

Thermal paper

Paper width

57.5 ± 0.5mm

Roll Diameter

39 mm ( max )

Reliability

Mean Cycle Between Failure (MCBF)

500 Million

Interface

Serial (RS-232, TTL), parallel

Embed Depth

50 mm

Power Supply ( Adapter )

DC5V-9V

Physical

Physical Properties

Dimensions ( W x H x D )

111x65x57 mm

Installation port size

103 x 57mm

Color

White / black

Environment

Operating Temperature

5 ° C ~ 50 ° C

Humidity

10% to 80%

Storage Temperature

-20 ° C ~ 60 ° C

Storage humidity

10% to 90%


* Contents

- Refer Url : https://learn.adafruit.com/mini-thermal-receipt-printer/overview


- Connect

GND RX TX DTR VH


- Key Code

#include "Adafruit_Thermal.h"

#include "adalogo.h"

#include "adaqrcode.h"

 

#include "SoftwareSerial.h"

#define TX_PIN 6 // Arduino transmit  YELLOW WIRE  labeled RX on printer

#define RX_PIN 5 // Arduino receive   GREEN WIRE   labeled TX on printer


SoftwareSerial mySerial(RX_PIN, TX_PIN); // Declare SoftwareSerial obj first

Adafruit_Thermal printer(&mySerial);     // Pass addr to printer constructor



  printer.begin();        // Init printer (same regardless of serial type)


  printer.justify('C');

  printer.boldOn();

  printer.setSize('L');

  printer.println("RD IoT");

  printer.boldOff();


  printer.printBarcode("123456789012", UPC_A); // BarCode Sample

Posted by RDIoT
|

VK-172 GMOUSE USB GPS GLONASS Module (VK-172) [S152]




https://www.youtube.com/watch?v=j-sTrOp1nYs



* Specs

supported operating systems: Windows 8/7/Vista/XP/CE 

VK-172 automatically adapt the baud rate, the baud rate has any data output 

Support Google Earth

C / A code, 1.023MHz stream 

Receive Band: L1 [1575.42MHz] 

Tracking Channels: 56 

Support DGPS [WAAS, EGNOS and MSAS] 

Positioning performance : 

2D plane: 5m [average] 

2D plane: 3.5m [average], has DGPS auxiliary. 

Drift: <0.02m / s 

Timing Accuracy: 1us 

Reference coordinate system: WGS-84 

Maximum altitude: 18,000 m 

Maximum speed: 500m / s 

Acceleration: <4g 

Electrical properties: 

Tracking sensitivity:-162dBm 

Acquisition sensitivity:-160dBm 

Cold Start Time: 29s [average] 

Warm start time: 28s [average] 

Hot start time: 1s [average] 

Recapture Time: 0.1s [average] 

Operating temperature: -30 to +80


* Contents

U-Center SW GSP Test

Posted by RDIoT
|

Optical Fingerprint Reader Sensor Module (LACC200640) [S078]



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



* Specs

Make adding fingerprint detection and verification super simple.

Typically used in safes­-there's a high powered DSP chip that does the image rendering, calculation, feature-finding and searching.

Connect to any microcontroller or system with TTL serial, and send packets of data to take photos, detect prints, hash and search.

You can also enroll new fingers directly - up to 162 finger prints can be stored in the onboard FLASH memory.

There's a red LED in the lens that lights up during a photo so you know it is working.


Supply voltage: DC 3.8-7.0V

Operating  Current: <65mA

Peak  current: <95mA

Fingerprint  image time: <1.0 seconds

Window area:  14.5*19.4 mm

Signature  File: 256 bytes

Template  files: 512 bytes

Storage capacity: 1000

False Accept  Rate (FAR): <0.001% (security level 3)

False Reject  Rate (FRR): <1.0% (security level 3)

Search time:  <1.0 seconds (1: 500 average)

PC  interface: UART (TTL logic level)

Baud rate (UART): (9600*N)bps (N=1~12, N default 6, equal 57600bps)

Working  environment: Temperature: -20 °C to 50 °C

Relative  Humidity: 40% RH to 85% RH (non-condensing)

Storage  Environment: Temperature: -40 °C to 85 °C

Relative  humidity: <85% H (no condensation)

Lighting:  Long light/Flashing

Dimensions  (L* W* H): 56*20*20.5mm


* Contents

enroll -> fingerprint check -> delete


- Library : AdaFingerprint-Sensor-Library

 : https://github.com/adafruit/Adafruit-Fingerprint-Sensor-Library


- Connect

Black ----- GND

Red ----- 5V

White ----- D3

Green ----- D2


- enroll : https://github.com/adafruit/Adafruit-Fingerprint-Sensor-Library/tree/master/examples/enroll

- fingerprint : https://github.com/adafruit/Adafruit-Fingerprint-Sensor-Library/tree/master/examples/fingerprint

- delete : https://github.com/adafruit/Adafruit-Fingerprint-Sensor-Library/tree/master/examples/delete

Posted by RDIoT
|

32x64 RGB LED Matrix P4 (LM-P4-SMD-RGB-LED) Basic Test [D025]





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


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


* Specs

P4 smd 3in1 led display module:

Pixel Pitch   P4

Pixel Component  3in1

Pixel Density  62500dot/m⊃2;

Pixel configuration 1R1G1B

Module resolution(dots) 64x32 

Module dimension(mm) 256x128

Drive Mode 1/16

Brightness   2500cd/m2;

Viewing Angle  Horizontal:160°   Vertical:160°

Control Distance    100m

Refresh Frequency Rate 400Hz/S

Life Span   100,000hours

Display MTBF   10,000 Hours

Constant Working Time  72hours

Operation Temperature   -40°C~+70°C

Operation Humidity  10%-90%RH

Blind Pixels Rate  0.0001

Smooth   ±1mm


* Contents

- Refer Url : https://learn.adafruit.com/32x16-32x32-rgb-led-matrix/connecting-with-jumper-wires

- Refer Url : https://learn.adafruit.com/32x16-32x32-rgb-led-matrix/library

- Refer Url : https://learn.adafruit.com/32x16-32x32-rgb-led-matrix/how-the-matrix-works


- Library 1 : https://learn.adafruit.com/32x16-32x32-rgb-led-matrix/

- Library 2 : https://github.com/adafruit/Adafruit-GFX-Library 


- Connect

GND ----- 3EA GND

R1 ----- D24

G1 ----- D25

B1 ----- D26

R2 ----- D27

B2 ----- D28

G2 ----- D29

A   ----- A0

B   ----- A1

C   ----- A2

D   ----- A3

LAT ----- D10

CLK ----- D11

OE   ----- D9


- Key Code

#include <Adafruit_GFX.h>   // Core graphics library

#include <RGBmatrixPanel.h> // Hardware-specific library


#define OE   9

#define LAT 10

#define CLK 11

#define A   A0

#define B   A1

#define C   A2

#define D   A3


RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false, 64);


void setup() {


  matrix.begin();

  

  // draw a pixel in solid white

  matrix.drawPixel(0, 0, matrix.Color333(7, 7, 7)); 

  delay(500);


  // fix the screen with green

  matrix.fillRect(0, 0, matrix.width(), matrix.height(), matrix.Color333(0, 7, 0));

  delay(500);


  // draw a box in yellow

  matrix.drawRect(0, 0, matrix.width(), matrix.height(), matrix.Color333(7, 7, 0));

  delay(500);

  

  // draw an 'X' in red

  matrix.drawLine(0, 0, matrix.width()-1, matrix.height()-1, matrix.Color333(7, 0, 0));

  matrix.drawLine(matrix.width()-1, 0, 0, matrix.height()-1, matrix.Color333(7, 0, 0));

  delay(500);

  

  // draw a blue circle

  matrix.drawCircle(10, 10, 10, matrix.Color333(0, 0, 7));

  delay(500);

  

  // fill a violet circle

  matrix.fillCircle(40, 21, 10, matrix.Color333(7, 0, 7));

  delay(500);

  

  // fill the screen with 'black'

  matrix.fillScreen(matrix.Color333(0, 0, 0));

  

  // draw some text!

  matrix.setTextSize(1);     // size 1 == 8 pixels high

  matrix.setTextWrap(false); // Don't wrap at end of line - will do ourselves


  matrix.setCursor(8, 0);    // start at top left, with 8 pixel of spacing

  uint8_t w = 0;

  char *str = "RD Kim  IoT Making";

  for (w=0; w<8; w++) {

    matrix.setTextColor(Wheel(w));

    matrix.print(str[w]);

  }

  matrix.setCursor(2, 8);    // next line

  for (w=8; w<18; w++) {

    matrix.setTextColor(Wheel(w));

    matrix.print(str[w]);

  }

  matrix.println();

  //matrix.setTextColor(matrix.Color333(4,4,4));

  //matrix.println("Industries");

  matrix.setTextColor(matrix.Color333(7,7,7));

  matrix.println("LED MATRIX!");

  

  // print each letter with a rainbow color

  matrix.setTextColor(matrix.Color333(7,0,0));

  matrix.print('3');

  matrix.setTextColor(matrix.Color333(7,4,0)); 

  matrix.print('2');

  matrix.setTextColor(matrix.Color333(7,7,0));

  matrix.print('x');

  matrix.setTextColor(matrix.Color333(4,7,0)); 

  matrix.print('6');

  matrix.setTextColor(matrix.Color333(0,7,0));  

  matrix.print('4');

  matrix.setCursor(34, 24);  

  matrix.setTextColor(matrix.Color333(0,7,7)); 

  matrix.print("*");

  matrix.setTextColor(matrix.Color333(0,4,7)); 

  matrix.print('R');

  matrix.setTextColor(matrix.Color333(0,0,7));

  matrix.print('G');

  matrix.setTextColor(matrix.Color333(4,0,7)); 

  matrix.print("B");

  matrix.setTextColor(matrix.Color333(7,0,4)); 

  matrix.println("*");

}

Posted by RDIoT
|

Wireless Charging Transmitter Receiver Solution Module 12V 60mA to 5V 1A (XKT412-1A) [B038]




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


* Specs

Transmitter Module

Operating Voltage: 12V

Standby Current: 60mA

Coil Diameter: 33mm

Charging/Power Distance: 1-5mm


Receiver Module

Output Voltage: 5V

Output Current: 1000mA

Coil Diameter: 33mm


* Contents

- Connect

12V / 60mA -----> Transmitter

Receiver -----> 5V / 1A 

Posted by RDIoT
|

LED Light Voltage Alert Pen AC90-1000V [B132]



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


* Specs

Electric Socket Wall AC Power Outlet Voltage Detector Sensor Tester Pen 90-1000V

The next generation  AC non-contact voltage testers are easy to use ? just touch the tip to a terminal strip, outlet, or supply cord. When the tip glows red and the unit beeps, you know there is voltage present. Electricians, maintenance, service, safety personnel, and homeowners can quickly test for energized circuits in the workplace or at home.

Frequency Range: 50 to 500 Hz

Test Voltage Range: 90-1000V AC

Safety Rating :  CAT II 1000v 

Powered By: 2 x AAA Batteries (Not included)

A perfect tool kit for home and electric industry uses

Ideal design for testing power cables, circuit breakers, wall sockets, junction boxes, fuses, etc

Just press the button, white LED light can be always on when there is absence of voltage

"Beep" sound and red flashing LED would indicate the presence of voltage

Totally insulated, no exposed metal or conductive parts

Long life and low power consumption

Compact, safety, & easy to carry

Specifications:

Material: ABS Plastic

Color: Yellow & Grey

Item size: 152*23*15mm

Package size: 204*91*19mm

Net weight: 45g

Packing content:

10 x LED Light Voltage Alert Pen


* Contents

AC Test

Posted by RDIoT
|

LCR-T4 Graphical Multi-function Tester (LCR-T4) [B060]





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



* Specs

Add boot voltage detection function 

Automatic detection of NPN and PNP transistors, N-channel and P-channel MOSFET, diodes (including dual diode), thyristors, transistors, resistors and capacitors and other components, 

Automatic test out the pin element and displayed on the LCD 

Can be detected to determine the transistor emitter forward bias voltage of the transistor, MOSFET protection diode and the amplification factor of the base 

Measure the gate threshold voltage and gate capacitance of the MOSFET 

LCD display uses LCD 1 2864 

High test speed, valid component test: 2 seconds (except in the larger capacitor of large capacitance measurement also takes a long time, the measured time of one minute is normal) 

Power consumption off mode: less than 20 nA 


Resistor: 0.1Ω-50MΩ

Capacitor: 25pF-100000uF

Inductance : 0.01mH - 20H

Working power:  DV-9V

Standby current:  0.02uA

Operating current:  25mA


* Contents

Potentiometer, PNP, NPN, Diode, MOSFET Test 

Posted by RDIoT
|

1-8S Lipo Li-ion Battery Voltage Tester [B058]




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


* Specs

Features:

Use for 1-8S Lipo/Li-ion/LiMn/Li-Fe

Specification:

Voltage detection precision: +_0.01V.

Unit voltage display range: 0.5~4.5V

Total voltage display range: 0.5~36V

1S test mode voltage range: 4-15V

Low voltage alarm mode for 2-8S

Alarm set value range:OFF~2.7~3.8V

Size: 40mm x 25mm x 11mm

Original box: NO

Net weight: 9g

Package weight: 15g

Color: Red


* Contents

Lipo Li-ion Battery Voltage Test

Posted by RDIoT
|

Diode LED Tester 9V 2~150mA [B157]






https://www.youtube.com/watch?v=n8qo-_L4AIA



* Specs

Item Condition: Brand New.

Color: White. 

Power Supply: 9V Battery.

Dimension: 8.0(L) x 5.5(W) x 2.2(H)cm

Material: High quality hard plastic.

Weight: 36g.

Wonderful Tool for testing LED (2-150mA), can test Lots of  LED at the same time.


* Contents

LED Diode Test 

Posted by RDIoT
|

USB Logic Analyzer 24Mhz 8CH [B008]



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


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


* Specs

1.8 channels input;

2.Logical light indication: a small light indicate CHO electrical level;

3.Input feature:5PF,100K Ohm;

4.USB power supply;

5.Sampling rate can be seted as below:

24MHz. 16MHz, 12MHz, 8MHz, 4MHz, 2MHz, 1MHz, 500KHz, 250KHz, 200KHz, 100KHz, 50KHz, 25KHz;

6. Data upload real time,the max of depth of collection is 10T,far from practical need.

A total of eight digital channels, =voltage range is 0V ~ 5.5V, the voltage threshold is considered to be low below 1.5V, 1.5V above is considered high.

Package includes the main device, 10pins of dupont cable and one USB cable.

See basic how it works and how to use the introduction video below.

Samples : How much samples to collect, Mhz: frequency of sampling, so 50M * 1Mhz will be 50 total sampling time.

This one is a starter version, different to Saleae16, which has 100Mhz, 16-channel version



* Contents

- Saleae SW Download : http://www.saleae.com/downloads

 : Windows 32bit : http://downloads.saleae.com/Logic%20Setup%201.1.15%20(32-bit).exe

 : Windows 64bit : http://downloads.saleae.com/Logic%20Setup%201.1.15%20(64-bit).exe


- Getting Started Using the Salease Logic Analyzer : http://support.saleae.com/hc/en-us/sections/200114124-Get-Started-Using-the-Saleae-Logic-Analyzer


- Connect

CH0~CH7, GND2

 

CH0 - D1

CH1 - D2

CH2 - D3


- Test Code

void setup()

{

  pinMode(0, OUTPUT);

  pinMode(1, OUTPUT);  

  pinMode(2, OUTPUT);  

}


void loop() {

  // PIN0 - HIGH

  digitalWrite(0, HIGH);

  

  // PIN1 - 10sec

  for (int i=0; i<10; i++) {

    digitalWrite(1, LOW);

          //PIN2 - 5.125us * 3 times

          digitalWrite(2, HIGH);

          digitalWrite(2, LOW);

          digitalWrite(2, HIGH);

          digitalWrite(2, LOW);

          digitalWrite(2, HIGH);

          digitalWrite(2, LOW);          

    // PIN1 - 0.5 sec

    delay(500);

    digitalWrite(1, HIGH);

    // PIN1 - 0.5 sec

    delay(500);

  }


  // PIN0 - LOW

  digitalWrite(0, LOW);


  // Delay 1sec

  delay(1000);

}

Posted by RDIoT
|

Classic Arcade Joystick Red Ball 4/8 Way [S207]




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


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



* Specs

Color: Red

Top Ball Diameter: Approx. 35mm

Total Size: Approx. 95x60x100mm


Features

Brand new and high quality.

8 way operation.

Fits metal control panels.

Easy to operate, with high sensitivity.

You can use it to DIY your own Arcade game machine.



* Contents

8 Way Basic Test


- Connect

TOP ----> D2 // UP

BOTTOM ---> D3 // DOWN

RIGHT ---> D4 // LEFT

LEFT ---> D5 //RIGHT


- Key Code

void setup() {

  Serial.begin(9600);

  pinMode(2, INPUT_PULLUP); // UP

  pinMode(3, INPUT_PULLUP); // DOWN

  pinMode(4, INPUT_PULLUP); // LEFT

  pinMode(5, INPUT_PULLUP); // RIGHT 

 }

 

void loop() {


  int up = digitalRead(2);

  int down = digitalRead(3);

  int left = digitalRead(4);

  int right = digitalRead(5);

 

  Serial.print("up(D2)="+(String)up);

  Serial.print(" down(D3)="+(String)down);

  Serial.print(" left(D4)="+(String)left);

  Serial.println(" right(D5)="+(String)right);

  Serial.println();

 

  if(up == LOW && left == LOW) 

  {    

    Serial.println("Location ==========> UP + LEFT     ");

  }

  else if(up == LOW && right == LOW)

  {

      Serial.println("Location ==========> UP + RIGHT    ");

  }

  else if(down == LOW && left == LOW)

  {

      Serial.println("Location ==========> DOWN + LEFT    ");

  }

  else if(down == LOW && right == LOW)

  {

      Serial.println("Location ==========> DOWN + RIGHT     ");

  }

  else if(up == LOW)

  {

      Serial.println("Location ==========> UP             ");

  }

  else if(down == LOW)

  {

      Serial.println("Location ==========> DOWN             ");

  }

  else if(left == LOW)

  {

      Serial.println("Location ==========> LEFT             ");

  }

  else if(right == LOW)

  {

      Serial.println("Location ==========> RIGHT            ");

  }

  delay(200); 

 

}



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

XY-axis Joystick Module (KY-023) [S056]  (0) 2016.09.12
Posted by RDIoT
|

XY-axis Joystick Module (KY-023) [S056]



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


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



* Specs

The company produces PS2 game joystick axis sensor module consists of using original quality metal PS2 joystick potentiometer system For the (X, Y) a 2-axis analog output and for (Z) 1 digital output channel button.


* Contents

- Connect

GND ----- GND

5V ----- 5V

X-axis ----- A0

Y-axis ----- A1

SW(Swtich) ----- D2


- Key Code


#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

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

 

int X = A0; // x

int Y = A1; // y

int S = 2; // SW

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  pinMode(X, INPUT);

  pinMode(Y, INPUT);

  pinMode(S, INPUT);

  digitalWrite(S, HIGH); 

 

  delay(1000);

 

  lcd.clear();

}

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S056:XY-axis Joystick");

 

  int x, y, s; 

  x = analogRead(X);

  y = analogRead(Y);

  s = digitalRead(S);

 

  lcd.setCursor(0,1);

  lcd.print("X=" + (String)x + "   ");

 

  lcd.setCursor(0,2);

  lcd.print("Y=" + (String)y + "   ");

 

  lcd.setCursor(0,3);

  lcd.print("SW=" + (String)s + "  ");

 

  delay(100);

}

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

Classic Arcade Joystick Red Ball 4/8 Way [S207]  (0) 2016.09.12
Posted by RDIoT
|

4x5 Matrix Array 20 Keypad [S187]




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


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


* Specs

Panel Size: 75*85mm. 

Length: 18CM. 

Insulation Resistance:100M 100V. 

Withstand Voltage:250V Rms.(50-60Hz lmin) 

Storage Temperature: +15°- +35°. 

Storage Humidity:70-90.


* Contents

byte rowPins[numRows] = {10,9,8,7,6}; 

byte colPins[numCols]= {2,3,4,5};

- Connect

D2 ~ D9

- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#include <Keypad.h>

 

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

 

const byte numRows= 5; //number of rows on the keypad

const byte numCols= 4; //number of columns on the keypad

 

//keymap defines the key pressed according to the row and columns just as appears on the keypad

char keymap[numRows][numCols]= 

{

  {'A','B','#','*'},

  {'1','2','3','U'},

  {'4','5','6','D'},

  {'7','8','9','C'},

  {'L','0','R','E'}

};

 

byte rowPins[numRows] = {10,9,8,7,6}; 

byte colPins[numCols]= {2,3,4,5}; 

 

//initializes an instance of the Keypad class

Keypad myKeypad= Keypad(makeKeymap(keymap), rowPins, colPins, numRows, numCols);

 

String numstr = "";

 

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("S187:4x5 20 Keypad");

 

 

  char keypressed = myKeypad.getKey();

  if (keypressed != NO_KEY)

  {

   // Serial.print(keypressed);

    lcd.setCursor(0,1);

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

 

    switch (keypressed)

    {

      case '1':        

           numstr = "1    ";

        break;

      case '2':           

           numstr = "2    ";

        break;  

      case '3':           

           numstr = "3    ";

        break; 

      case '4':           

           numstr = "4    ";

        break; 

      case '5':           

           numstr = "5    ";

        break;                 

      case '6':           

           numstr = "6    ";

        break; 

      case '7':           

           numstr = "7    ";

        break; 

      case '8':           

           numstr = "9    ";

        break; 

      case '0':           

           numstr = "0    ";

        break; 

      case 'A':           

          numstr = "F1   ";

        break; 

      case 'B':           

          numstr = "F2   ";

        break; 

      case 'C':           

          numstr = "ESC  ";

        break; 

      case 'E':           

          numstr = "ENTER";

        break; 

      case 'D':           

          numstr = "DOWN ";

        break; 

      case 'U':           

          numstr = "UP   ";

        break; 

      case 'R':           

          numstr = "RIGHT ";

        break; 

      case 'L':           

          numstr = "LEFT ";

        break; 

      case '*':           

          numstr = "*    ";

        break; 

      case '#':           

          numstr = "#    ";

        break;                                                 

        

      default:          

        break;

    }

 

 

    if(numstr !="")

    {

      lcd.setCursor(0,2);

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

    }

 

  }

 

}

Posted by RDIoT
|

TTP229 16 Key Capacitive Touch Keypad (TTP229) [S153]




https://www.youtube.com/watch?v=NXZR0p-kX1A


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


* Specs

Operating voltage:2.4V~5.5V

Built-in regulator

Stand-by current At 3V, and sleep mode slow sampling rate 8Hz:

=> Typical 2.5uA for 16 input keys

=> Typical 2.0uA for 8 input keys

8 Key or 16 key modes

Separate outputs to 8 keys in 8 key mode

2 wires serial output interface for both 16 key and 8 key mode

Outputs can be set to CMOS/OD/OC with active high/low

2 Wires serial interface can select active high or low by option

Optional Multi-key or single-key

Provides two kinds of sampling rate: slow sampling rate 8Hz and fast sampling rate 64Hz at sleep mode

Optional maximum key-on time about 80sec

Auto calibration at power up (keypad must not be touched for 0.5 seconds after power up)

Auto calibration for changes in environment

 

1.....VCC (2.4 - 5.5V)

2.....GND

3.....SCL (serial clock in)

4.....SDO (serial data out)

5.....OUT 1 (key 1 state)

6.....OUT 2 (key 2 state)

7.....OUT 3 (key 3 state)

8.....OUT 4 (key 4 state)

9.....OUT 5 (key 5 state)

10...OUT 6 (key 6 state)

11...OUT 7 (key 7 state)

12...OUT 8 (key 8 state)


* Contents

- Connect

VCC ----- 5V

GND ----- GND

SCL -----> D2 

SDO -----> D3 


- Key Code

#define pulse 2

#define data 3


int old  = 0;


void setup()

{

  Serial.begin(9600);

  pinMode(pulse, OUTPUT);  

  pinMode(data, INPUT); 

}


void loop()

{

  int Key = getkey();

  

  if (Key!=0&Key!=old)

  {

    Serial.print("PUSH--->");

    Serial.println(Key);


  }

    

  old = Key;

}



byte getkey(void)

{

  byte cnt;

  byte num = 0;

  for(cnt = 1; cnt < 17; cnt++)

  {

    digitalWrite(pulse, LOW); 

    

    if (digitalRead(data) == 0)

      num = cnt; 

    

    digitalWrite(pulse, HIGH);

  }  

  

  return num; 

}

Posted by RDIoT
|

4x4 Matrix Keyboard Keypad [S188]




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


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


* Specs

Small and compact in size

MR-MINI-4x4KEY is a 4x4 matrix keyboard module. It has 8 pins and 10 number 4 Letters on the interface

8-PIN MRconnect hole

+3.0V to +5VDC supply voltage

On-board pulled-up resistors

Four mounting holes on each corner

Dimension:7cm*6.5cm*0.5cm( approx)


* Contents

byte colPins[numRows] = {2,3,4,5}; //col 0 to 3

byte rowPins[numCols]= {6,7,8,9}; //row 0 to 3


- Connect

1(LEFT) ----- D2

2 ----- D3

3 ----- D4

4 ----- D5

5 ----- D6

6 ----- D7

7 ----- D8

8(RIGHT) ----- D9


- Key Code

const byte numRows= 4; //number of rows on the keypad

const byte numCols= 4; //number of columns on the keypad

 

//keymap defines the key pressed according to the row and columns just as appears on the keypad

char keymap[numRows][numCols]= 

{

  {'1','2','3','A'},

  {'4','5','6','B'},

  {'7','8','9','C'},

  {'*','0','#','D'}

};

 

byte colPins[numRows] = {2,3,4,5}; //col 0 to 3

byte rowPins[numCols]= {6,7,8,9}; //row 0 to 3


  char keypressed = myKeypad.getKey();

    switch (keypressed)

    {

      case '1':        

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

      break;

    }

Posted by RDIoT
|

4x4 Matrix Keyboard 16 Key Membrane Switch Keypad [S087]



https://www.youtube.com/watch?v=AdKrsusar-I


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


* Specs

4 * 4 Matrix Keyboard 16 Key Membrane Switch Array Keypad For Arduino


* Contents

- Connect

1(LEFT) ----- D2

2 ----- D3

3 ----- D4

4 ----- D5

5 ----- D6

6 ----- D7

7 ----- D8

8(RIGHT) ----- D9


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#include <Keypad.h>

 

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

 

const byte numRows= 4; //number of rows on the keypad

const byte numCols= 4; //number of columns on the keypad

 

//keymap defines the key pressed according to the row and columns just as appears on the keypad

char keymap[numRows][numCols]= 

{

  {'1','2','3','A'},

  {'4','5','6','B'},

  {'7','8','9','C'},

  {'*','0','#','D'}

};

 

byte rowPins[numRows] = {2,3,4,5}; //Rows 0 to 3

byte colPins[numCols]= {6,7,8,9}; //Columns 0 to 3

 

//initializes an instance of the Keypad class

Keypad myKeypad= Keypad(makeKeymap(keymap), rowPins, colPins, numRows, numCols);

 

String numstr = "";

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S087:4x4 16 keypad");

 

 

  char keypressed = myKeypad.getKey();

  if (keypressed != NO_KEY)

  {

   // Serial.print(keypressed);

    lcd.setCursor(0,1);

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

 

    switch (keypressed)

    {

      case '1':        

           numstr += "1";

        break;

      case '2':           

           numstr += "2";

        break;  

      case '3':           

           numstr += "3";

        break; 

      case '4':           

           numstr += "4";

        break; 

      case '5':           

           numstr += "5";

        break;                 

      case '6':           

           numstr += "6";

        break; 

      case '7':           

           numstr += "7";

        break; 

      case '8':           

           numstr += "9";

        break; 

      case '0':           

           numstr += "0";

        break; 

 

      case 'D':           

          lcd.setCursor(0,3);

          lcd.print("Dial:"+numstr);

        break; 

 

      case 'C':           

          lcd.clear();

          numstr = "";

        break; 

 

      default:          

        break;

    }

 

 

    if(numstr !="")

    {

      lcd.setCursor(0,2);

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

    }

 

  }

 

}



Posted by RDIoT
|

4x4 Matrix 16 Keypad Keyboard Module [S025]



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


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



* Specs

4x4 Matrix

Keypad Keyboard module 16 Button

Size: Approx.42mmX42mm / 1.65x1.65


* Contents

1) row = (1, 2, 3, 4) PIN

2) column = (5, 6, 7, 8) PIN 

- Connect

1 ----- D2

2 ----- D3

3 ----- D4

4 ----- D5

5 ----- D6

6 ----- D7

7 ----- D8

8 ----- D9


- Library : ttp://playground.arduino.cc/uploads/Code/keypad.zip


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#include <Keypad.h>


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


const byte numRows= 4; //number of rows on the keypad

const byte numCols= 4; //number of columns on the keypad


//keymap defines the key pressed according to the row and columns just as appears on the keypad

char keymap[numRows][numCols]= 

{

  {'0','1','2','3'},

  {'4','5','6','7'},

  {'8','9','A','B'},

  {'C','D','E','F'}

};


byte rowPins[numRows] = {2,3,4,5}; //Rows 0 to 3

byte colPins[numCols]= {6,7,8,9}; //Columns 0 to 3


//initializes an instance of the Keypad class

Keypad myKeypad= Keypad(makeKeymap(keymap), rowPins, colPins, numRows, numCols);


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("S025:4x4 16 keypad");


  char keypressed = myKeypad.getKey();

  if (keypressed != NO_KEY)

  {

   // Serial.print(keypressed);

    lcd.setCursor(0,1);

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


    switch (keypressed)

    {

      case '0':

           lcd.setCursor(0,2);

           lcd.print("if=0, then action");      

        break;

      case 'F':

           lcd.setCursor(0,2);

           lcd.print("if=F, then action");      

        break;  

      default:

          lcd.setCursor(0,2);

           lcd.print("if=defulat       "); 

        break;

    }


  }


}

Posted by RDIoT
|

Metal Touch Sensor Module [S042] 



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


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


* Specs

Color: red

Main chip: LM393

Operating voltage: DC 5V

Light weight design

With single channel signal output

Low level output signal used for human body touch sensor alarm

Compatible with Arduino



* Contents

- Connect

A0 ----- X

G ----- GND

+ ----- 5V

D0 ----- D2


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

int pin = 2;

 

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

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  pinMode(pin,INPUT);

  delay(1000);

 

  lcd.clear();

}

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S042:Metal Touch");

 

  int val = digitalRead(pin);

 

  lcd.setCursor(0,1);

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

 

  if(true == IsTouchec(pin))

  {

    lcd.setCursor(0,2);

    lcd.print("IsTouch=Touched   ");

  }

  else

  {    

    lcd.setCursor(0,2);

    lcd.print("IsTouch=None    ");

  }

 

}

 

bool IsTouchec(int p)

{

 int time = 0;

 do

 {

   if (HIGH == digitalRead(p)) return true;

   delay(1);

 } while (time++<15);

 return false;

}

Posted by RDIoT
|

Catalex Capacitive Touch Sensor (TTP223B) [S009]



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


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



* Specs

This device uses your body as part of the circuit.  When you touch the sensor pad, the capacitance of the circuit is changed and is detected.  That detected change in capacitance results in the output changing states.

When I first got this,  I expected a glitchy device,  that while functional,  would occasionally have unpredictable output results.

I may have been wrong.   After playing for a few hours, I can’t seem to get it to do anything other than what I expected it to do.  If you’re looking for robust user input,  this might do the trick.



* Contents

- Key Code

#define ctsPin 14 // Pin for capactitive touch sensor

 

int ledPin = 13; // pin for the LED

 

void setup() {

  Serial.begin(9600);

  pinMode(ledPin, OUTPUT);  

  pinMode(ctsPin, INPUT);

}

 

void loop() {

  int ctsValue = digitalRead(ctsPin);

  if (ctsValue == HIGH){

    digitalWrite(ledPin, HIGH);

    Serial.println("TOUCHED");

  }

  else{

    digitalWrite(ledPin,LOW);

    Serial.println("not touched");

  } 

  delay(100);

  

}

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

Digital Touch Sensor Module Capacitive Switch [S243]  (0) 2017.02.28
Metal Touch Sensor Module [S042]  (0) 2016.09.12
Posted by RDIoT
|

Button Switch Module [S062] 



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


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



* Specs

Weight:10 g

Color: as picture show

Size:35mmx23mmx1mm/1.38"x0.91"x0.04"(inch) (approx)

What is an electronic brick? An electronic brick is an electronic module which can be assembled like Lego bricks simply by plugging in and pulling out. Compared to traditional universal boards and circuit modules assembled with various electronic components, electronic brick has standardized interfaces, plug and play, simplifying construction of prototype circuit on one's own. There are many types of electronic bricks, and we provide more than twenty types with different functions including buttons, sensors, Bluetooth modules, etc, whose functions cover from sensor to motor drive, from Ethernet to wireless communication via Bluetooth, and so on. We will continue to add more types to meet the various needs of different projects.

Electronic brick of button switch is finger-sized, which can be connected to I/O port of main board or externally disconnected to check the switch state so as to control ON/OFF of LED lamp.

Features:

1. Plug and play, easy to use. Compatible with the mainstream 2.54 interfaces and 4-Pin Grove interfaces in the market.

2. With use of M4 standard fixed holes, compatible with M4-standard kits such as Lego and Makeblock

3. Hardware with debouncing function for more stable output


* Contents

- Connect

G ----- GND

V ----- 5V

S ----- D2


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

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

 

int button=2; //connect button to D2

 

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("S062:Button Module");

 

  lcd.setCursor(0,1);

  lcd.print("btn_read=" + (String)digitalRead(button) + "  ");

 

 

  lcd.setCursor(0,2);

  if(digitalRead(button)==HIGH) 

  {

     lcd.print("STAT = OFF ");

  }

  else if(digitalRead(button)==LOW) 

  {

     lcd.print("STAT = ON ");

  }

 

}

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

Key Switch Module (KY-004) [S024]  (0) 2016.09.12
Posted by RDIoT
|

Key Switch Module (KY-004) [S024] 



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


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


* Specs

The Keyes KY-004 Key Switch Module is a simple on/off Micro switch compatible with Arduino systems.   

Material: FR4

Length: 25mm

Width: 16mm

Height: 10mm

Weight: 1.5g

Operating Voltage: 5v DC


* Contents

- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


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

int R = 2;

byte lastButton = HIGH;

byte nowButton = HIGH;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

  pinMode(R, INPUT);

  digitalWrite(R, HIGH);


  delay(1000);


  lcd.clear();

}


void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S024:KY-004KeySwitch");


  byte nowButton = digitalRead(R);


  lcd.setCursor(0,1);

  lcd.print("value="+(String)nowButton);


  if (HIGH == lastButton)

  {

    if (LOW == nowButton)

    {

     lcd.setCursor(0,2);

     lcd.print("pushed  ");

    }

  }

  else

  {

    if (HIGH == nowButton)

    {

     lcd.setCursor(0,2);

     lcd.print("released");

    }

  }

 

 lastButton = digitalRead(R);

 delay(100);


}

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

Button Switch Module [S062]  (0) 2016.09.12
Posted by RDIoT
|

Rotary Encoder Module (KY-040) [S120] 



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


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


* Specs

By rotating the rotary encoder can be counted in the positive direction and the reverse direction during rotation of the output pulse frequency, unlike rotary potentiometer counter, which Species rotation counts are not limited. With the buttons on the rotary encoder can be reset to its initial state, that starts counting from 0.

How it works: incremental encoder is a displacement of the rotary pulse signal is converted to a series of digital rotary sensors. These pulses are used to control Angular displacement. In Eltra angular displacement encoder conversion using a photoelectric scanning principle. Reading system of alternating light transmitting window and the window is not Consisting of radial indexing plate (code wheel) rotating basis, while being an infrared light source vertical irradiation light to the code disk image onto the receiving

On the surface. Receiver is covered with a diffraction grating, which has the same code disk window width. The receiver's job is to feel the rotation of the disc Resulting changes, and change the light into corresponding electrical changes. Then the low-level signals up to a higher level, and generates no interference Square pulse, which must be processed by electronic circuits. Reading systems typically employ a differential manner, about the same but the phase difference of the two waveforms Different by 180 ° compared to the signal in order to improve the quality and stability of the output signal. Reading is then the difference between the two signals formed on the basis, Thus eliminating the interference.


Analog output voltage: 0~5V


* Contents

- Conect

OUT ----- A0

VCC ----- 5V

GND ----- GND


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


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


int pin = A0;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  pinMode(pin, INPUT);


  delay(1000);


  lcd.clear();

}


void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S120:Rotary Encoder");


  lcd.setCursor(0,1);

  lcd.print("AnalogValue=" + (String)analogRead(pin) + " ");


}

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

Rotation Encoder Module (KY-040) [S043]  (0) 2016.09.12
Posted by RDIoT
|

Rotation Encoder Module (KY-040) [S043]



https://www.youtube.com/watch?v=pgAY8-C8O64


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


* Specs

By rotating the rotary encoder can be counted in the positive direction and the reverse direction during rotation of the output pulse frequency, unlike rotary potentiometer counter, which Species rotation counts are not limited. With the buttons on the rotary encoder can be reset to its initial state, that starts counting from 0.

How it works: incremental encoder is a displacement of the rotary pulse signal is converted to a series of digital rotary sensors. These pulses are used to control Angular displacement. In Eltra angular displacement encoder conversion using a photoelectric scanning principle. Reading system of alternating light transmitting window and the window is not Consisting of radial indexing plate (code wheel) rotating basis, while being an infrared light source vertical irradiation light to the code disk image onto the receiving

On the surface. Receiver is covered with a diffraction grating, which has the same code disk window width. The receiver's job is to feel the rotation of the disc Resulting changes, and change the light into corresponding electrical changes. Then the low-level signals up to a higher level, and generates no interference Square pulse, which must be processed by electronic circuits. Reading systems typically employ a differential manner, about the same but the phase difference of the two waveforms Different by 180 ° compared to the signal in order to improve the quality and stability of the output signal. Reading is then the difference between the two signals formed on the basis, Thus eliminating the interference.



* Contents

- SW : Button Push 

- DT (D3) : A, CLK(D2) : B

- When Turn Left

  : DT=1, CLK=1 6

  : DT=0, CLK=1 5

  : DT=0, CLK=0 4

  : DT=1, CLK=0 3

  : DT=1, CLK=1 2

- When Turn Right

  : DT=1, CLK=1 6

  : DT=1, CLK=0 7

  : DT=0, CLK=0 8

  : DT=0, CLK=1 9

  : DT=1, CLK=1 10


- Connect

GND ----- GND

+ ----- 5V

SW ----- D4 (Detect Button)

DT ----- D3 (A, Interr Pin)

CLK ----- D2 (B, Interr Pin)



- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

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


int encoderPin1 = 2; // (CLK)

int encoderPin2 = 3; // (DT)

int encoderSwitchPin = 4; //push button switch (SW)

 

volatile int lastEncoded = 0;

volatile long encoderValue = 0;

 

long lastencoderValue = 0;

 

int lastMSB = 0;

int lastLSB = 0;

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  pinMode(encoderPin1, INPUT); 

  pinMode(encoderPin2, INPUT);

 

  pinMode(encoderSwitchPin, INPUT);

 

  digitalWrite(encoderPin1, HIGH); //turn pullup resistor on

  digitalWrite(encoderPin2, HIGH); //turn pullup resistor on

 

  digitalWrite(encoderSwitchPin, HIGH); //turn pullup resistor on

 

  //call updateEncoder() when any high/low changed seen

  //on interrupt 0 (pin 2), or interrupt 1 (pin 3) 

  attachInterrupt(0, updateEncoder, CHANGE); 

  attachInterrupt(1, updateEncoder, CHANGE);

 

  delay(1000);

 

  lcd.clear();

}

 

int nowCnt = 0;

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S043:RotationEncoder");

 

  //Do stuff here

  if(digitalRead(encoderSwitchPin)){

     lcd.setCursor(0,1);

     lcd.print("button not pushed"); 

    //button is not being pushed

  }else{

     lcd.setCursor(0,1);

     lcd.print("button pushed     "); 

  }

 

  //Serial.println(encoderValue);

  lcd.setCursor(0,2);

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

 

  lcd.setCursor(0,3);

  lcd.print("DT="+(String)digitalRead(encoderPin2)+" CLK="+(String)digitalRead(encoderPin1)+" "); 

 

  delay(100); 

}

 

 

void updateEncoder(){

  int MSB = digitalRead(encoderPin1); //MSB 

  int LSB = digitalRead(encoderPin2); //LSB 

 

  int encoded = (MSB << 1) LSB; 

  int sum  = (lastEncoded << 2) encoded; 

 

  if(sum == 0b1101 sum == 0b0100 sum == 0b0010 sum == 0b1011) encoderValue ++;

  if(sum == 0b1110 sum == 0b0111 sum == 0b0001 sum == 0b1000) encoderValue --;

 

  lastEncoded = encoded; //store this value for next time

}

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

Rotary Encoder Module (KY-040) [S120]  (0) 2016.09.12
Posted by RDIoT
|

433Mhz Button Smart Receiver Doorbell [S220]





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



* Specs

Feature:

Wireless design,  Max. operating range can up to 120 meter in open area

Click Button Transmitter design, lifespan can up to 100,000 Clicks

1 million sets of auto-learning codes to avoid interference between doorbells

Transmitter/Bell Push is with IP44 waterproof, and with Flat Panel design, dust-proof, clean and convenient for using

Energy saving, plug-in Receiver working power consumption is less than 5W

Music and volume are adjustable, comes with 32 chimes, 36 Polyphonic melodies

The 12V 23A Battery is Included


Specification:

Application: Suitable for villas, apartments, office, hotel, hospital and so on

Power Supply (Receiver): AC 110~220V

The plug is US EU standard.

Power Supply (Transmitter): 2V 23A Battery( Included)

Operating Range: 120 meters / 393ft (OPEN AREA)

Sound Options: 32 chimes, 36 Polyphonic melodie


Package included: ( with original retail box )  

1* main doorbell(only has EU US plug )

2* button (with battery ) 

2* Double-sided Adhesive

4* Screw 

1* English user manual

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

433Mhz Wireless Door Contact Sensor [S212]  (0) 2016.09.12
Electromagnetic Door Lock 12V [S182]  (0) 2016.09.12
Wired Door Window Sensor 330mm [S140]  (0) 2016.09.12
Posted by RDIoT
|

433Mhz Wireless Door Contact Sensor [S212] 





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


* Specs

Feature:

100% Brand New! 

Wireless door / window entry detector.

These sensors are used to 

protect the opening of doors and windows.

Easily mounted by adhesive tape to window or door.

specification:

Working frequency: 433 MHz.

Power supply: battery 23A(include).

Working distance: more than 100 m.

Working temperature: -10-50.

Size: approx. 70x37x15
Battery Type : Alkaline 23A 12V 

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

433Mhz Button Smart Receiver Doorbell [S220]  (0) 2016.09.12
Electromagnetic Door Lock 12V [S182]  (0) 2016.09.12
Wired Door Window Sensor 330mm [S140]  (0) 2016.09.12
Posted by RDIoT
|

Electromagnetic Door Lock 12V [S182] 



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

* Specs

Lock size: 28 x 27 x 19 mm

Material: Steel

Voltage: DC 12V

Working Current: 0.42A Max (at DC12V 20C)

Power: 5.1W

DC Resistance: 28 ohm±10%

Plug pin route length: 5 mm

Stroke and force: 0 mm- >=300 gf; 5 mm-- >=80gf

Unlock time: 1s, max power on/time < 15S.

Operation temperature / humidity: -5C --+55C (5%RH-85%RH)

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

433Mhz Button Smart Receiver Doorbell [S220]  (0) 2016.09.12
433Mhz Wireless Door Contact Sensor [S212]  (0) 2016.09.12
Wired Door Window Sensor 330mm [S140]  (0) 2016.09.12
Posted by RDIoT
|

Wired Door Window Sensor 330mm [S140] 



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


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


* Specs

metals shield anti-fire ABS

connecting mode: N.C. normally closed

rated current : 100mA

rated voltage : 200 VDC

operating distance: more than 15mm, less than 25mm

rated power: 3W

No external power supply, connect to wired or wireless alarm control panel GND and N.C ports directly! Please note that this item not fit to iron door, It will decline magnetic of the sensor.


* Contents

- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>


LiquidCrystal_I2C lcd(0x27,16,2);  // LCD1602

int pushButton = 2;


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD1602");

  pinMode(pushButton, INPUT_PULLUP);

  

  delay(1000);


  lcd.clear();

}


void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S140:Window Sensor");


  int buttonState = digitalRead(pushButton);


  lcd.setCursor(0,1);

  lcd.print("value=" + (String)buttonState + " ");


  if(buttonState == 1)

  {

    digitalWrite(8, HIGH);

  }

  else

  {

   digitalWrite(8, LOW); 

  }

  delay(1);

}

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

433Mhz Button Smart Receiver Doorbell [S220]  (0) 2016.09.12
433Mhz Wireless Door Contact Sensor [S212]  (0) 2016.09.12
Electromagnetic Door Lock 12V [S182]  (0) 2016.09.12
Posted by RDIoT
|