Note: * is required.
[Please fill in during the registration stage↓]
* 1. Self/team introduction
A team of software engineers and electronic engineers.
* 2. Briefly introduce the project
A low-cost hot and cold light control module developed in response to market demand. The control methods include infrared remote control, touch buttons and offline voice control.
[Please fill in during the competition stage↓] * 1. Describe the project details. Modern home pursues a simple, convenient and practical lifestyle. Lamps are an essential appliance in any home room. Most of the existing lamp control methods are still in the key switch mode, which is not convenient enough, and the operation and wiring are cumbersome. So our team developed a low-cost multi-function lamp control module based on infrared remote control, offline voice and touch buttons. This module integrates functional hardware into a space within 9.13cm x 1.75cm, trying to simplify the design while maintaining perfect functions. The matching infrared remote control and CODE support customization, and are highly flexible for customization for different manufacturers and lamps.
1.1 Control board PCB (double panel)
* 2. Describe the challenges faced by the project and the problems solved
2.1 Challenge:
The design and production of the prototype (the design went relatively smoothly. There are many touch chips in the Lichuang mall, as well as infrared receivers. The main control chip is a low-cost 8-bit MCU (Shilan), and the PCB is produced directly to Lichuang for proofing, which is convenient. Fast, good reviews!)
Selection of low-cost solutions (the main costs occur in the touch IC, main control IC, infrared receiver, LDO, and MOS driver, which require weighing and selection)
Consideration of miniaturization (this is a challenge that tests the team AW, taking into account the clearance area of the touch button area, as well as the heat dissipation of the driver tube, the current carrying capacity of the traces, etc., all devices are finally integrated into a 9.13 x 1.75cm In the space, it is already relatively small and suitable for human hand operation (the diameter of the touch button is 10mm). The PWM drive part originally used discrete chip MOS. Finally, I found the composite MOS tube NCE2003 in Lichuang Mall, which has excellent performance and size. very good.)
Flexible customization considerations (decoding customization for different IR remote controls, function customization for different lamps, detailed customization for different functions (brightness, etc.))
Application Expansion This demonstration works for the brightness and mode control of lamps. This control panel should also be expanded to other home equipment or supplies, such as the control of automatic curtains. Peripheral modules should also be easy to combine. For example, the addition of Bluetooth WIFI module can realize online remote control.
2.2 Problems solved:
The first is the separation of the LED driving voltage and the main control circuit power supply voltage. An LDO-3.3V voltage stabilizing IC is used. Talking about design and performance without a stable power supply is a fool's errand.
< br> 2.2.1 Debugging of MOS tube drive circuit and control of Vgs.
(The driver is an upper channel + two lower channel control mode. Direct NMOS is sufficient for the lower channel. PMOS+NMOS is required for the upper channel (knowledge point)) The main thing is to consider the relationship between Vgs and Vgs_th to switch the circuit (3.3VPWM signal -》12V PWM drive voltage)
2.2.2 Use of composite MOS tubes.
At first, discrete components NMOS+PMOS were used, and later they were converted to composite MOS. The principle is the same, and the main thing is to set up the voltage dividing bias circuit.
Composite MOS (note that the D and S poles should not be connected in reverse, the S pole of PMOS needs to be connected to Vcc):
< br>
< br> 2.2.3 Capacitive touch debugging (refer to capacitive debugging, you mainly need to adjust C9 and R7 to control the sensitivity of the touch button. Now the sensitivity is higher and can be sensed 2mm away from the panel) Shenzhen is used here Opsun Technology’s 4-button 4-channel touch IC.
2.2.4 PWM signal considerations (frequency, duty cycle)
This mainly depends on the software settings. The frequency cannot be too low, otherwise the human eye will perceive flickering, which is not good for eye health. Because the main control IC used has an infrared signal emission port (REM), it can directly output a PWM with a fundamental frequency of 32kHz, which is much higher than the resolution of the human eye. The TX port is the input of the touch signal, IR_OUT is the signal input of the infrared receiver, and RX_U is the input of the speech recognition module.
< br> < br>
* 3. Describe the key points involved in the hardware and software parts of the project
3.1.1 Implementation of functions
Because lamps are also divided into grades, this project designs its control module based on warm and cold LED lamps. If it is a monochromatic lamp or a row of lamps, it can also be applied. In this regard, the functional design refers to the schematic diagram below.
< br> The 12V PWM drive uses a 32kHz signal (to ensure that the human eye cannot detect the flicker of the LED light), and the drive capability is enhanced through the MOS drive switch (the designed rated drive voltage is 12V, but 5V~24V can operate). The dual-channel MOS switch is designed to control the cold and warm dual-color LED circuits. It can be double-on, single-on, and switched. It is also driven by MOS tubes. (Current withstands up to 2A per channel) Three control methods: touch (integrated on PCB board), infrared remote control (customizable design of any remote control, high flexibility), voice control (mature low-cost offline on the market There are many voice modules, and internal programs can be flexibly customized through UART communication)
3.1.2 Hardware selection
Considering the power consumption and current of the lamp, it has important guiding significance for the development and design of the hardware and the selection of the device. The power of common LED lights on the market is 12~24W. This project uses 12V power supply, so its rated total current is 1A~2A. Considering that this circuit is a dual-channel control, the rated current of a single channel is 0.5~1A. Since 12V PWM is the total drive, it needs to be double that of a single channel, that is, 1A~2A. The design of PCB is to handle the line width according to the current value. The main thing is the selection of the drive MOS tube, which needs to be small and have the ability to pass rated current. Fortunately, there are many components in Lichuang Mall, so there is no problem at all. Just choose more.
3.1.3 Consideration of the adaptation of lamps and the flexibility of manufacturer customization
As for the lamps, there is no good choice for the moment, but they are all LED lamps, and the driving method is relatively simple, which is to use PWM to adjust the duty cycle for driving. The main thing here is to consider the drive design of a total of three channels, upper and lower. As for the choice of infrared remote control, it can be developed according to the specifications of the lighting manufacturer, which is not difficult. You can also use the default remote control of this project (under development) for customized development. The same applies to the offline voice module.
3.1.4 Offline speech recognition module
Hi-Link/Hailingke's < span class="colour" style="color:rgb(102, 102, 102)">HLK-V20 single module is used, and its communication method is serial communication/GPIO. < /span>
< br> 3.1.4 Software Considerations
Hardware design mainly considers driver and device selection. The main functions and performance are designed and controlled by software programs. There are several major points that must be considered:
1. Read and identify the signal output by the touch IC
According to the user manual, understand the composition of the touch IC output data, the start signal, the time length of DATA0, and DATA1. The touch IC output port outputs a high level when there is no action, and a low level when there is a signal output to send the start signal. The main IC sets P20 The port is set as a pull-up input, the falling edge interrupt is enabled, and is connected to the touch IC output port. When a signal comes in, P20 is pulled low and the data sent by the touch IC starts to be read.
2. Reading and identifying the output signal of the infrared receiver. The method of reading and identifying the infrared signal is similar to that of the touch IC. The output port of the infrared receiver outputs a high level when there is no action, and a low level when there is a signal output. The main IC Set the P21 port as a pull-up input, enable the falling edge interrupt, and connect it to the infrared receiver output port. When a signal comes in, P21 is pulled low and starts reading the data from the infrared receiver. Due to limited space, the actual test distance can be effectively controlled as far as 27m.
< br> 3. Input and reading of voice signals
When the voice chip recognizes a valid command, the data is transmitted to the main IC through UART (Uart: 9600bps). The TX output port of the voice module outputs a high level when there is no action, and a low level when there is a signal output to send a start signal. The main IC sets P00 The port is set as a pull-up input, the falling edge interrupt is enabled, and is connected to the TX output port of the voice module. When a signal comes in, P00 is pulled low and the data sent by the voice module starts to be read.
< br> 4. Output of PWM signal (drive signal)
The PWM currently developed is only for demonstration, and can also be optimized for stepless dimming, and the product will be more high-end.
4. Implementation of functions (switching, dimming (PWM), mode control)
(1) To turn on and off the desk lamp, touch the IC power key (0xA0) and the infrared remote control power key (0x18). When the main IC receives the (0xA0/0x18) command for the first time, turn on the desk lamp and receive the (0xA0/0x18) command again. Turn off the desk lamp when instructed, and so on. The main IC turns on the desk lamp when it receives the (0x15) command from the voice module for the first time, and turns off the desk lamp when it receives the (0x16) command.
(2) PWM output is realized through the PWM module inside the main IC, and the duty cycle output is set through the register. Currently, the four duty cycles are set to 1/2, 1/3, 1/4, and 1/5Duty. Main IC When receiving the dimming +/- command, changing the register setting value can change the duty cycle to achieve the purpose of dimming. The default duty cycle is 1/3Duty.
(3) Cold light and warm light mode settings. When the main chip receives the command to turn on the cold light, it turns off the warm light. When it receives the command to turn on the warm light, it turns off the cold light. The default is to turn on the cold and warm lights at the same time.
< br>
* 4. Project material list display (the following capacitor and resistor packages are all 1005 (0402))
< br> < br> * 5. Upload project pictures
5.1. If the contest logo is not printed on the PCB, it will be deemed as giving up the participation.
5.2. Other pictures of the project nameplate + PCB = module product
Demonstration of switching between warm and cold lights (see demonstration video for details)
Form a desk lamp (see the video demonstration for details. Since I only have a single-color white light desk lamp on hand, I cannot demonstrate the switching between warm and cold light. Please forgive me)
* 6. Demonstrate your project and record it as a video for upload. 6.1. Official website of the video upload competition (uploaded)
< br> 6.2. Video title and link of Station B
JLC's 5th #Multifunctional Dimming_Main Control Board Demonstration https://www.bilibili.com/video/BV1dz4y1o7NT/ < br> < br>
JLC's 5th #Multi-function Dimming_Desk Lamp Control Demonstration https://www.bilibili.com/video/BV1ST4y1w7oU/ < br> < br> < br>
The 5th Lichuang Electronic Design Competition: "Multifunctional Dimming Module (Control Mode: Voice Infrared Touch)" Project Function Demonstration & Performance Test https://www.bilibili.com/video/BV1pK4y1a7Up/ < br> < br> < br>
< br> Notes:
①: Video requirements: Please shoot horizontally, the resolution is no less than 1280×720, the format is Mp4/Mov, and the size of a single video is limited to 100M;
②: Video upload: Please upload to the official website of the competition and Station B ( www.bilibili.com ) simultaneously. The top 10 most popular projects at Station B will receive 1,000-5,000 yuan in cash rewards, and other uploaded projects will receive 100 yuan Lichuang Mall no-threshold coupons;
③: Video title: The 5th Lichuang Electronic Design Competition: {Project Name}-{Video Module Name}; For example, the 5th Lichuang Electronic Design Competition: "Autonomous Driving" Project - Team Introduction. < /span>< /span>< br> < br>
< br> * 7. Whether it is released to the public for the first time
First public release.
7.1. If the project has been published or won an award before, please explain. 7.2. If the project is optimized on the original basis, please explain the optimization part.
8. Open source documents 9. References
< br> Click the link for more details: https://www.szlcsc.com/go/dsxq
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet