1. Introduction to project functions
Use the current mainstream PD protocol to achieve high-power portable lighting applications, making outdoor lighting convenient and fast.
2. Project attributes
are disclosed for the first time, original project.
3. Open source protocol
GPL3.0
4. Hardware part
Overview of the motherboard power supply: The total power supply is 20V3.25A lured by USB using HUSB238, corresponding to the schematic diagram VBUS, and then divided into two paths, one DCDC step-down to about 13.2V to provide power to the fan and LED part, and one DCDC step-down to 5V to power the MCU part (can be replaced by LDO); Be careful not to connect D+ and D-
in the PD deception circuit
, otherwise the pd protocol will not be spoofed to 20V.
CC1 and CC2 are best to be differentially distributed, otherwise it may cause the positive and negative insertion to only be able to be spoofed on one side.
The 5V power supply circuit
requires other voltages, which are described in the official specification. The actual output voltage
of the 12V power supply circuit
is set at 13.2V, otherwise the LED will not run full power.
The LED constant current control circuit
uses two LED2000PURs to drive them separately. If necessary, each LED can be controlled separately. You can also use the constant current mode of the 12V power supply and use nmos to achieve dimming, thereby simplifying the circuit. LED2000PUR is used here as a surplus from the previous project.
The MCU main control circuit
cannot change the pins at will. Some pins are specified, such as ADC and PWM. Please refer to the MCU specification for details.
The VBUS voltage detection is divided by two resistors in series and then read and calculated by the ADC of the MCU;
the precautions for the use of the serial debugging interface are that there are no precautions. A Schottky diode is connected in series with the power supply, which is reversed. There is no need to worry about the 20V typec being inserted;
the burning method: press and hold the boot button and press the reset button again. Do not release the boot button until the burning is completed.
Notes on welding and assembly:
The cooling fan needs to remove three fixing screws and rotate the position to hide the fan wire inside.
The inductor has a high temperature and needs a thermal pad underneath.
5.
The complete code of the software part is in the attached compressed package.
The attached hex file can be directly burned using the official burning software Renesas Flash Programmer.
6. BOM list.
In addition to this table, there are also heat sinks purchased from tb for more than 80 yuan, and two XHP70.2 lamp beads purchased from Digi-Key for more than 70 yuan each.
7. Competition LOGO verification
8. Function demonstration video
https://www.bilibili.com/video/BV11m4y1L7Ej/?share_source=copy_web&vd_source=8c94a8635229b03ef7150226cb268e17