In this post, I detail several critical corrections and improvements for the LM5101-based converter schematic and Proteus simulation. From swapped pins and regulator issues to MCU wiring and sensing circuits, these fixes ensure proper operation in real hardware and accurate simulation results.
1. LM5101 HO and HS are swapped (U2 pins 3 and 4).
Corrected Wiring
2. Q9, the 12 V regulator, has its base grounded
- Q9 is a BC846B emitter follower with its base tied straight to GND. R27 only bleeds the input rail to ground, and there is no ~12 V zener.
- As drawn it can't produce 12 V. It probably only works in Proteus because the "+12V" power terminal is an ideal source, so real hardware would have no gate-drive rail.
- Fix: bias the base from the input rail through R27 and add a 12–13 V zener from base to GND.
Corrected Wiring
- Label the MCU terminals "+3.3V" so they join the buck output. As it stands, Proteus runs the MCU from its default VCC rail instead of the 3.3 V buck.
- IN+ is on the battery side of R10 and IN− is on the inductor side. Charging current therefore pulls the output below REF.
main.cexpects positive output for charging current. Swap R11 and R12, or invert the sign in firmware.
Solution: I updated it in firmware.
5. The comparator output goes to PB14, not PB12
TIM1_BKIN is only on PB12, so the hardware break never fires.
6. There is no NTC circuit, and PA5 is floating
- Firmware turns a low or zero ADC reading into 130 °C.
- After the first second that triggers a permanent over-temperature fault, and the converter never starts.
- Add RT1 and R41 with C39 on PA5, (or disable the over-temperature check for now).
Smaller issues
- Reset button: it is in series with C4 (button → C4 → GND), so there is no direct path to ground. The first press gives a short pulse and later presses do nothing. Wire the button from NRST to GND with C4 across NRST and GND.
- Fuse: its netlist value is
1A, and the symbol has no label. Set it to 25 A.
- Q1 gate: it is fed through D2 from LO with no gate-source resistor. It stays charged after the converter stops, so add about 1 MΩ.
- Status LED: now active high with a
LED_ACTIVE_HIGHswitch. PC13 on the F103 should only source about 3 mA, so use a 680 Ω–1 kΩ resistor for R3 instead of 330 Ω.
- VDDA: the reference filters it with 47 Ω and 2.2 µF. You tie it directly to 3.3 V with 100 nF and 1 µF. Adding the 47 Ω improves ADC noise.
This post provides a detailed review of corrections and improvements for an LM5101-based converter schematic and its Proteus simulation. Key fixes include swapping HO and HS pins, properly biasing the 12 V regulator, connecting the MCU to the correct 3.3 V rail, correcting inductor-current sensor inputs, updating comparator connections, and implementing an NTC temperature circuit. Additional minor adjustments cover the reset button wiring, fuse labeling, Q1 gate resistor, and LED resistor value. These changes ensure accurate simulation behavior and reliable real-world operation.
Related blog posts:
- STM32 MPPT Solar Controller Design: Power Supply & DC/DC Converter
- STM32 MPPT Solar Controller Design: Current Sense Amplifier (INA186 )
- STM32 MPPT Controller: Reverse Polarity Protection & Voltage Measurements
1 min read


















