How to use PIC as infrared remote control receiver? (Part 3)

Publisher:温柔的爱情Latest update time:2015-01-20 Source: laoguKeywords:PIC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Some thoughts on infrared reception. 
I am currently working on an infrared receiver and transmitter for a television. I have read some books, and the books say that the signal is modulated on a 38khz modulation signal. However, when I look at the infrared waveform through an infrared receiving tube and two levels of amplification, the oscilloscope has to be set to the 10ms position to see the complete waveform. According to the book, the waveform should be visible at the 50us position, and this waveform looks like a trapezoidal wave. What's going on? The infrared source I use is the remote control of a Changhong TV. In this case, how should I write my receiving program? 

You don't need to worry about how it is modulated. You only need to use a receiving head. What comes out is a square wave. You can judge the signal according to the two falling edges (the idle state is high level). I used an oscilloscope to observe for a day before I understood what was going on. 

  If someone keeps pressing the remote control, won't the microcontroller treat it as a signal and record it? Moreover, I am using a pic16c57 chip without interruption. How to judge the timing of the two falling edges, and how to determine that a signal has ended?

If you have never done infrared remote control reception, it is recommended that you use a chip with interruption first. Using 57 is somewhat difficult. 
 

I have seen the infrared receiving program you wrote and found some problems. 
 
The second line of the receiving program you wrote uses goto to jump to rf1, and the retlw 0 instruction is used on rf1, but isn't this instruction used when using the call instruction to return? If the goto instruction uses retlw 0, where to return to?
This is related to the chip used by the remote control. You can learn about the definition of the remote control buttons and observe it with an oscilloscope. It is best for you to write a program to read the code first, and observe the key definition and rules. 


If the requirements are not high, you can use infrared encoding and decoding chips  .
If you want a low bit error rate, it is best to write your own transmission and reception (plus decoding) program.

1. What is emitted from the infrared ray? What is received? Some high and low levels?
2. How do we decode these? What is the so-called code? Is it 0.1 code? Or what?
There are so many questions, everything is due to lack of experience, thank you for your help.


Have you learned high frequency? It will be easier to understand if you have learned it. 
Infrared transmission is generally divided into two types:
1. Carrier: that is, the baseband signal (that is, "0", "1") is modulated onto the 38k carrier, and emitted by the infrared light-emitting tube (same as the light-emitting diode);
then received at the receiving end by an infrared photodiode (or triode) or an infrared integrated receiving head.
Receiving with a photodiode or triode requires demodulation by a program or IC (such as: cx20106, etc.). Then process the baseband signal. This method is mainly used in situations where the carrier needs to have multiple frequencies.   
The integrated receiver head has a relatively high sensitivity and a relatively small size. It integrates 38k demodulation, low-pass filtering and other anti-interference circuits. This receiver head is relatively simple to use, but according to the situation I have used, the higher the sensitivity, the worse the anti-interference performance, often accompanied by pulse interference, which can still be solved with a program.
It is best to use encoding and duty cycle adjustment for baseband signals to enhance anti-interference performance.

2. Directly send 0,1 signals: Use when the distance is relatively close (cm level) and the environmental interference is relatively small.   
My idea is to directly amplify the signal of the remote control through two stages, and then output it after amplification by the triode, but I just don’t know how to record the 38khz signal into the microcontroller. I think it’s 


better not to use a decoding chip. It’s enough to transmit a 9013. If you can’t buy a high-power transmitting tube, you can connect two transmitting tubes in series.

Why do you need to input the 38k signal into the microcontroller? Do you use infrared photosensitive triodes to receive? The cost is much lower. The process requirements are relatively high.
Keywords:PIC Reference address:How to use PIC as infrared remote control receiver? (Part 3)

Previous article:How to use PIC as infrared remote control receiver? (Part 2)
Next article:Classification and characteristics of PIC 8-bit microcontrollers 2

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号