OT-HOBBIES
www.ot-hobbies.com


Return to Resources page.

How to Hack an Adjustable Voltage Regulator

Some OT-Hobbies boards use an adjustable voltage regulator, such LM317 or LM1086-ADJ. This allows the output voltage to be configured for nominal 5V, but also for upwards to 30V or so, for special purposes.

As shown on the board schematics, the regulator output voltage is set using a combination of 2 resistors, one between the output and adjust pins, and the other between the adjust pin and ground (see figure, R6,R7).

In general, regulators with preset output voltages have about +/-5% tolerance, meaning a possible range of 4.75 - 5.25V for a nominal 5V output. Similar for "5V" sources supplied by USB ports and adaptors. Of course, this sounds like a lightyear when you're thinking "should be 5V rock solid". Well, welcome to the real world.

However, with an adjustable voltage regulator, like LM317, it's not difficult to get closer to 5V. We've done some tests, and with bias R values of 680 and 220 ohms, as shown, we've measured voltages such as 5.02V and 5.12V.

5.12V sounds a little high (although it's really only 2.4% high), but it can be adjusted to spot-on, simply by trimming the 680R down by a bit. Eg, we found that wiring a 22K in parallel with the 680R produced a voltage of 5.0V right on the mark, in this case. Alternately, if the measured output voltage were a little low instead, the 680R value would have to be increased a bit, by wiring a small value R in series.

We could do the maths for this, but it's easy to try a couple of R-values and see what does the job. Typically, the parallel R needs be in the range of 10K...33K to get a good downward adjustment, or a series-R of 5...20 ohms for an upward adjustment.

Some people use a trimpot to adjust the LM317 output voltage, but it's too easy for such an adjustment to get accidentally out of whack, and blow up the circuits. So, we favor using fixed value resistors.


Maths - heres' the maths on the preceding adjustment.

  • on these regulators, the adjustment pin current = 50-60 uA, so we ignore it for the
    following computations, since it's approx 100X less than the R6-R7 currents. Ignoring
    it will cause about a 1% error in the maths.
  • the reference voltage between the output and adjustment pins is 1.25V with typical
    tolerance of +/-4%, so in the practical case, we're adjusting both for this and also
    for the non-exact values of R6 & R7.

- putative original measurement: 

Vr7 = 1.25V / R7 = 1.25V / 220ohms = 5.68mA
Vr6 = 5.68mA * 680ohms = 3.86V
Vout = Vr6 + Vr7 = 3.86V + 1.25V = 5.11V --> slightly high.
- trimming R6 with 22K in parallel:

R6' = (R6 * 22K) / (R6 + 22K) = 660ohms

Vr7 = 1.25V / R7 = 1.25V / 220ohms = 5.68mA (same as before).
Vr6' = 5.68mA * 660ohms = 3.75V
Vout = Vr6' + Vr7 = 3.75V + 1.25V = 5.0V --> right on.

<| TOP


© OT-Hobbies, May 2013