- Home >> Solution >> Appliances >> convenient tools
Remote control solution
The remote control is a very common remote control device in our life, and has a wide range of applications. Although this technology application utilizing infrared remote control is extremely mature, there are still obvious shortcomings in use. Applying the advantages of Bluetooth device technology to the design of the remote control system can effectively improve the defects of the original remote control.
1. Design scheme of bluetooth remote control system
The main components of the Bluetooth remote control system include a Bluetooth module, an MCU stand-alone chip, an operating keyboard, and a speaker. The composition of these components makes the remote control a basic remote control device. In terms of function, when the key of the operation keyboard is pressed, the value of the pressed key will be encoded by the system, and the ASICC code formed under the action of the Bluetooth module will be sent in the form of this code. When the connection between the Bluetooth module and the system is established, the corresponding receiver can send a sound signal to the remote control, and then the speakers of the components in the remote control will emit sound, which can be used to confirm the position of the remote control. Since a connection needs to be established first during the Bluetooth communication, it is necessary to consider the connection interruption that occurs in the middle. When the Bluetooth communication fails, the operating system will automatically restart the Bluetooth module, and re-establish the connection, and then continue the communication again.
2. The development process of the remote control system based on Bluetooth technology
2.1 Hardware design of Bluetooth remote control
The hardware composed of the Bluetooth remote control mainly has the following 8 aspects:
① Microcontroller of the remote control (MCU stand-alone chip): The microcontroller is the main control part of the remote control component. It is connected to the keyboard to detect the operating status of the keyboard and implement the key value of the keyboard. encoding function. Connect it to the Bluetooth module in the form of a UART serial port, so that it can realize the communication state with the Bluetooth module, so that the Bluetooth connection can be realized, so as to output and read the corresponding functions of data. Connect it to the power amplifier module in the construction of the remote control, and the power amplifier module can be switched on and off.
②Bluetooth module of the remote control: BK8002 bluetooth module is generally selected, and the connection between it and the MCU stand-alone chip is realized through UART, which has the function of receiving instructions, and can send and receive data information through bluetooth. At the same time, it is also necessary to connect the audio cable to the power amplifier to ensure that the speaker can output.
③The power amplifier module of the remote control: connect the audio cable to the module, which can amplify the audio signal and output the amplified signal through the speaker. Of course, we must pay attention to the volume of the output can not be too loud, otherwise it will cause overheating of amplifier.
④Speaker of the remote control: Its main function is to play audio.
⑤ Keyboard of the remote control: it can realize the reception of user input information.
⑥ On/off key of the remote control: When this key is pressed, the remote control system starts to supply power, and at the same time, the signal can be provided to the MCU single-chip microcomputer.
⑦The buzzer of the remote control: mainly used to send out the reminder signal. ⑧The power supply of the remote control: Lithium battery is generally used for power supply, and it is used together with the voltage conversion chip to provide 3.3 volts for the MCU microcontroller and 5 volts for the Bluetooth module. The conduction is realized through the common control of the MCU single-chip microcomputer and the switch key.
2.2 Software Design of Bluetooth Remote Controller
The main program flow of the remote control based on Bluetooth technology mainly includes the following 8 aspects:
① The switch function of the remote control, when this button is pressed, the MCU single-chip microcomputer will get power supply, and at the same time receive the signal from the switch button in the keyboard, when the system detects that the button has been pressed for 2 seconds, the power-on signal will be sent out, At this time, the remote control is powered, which means it has been turned on.
②The bluetooth handshake function of the remote control, when the bluetooth module in the remote control is powered, its indication signal is ON, when the system detects this signal, the receiver pairing operation command will be executed, otherwise the bluetooth reboot. After the pairing is successful, the bluetooth module powers up and spits out the signal indication of II. Once detected, the password is sent, and the system enters the mode of data transmission, otherwise it will continue to wait for the bluetooth connection.
③The button scanning function of the remote control, this function can scan the keyboard, when the code of the key value is detected, it will enter the code sending mode.
④The key value sending function of the remote control, when the key is in the non-volume control state, the key code value is transmitted to the Bluetooth module through UART in the format of AT+ code value, and the transmission baud rate is 9600. When the transmission is successful, the indication of the bluetooth module is OK.
⑤ The volume control function of the remote control, through the control of the volume control keys, sends volume control instructions to the Bluetooth module. If the instruction is sent successfully, the indication signal displayed by the Bluetooth module is successful. If the instruction is not sent successfully after repeated times, the Bluetooth module will automatically restart. In order to avoid overheating of the power amplifier, the volume should be limited by setting the maximum value.
⑥ The function of receiving audio signals of the remote control, the functions of sending data and receiving audio in the Bluetooth module are independent of each other, so after the MCU single-chip microcomputer amplifies the power module, the receiver can directly send the audio signal .
⑦The warning and sleep function of the remote control, if there is a long-term disconnection situation during the Bluetooth handshake, the buzzer of the MCU will receive the control and make a sound to prompt. After the connection is established, if the keyboard is in a state of inactivity for a long time, the MCU will enter sleep mode, and the Bluetooth module will be automatically turned off, and will not recover until the key is pressed again.
⑧The automatic restart function of the disconnection of the remote control. When the established Bluetooth connection is disconnected, the MCU will control the Bluetooth module to restart.
3. The development idea of remote control based on single-chip microcomputer technology
With the development of the times, our requirements for life are getting higher and higher. Various remote controls have quietly entered our home and work. However, the traditional remote control is simple to make and has a single function, which is subject to certain restrictions in application. The design of the remote controller in this paper combines the advantages of the previous remote controllers and optimizes the shortcomings of the previous ones, and adds new elements to make our remote controllers more advanced. We use single-chip microcomputer for remote control design, and use the characteristics of single-chip microcomputer to make one remote control control all electrical appliances and achieve the effect of one device with multiple functions. This research has made our lives more and more intelligent, saved the number of remote controls in our lives, and helped us set a new milestone in the development of our technology.
The full name of the single-chip microcomputer is a single-chip microcomputer, which integrates random access memory, read-only memory, central microprocessor, interface circuit and other components on a chip to form a microcomputer. The universal remote control is actually required to increase the capacity of our memory. When encoding, put the codes of all electrical appliances into it. When using the remote control, we look for different codes according to different electrical appliances, so as to control the functions of the electrical appliances.
Since the wireless waves generated by the previous wireless communication technology will cause certain interference to other wireless communication devices, it cannot be used in large quantities, and it is difficult to realize multiple functions of one device. Therefore, the remote control relies on infrared communication on the basis of using a single-chip microcomputer. Infrared communication not only does not generate signal mutual interference, but also has a fast release speed. It utilizes the transmission of infrared rays in the air, and the remote controller is responsible for transmitting and electrical appliances are responsible for receiving. When transmitting, the sending signal of our selected function is coded and enters the circuit to emit through the infrared light-emitting diode. When the electrical appliance receives this infrared signal, it will be restored to the original signal through the circuit to control the electrical appliance.
4. Design method of remote control based on single chip microcomputer
4.1 The overall structure of the microcontroller remote control
First, we template the structure of the single-chip remote control, and then connect each template together. The remote controller mainly includes a receiving and sending module, a single-chip microcomputer, a button module, a power supply module, and a circuit control module. These modules constitute our remote control. We are designing these modules separately, and finally designing the overall appearance to form our remote control.
4.2 Single chip microcomputer selection design
When we choose a single-chip microcomputer, there are many single-chip microcomputers to choose from. Through repeated selection, we choose the single-chip microcomputer AT89S52. This single-chip microcomputer is a low-power, high-performance microcontroller with 8KB in-system programmable Flash memory. Its internal data memory has 258Byte Extended external RAM), which can be used as the internal cache of the CPU for normal work and the pulse width and encoding scratchpad of the infrared command during the learning process. The basis of the hardware circuit is the minimum system of AT89S52, and all other circuits are expanded on this basis. This high-performance microcontroller is widely used in the control industry. The single chip microcomputer is connected with each module circuit port.
4.3 Design of remote control sending module
When transmitting infrared rays, we use infrared light-emitting diode PH303 to transmit infrared signals. When we press the function key, the single-chip microcomputer finds the corresponding code and starts to pass through the circuit. When the current passes through the diode, the infrared light-emitting diode emits infrared rays. Since the infrared ray has the characteristics of a strong emission signal at a small distance, we need to enhance the signal strength of the infrared ray to prevent the phenomenon that the distance is difficult to control. We can use a pulse signal with a small output duty ratio to enhance the intensity of the infrared signal. The methods for outputting a small duty ratio are generally two methods: designing a pulse circuit and using software to control a single-chip microcomputer.
We use the method of using software when designing the remote controller of the single-chip microcomputer. When the remote controller outputs a high level, the timing time is determined by the number of instructions and the instruction cycle, but the instruction cycle is certain, so we should control the instruction number. Therefore, we can see that the duty cycle can be controlled by timing, so that we output a pulse signal with a duty cycle as small as possible. That is to say, we can control the strength of the signal emitted by infrared rays by using the number of software control instructions.
4.4 Receiver module design
For infrared reception, we choose the receiving head SM0038. The working principle of this receiving head is that when it receives a 38KHZ infrared signal, it will convert this optical signal into an electrical signal, which will be amplified by the circuit, and then the output stage will The circuit performs reverse amplification output. Its advantages are high performance and low price, and it is widely used in other fields.
4.5 Remote control button module design
When designing the keyboard, we generally use a matrix keyboard to form a row and column structure to arrange the keys on the AC, and then connect each key to the line. The order of the buttons is also related to our use. When arranging the buttons, we should put the buttons with closely related functions together, and separate the ones that are not related. Such a design is convenient for us to master the usage method of our remote control as soon as possible when using the remote control. We should also set the button to select the electrical appliance to select the electrical appliance we control.
The basic principle is that when the button is pressed, it is low level, and when no button is pressed, it is high level. Different keys represent different functions, which are different signals when receiving, and then different signals are different codes. And there are switches under different buttons, which use the opening and breaking of mechanical contacts. In the process of closing and opening, a voltage is generated through the mechanical contact, but the mechanical contact is elastic, and it will vibrate when it is opened and closed, which will cause the circuit to be unstable. We must eliminate this kind of button vibration, we choose to use the method of adding a bistable circuit.
4.6 Remote control power supply module design
We usually choose 5V dry battery as the power supply of the remote control. First of all, the purchase channels of batteries are more convenient, and they are sold in various supermarkets. Secondly, the dry battery is convenient to use. Compared with the charging remote control, it saves raw materials. Such a battery does not need to consider its service life, and there is no need to introduce the principle of rechargeable batteries.
Summarize
To sum up, this paper restores the implementation process of the Bluetooth remote control through the introduction of the Bluetooth modular design. It is found that compared with the infrared remote control, its communication accuracy is almost the same. It can be corrected to maintain normal communication when the connection is interrupted. The receiving distance is long and the receiving device can be not aligned to complete the long-distance control task, so the Bluetooth remote control is more stable.
In addition, the remote control of single-chip microcomputer is more and more important in our life, we need such a convenient and quick tool to make our life more convenient. Now the intelligentization of our homes and industries is not high enough, the years when each electrical appliance can only be controlled by the corresponding remote control will soon pass, and the new era of multi-purpose appliances has quietly arrived. This article takes the design of single-chip remote control as the main content, introduces the basic principles and design process of some single-chip remote controls, and solves the problem of incompatibility between remote controls of different electrical appliances. With the further development of technology, our smart remote control will become more and more convenient, and more functions will be introduced. The smart remote control not only makes our electrical control more convenient, but also facilitates our research on remote monitoring in the future.
The above are the details of the remote control solution introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have electronic function development needs for smart remotes, you can trust us. We have rich experience in customized development of electronic products, and can evaluate the development cycle and IC price as soon as possible, and can also calculate PCBA quotations. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, Bluetooth IC and module, wifi module. Our development capabilities cover PCB design, single-chip microcomputer development, Bluetooth technology development, software customization development, APP customization development, WeChat official account development and other hardware and software design. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
- TOP