로그인회원등록 내글장바구니주문조회현재접속자
 상품 검색








 게시판 검색





 
 
회원등록 비번분실


온라인 입금계좌
ㆍ기업은행
ㆍ219-043192-01-028
ㆍ이건영

      거래은행 바로가기
 
 Sensor Applications
센서 자료실
작성자 leeky        
작성일 2006/02/17
첨부#2 ir_sig_tx_ani.gif (0KB) (Down:18)
Link#1 index.shtml (Down:145)
ㆍ추천: 0  ㆍ조회: 661   
  RC5 적외선 리모콘의 신호처리

remote controls use the 36kHz (or around) to transmit information.
InfraRed light emitted by IR Diodes is pulsated at 36 thousand times per second,
when transmitting logic level "1" and silence for "0".

To generate a 36kHz pulsating infrared is quite easy, more difficult is to receive
and identify this frequency.  This is why some companies produce infrared receives,
that contains the filters, decoding circuits and the output shaper, that delivers a square wave,
meaning the existence or not of the 36kHz incoming pulsating infrared.

It means that those 3 dollars small units, have an output pin that goes high (+5V)
when there is a pulsating 36kHz infrared in front of it,
and zero volts when there is not this radiation.

A square wave of approximately 27uS (microseconds) injected at the base of a transistor,
can drive an infrared LED to transmit this pulsating light wave.  
Upon its presence, the commercial receiver will switch its output to high level (+5V).
 
  

If you can turn on and off this frequency at the transmitter,
your receiver's output will indicate when the transmitter is on or off.


Those IR demodulators have inverted logic at its output,
when a burst of IR is sensed it drives its output to low level, meaning logic level = 1.

The TV, VCR, and Audio equipment manufacturers for long use infra-red at their remote controls.
My first color TV in 1976 used an ultrasound (not infrared) remote control.

To avoid a Philips remote control to change channels in a Panasonic TV,
they use different codification at the infrared, even that all of them use basically the same
transmitted frequency, from 36 to 50kHz.  So, all of them use a different combination of bits
or how to code the transmitted data to avoid interference.  

Some standards were created.  As illustrative material, we will only show one of them,
the one used by Philips, even that we can cover the other ones in the future.

--------------------------------------------------------------------------------
First of all, Philips adopted or created the RC5 standard that uses fixed bit length
and fixed quantity of bits.

Each time you press a button at the Philips remote control, it sends a train of 14 bits,
1.728ms per bit, the whole train is repeated every 130ms if you keep the button pressed

Each bit is sliced in two halves.  The left and right half has opposed levels.
If the bit to be transmitted is one (1), its left side is zero while its right side is one.  
If the bit to be transmitted is zero (0), its left side is one while the right side is zero.
 
(This is the right logic, reversed from what you can see at the IR receiver output.)

It means that the second half of the bit is actually the same meaning of the bit to be transmitted,
as you can see at the shaded blue right side of the bit as on, means bit transmitted = 1.

If you want to measure the correct logic level directly from the Receiver Output,
you should measure at the first half of the bit.

The correct interpretation, is that it changes level exactly at the middle of bit time.  
At the IR Receiver output a bit Zero changes level from Low to Up,
while a bit One changes level from Up to Low.

There are a minimum quantity of incoming 27µs pulses to the demodulator understand
it is at the right frequency and then drop its output.  
The quantity of pulses used at the Philips remotes are 32 pulses per each half of the bit,
64 pulses per bit.  So, a bit "0" to be transmitted it means 32 square pulses of  27µs each,
then 32 x  27µs of silence.  The bit "1" is the opposite, 32 x 27µs of silence followed
by  32 square pulses of  27µs.

Our job here will be to decode the receiving of the waveform at the demodulator output.
We could observe the direction of the changing at the middle of the bit,
if going down, means bit 0, going up, means bit 1.  
But it is easy to sample the middle of the first half of the bit,
so it directly tells us what is the bit state, as we will see next in this text.

