A USB voltage and current meter based on STM32 can easily see whether the charger is working in fast charging mode, and can also easily test the power consumption of USB devices or the output power of USB chargers.
v1.1 - 2020/4/15
Based on STM32F030K6, the code is written using HAL library and GCC compiler
0.91-inch white OLED display with clear display effect
Use low resistance sampling resistor (5mΩ) to prevent excessive internal resistance from affecting USB power supply efficiency
Supports a wide voltage range of 4.7~24V and current measurement of 0~5A
Can measure Vbus, D+, D- voltage, Vbus current. Support power display and energy calculation
Optional use of internal voltage reference source (Vref) or external voltage reference source (AZ431)
Software calibration function can ensure a certain accuracy after calibration.
Completely open source, you can add functions by yourself
This USB voltage and ammeter is designed with a software calibration function that can compensate for hardware deviations. When powering on, press and hold the button until "Prepare to calibrate~~~~" appears on the screen, then release the button to enter the calibration mode. Please follow the screen prompts to provide standard voltage and current to complete the calibration.
The code is a trueStudio project generated through STM32CubeMX. It is recommended to use trueStudio 9.3.0 to import and use.
There are two types of USB female sockets, one with the internal contacts facing down (facing the pad) and the other with the internal contacts facing up (back to the pad). These two female sockets can use the same PCB package. If you have used a USB female socket with lower contacts, the female socket should be welded to the front of the board, otherwise it should be welded to the back of the board. The example picture uses a USB female socket with lower contacts, and the female socket with upper contacts is designed in the schematic diagram and PCB. Please pay attention to this when making.
Recommended mother seat:
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet