A pulse-width-modulation controller connects the panel to the battery in rapid pulses, hundreds of times a second, and shortens the pulses as the battery approaches its charging ceiling so that the average current tapers smoothly. For a solar panel it wastes almost nothing as heat, because the surplus is simply not drawn, but it does not harvest more energy than a simple on-off controller: its gain is smooth tapering and no relay wear.

How a switching charge controller works, what the duty cycle means for battery current, and what a hand-built one needs.

Duty Cycle Sets The Average Current

The carrier describes the PWM controller as rapidly switching the panel connection on and off, adjusting the duty cycle to maintain the right battery voltage, built from a timer circuit (a 555 or a simple microcontroller) and a power MOSFET. The Charge Controller article describes a PWM dump-load stage with a logic-level MOSFET (it names the IRL540 and IRLZ44N, salvaged from computer motherboards), switching hundreds of times per second, and an Arduino or 555 timer adjusting the duty cycle from battery voltage.

When the switch is on, the panel feeds the battery at the panel’s current at that voltage. When it is off, the panel is at open circuit, which is safe for a panel (Power Electronics). The average current into the battery is the on-fraction D times the panel current:

I_average = D × I_panel.

The control loop reads the battery voltage. Below the ceiling D = 1 and the panel connects continuously. As the battery reaches the ceiling, the loop shortens D so the voltage holds there, and the current tapers to the finishing level of C/50 (Charging Circuits).

Compared With The Other Controller Types

TypeHeat wastedMoving partsBehaviour
Series relayNoneRelay contactsOn-off, needs hysteresis, contacts wear
Shunt relayLow for a panelRelay contactsIsolates the battery, wear as above
Shunt MOSFETLow for a panelNoneNeeds a heat sink only for a resistor
Series PWMMOSFET loss onlyNoneSmooth taper

The carrier calls PWM “more efficient”. Against a shunt that burns the surplus in a resistor, that is true, and for a panel the shunt can be made cool anyway (Shunt Regulator Design). Against an ideal on-off controller the energy delivered is the same: the surplus is not produced either way.

What You Need

  • A power MOSFET — logic-level, rated above the panel current by the 1.25 margin (Load Calculation); salvaged from motherboards or controllers
  • A PWM source: a 555 timer circuit or a microcontroller (carrier)
  • A battery-voltage sensing divider and reference — as in Shunt Regulator Design
  • A blocking diode — Bypass Diodes explains the diode choice
  • A heat sink for the MOSFET at higher currents
  • A bench supply and meter for calibration — Metering

Method: Build And Tune

Step 1: Choose the switching frequency in the hundreds of hertz range the Charge Controller article gives.

Step 2: Wire the MOSFET as the series switch in the line between panel and battery. General knowledge, not from the other articles: switching the negative lead avoids a high-side gate driver, and the body diode inside the MOSFET can conduct the wrong way, so keep the blocking diode and check the orientation by test.

Step 3: Build the control stage so duty falls as battery voltage rises above the setpoint, and calibrate the setpoint on the bench with a variable supply.

Step 4: Test with a lamp load before the battery.

Step 5: Run it with the panel and watch the battery voltage hold at the ceiling while the current falls.

Worked Example: Duty, Pulse Width And Loss

The 59 W panel gives 59 ÷ 14.4 = 4.1 A into the battery. A 100 Ah battery near full needs the C/50 finishing current of 100 ÷ 50 = 2 A, so D = 2 ÷ 4.1 = 0.49, a 49% duty cycle. At 500 Hz the period is 1 ÷ 500 = 2 ms and the on-time is 0.49 × 2 = 0.98 ms. In float the need is around 4–7 mA (the float article’s self-discharge arithmetic), so D = 0.005 ÷ 4.1 = 0.0012, about 0.12%, a pulse of 0.0012 × 2 ms = 2.4 µs: the control stage must reach very short pulses, or the battery voltage will hover above the ceiling.

MOSFET loss: with an assumed on-resistance of 0.05 Ω, 4.1² × 0.05 = 0.84 W at full duty. The loss falls with duty because the MOSFET conducts less of the time, plus a small switching loss the corpus does not quantify.

Common Mistakes

  • Claiming PWM harvests more energy — it does not; it only tapers cleanly
  • A MOSFET that is not logic-level — it does not turn fully on from a 5 V signal, so it runs hot
  • No blocking diode — the battery drains through the body diode at night
  • A switching frequency too low — the battery voltage ripples
  • Calibrating on a live battery — use a bench supply

Safety

The array is live while the controller switches, and a failed MOSFET can short the bank

A panel is producing voltage whenever there is light, and a series string reaches dangerous voltage (three 18 V panels make 54 V, six make 108 V), so cover the array or disconnect it before touching the wiring and treat it as live regardless. If the MOSFET fails short, the battery is connected straight to the panel with nothing to taper it, so fit a fuse on the battery lead and keep the hydrogen-producing bank ventilated at the top (Hydrogen Gas Hazard).

What’s Next