spacer

Feeding Fitzy - Variable Buck Regulator

Buck RegulatorHow you supply power to your robot is an important design decision. Ultimately it depends on your design's power demands, desired longevity, and ease of replenishment.

Skip to Buck Regulator Design

My initial robots used four AAA Alkaline cells (or rechargeables). As they were a learning tool for me and my young son, they were intended to be used for only brief periods. I thought that a simple unregulated battery supply would be sufficient, but even in such a simple case issues began to arise.

The symptom of the problem was that over time, the continuous rotation servos that had been trimmed to be motionless, would begin to drift. At the start of each session, the servo pulses were calibrated so that the servos would be motionless. After a few minutes, they would begin to creep even though commanded to be motionless. This creeping would accelerate with time. It's not clear whether this can be attributed to the microcontroller or the servos. I suspect that it derives from the dropping supply voltage so future designs need some form of voltage regulation.

Linear, Buck or Boost

There are two common types of voltage regulators; linear and switching. In a linear regulator, a higher voltage is converted to a lower voltage (or a lower negative voltage). This is done by dropping the excess voltage across an internal load. The excess power (dropped voltage times current) is converted to heat and wasted.

Despite the inefficiency of linear regulators there are several reasons to use them.

  • They tend to be smaller than an equivalent switching supply.
  • They require few parts and are cheap to implement.
  • They generate less noise on the output voltage.
  • If the load is small compared to the overall power budget, the inefficiency is of less importance.

Switching regulators convert the input DC voltage to high frequency AC voltages. In the process, the voltages can be raised or lowered with good efficiency, often in the 80-90% range depending on the specific design.

When the output voltage is higher than the input, the switching regulator is called a boost regulator. When the output is lower, it's a buck regulator. In some cases the design can do either and is called a buck-boost regulator.

Our most common exposure to switching supplies are the power supplies in the computers we use. This gives the impression that switching supplies have to be complicated and dangerous. Nothing could be further from the truth. Due to the fantastic chips available today it's possible to build a small switching supply with as few as a dozen or so simple components and still achieve 5A+ output current at your desired voltage.

  • Switching supplies can produce high currents with good efficiency
  • Switching supplies tend to be slightly larger than linear supplies.
  • Switching supplies cost a bit more than linear supplies but not much.

Buck or Boost, that is the Question

In my case of Fitzy and Carraldo, I chose to use recycled Li Ion cells from old, discarded laptop battery packs. These are free from the local recycle dock. While some cells are damaged, many are still serviceable. And, these are readily available on the Internet if the recycled cells don't work out.

I decided on a 3 cell pack (~3.6V @ 2000mAH each). The big question was whether I should arrange the cells in parallel or series. In each case I wanted to produce 6V output.

 

  Parallel (~3.6V @ 6000mAH) Series ( ~10.8V @ 2000mAH)
Pros
  • Could use a commercial 1 cell charger.
  • Could easily increase capacity by adding matched cells.
  • Commercial 10A buck regulator available for about $11.00
  • Can build own 5A regulator for about $4.00.
     
Cons
  • Boost circuit is somewhat more expensive to build. Buck chips start at ~$1.20 whereas Boost chips start at ~$6.00.
  • Have to build own smart charger with safeties.
  • Harder to add more cells.

 

When I started building Fitzy and Carraldo, I thought that three cells would be sufficient. Coupled with the inexpensive 10A buck regulator I found, a series arrangement seemed the best for me. Your factors may differ. The one cell charger is a compelling argument for parallel.

As my robot design allows individual monitoring of each cell voltage I can easily implement discharge and recharge safeties; Li Ion cells shouldn't be discharged below 3V or charged at voltages higher than 4.2V (some are 4.1V).

Commercial 10A vs DIY 5A Buck Regulator
Commercial unit on left. DIY on right.

Building Your Own Buck Regulator

I accidentally destroyed a couple of the 10A regulators I'd bought. I'm not entirely certain how but it could be

  • A voltage surge when I turn my bench power supply on or off. The 10A regulator is only rated to 14V input so it's conceivable.
  • Soldering a bad connection without disconnecting the PCB from the power supply (which was off).
  • Or just bad mojo that day.

Whatever the reason, I decided to build my own buck regulator. The chip I chose was the RT8289GSP.

  • It comes in a nice 8SOP package that is relatively easy to solder.
  • Can supply 5A at between 1.222V to 26V
  • Input voltage between 5.5V to 32V
  • Requires only an external inductor, a diode, and a few standard resistors and capacitors.

The schematic is basically the reference circuit. In the PCB I've made allowances for the optional parts of the design. These are Ren and Cen (the enable line can be left floating and will be pulled high via an internal resistor), Rboot (I bridge with a 0R resistor), and Rs and Cs that form a snubber circuit to reduce EMI interference from the high-frequency switching.

The interface pin locations and spacing on the board are designed as a drop-in replacement for the 10A regulator I'd bought. Because the pin spacing is odd ( 1.7mm or 0.067" ) I've created a second PCB toner transfer pattern with more standard 0.1" spacing.

Schematic           PCB           Assembly

In the assembly guide I've indicated the components I used. R(s) and C(s) were left unpopulated. R(en) was later set to 10K (really not necessary), and C(en) was left unpopulated. If you leave out R(en) and C(en), you can drive the ENable line from a microcontroller or leave it unattached. The line is enabled by a weak internal pull-up resistor if left unconnected.

The inductor and diode must be rated for the maximum current you plan to draw. The components I used are spec'd for 5A. If you plan to draw less, you could specify cheaper components. Similarly, the two output capacitors are spec'd at 10V. Depending on your output voltage you may need to spec higher voltage parts.

You've probably noticed the parallel input and output capacitors. The parallel capacitors are used to lower the ESR (electrical series resistance) of the parts. A single capacitor of double the value will not work equivalently.

Finally, the output voltage is controlled by the 2K55 ohm resistor. The output voltage is calculated as ...

Vout = 1.222V + (1 + (10K / 2K55)) = 1.222 + (1 + 3.92) = 6.01V

For 5V output, substitute a 3K16 ohm resistor in place of the 2K55 resistor.

That's about it. Enjoy.

Next Section: <coming soon>