There are quite a few problems, the typec data cable is connected incorrectly, the LDO efficiency is low, the temperature is high, etc.
Corrected the wiring of the typc plywood, switched to dcdc, and added ripple detection. I don’t know how others made the finished product. The amplification circuit I built with an op amp is at a playful level.
In order to achieve the black color of JLC, the two-layer boards cannot be routed through each other, so a two-layer double-panel combination is used to connect the upper and lower boards in a manner similar to stamp holes.
Schematic diagram of the connection between the upper and lower boards:
The cover is the same as before, with two typec packages modified. Used a short female seat
In order to make the op amp work stably, you can appropriately modify the DCDC feedback resistor to make the voltage a little higher than 3.3, but not exceed the rated voltage of the microcontroller. Let LDO eliminate the DCDC ripple. It doesn't matter if you don't change it. The ripple will be Have a rough look
Press key1 to switch the menu. Double-click key1 under each branch menu to change the time gear. Double-click key1 under the main menu to change the current to 0 and eliminate static errors.
Press key2 in any menu to reverse the screen
The interface is as follows:
The large characters on the left side of the main interface display voltage, current, and power, and the small characters on the right display D+D-voltage, microcontroller core temperature, power meter working time, charging energy (mWh), and current direction.
Voltage and current waveform display: The vertical gear changes automatically (it seems that there is a problem with the logic of direct judgment and change, and it will jump back and forth near the threshold). The horizontal time can be adjusted by double-clicking the button. The boy on the right displays the time corresponding to each grid of the waveform diagram. voltage, current, and voltage current power
d+d-waveform display, there is nothing to change the vertical gear, just 0-3.3, and the horizontal gear can be adjusted (this picture is the waveform captured after connecting to stlink. The communication is too fast, and the captured waveform is messy. In reality Charging jump can be seen)
Ripple display and fast Fourier transform spectrum display
Automatically change the vertical gear, stably display 7/10 screens, the horizontal sampling rate can be changed, the highest sampling rate is 2MHZ, and the display ripple within 1M can be achieved