The Philips remote control sends 14 bits in sequence as you can see below.
(I am sorry to need to use more than your monitor width for the next picture,
but it is to better view it).


You can see the 14 bits of the RC-5 system above. The RED bits are level "ON",
while Blue are "OFF". The first two bits, #1 and #2,  are called ACG calibration.
They are "ON" level, and serve to calibrate the IR Receivers Auto Gain Control.

In the Philips remotes, the bit #3 is the CHECK bit, every time you press a key at the remote,
even pressing repeatedly the same key, this bit flips state.  This feature is interesting.  
Suppose you pressed number "1" at the remote (trying to select channel 15 at TV)
and holding it for 2 seconds, then  your other hand just blocks the InfraRed signal.  
The TV would receive two trains of pulses, generated by your hand breaking a long train in two.

Other systems would understand transmission of two keys "1" selecting channel "11",
but this do not happens in the Philips system.  
This bit flips state every time you press a key,
so blocking the signal with your hand doesn't change this bit,
so the TV will understand that still the same key pressed.  
To select channel "11" you should press key "1" really twice.

The next 5 bits, #4 to #8, are used for SYSTEM ADDRESS,
or to identify which kind of device should execute the COMMAND bits.  

For example,
TV set uses ADDRESS ZERO.  
Bit #8 is the Less Significant Bit.

SYSTEM ADDRESS EQUIPMENT
0 TV SET 1
1 TV SET 2
2 VIDEOTEXT
3 EXPANSION FOR TV 1 AND 2
4 LASER VIDEO PLAYER
5 VIDEO RECORDER 1 (VCR 1)
6 VIDEO RECORDER 2 (VCR 2)
7 RESERVED
8 SAT 1
9 EXPANSION FOR VCR 1 OR 2
10 SAT 2
11 RESERVED
12 CD VIDEO
13 RESERVED
14 CD PHOTO
15 RESERVED
16 AUDIO PREAMPLIFIER 1
17 RECEIVER / TUNER
18 TAPE / CASSETE RECORDER  
19 AUDIO PREAMPLIFIER 2
20 CD
21 AUDIO RACK
22 AUDIO SAT RECEIVER
23 DCC RECORDER
24 RESERVED
25 RESERVED
26 WRITABLE CD
26-31 RESERVED

The next 6 bits, #9 to #14, are used for COMMAND information to the device selected
at the ADDRESS bits.  Bit #14 is the LESS SIGNIFICANT BIT, and it is last transmitted.

For example, STOP key uses COMMAND #54 (36h in hexadecimal),
bits #9, #10, #12 and #13 should be ON, bits #11 and #14 should be OFF.  

COMMAND (in decimal) DESCRIPTION of FUNCTION
0-9 NUMERIC KEYS 0 - 9
12 STANDBY
13 MUTE
14 PRESETS
16 VOLUME UP
17 VOLUME DOWN
18 BRIGHTNESS  +  
19 BRIGHTNESS -
20 COLOR SATURATION +
21 COLOR SATURATION -
22 BASS UP  
23 BASS DOWN
24 TREBLE  +  
25 TREBLE -
26 BALANCE RIGHT
27 BALANCE LEFT
48 PAUSE  
50 FAST REVERSE
52 FAST FORWARD-
53 PLAY
54 STOP
55 RECORD  
63 SYSTEM SELECT
71 DIM LOCAL DISPLAY
77 LINEAR FUNCTION (+)
78 LINEAR FUNCTION (-)
80 STEP UP
81 STEP DOWN
82 MENU ON
83 MENU OFF
84 DISPLAY A/V SYS STATUS
85 STEP LEFT
86 STEP RIGHT
87 ACKNOWLEDGE
88 PIP ON/OFF
89 PIP SHIFT  
90 PIP MAIN SWAP
91 STROBE ON/OFF
92 MULTI STROBE
93 MAIN FROZEN
94 3/9 MULTI SCAN
95 PIP SELECT
96 MOSAIC MULTI PIP
97 PICTURE DNR
98 MAIN STORED
99 PIP STROBE
100 RECALL MAIN PICTURE
101 PIP FREEZE
102 PIP STEP UP
103 PIP STEP DOWN
118 SUB MODE
119 OPTIONS BUS MODE
123 CONNECT
124 DISCONNECT

