아두이노 > tkkrlab - Arduino 37 sensors - KY-022 Infrared sensor receiver module

TODAY1,105 TOTAL2,933,391
사이트 이용안내
Login▼/회원가입
최신글보기 질문게시판 기술자료 동영상강좌

아두이노 센서 ATMEGA128 PWM LED 초음파 AVR 블루투스 LCD UART 모터 적외선


BASIC4MCU | 아두이노 | 아두이노 | tkkrlab - Arduino 37 sensors - KY-022 Infrared sensor receiver module

페이지 정보

작성자 키트 작성일2017-09-13 14:29 조회3,030회 댓글0건

본문

 

Arduino KY-022 Infrared sensor receiver module

Arduino KY-022 Infrared sensor receiver module Sku 135045 2

Buy on Dealextream


 

 

Infrared remote control module

Infrared controller (in other TkkrLab Arduino Set)

This is a new ultra-thin 38K universal infrared remote control, using the NEC encoding format, mainly for cars Containing MP3, foot bath, lighting design equipped, digital photo frame, microcontroller development board learning board and other occasions. Because it is based on non-Line remote control, so people seem easy to use, effective, and now more and more wide application field, then for This product of our company that we will make the following introduction.

Specifications

  • 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

Use

Remember that the remote control and the ir receiver is a set, it has to decode the code and will display a hex code.

 

Test

  • Arduino controller × 1
  • USB data cable × 1
  • Infrared remote control × 1
  • the infrared receiver module × 1

Schematic

  • Arduino GND --> Module pin -
  • Arduino +5V --> Module PLUS (middle pin)
  • Arduino Digital pin 11 --> Module S

 

Example Code

This is the supplied demo code for the Arduino you can find under File->Examples->IrRemote->IrRecvDemo

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
 * An IR detector/demodulator must be connected to the input RECV_PIN.
 * Version 0.1 July, 2009
 * Copyright 2009 Ken Shirriff
 */
 
#include <IRremote.h>
 
int RECV_PIN = 11;
 
IRrecv irrecv(RECV_PIN);
 
decode_results results;
 
void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}
void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
  }
}
cs


Raspberry Pi2

Tutorial

  1. on intstructables.com

Wiring the pi with the module

  1. left pin (GND) to pin 6 (GND)
  2. Center pin (VCC) to pin 1 (3,3V)
  3. Right pin (DATA) to pin 12 (GPIO 18)

Setting up Raspbian

Before running any code, install LIRC with sudo apt-get install lirc and the follow the prerequisites below

edit /etc/modules and add the lines below:

  1. lirc_dev
  2. lirc_rpi gpio_in_pin=18 gpio_out_pin=17

edit /etc/lirc/hardware.conf and modify to add the correct values as below:

  1. DRIVER="default"
  2. DEVICE="/dev/lirc0"
  3. MODULES="lirc_rpi"

edit /boot/config.txt and edit the dtoverlay value like this:

  1. dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_out_pin=17,gpio_in_pull=up

reboot your pi

after reboot:

  1. stop lirc daemon: sudo /etc/init.d/lirc stop
  2. test your ir receiver by running: mode2 -d /dev/lirc0 then by pushing any key on your remote to see if something happens (random numbers)

your ir receiver is working !

Example Code (Python)




댓글 0

조회수 3,030

등록된 댓글이 없습니다.

아두이노HOME > 아두이노 > 전체 목록

아두이노 목록
제목 작성자 작성일 조회
현재글 아두이노 tkkrlab - Arduino 37 sensors - KY-022 Infrared sensor receiv… 키트 17-09-13 3031
91 아두이노 tkkrlab - Arduino 37 sensors - KY-021 Mini magnetic reed mod… 키트 17-09-13 2884
90 아두이노 tkkrlab - Arduino 37 sensors - KY-020 Tilt switch module 키트 17-09-13 2973
89 아두이노 tkkrlab - Arduino 37 sensors - KY-019 5V relay module 키트 17-09-13 3029
88 아두이노 tkkrlab - Arduino 37 sensors - KY-018 Photo resistor module 키트 17-09-13 2662
87 아두이노 tkkrlab - Arduino 37 sensors - KY-017 Mercury open optical m… 키트 17-09-13 2633
86 아두이노 tkkrlab - Arduino 37 sensors - KY-016 3-color LED module 키트 17-09-13 2921
85 아두이노 tkkrlab - Arduino 37 sensors - KY-015 Temperature and humidi… 키트 17-09-13 2532
84 아두이노 tkkrlab - Arduino 37 sensors - KY-013 Temperature sensor mod… 키트 17-09-13 2894
83 아두이노 tkkrlab - Arduino 37 sensors - KY-012 Active buzzer module 키트 17-09-13 2947
82 아두이노 tkkrlab - Arduino 37 sensors - KY-011 2-color LED module 키트 17-09-13 2702
81 아두이노 tkkrlab - Arduino 37 sensors - KY-010 Optical broken module 키트 17-09-13 2676
80 아두이노 tkkrlab - Arduino 37 sensors - KY-009 3-color full-color LED… 키트 17-09-13 2653
79 아두이노 tkkrlab - Arduino 37 sensors - KY-008 Laser sensor module 키트 17-09-13 2966
78 아두이노 tkkrlab - Arduino 37 sensors - KY-006 Small passive buzzer m… 키트 17-09-13 2873
게시물 검색

2022년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2021년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2020년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2019년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2018년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
Privacy Policy
MCU BASIC ⓒ 2020
모바일버전으로보기