* 1. Introduction to project functions
The USB adjustable power supply (Bluetooth adjustment)

shell has been drawn, but it has not been made yet and needs to be modified. The shell in the project cannot be used temporarily.
Current detection cannot be used in the old version (V0.0), and the new version (V0.1) has not been verified yet, but the adjustable power supply function is still available
with PD, QC fast charging request.
The maximum request voltage is 15V, and the default request voltage is 12V (my own charger can only reach a maximum of 12V1.5A, and the 15V request cannot be measured)
·VINMAX: 15V
·VOUTMIN: 1V
·VOUTMAX: VIN-2V
Output ripple:
·1V~10V no-load: The oscilloscope is too weak, it can't be measured, a straight line
·1V0.25A: It can't be measured, a straight line
·4.0V1A: 30mV

·8.5V2A: 50mV

·3V3A: 30mV

5V3A: 35mV

load is a nickel-chromium heating wire

temperature: The temperature on the board was not measured, and the heat was a bit high. The main heat source was the diode. The inductor and the driver chip can be touched at 3A current, but the diode is hot to the touch after one or two seconds (without a shell)
. The new version will improve the heat dissipation.
The old version (V0.0 version) is the first board, and it was also V0.0 version during the test. There is a problem with the current detection of V0.0 version.
The specific problem is: the input voltage does not meet the common-mode input voltage of the adc chip under the condition of 64,128 times gain.
Solution: Add pre-amplification, do not use the 64,128 times gain mode of the adc chip, and only use the 1,2 times gain mode. The common mode input voltage is AGND-0.1V~AVDD+0.1V at 1,2 times gain.
The new version has been drawn, but it has not been tested and verified yet.
*2. The project attributes
are made public for the first time, original
* 3. Open source agreement
GPL3.0
*4. The hardware part
is stacked, divided into upper board (power board) and lower board (control board)
Lower board (control board):
The +3.3V that powers the MCU (N32G430) is input by the fast charge request, given to the first-level DCDC, and the output is about +4.9V, and then stabilized to +3.3V by LDO.
In the request voltage control line, CFG3 is pulled up by hardware and cannot be changed, so only 5V, 12V and 15V can be requested.
Why locked:
·Because the VINMAX of the DCDC on the power board is 16V!


Bluetooth:
The serial Bluetooth module HC-04 from Huicheng is used. The hardware is directly connected to the UART3 of the MCU through a 4PIN fpc socket.

Debugging and reset:

Both the debugging interface and the Bluetooth interface are 4PIN 0.5mm fpc connectors, which need to be connected to debuggers such as stlink through an fpc adapter board. The same is true for Bluetooth
. This project does not include a Bluetooth board, so the Bluetooth tested is directly soldered on the fpc and then glued as a whole. The flying wire solder joints are painted with green oil.
Upper board (power board):
DCDC:
The power is input to DCDC from the typec interface requested by the fast charge, VINMAX is 15V, and the DCDC chip is TI's TPS54620.

Voltage regulation:
The voltage drop on R14 is adjusted by a constant current source to achieve the purpose of voltage regulation. The input signal is a PWM, which is divided by 1/4 after 3rd-order filtering and given to the positive input of another op amp channel, which determines the voltage drop on R14.

Voltage and current detection:
Voltage and current detection consists of a reference voltage, a fixed 50x gain amplifier and two 24-bit ADCs.

The connection between the upper and lower boards: The lower control board and the upper power board are connected by an 8P fpc cable, one GND, one +3.3V, +5V optional, 6 signal lines, including voltage regulation, DCDC enable, and 4 communication lines with the ADC chip

*5. Software part
· Code will be released after the new version is tested
· Host computer
The host computer software has been uploaded to the attachment .
After installation, select the Bluetooth to be connected in the upper left Bluetooth list

*6. BOM list
*7. Competition LOGO verification

*8. Demonstrate your project and record it into a video and upload it.
In the video, because you need to record a video, but you can't open the Bluetooth software for recording, so you only upload data on the computer for control. In fact, Bluetooth can be used.
Constant current and constant voltage have not been done yet. Wait for the new version. The code will be improved at that time and the code will be released at that time.
After the subsequent new version is completed, the host computer will be adjusted accordingly