This system can be automated if using the chips:
SAA3049 or TDA3048 for receivers and SAA3006, SAA3010 or SAA3027 as transmitters.

--------------------------------------------------------------------------------
적외선 리모콘 신호의 복호
To receive this signal using a microcontroller, follows the timing from the figure  7 above.  
Note that the Infrared Receiver invert the bit signal, low level means bit ON.

During inactivity (no Infrared  present) the output of the Infrared receiver is UP (bit zero).

You can connect the IR receiver output to any input port pin or interrupt pin of your microcontroller,
and keep polling it or prepare the interrupt routine to trigger your reading after the first low level sensed.

When you press a key at the remote, it transmits the train of pulses,
and your microcontroller will receive bit #1 first.
It will be sensed right after the middle of the bit when it changes
from high to low level to means bit "1".  
This is the first time that your microcontroller will "see" the incoming IR signal.

You don't need to decode those first  two bits, not even the CHK bit
(except if you want to control as the TV do and described above),
so you can skip those 3 bits and start to receive the ADDRESS bits.  
To do that, you need to skip 2.75 bits time, and you will be exactly
at the middle of the right level of the first ADDRESS bit to be read (non inverted level).
 

So, upon sensing the first low level, your software should wait 4.752 milliseconds
and then start to read the next 11 bits spaced 1.728ms each.  
The first 5 bits are Address and the next 6 bits are  Command,
logic correct level, LOW = 0, HIGH = 1.

To make sure your software is waiting the correct timing,
you need to use a dual channel oscilloscope,
and this procedure to adjust your software:

At your bit reading routine use an available microcontroller port pin
and generate a fast pulse UP and DOWN,  then use one scope channel to display this pulse,
and the other scope channel to show the incoming signal from the receiver.  
Press and hold key number ZERO at the remote,
and sync the scope to show a complete wave form, don't worry with timing.
The fast 11 pulses should always be in place of those SKY_BLUE down arrows
at the figure 8 above.  It means that the "bit reading" software routine will reading exactly
in the middle of the correct bit level.  

