Fork me on GitHub

Project Notes

#726 Push-Pull Output Driver

Testing the basic MOSFET push-pull output driver, similar to designs used in digital logic output or GPIO circuits.

Build

Notes

A push–pull amplifier is a type of electronic circuit that uses a pair of active devices that alternately supply current to, or absorb current from, a connected load. This kind of amplifier can enhance both the load capacity and switching speed.

Push–pull outputs are present in TTL and CMOS digital logic circuits and in some types of amplifiers, and are usually realized by a complementary pair of transistors, one dissipating or sinking current from the load to ground or a negative power supply, and the other supplying or sourcing current to the load from a positive power supply.

For more information see: 2.4.1 Push–pull output stages, p106, The Art of Electronics 3rd Edition.

A simplified circuit for the output portion of a GPIO pin is shown below. It basically comprises a p-channel MOSFET to provide the positive drive current when the output is “HIGH”, and an n-channel MOSFET to sink the negative drive current when the output is “LOW”. Typically additional features such as ESD protection may be included, and this does not include the input side of a full GPIO circuit.

GPIO_Output_SCH

Circuit Design

The following circuit demonstrates the basic operation of a MOSFET push-pull output driver:

  • a 10kΩ pull-down is included on the input so that by default the gate input is pulled LOW, output HIGH.
  • the high-side p-channel MOSFET is the BS250
  • the low-side n-channel MOSFET is the 2N7000
  • red LED is wired to be on when the output is HIGH
  • green LED is wired to be on when the output is LOW

The Arduino is only there to provide a test input signal: the PushPullOutputDriver.ino is configured to generate a square wave on pin 9. The frequency can be adjusted by changing the DELAY value (in milliseconds).

bb

schematic

Note that in the breadboard build, I’ve included a 200mA polycap fuse. This is to protect against the case of having both the high and low side MOSFETs enabled at the same time (effectively shorting the power rail).

bb_build

An oscilloscope trace of the behaviour:

  • CH1 (yellow) - input signal as measure at TEST_SIGNAL
  • CH2 (blue) - output signal as measure at OUTPUT, offset by -5V for clarity

scope-arduino-test

Function Test

Replacing the Arduino-generated signal with a FY3200S Function Generator for some more testing…

PushPullOutputDriver_bb_test

10kHz square wave

scope-10kHz-square

10kHz sine wave. No apparent cross-over effects.

scope-10kHz-sine

10kHz triangle wave. No apparent cross-over effects.

scope-10kHz-triangle

Boosting up to 2MHz sine wave, we start to see some significant cross-over distortion, especially on the rising input.

scope-2MHz-sine

Credits and References

About LEAP#726 Digital LogicCMOS/TTL

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

Project Source on GitHub Return to the LEAP Catalog
About LEAP

LEAP is my personal collection of electronics projects - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting.

Projects are often inspired by things found wild on the net, or ideas from the many great electronics podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know or send a pull-request.

NOTE: For a while I included various scale modelling projects here too, but I've now split them off into a new repository: check out LittleModelArt if you are looking for these projects.

Project Gallery view the projects as an image gallery Notebook reference materials and other notes Follow the Blog follow projects and notes as they are published in your favourite feed reader