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)
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.
Previous article:How to use PIC as infrared remote control receiver? (Part 2)
Next article:Classification and characteristics of PIC 8-bit microcontrollers 2
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Microcontroller Articles
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
MoreDaily News
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
Guess you like
- TI CCS & controlSUITE Troubleshooting Log
- What is differential gain and differential phase?
- Microstrip Circuits (Tsinghua University)
- Introduction and analysis of namespace logical isolation
- MSP430F5438A clock system
- The chip does not have a DAC peripheral. Can PWM be used to simulate a DAC port?
- 2020 I would like to say hello to everyone
- Reverse voltage protection circuit for battery charger applications
- [NXP Rapid IoT Review] +IOT First Experience and Web IDE Usage Process
- 【AT32F421 Review】+ COMP Comparator Usage