Constant current dimming LED lamp based on AT32F421 master control
Update log
2022-12-12 First version, the physical object has been verified, except that the silk screen of the burning port is reversed (currently corrected), all other verifications have passed.
Product Description
Constant current dimming LED lamp based on AT32F421 master control uses AT32F421 32-bit microcontroller as the main control, with two RY3730 constant current LED driver chips and EEPROM AT24C02 on board for constant current dimming and parameter storage. The chip is relatively easy to buy, and the microcontroller only costs 3 yuan, which is lower in cost than similar products.
Program open source address
https://gitee.com/fhcloud/pwm_led
Principle structure
1. Main control AT32F421C8T7
2. EEPROM AT24C02, used to store brightness
3. Constant current driver RY3730
4. Microcontroller power supply: sy8089
The microcontroller controls the dimming and over-temperature protection of the LED lamp. At the same time, secondary development can be used to add other functions for easy use.
Manufacturing Instructions (Important!!!)
(1) PCB order:
PCB1 is the light board, PCB2 is the main control board, and both pieces need to be sampled and spliced at the same time
(2) Component order:
2.1 You need to prepare a certain length of wire to connect the light board and the main control board. The wiring method is LEDA to LEDA, LEDK to LEDK
2.2 For acrylic board, please refer to the attached DXF_Acrylic_2022-12-12.dxf for cutting
2.3 Copper column model M3*10, M3*5+6:
https://detail.tmall.com/item_o.htm?_u=c2dklb45be5a&id=19634185206&spm=a1z09.2.0.0.398a2e8dBviU5i
https://detail.tmall.com/item_o.htm?_u=c2dklb4515bc&id=41574313055&spm=a1z09.2.0.0.67002e8dv8EFfs
2.4 Screw M3*5 hexagon socket screw thin head:
https://detail.tmall.com/item_o.htm?_u=c2dklb45a89c&id=624811454452&spm=a1z09.2.0.0.398a2e8dBviU5i
2.5 LED lamp beads: 2835 package, the one I bought here is high color rendering, for reference only:
https://item.taobao.com/item.htm?spm=a1z09.2.0.0.67002e8dv8EFfs&id=679503650076&_u=c2dklb45de1a
2.6 Heat sink, slotted 14*14*6 black with blue stickers 10 pcs:
https://item.taobao.com/item.htm?spm=a1z09.2.0.0.67002e8dv8EFfs&id=646793338984&_u=c2dklb452693
2.6 Main control chip AT32F421C8T7, purchase link for reference:
https://item.taobao.com/item.htm?spm=a1z09.2.0.0.67002e8dv8EFfs&id=650291089430&_u=c2dklb45d48d
2.7 Test pin (for burning, spacing 2.54 for reference only):
https://item.taobao.com/item.htm?spm=a1z09.2.0.0.67002e8dv8EFfs&id=606828175951&_u=c2dklb4561e2
Program burning
first requires an ARM debugger or a serial port to USB burner. I use WCH-LINK here.
Debugger burning
Select the correct debugger in KEIL, then click the compile button above and click LOAD to burn it into the program (you can fly the wire to the pinhole of the SWD interface or buy the test pin given above). For
serial port burning
, you need to connect BOOT0 to VCC (as shown in the figure below), and then use AT official ISP tool to connect the serial port for burning. The program is template.hex. The burning tool is given below
.