Your software will need to have two timing delays, the first to wait 4.752ms
and the second to wait 1.728ms.   Adjust the timing loop from the 4.752ms
until the first fast pulse happens exactly as indicated above.  
Then adjust the 1.728 ms timing delay in such way
that the last fast pulse (#11)  bit reading happens exactly
at the middle of the low part of the last bit (#14).  

Check all other bits and fast pulses, they should be all matching ok.  
Small errors would be accepted since the reading would be happening in the middle of the bit,
few errors for more or less is not a problem,
but it is better to be the most possible in the middle of the low level of each bit.  
This is why you should adjust your 1.728ms timing routine looking at the last data bit
and fast pulse, if they match somehow ok, all the other bits should be ok too.

Remember that any other remote key will generate a different pattern
and it can confuse you.  Use always key number ZERO for this software calibration.

Once you find the correct timing delays, you can replace the FAST pulse instructions
with NOPS (check your chip instruction set to keep the same clock count wasted),
or keep the fast pulse there just for fun,
so you will be able to recheck it in case of problems.

Reading the 11 bits is easy.  Just shift them left into a 8 bits register
and ignore the high order 2 bits #7 and #6 (AND 03Fh instruction),
keep only the COMMAND last 6 bits... You will not want to decode the ADDRESS bits,
are you?  The TV remote control will always send Address Zero, you know that, right?  

Here few examples of the complete waveform (14 bits) at the Receiver Output:
 

Values at the right are the command in hexadecimal
Sky blue: AGC pulses (ON)
Yellow: Check bit (flipping)
Black: Address (00)
Pink: Command

AVRTOOLS™
   
윗글 DS1820 온도센서 읽기
아래글 NEC 적외선 리모콘의 전송규격
    N         제목    글쓴이 작성일 조회 추천
74 AT89C2051과 EM4095를 사용한 RFID 장치의 제작 leeky 2006/12/31 (일) 1189 0
73 UserPort for Windows 2000 leeky 2007/11/12 (월) 807 0
72 아날로그 PID 제어 회로 leeky 2007/11/12 (월) 1397 0
71 Windows Scope 2K4 leeky 2007/11/12 (월) 938 0
70 12C508 금속검출기 leeky 2006/02/24 (금) 1104 0
69 16C84 LCD표시 L,C 메터 leeky 2006/02/25 (토) 1150 2
68 89C2051 LCD표시 LC메터의 제작 leeky 2006/02/14 (화) 1167 8
67 12C508A 초음파 거리 측정기 avrtools 2006/02/23 (목) 1054 0
66 Caliper to computer (RS-232) interface leeky 2006/02/23 (목) 1069 4
65 가속도센서 ADXL202의 PIC12C508 인터페이스 leeky 2006/02/20 (월) 1036 2
64 16F84 광학식 심박측정기 leeky 2006/02/27 (월) 1121 6
63 12C508 전자 나침판 leeky 2006/02/27 (월) 705 0
62 ENC28J60 Ethernet to SPI Header Board leeky 2007/03/26 (월) 979 0
61 SHT11 습도센서 8051 인터페이스 leeky 2006/02/14 (화) 1029 0
60 SHT11 습도센서 SX18 인터페이스 leeky 2006/03/16 (목) 665 2
59 SRF04 초음파 거리센서의 제작 leeky 2006/02/25 (토) 663 0
58 Ambient Light Sensors TSL2550 avrtools 2006/04/06 (목) 469 0
57 PIC16F877A BioSense Physiologic Sensing leeky 2006/04/06 (목) 605 0
56 Electrocardiogram (ECG) Front End leeky 2006/04/06 (목) 676 0
55 Biometric Interface Board leeky 2006/04/06 (목) 789 0
54 MAX2242 802.11b 블루투스 RF증폭기 leeky 2006/04/06 (목) 481 0
53 AX.25 9600BPS 무선모뎀 L2PCX leeky 2006/04/06 (목) 378 0
52 TCS230 색상검출 평가키트 leeky 2006/04/06 (목) 632 0
51 100V10A 50W 전자부하 leeky 2006/04/06 (목) 561 0
50 FLAME SENSOR UVTRON R2868 leeky 2006/04/06 (목) 563 0
49 Compact Optical Image Scanner leeky 2006/04/06 (목) 494 0
48 지자기 방위계 모듈 CMPS03 leeky 2006/04/06 (목) 634 0
47 0~1.5KV 정전기 측정센서 PKE05A1 leeky 2006/04/06 (목) 338 0
46 Rain Sensor 인터페이스 회로 leeky 2006/04/06 (목) 567 0
45 초음파 감지 센서 leeky 2006/04/06 (목) 554 0
44 HUMIDITY SENSOR HS-1100 leeky 2006/04/06 (목) 429 0
43 Relative Humidity Sensor KSH01, KSH-02 leeky 2006/04/06 (목) 327 0
42 Digital Radar Speedometer leeky 2006/04/06 (목) 488 0
41 Touch Sensitive Switch leeky 2006/04/06 (목) 539 0
40 Economy radar detector leeky 2006/04/06 (목) 373 0
39 Twin Loop metal detector leeky 2006/04/06 (목) 507 0
38 Proximity Detector CS209A/D leeky 2006/04/06 (목) 485 0
37 Lego Sound Sensor leeky 2006/04/06 (목) 443 0
36 12C508 IR Proximity Detector leeky 2006/04/06 (목) 646 0
35 Sharp IR Sensor Hack leeky 2006/04/06 (목) 628 0
34 TIL300 PRECISION LINEAR OPTOCOUPLER leeky 2006/04/06 (목) 388 0
33 Analog Opto Isolator leeky 2006/04/06 (목) 433 0
32 Rich Caudle's capaciflector leeky 2006/04/06 (목) 278 0
31 Geiger Tube leeky 2006/04/06 (목) 389 0
30 Lynxmotion Infrared Proximity Detector leeky 2006/04/06 (목) 365 0
29 Low Power LED Flasher leeky 2006/04/06 (목) 440 0
28 백색 LED BLU 구동회로 leeky 2006/04/06 (목) 473 0
27 저전압 백색 LED 구동회로 leeky 2006/04/06 (목) 512 0
26 IR LED 송신회로 avrtools 2006/04/06 (목) 490 0
25 LED 총방사 광량의 측정 leeky 2006/04/06 (목) 404 0
24 자외선 측정센서의 교정 leeky 2006/04/06 (목) 354 0
23 UV센서 S9050의 데이터 leeky 2006/04/06 (목) 269 0
22 디지털 자외선 메터 leeky 2006/04/06 (목) 322 0
21 Simple Metal Detector leeky 2006/04/06 (목) 514 0
20 DS1820 온도센서 읽기 leeky 2006/04/04 (화) 568 0
19 RC5 적외선 리모콘의 신호처리 leeky 2006/02/17 (금) 661 0
18 NEC 적외선 리모콘의 전송규격 leeky 2006/02/17 (금) 551 0
17 MBI-6001 TRANSLESS LED DRIVER leeky 2006/02/14 (화) 391 0
16 PC로 제어하는 AD9850 DDS 신호발생기 leeky 2006/02/14 (화) 429 0
15 2400 Mhz test oscillator leeky 2006/02/14 (화) 460 0
14 DC BRUSHLESS FANS leeky 2006/02/14 (화) 546 0
13 RF mW Meter for SHF (2300MHz) leeky 2006/02/14 (화) 377 0
12 FET로 만드는 400W SSR leeky 2006/02/14 (화) 606 0
11 Scope2k4 소프트웨어 및 하드웨어 회로 leeky 2006/02/14 (화) 722 0
10 LTC1298를 사용한 PC 병렬포트용 ADC leeky 2006/02/14 (화) 388 0
9 0~14V 가변정전압, 0~2A 가변정전류 전원 avrtools 2006/02/14 (화) 519 0
8 ATV 1240-1300MHz 튜너용 PLL leeky 2006/02/14 (화) 271 0
7 1 Transistor FM Microphone leeky 2006/02/14 (화) 327 0
6 Helical Antenna Design Software leeky 2006/02/13 (월) 428 0
5 IRF510을 사용한 7MHz 출력10W 증폭기, PLL leeky 2006/02/13 (월) 478 0
4 MC34063A 설계용 계산기 avrtools 2006/02/13 (월) 461 0
3 RS232 신호 변환회로 leeky 2006/02/13 (월) 600 0
2 Sound card based multimeter Scope leeky 2006/02/13 (월) 747 0
1 2400MHz Helical Antenna Design leeky 2006/02/08 (수) 378 0
1

바구니 : 0
 보관함 : 0
오늘뷰 : 0
HOME   |   회사소개   |   제휴안내   |   회사위치   |   서비스이용 약관   |   개인정보 보호정책   |   사이트맵
17015 경기도 용인시 기흥구 동백중앙로16번길 16-25, 508호. 전화 : 031-282-3310
사업자 등록번호 : 697-47-00075 / 대표 : 이건영 / 업태 : 제조업 / 종목 : LED조명, LED전원, 제어장치.
개인정보 관리책임자 : 홈페이지 관리자 . Copyright ⓒ2016 아크레즈 (ACLEDS INC.)
HOME TOP PREVNEXT 0 0 0