element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Frank Milburn's Blog Op-amp made from Discrete Components
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fmilburn
  • Date Created: 3 Jun 2020 5:30 AM Date Created
  • Views 31398 views
  • Likes 13 likes
  • Comments 38 comments
  • opampsch
  • op-amp
  • opamp
  • op amp
  • discrete
  • breadboard
  • component.
Related
Recommended

Op-amp made from Discrete Components

fmilburn
fmilburn
3 Jun 2020

Background

 

A few weeks ago I came across a series of YouTube videos by the IMSAI Guy on an op-amp made from discrete components.  Over a series of posts he describes the circuits that make up a basic op-amp and demonstrates them on a bread board.  I found this very interesting and proceeded to build one myself.  It was to going to be a one or two night affair that has stretched into several weeks.  The issue has been a combination of being away from home for large stretches of time and not being able to concentrate on it, the desire to dig into it more deeply than the videos, and the complex behavior of even this simplified op-amp.

 

I do recommend the YouTube videos for those who haven't had a formal introduction to op-amps in school.  The videos are a bit long in places but interesting and he teaches in a down to earth way I found easy to follow.  The focus is on how the individual parts work and not on design.  The questions I had after viewing the videos were on design - not because it makes sense to design an op-amp from discrete parts but because the circuits involved are useful ones in their own right and I wanted to understand them more deeply.

 

It turns out however that op-amps from discrete components are still a thing and an internet search will turn up quite a few hits.  I have an old text book "Electronics Principles" by Albert Malvino from 1993 that was very helpful and describes basic op-amps in some detail.  I was also able to build a working SPICE model that was helpful using the free simulator MIcro-Cap.  IMSAI guy also builds a similar simulator.

 

The Schematic and Operation

 

A schematic for the op-amp that was built is shown below.

image

This is essentially the same op-amp made by IMSAI guy although I am using different diodes and transistors.  Roughly, my brief interpretation of the way it works is this:

 

Difference Amplifier: R2, Q1, and Q2 make up a differential amplifier - the heart of the op-amp.  Since the total current through the two transistors is fixed by the tail current as described below, a difference between the voltage of the non-inverting and inverting inputs (the base of Q1 and Q2) results in different collector currents in Q1 and Q2.  The base to emitter current vs. voltage curve of the transistors look like a diode.  Once the base voltage of the transistor is high enough to turn it on the current shoots up quite rapidly and small differences in ideally matched transistors mean large differences in the amplified current between the collector and emitter. In an ideal situation with the current fixed and the voltages equal on the non-inverting and inverting inputs the current through Q1 and Q2 will be identical.

 

Look first at Q1, the non-inverting input.  If the base voltage of Q1 rises the voltage drop across R2 will also increase since the current increases.  In the extreme case all of the current passes through it.  If voltage rises on Q2 the opposite occurs and the voltage drop across R2 decreases.  The varying voltage is then passed on to the amplification stage described below through resistor R4.

 

Tail Current:  R1, D1, D2, Q3, and R3 make up a current source.  Diode D1 is approximately equal to the voltage drop from base to emitter on Q3. It follows that the voltage drop across D2 will be approximately equal to that across R3 which sets the current through Q3.  As a first approximation the current is 0.7 V / 3300 ohms = 0.2 mA.  A low current is desirable because an ideal op-amp has infinite input impedance and no current flows through the inputs.  In this case the base current will be less than the collector to emitter will by a factor of the gain in the transistor or as a first approximation 200 uA / 100 = 2uA.

 

A 10 turn, 10 k resistor is used instead of a fixed value for R3 in order to trim the op-amp in the circuit.

 

Another Current Source:  D3 and D4 form another current source with Q5 and R6. This time the current source will be on the order of 1.5 mA.

 

Frequency Compensating Capacitor:  There is capacitance in any circuit (especially this one on a breadboard) and this can cause among other things oscillations.  Capacitor C1 allows the designer to select the critical frequency and thus control the frequency response of the op-amp.  It also reduces oscillation.  The critical frequency is 1 / 2*pi*R2*C1.  Given that my op-amp is on a breadboard this calculation is probably way off.

 

Capacitor C1 also sets the slew rate.  When there is a voltage step between the inverting and non-inverting inputs it drives one transistor into saturation and the other into cutoff.  Capacitor C1 then begins charging or discharging.  The voltage therefore does not change ideally but instead increases or decreases exponentially.  The slew rate is defined as the maximum rate of output voltage change and is the fastest response the op-amp is capable of.

 

If the voltage swing the op-amp is trying to achieve for a sine wave is too great at a given frequency then distortion occurs and the slew rate may be such that the peak voltage is not obtained.  The maximum frequency the op-amp can operate without slew-rate distortion at a given peak voltage is called the power bandwidth.  Higher power bandwidth is achieved at lower frequencies.

 

Amplification: Q4 and Q5 act as an amplification stage with very high gain.  Diodes D5 and D6 bias the class B push-pull amplifier which follows.

 

Class B Push-Pull Emitter Follower:  Finally Q6 and Q7 are a class B amplifier which give the final output.

 

Non-inverting Amplifier:  R7 and R8 are external to the op-amp and are used to set gain for a non-inverting amplifier with negative feedback.

 

The Setup and Bread Board

 

The circuit was built on a breadboard and shown below.  My bench power supply has a single channel so +Vcc was arbitrarily set to 10V to begin and -Vee is 0V.  The input comes from the Keysight DSOX1102GDSOX1102G oscilloscope which can provide a DC or an AC signal with DC offset.  The oscilloscope and several multimeters are also used to analyze circuit behavior.

 

image

 

Here is a closeup of the breadboard.  All resistors were 1% and the transistors in the difference amplifier were matched using an inexpensive "M Tester".  The measured beta of the NPN transistors was 210.  The PNP transistors beta measured 189.

 

