The idea

A battery gives one voltage, but a robot needs several: one for the motors, one for the logic, one for the sensors. A DC-DC converter chops the input with a MOSFET (PWM), then smooths the result with an inductor (which stores energy in its current) and a capacitor (which stores energy in its voltage). The duty cycle sets the output.

Buck (step-down)

Buck converter with on and off current paths

  • Switch on: the battery drives current through L into the load. L stores energy.
  • Switch off: L keeps the current flowing (inductors resist sudden changes in current), and the diode completes the loop. This is called freewheeling.

Boost (step-up)

Boost converter with on and off current paths

  • Switch on: L is connected straight across the battery and charges up. The capacitor feeds the load.
  • Switch off: the battery and L push together through the diode, so the output rises above .

Deriving both: volt-second balance

In steady state, an inductor’s average voltage over one cycle must be zero. If it weren’t, its current would keep growing every cycle. So (voltage × time while on) + (voltage × time while off) = 0.

Buck. On for : the inductor sits between and , so . Off for : the diode connects it to ground, so .

Boost. On: . Off: , which is negative.

Sizing the buck’s L and C

Inductor: . While off, for a time , and the current changes by the ripple :

Capacitor: it absorbs the inductor’s triangle-shaped ripple current:

Higher frequency means a smaller L and C, which is why modern converters are tiny. The trade-off is more switching loss.

Worked example

Step a 48 V robot battery down to 24 V at 5 A, switching at 100 kHz, with 10% ripple on both current and voltage. Find D, L and C.

Isolated or not?

Transformer-less (buck, boost)Transformer-based (isolated)
HowSwitch, inductor, capacitorDC → high-frequency AC → transformer → rectified back to DC
Galvanic isolationNo: a fault passes to the loadYes: protects the user and load
Efficiency90–98%80–95%
Size and costSmall, cheapBulkier, costs more
Voltage ratioLow to moderateExtreme step-up or step-down
OutputsOneOne or several

Buck-boost converters can go either way, which is useful when a battery sags below the output as it drains. Synchronous versions replace the diode with a second MOSFET to cut loss.

Check yourself