MPPT Solar Charge Controller & INA186 Design Summary
Hardware Design & Simulation Engineering Document
1. Project Overview
This document provides a comprehensive technical overview of the open-source Maximum Power Point Tracking (MPPT) Solar Charge Controller. The hardware platform is designed to optimize photovoltaic (PV) power extraction and manage battery charging efficiency under dynamic solar irradiance levels.
The first part STM32 MPPT Solar Controller Design: Power Supply & DC/DC Converter covers the power supply circuit connected to the PVA panel port, the DC-to-DC converter stage and battery connection port.
The complete development stack is implemented within the Proteus Design Suite, utilizing:
Schematic Capture: Circuit design, nets declaration, and parameter mapping.
ARES PCB Layout: High-current trace routing, ground plane isolation, and layer stackup configuration.
VSM Studio: Integrated SPICE co-simulation and firmware verification environment.
2. Key System Architecture & Components
The system architecture integrates a dedicated 32-bit controller, synchronous half-bridge power stage, robust protection circuitry, and precision current monitoring.
Current Sensing Circuit Architecture & Low-Noise Signal Conditioning
The exact signal chain from the shunt resistor to the microcontroller is structured as follows:
Shunt Sense Stage (R10 - 2 mΩ): The output charging current passes through the 2 milliohm (2 mΩ) low-side/high-side current sense resistor (R10) placed in series with the output rail (before the output filter capacitors C15–C18 and battery terminal J2), generating a small differential voltage proportional to load/charging current ($V_{\text{sense}} = I \times 2\text{ m}\Omega$).
Input Differential RC Low-Pass Filter (R11, R12, C19): The differential voltage across R10 is routed via Kelvin connections through two 10 Ω series input filter resistors (R11 on the non-inverting input pin 4 / IN+ and R12 on the inverting input pin 5 / IN-) with a 1 nF differential filter capacitor (C19) bridged directly across the amplifier inputs. This differential RC network ($R_{\text{diff}} = R11 + R12 = 20\,\Omega$, $C19 = 1\text{ nF}$, yielding a differential cutoff frequency $f_c = \frac{1}{2\pi (20\,\Omega)(1\text{ nF})} \approx 7.96\text{ MHz}$) suppresses high-frequency switching transients and RF noise from the synchronous buck converter before amplification while maintaining low bias-current offset error.
INA186 Current Sense Amplifier (U3 - INA186A1): U3 (INA186 / INA186A1, fixed gain of 25 V/V in the A1 variant or 50 V/V in the A2 variant, powered from the 3.3 V rail with GND reference on pin 2) amplifies the filtered differential shunt voltage into a clean, single-ended ground-referenced analog voltage on pin 6 (OUT). Its ultra-low input offset voltage, low quiescent current, and high common-mode rejection ratio (CMRR) prevent switching-node common-mode steps from corrupting current readings.
Output Post-Amplifier RC Filter (R13, C20) & STM32F103C8 PA2 ADC Interface: The amplified output from pin 6 of U3 passes through a single-ended RC low-pass filter consisting of a 1 kΩ series resistor (R13) and a 1 nF shunt capacitor (C20) to ground ($f_c = \frac{1}{2\pi (1\text{ k}\Omega)(1\text{ nF})} \approx 159.15\text{ kHz}$). R13 and C20 serve both as an anti-aliasing / switching-ripple filter and as a charge-bucket reservoir to drive the sample-and-hold capacitor of the STM32F103C8 internal 12-bit ADC without voltage droop. Finally, the conditioned analog signal connects directly to pin PA2 (ADC12_IN2) of the STM32F103C8 microcontroller, providing accurate, low-noise current feedback required by the MPPT control algorithm (Perturb & Observe / Incremental Conductance) to compute instantaneous output power ($P = V \times I$) and track the maximum power point reliably.
3. Custom Modeling & Validation in Proteus
Because high-precision component models are often missing from standard CAD libraries, custom models and SPICE definitions were authored specifically for this project in Proteus.
Custom Component Library & SPICE Models
INA186A2 Current Sense Amplifier: Created custom schematic symbols and pinouts corresponding to the SC70-6 / SOT-563 packages. Developed behavioral SPICE sub-circuits matching the amplifier's $50\text{ V/V}$ fixed gain, low offset voltage, and common-mode rejection performance.
SS14 / SS14FL Schottky Rectifiers: Modeled forward voltage drops ($V_F$), thermal derating parameters, and junction capacitance to evaluate reverse recovery loss within the simulation.
The following video shows how the SS14 spice model-based simulation part was created and simulated in proteus.
Power MOSFETs: Incorporated full switching and parasitic conduction models to accurately analyze switching transition losses and gate drive current requirements.
How to Test N-MOSFET Spice Model Quickly? note explains with video how to install and simulate IPA045N10N3G N-Channel MOSFET.e
Circuit Troubleshooting & VSM Simulation
Pin Mapping & Net Integrity: Corrected floating inputs, non-standard power pin assignments, and power-rail connections across the Proteus VSM schematic canvas.
Signal Condition Verification: Simulated load transients to verify the response of the INA186 current sense amplifier across the $2\text{ m}\Omega$ shunt. Validated that the output voltage remained clean and proportional without driving the internal STM32 ADC into saturation.
4. Next Steps & Verification
To complete hardware release readiness, the following validation tasks are scheduled:
Proteus Load & Noise Simulations:
Run full-sweep transient simulations under variable load profiles to verify INA186 signal-to-noise ratio (SNR) across the $2\text{ m}\Omega$ current-sense shunt.
Evaluate filter network response at the INA186 inputs to mitigate high-frequency switching noise originating from the buck converter stage.
ARES Layout Optimization:
Finalize trace widths and copper pours in ARES for high-current paths ($PV+$, $BAT+$, and power grounds).
Implement strict Kelvin connection routing (four-wire differential routing) from the $2\text{ m}\Omega$ sense resistor directly to the INA186 inputs to eliminate copper trace resistance errors.
Tutorials on STM32 MCU:
