Control Systems

Enter Your Electronics & Design Project for a chance to win a $200 shopping cart!

Submit an EntrySubmit an Entry  Back to homepage
Project14 Home
Monthly Themes
Monthly Theme Poll

 

Recently I have been trying to follow a thread where John Wiltrout is providing advice on how to fix a broken power supply without access to the schematic and equipment.  How he does this I do not know.  He may have a database of power supply schematics and SPICE models stored in his brain.  I think he is able to detect a change in the Force when a power supply starts to feel ill somewhere in the galaxy.  This has lead me to pull out the books, do some research, and make a post - especially since there is a Project14 contest on Control Systems underway.  In this post I will explore linear voltage regulation with an op-amp controlling a pass transistor inside a negative feedback loop.

 

Designing a Discrete Component Linear Regulator

 

Chapter 9 of The Art of Electronics Third Edition by Horowitz and Hill is about Voltage Regulation and Power Conversion.  Horowitz and Hill is not light reading, at least for me.  But the tutorial on designing a linear regulator is a great example of the clear and concise way they convey information.  Everything is summed up in the figure below:

Evolving the Linear Voltage Regulator

Credit:  Art of Electronics (Third Edition) by Horowitz and Hill

 

The short tutorial that accompanies this figure describes how to go from simple Zener regulation to amplified voltage with feedback loop stability, overcurrent protection, and overvoltage crowbar protection in a few short pages.

 

This voltage regulator design is not unique to Horowitz and Hill of course and can be found in other places.  And it should be recognized that as Horowitz and Hill say it is "seldom necessary to assemble these components from scratch - they are available as complete integrated circuits."  But going through the design is instructive and in this post a minimal breadboard version will be developed and investigated. 

 

It will be presented in the manner mandated of all engineering students in every discipline at my university more years ago than I care to remember.  The Problem and Requirements are given, everything else is by the student.  Points deducted if the format is not followed.

 

Problem

 

Design and demonstrate a working linear voltage regulator from discrete parts

 

Requirements

 

The design should meet the following criteria:

  • Operate from a nominal 9V unregulated source
  • Deliver fixed 5V regulated output
  • Use common "jelly bean" components

 

Assumptions and Notes

 

It is assumed that a breadboard demonstration is acceptable. This is important because there are wildfires in the Portland area right now, the air is thick with smoke, and I don't care to add solder fumes to the mixture I am breathing. 

 

Solution

 

The following schematic derived from Horowitz and Hill was developed with further annotations from the calculations which follow:

Schematic

credit: me

 

Calculations: Zener Voltage Reference

 

The design deviates from Horowitz and Hill in that a Zener diode will be used as a voltage reference by the op-amp to control the output of the transistor instead of a LM385 2.5V adjustable voltage reference as shown in their Figure 9.2E.  This will introduce problems later on but this is how we learn.  The Zener Diode, D1 is a 3V3 +/-5% 500mW ON Semiconductor BZX79C3V3BZX79C3V3.

Zener Electrical Characteristics

credit: ON Semiconductor BZX79C2V4BZX79C2V4 - BZX79C56 Datasheet

 

The Zener voltage must be less than the output voltage or the design will not work.  At 3V3 with a desired 5V output and 9V supply this one should be OK.  If the 5% variance between min and max is not acceptable then it can be adjusted by changing out resistors in the voltage divider R2, R3 or by using a trimmer.  The value of Iz is important because it is the current necessary to make sure the diode is operating past the knee into the region where Zener voltage is fairly stable.  This will be done with resistor R1.

 

The nominal input voltage is 9V and the desired current is around 5 mA.  For our purposes negligible current flows to the non-inverting input of the op-amp so resistor R1 is sized with Ohm's Law as follows:

 

R1 = (V+ - Vz) / Iz = (9 - 3.3) / 0.005 = 1,140; use 1k

 

The maximum current through the Zener is 500 mW / 3.1 V = 150 mA so no worries there.  Likewise the 1/8 W resistor is adequately sized.  Among the bothersome things is the power wasted in the Zener, the range of Zener voltages, and as shall be shown the Zener impedance, Zz.

 

Calculations: Op-Amp

 

The LM358LM358 is a low power dual op-amp produced that is widely available.  This is not a demanding circuit (I hope) as there is plenty of headroom and it has a DC input. Offset voltages, temperature influence, etc. have not been evaluated but the LM358 should be fine.  I have a number of these in a DIP package and they are easily used without an adapter on a breadboard.

 

Calculations: Series Pass Transistor

 

I have some n-channel MOSFETs which would increase the delivered power.  But they don't fit in the breadboard without the larger pins potentially damaging it.  So a smaller BJT 2N39042N3904 NPN will be used.  It is good for 625 mW and continuous DC collector current of 200 mA.  As far as maximum operating voltages and such, no worries.

Lego WeDo Robot

credit: Gratuitous Lego robot image by me placed here to see if anyone is actually reading any of this

 

Calculations: Feedback Design

 

Finally we are to the interesting part.  The op-amp is configured so as to drive the pass transistor inside the negative feedback loop.  Op-amp golden rule number 1) when configured for negative feedback is:  The op-amp does whatever it can through the output to make the input difference between V+ and V- zero.

 

The design proceeds as follows:

 

  • The op-amp is supplied by a source, in this case 9V, which gives adequate headroom around the rails of the op-amp and is also sufficient for the transistor.
  • The non-inverting pin V+ on the op-amp is set at 3V3 by the Zener diode voltage reference.
  • By op-amp golden rule number 1) the op-amp will supply an output Vout to the transistor so that the inverting pin V- will also be 3V3
  • The voltage divider consisting of R2 and R3 is set up such that the output, Vout will be 5V when the voltage divider delivers 3V3 to the inverting pin V-.

 

The voltage divider doesn't have to be all that stiff because op-amp golden rule number 2) states that the current flow into the inputs of an op-amp is near zero.  For the voltage divider:

     V- = Vout * R3 / (R2 + R3)

     R2 = (Vout * R3 / V-) - R3

     arbitrarily select 10k for R3

     R2 = (5.0 * 1E04 / 3.3) - 1E04

     R2 = 5,152 ohms;  use 5k1

 

Demonstration

 

The circuit was built on a breadboard from the schematic.

Circuit on Breadboard

credit: me

 

For the demonstration a Tenma 72-268572-2685 DC Power Supply was used to power the breadboard.  Voltage measurements were taken with a Tenma 72-102072-1020.

 

The video that follows is longer than I usually post at 17 minutes and is in the form of an educational presentation.  It is the type of thing I like to watch when having trouble falling asleep for a nap.  To skip the theory go to about 7:45 and to skip the experimental setup go to 10:45 for the demonstration and results.  If anyone actually watches this please comment below.

credit: mostly me

 

In the video a change of 380 mV in the Zener voltage is observed if the input voltage, V+ is increased from 9V to 19V.  This also results in an increase from 4.87V to 5.44V in the voltage output Vout of the power supply.  To explain this we return to the Zener diode datasheet.

Zener Electrical Characteristics

credit: ON Semiconductor BZX79C2V4BZX79C2V4 - BZX79C56 Datasheet

 

The datasheet shows the maximum value of the Zener impedance, Zz to be 95 ohms but does not state the frequency at which it was measured.  Using Ohm's Law we calculate the Zener currents and then the maximum Zener voltage change to be:

    

     I9V = (9 - 3.3) / 1000 = 0.0057 A

     I19V = (19 - 3.3) / 1000 = 0.0157 A           

     delta V = (0.0157 - 0.0057) * 95 = 0.95 V

 

The observed voltage change of 380 mV is less than the calculated maximum of 950 mV.  From a first approximation this seems reasonable for the part but may be unacceptable for a design if it must handle wide swings in input voltages.  In that case a different voltage reference such as the LM385 used by Horowitz and Hill would be appropriate or perhaps a 6mA current source.

 

Conclusion

 

This was a fun exercise and I hope I interpreted the results correctly and managed to learn something.  The power supply worked as designed, performed within the tolerances of the parts used, and met the requirements stated for the problem.  Potential improvements include the following:

 

  • Transfer design to PCB or proto-board
  • Replace Zener diode voltage reference with LM385 or other adjustable voltage reference for an improved voltage reference and reduced current
  • Replace BJT with n-channel power MOSFET and heat sink for greater power
  • Add Miller feedback capacitor around the inverting gain stage to potentially improve stability
  • Add current limiting feature with single transistor described in Horowitz and Hill
  • Add overvoltage crowbar feature described in Horowitz and Hill
  • Add capacitor to reduce input ripple current as described by Horowitz and Hill

 

If you made it this far, thanks for reading and watching.  My homework wasn't normally this well presented when I was a student but I do remember staying up most of the night drawing an awesome 3D representation of transient temperature measurements from thermocouples I embedded in a cube of plaster of paris for a thermodynamics lab.  Feel free to grade my power supply with op-amp negative feedback control system in the comments below.  Would this be a first or second year EE lab?

 

Edit 12 September 2020:  If you are really interested in this design check out the comments and additional testing below.  The Horowitz and Hill schematic at the beginning of the post is essentially completed with lots of interesting comments from element14 members.