image

 

DC Performance

 

As noted above a SPICE model was set up and was run beforehand.  The gain was set with resistors R7 and R8 to be approximately 4.3 to give an output voltage of about 6.5.  This is about as close as the op-amp can get to the rails.  In the SPICE model below the voltages at nodes is in green surrounded by red ovals and the actual measured voltages are in black in a larger font.  For example, the model was set to give a positive rail of 10V and the measured voltage was 9.98V.

 

image

I made an error or two and then had to wiggle wires to get it to work due to a bad breadboard connection but then it became quite stable and as can be seen the results for DC amplification are quite close to the model.  The resistance of R3 (the potentiometer) was adjusted to minimize the voltage difference n the inputs which is why it is at 2.72k instead of 3.3k.  The internal measurements match the model well and gain is right on with reasonable voltage offset after adjustment.  I was quite pleased.

 

AC Performance

 

To understand the AC performance the circuit was modified as shown below which passes the AC and removes DC.  The gain was increased to 38.

 

image

 

When the circuit was modelled in SPICE the following output was obtained:

 

image

This analysis indicated that the bandwidth of the op-amp is around 1 MHz under the test conditions.  As shall be seen the performance is not so good on the breadboard.  All that stray capacitance and who knows what. In the following video the behavior near the rails, influence of capacitor C1, slew rate, and bandwidth are demonstrated.

 

In the first video amplification of a sine wave is demonstrated.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

In this video the input signal is increased until the output clips as it swings near the rails.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Here the slew rate of the discrete component op-amp is examined.  Removing C1 from the circuit does not produce noticeable effect.  My guess is this is because the breadboard circuit already contains so much capacitance.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

In this final demonstration the bandwidth is looked at.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Conclusion

 

This has been a fun project and I learned a lot from it.  The low gain DC configuration and the SPICE model agreed really well.  There was discrepancy in AC behavior with slew rate and higher frequency but that is to be expected on the breadboard.  I considered soldering something up on perf board but in the end decided not to.  A poorly performing component can sometimes be more instructive than a good performing one and besides if a good performing op-amp is desired then buy one of the many ICs available.

 

I have a better idea now about how op-amps work and what drives some of the non-ideal behavior but am far from an expert.  Please feel free to correct my interpretations or observations in the comments.  I will leave the breadboard set up for a few more days if anyone is interested in another measurement or observation.

  • Sign in to reply

Top Comments

  • jc2048
    jc2048 over 5 years ago +8
    I've made one. Not sure why, but I have. Here it is sitting on my battered copy of Walter Jung's cookbook: Didn't have enough 2N3904s, so I used BC549C for the NPN and BC559C for the PNP. The BC parts…
  • jc2048
    jc2048 over 5 years ago in reply to fmilburn +6
    Yes, it's the base-collector capacitance of that input transistor. The model from the library had 3.49pF for it. If I set it up for 3 steps from 3pF to 9pF with nothing else changing, this is the result…
  • jc2048
    jc2048 over 5 years ago in reply to fmilburn +5
    I'm not clear on the reason. Because it's a loop, it's quite hard to pin down. The simuation gives something similar, so it's down to intrinsic properties of the parts and not parasitics. This is the collector…
  • HaroonQazi
    HaroonQazi 9 months ago

    How to get inverting input from this circuit ? I connected function generator +ve to inverting input and com port to ground but the output is not inverting sine wave but its non inverting

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fmilburn
    fmilburn over 5 years ago in reply to jc2048

    I'm interested!  That is a very nice explanation and work.  It also fosters admiration for the engineers who did the original work in this area and more appreciation for what we can buy in an IC today.  I want to build another more permanent version if for no other reason to display it and have people ask "what is that?"   They will be sorry they asked :-).  I am in the midst of moving house and all my electronic equipment and tools have been packed.  Unfortunately I won't see them again for at least another 3 weeks so everything is on hold for the moment.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jc2048
    jc2048 over 5 years ago

    I mentioned above trying a mirror for the load. I've now tried it on the real circuit with this result

    [keep in mind that I don't really know what I'm doing here and some of it is a bit random].

     

    Here's the circuit I have on the board at the moment

     

    image

     

    and here are the two extra transistors installed on the board

     

    image

     

    The small step is now like this

     

    image

     

    It hasn't completely fixed the input voltage offset, but you can see it's much closer than the 50mV

    that I had before. But it's more on edge. When I first power it up, the ringing extends all the way

    along the top or bottom of the waveform, before it finally settles to what you see here. This is with

    the Miller cap increased to 22pF [it's no longer stable with 10pF]. Compensating the amplifier is now

    more difficult. Increasing the Miller capacitor dramatically works for stability, but results in the

    slew becoming ridiculous [the capacitor is an integrator, so if you push it too high, large square waves

    become triangular]. The 470R and 22n were where I was experimenting with trying to tailor the open loop

    frequency response, but probably aren't the way to do it.

     

    The slew now looks like this

     

    image

     

    the symmetry that the mirror gives to the drive of the compensation capacitor [compared to a transistor

    collector and a pull-up resistor] sorts out the unbalanced slewing.

     

    Anyway, it's something else to experiment with if you're interested.

     

    BTW I picked the two most closely matched transistors I had in the packet for the mirror.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Andrew J
    Andrew J over 5 years ago in reply to jc2048

    LOL....a bit like me then.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fmilburn
    fmilburn over 5 years ago in reply to jc2048

    I barely know how to string something together with it.  What interests me is the underpinnings of the models.  They model complexity much more accurately than the hydraulic models I used years ago for complex fluid behavior.  Of course those models have improved greatly too since I was a boy :-). And as ever, interpretation is at least as important as the model.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube