念慈菴

Touch desk lamp design based on ESP-07

 
Overview

Touch desk lamp design based on ESP-07

1. Topic requirements

image.png

2. Function description

1. Four touch buttons are designed on the PCB to control the two LEDs (RGB) on the right side of the PCB.

  • The M key is the key to switch the light color temperature mode, adjusting between cold color light and warm color light.
  • ON/OFF is the light switch key.
  • + is the light brightness increase key, short press to adjust the light brightness gradient, and long press to adjust the light brightness steplessly.
  • -For the light brightness reduction button, short press the gradient to adjust the light brightness, and long press the stepless to adjust the light brightness.

2. It can be connected to the Internet to control lights, and it can also be connected to IoT platforms such as Mijia to control lights through voice assistants.

3. USB port power supply, program burning can also be performed through the USB port, and supports Arduino programming.

3. Design features

1. The two LED lamp beads on the board simulate desk lamp lamp beads, which is simple and intuitive to verify the LED lighting and dimming functions.

2. Reset button for debugging.

3. Use Type-c interface, which is common with most mobile phone data cables today, making it easy to find wires.

4. The touch chip configuration IO is configured with a 0Ω resistor, which is used to select the touch chip working mode to facilitate the realization of more button functions.

5. Onboard USB to serial port and automatic download circuit, directly use the USB interface to download the program with one click, and can be programmed using Arduino.

6. Completely simulate all the functions of the actual desk lamp required. After successful verification, you only need to redesign the PCB shape according to the required shell.

7. The PCB area (width 5.72cm and length 6.65cm) is within the 10cm*10cm limit of Jialichuang's proofing, and the board production cost is extremely low.

4. Component selection

1. The main control uses Essence’s ESP-07s module as the main control. It comes with a high-sensitivity ceramic antenna and the signal strength meets the needs. 32-bit MCU, performance meets demand. Supports WIFI and can be controlled via the Internet to meet the functional requirements of smart home desk lamps. At the same time, the price is also within an acceptable range.

2. Use WCH's CH340 to convert USB to serial port. The commonly used USB to serial port chip has a lot of information for reference in addition to official documents.

3. LDO uses KEXIN’s AMS1117-3.3 chip, which can stably output the 3.3V voltage required by the main control under low voltage difference, and is cheap at the same time.

4. The touch chip uses SHUODING 's SD8223LC chip, which has a self-calibration function and  is suitable for situations with various interferences. The sensitivity of the touch chip will not be interfered by interference sources and change in self-calibration, and the consistency is relatively strong. It also has a maximum on time function, and we chose the LC version with a maximum on time of 10 seconds, because when using the desk lamp, there is no need to press and hold it for a long time, which prevents the system from being triggered all the time, causing unpredictable events. As a result, this IC was adopted.

5. The USB interface uses a Type-c interface, supports reversible insertion, is easy to use, and is compatible with most current mobile phone data cables, making it easy to find wires.

6. Using WS2812 lamp beads, it is programmable and takes up less IO, and if you use Arduino programming, there are a large number of libraries that can be easily called.

5. Layout and routing design

1. The ESP-07s is placed according to official requirements, extending the PCB antenna area outside the base plate frame to pursue optimal signal performance. (Similar to the placement of ② in the picture)

image.pngimage.png

2. The USB D+D- pins of CH340 are at the same level as the corresponding pins of the USB socket, so as to minimize the corners of the differential lines.

image.png

3. The touch area is placed at the bottom of the PCB, away from the original parts to prevent interference, and is ground protected in accordance with the design document.

image.pngimage.png

4. The back of the touch area is not covered with copper to prevent false triggering.

image.png

4. The entire PCB is also processed with arc wiring corners, which is more reasonable and more beautiful (except for a small number of short and multi-corner lines).

image.png

5. The GND pin of the LDO is surrounded by vias.

image.png

6. Use silk screen to mark the original part number and resistance and resistance parameters at the same time, which is more intuitive and convenient for manual welding.

image.png

7. Each lamp bead uses a 0.1UF capacitor for filtering to protect the lamp bead. The filtering of other components is also laid out and routed according to the document requirements.

image.png

6. Design experience

Through the design of this assessment question, I learned the importance of layout. Wiring is performed on the basis of layout. As the saying goes: "Layout and wiring. Layout and wiring, first layout and then wiring." I also learned that in the process of power supply wiring , the placement and wiring principles of filter capacitors, first analyze the power flow direction and branch situation, and then conduct reasonable layout and wiring to achieve the required effect. At this point, the first version of the design of this project has been completed, and the order for printed PCB has been placed. Subsequent modifications and improvements to this project will be made based on the test results after the PCB welding is completed, and physical pictures and demonstration videos will be uploaded in a timely manner.

7. Welding process and physical demonstration

Hang up my other projects in the back! !

ESP-01S lithium battery powered WIFI Killer

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-15 02:19:06

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

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号