当前位置:网站首页>STM32 infrared remote control
STM32 infrared remote control
2022-07-27 06:03:00 【an0420】
#STM32 - infrared remote control
Catalog
Working principle of infrared remote control
Basic knowledge of light

The nature of light : The essence of light is electromagnetic wave , Its propagation is essentially a particle vibration . In broad sense , Light refers to all electromagnetic spectra . In a narrow sense, light is an electromagnetic wave that human eyes can see , Also known as visible light ,.
The wavelength of light : It refers to the distance of wave propagation in a vibration period . The wavelength of light is determined by the frequency of light and the medium of propagation , When light passes through different media , The frequency does not change while the wavelength changes
The color of light : It is determined by its wavelength , Each color has its own wavelength , The visible light that people's eyes can see is arranged from long wavelength to short wavelength , Red... In turn 、 orange 、 yellow 、 green 、 green 、 blue 、 purple .
Visible light :
The entire electromagnetic spectrum of light includes radio waves 、 Infrared 、 UV and X Rays, etc . They have different wavelengths , Where the wavelength is 380~760 Between nanometers is general visible light . Red... In turn 、 orange 、 yellow 、 green 、 green 、 blue 、 purple . Light with shorter wavelength than violet light is called ultraviolet , Light with a wavelength longer than red light is called infrared .
Infrared :
It is an electromagnetic wave with a wavelength between microwave and visible light , The wavelength is 1mm To 760 nanometer (nm) Between , Non visible light longer than red light .
Above absolute zero (-273.15℃) All substances can produce infrared . Modern physics calls it thermal rays . We call the radiation beyond red light infrared ( Beyond violet light is ultraviolet ), Human eyes cannot see .
Infrared communication
Wireless remote control technology :
Also known as remote control technology , It refers to the realization of remote control over the controlled target , In industrial control 、 Aerospace 、 It is widely used in the field of household appliances .
infrared remote control :
It's a wireless 、 Non contact control technology , Have strong anti-interference ability , Reliable transmission of information , Low power consumption , The cost is low , It is easy to realize , It is widely used by many electronic devices, especially household appliances , And more and more applied to computer and mobile phone systems .
Infrared communication :
Is to transmit data through infrared . The transmitter sends an infrared signal , The receiver receives the signal and analyzes it . The transmitter matches the receiver . The emitter : remote control .
Infrared remote control :
The infrared remote control uses an infrared light-emitting diode , Infrared light is used as the carrier to transmit the key information to the device at the receiving end . Infrared light is invisible to human eyes , Therefore, the use of infrared remote control will not affect human vision ( You can turn on the mobile camera , Press... With the remote control towards the camera , You can see the infrared light emitted by the remote control ).
signal modulation :
There are many infrared light sources in the daily living environment , The sun 、 Candle fire 、 Incandescent lamp 、 Even our bodies . These infrared light sources may interfere with our receiving equipment , In order to shield interference , Receive only valid messages , We need to use modulation .
Through modulation, we can convert the specified digital signal into infrared light of a specific frequency for transmission , The modulation carrier frequency is usually in 30khz To 60khz Between , Most of them use 38kHz, Infrared light is transmitted at a fixed frequency , First, it is modulated and then transmitted .
Infrared receiver :

Infrared receiver is a kind of receiver that can receive infrared signals and independently complete the receiving, output and TTL Level signal compatible devices , The volume is similar to that of an ordinary plastic sealed triode , Suitable for all kinds of infrared remote control and infrared data transmission .
Signal demodulation :
Demodulation is to convert analog signals into digital signals . After the infrared receiver receives the infrared signal from the external transmitter , Will analyze the signal according to the fixed protocol , And convert it into digital signal output .
NEC protocol
NEC Characteristics of the agreement
8 Bit address code , 8 Bit command code
Complete transmission of address code and command code twice , To improve reliability -------- Send an address code , Send another address inversion , Whether the inverse code is equal to the source code .
Pulse length modulation
38KHz Carrier frequency
Bit time 1.12ms or 2.25ms, distinguish 0,1 The overall wavelength of .


First, the transmitter sends a series of waveform start codes , With 9ms Low level plus 4.5 High level of , Only after receiving the start code will the following be received 32 Bit data , Transmit if bit 560us Low level plus 560us High level is a logic 0, If 560us Low level plus 1690us High level is a logic 1,(Data Format :Address + ~(Address) + Command + ~(Command), If you keep pressing the key, a repeat code , Repeat the previous action .
Infrared circuit analysis

Altogether 3 Follow the line GND Grounding , One is a data cable PG8, A piece of VCC,IRDA For infrared receivers ,
Infrared example
The experiment purpose
Press the remote control button , The host receives the signal through the infrared receiver and decodes , Identify the command code of the key , Print out the corresponding key symbol
边栏推荐
- [MVC Architecture] MVC model
- [high concurrency] interviewer
- 【头歌】重生之我在py入门实训中(6):函数的定义与应用
- 【11】二进制编码:“手持两把锟斤拷,口中疾呼烫烫烫”?
- 2022.6.10 STM32MP157串口时钟的学习
- 【头歌】重生之我在py入门实训中(9):异常处理
- 李宏毅 2020 深度学习与人类语言处理 DLHLP-Coreference Resolution-p21
- 超强远程连接管理工具:Royal TSX
- 【5·20特辑】MatLAb之我在和你表白
- What has been updated in the Chinese version of XMIND mind map 2022 v12.0.3?
猜你喜欢

PS 2022 updated in June, what new functions have been added

Super remote connection management tool: Royal TSX

Digital image processing Chapter 5 - image restoration and reconstruction

ps 2022 六月更新,都新增了哪些功能

AE 3D particle system plug-in: Trapcode particle

Redis在windows下的idea连接不上问题

Digital image processing -- Chapter 9 morphological image processing

LaTeX中多个公式公用一个序号时

3. Classification problems - initial experience of handwritten digit recognition

10. Gradient, activation function and loss
随机推荐
【头歌】重生之机器学习-线性回归
leetcode系列(一):买卖股票
ps 2022 六月更新,都新增了哪些功能
Day14. Using interpretable machine learning method to distinguish intestinal tuberculosis and Crohn's disease
2. Simple regression problem
2.简单回归问题
李宏毅 2020 深度学习与人类语言处理 DLHLP-Coreference Resolution-p21
Dpdk network protocol stack VPP OVS DDoS Sdn nfv virtualization high performance expert Road
15. GPU acceleration, Minist test practice and visdom visualization
5. Indexing and slicing
AE 3D粒子系统插件:Trapcode Particular
Gbase 8C - SQL reference 6 SQL syntax (14)
【头歌】重生之我在py入门实训中(2):公式编程
谈谈为何需要将类的成员函数声明为private
维度问题以及等高线
malloc和new之间的不同-实战篇
Xmind 思维导图 2022 v12.0.3中文版更新了哪些内容?
数字图像处理——第六章 彩色图像处理
Gbase 8C - SQL reference 4 character set support
Numpy basic learning