Inverters

Inverters
Consider the following circuit:

If neither of the press-button switches are operated, the transistor has no base/emitter current flow and so it is off.   This places the collector voltage at ‘C’ near the positive rail (+5 Volts).

If press-button switch ‘A’ is operated, the base voltage tries to rise to half of the battery voltage but doesn’t make it because the transistor base pins it down to 0.7 Volts. This feeds base current to the transistor, switching it hard on and causing the output at ‘C’ to drop to nearly 0 Volts.

If press-button switch ‘B’ is operated (don’t do this when switch ‘A’ is closed or you will get a very high ‘short-circuit’ current flowing directly through the two switches) it has no effect on the output voltage which will stay high.

If we re-draw the circuit like this:

We can see that if the voltage at the input ‘A’ is taken high, then the output voltage at ‘C’ will be low. If the voltage at the input ‘A’ is taken low, then the output voltage at ‘C’ will be high. A circuit which does this is called an ‘Inverter’ because it ‘inverts’ (or ‘turns upside down’) the input voltage.

We can summarise this operation in a table.   Personally, I would call the table an ‘Input/Output’ table, but for no obvious reason, the standard name is a ‘Truth’ table.   The purpose of this table is to list all of the possible inputs and show the corresponding output for each input.

Another standard, is to substitute ‘1’ for ‘High Voltage’ and ‘0’ for ‘Low Voltage’.   You will notice that many items of electrical and electronic equipment have these symbols on the ON / OFF switch.   In computer circuitry (hah! you didn’t notice that we had moved to computer circuits, did you?), the ‘0’ represents any voltage below 0.5 Volts and the ‘1’ represents any voltage above 3.5 Volts.   Many, if not most, computers operate their logic circuits on 5 Volts.   This Inverter circuit is a ‘logic’ circuit.

A criticism of the above circuit is that its input resistance or ‘impedance’ is not particularly high, and its output impedance is not particularly low.   We would like our logic circuits to be able to operate the inputs of eight other logic circuits.   The jargon for this is that our circuit should have a ‘fan-out’ of eight.

Let’s go for a simple modification which will improve the situation:

Here, The input impedance has been increased by a factor of 100 by using a Darlington pair of transistors which need far less base current, and so can have a much higher input resistor.

Unfortunately, the output impedance is still rather high when the transistors are in their OFF state as any current taken from the positive line has to flow through the 1K8 (1800 ohm) resistor.   But we need this resistor for when the transistors are in their ON state.   We really need to change the 1K8 resistor for some device which has a high resistance at some times and a low resistance at other times.   You probably have not heard of these devices, but they are called ‘transistors’.

There are several ways to do this.   We might choose to use PNP transistors (we normally use NPN types) and connect these in place of the 1K8 resistor.   Perhaps we might use a circuit like this:

This circuit is starting to look complicated and I don’t like complicated circuits.   It is not as bad as it looks.   The NPN transistors at the bottom are almost the same as the previous circuit.   The only difference is that the collector load is now two 100 ohm resistors plus the resistance of the two transistors.   If the PNP transistors are OFF when the NPN transistors are ON, then the circuit loading on the NPN transistors will be negligible and the whole of the NPN transistors output will be available for driving external circuits through the lower 100 ohm resistor (a large ‘fan-out’ for the ‘0’ logic state).   To make sure that the PNP transistors are hard off before the NPN transistors start to switch on, the resistor ‘R1’ needs to be selected carefully.

The PNP transistors are an exact mirror image of the NPN side, so resistor ‘R2‘ needs to be selected carefully to ensure that the NPN transistors are switched hard OFF before the PNP transistors start to switch ON.

You need not concern yourself unduly with that circuit, because you will almost certainly use an Integrated Circuit rather than building your own circuit from ‘discrete’ components.  An Integrated Circuit containing six complete inverters is the 7414 which is shown above.   This comes in a small black case with two rows of 7 pins which make it look a bit like a caterpillar.   Because there are two row of pins, the packaging is called “Dual In-Line” or “DIL” for short.

Now, consider the following circuit:

This circuit operates the same way as the Inverter circuit, except that it has two inputs (‘A’ and ‘B’). The output voltage at ‘C’ will be low if either, ‘AORB’ or both, of the inputs is high. The only time that the output is high, is when both Input ‘A’ and Input ‘B’ are low. Consequently, the circuit is called an “OR” gate. Strictly speaking, because the output voltage goes Down when the input voltage goes Up, it is called a “Not OR” gate, which gets shortened to a “NOR” gate. In this context, the word “not” means “inverted”. If you fed the output ‘C’ into an inverter circuit, the resulting circuit would be a genuine “OR” gate. The digital circuit symbols for an AND gate, a NAND gate, an OR gate and a NOR gate are:

These common chips are usually supplied with 2, 4 or 8 inputs.  So, why is it called a “Gate” – isn’t it just a double inverter?   Well, yes, it is a double inverter, but a double inverter acts as a gate which can pass or block an electronic signal.   Consider this circuit:

Here, transistors ‘TR1’ and ‘TR2’ are connected to form an astable (multivibrator).   The astable runs freely, producing the square wave voltage pattern shown in red.   Transistor ‘TR3’ passes this voltage signal on.   TR3 inverts the square wave, but this has no practical effect, the output being the same frequency square wave as the signal taken from the collector of TR2.

If the press-button switch at point ‘A’ is operated, a current is fed to the base of TR3 which holds it hard on.   The voltage at point ‘C’ drops to zero and stays there.   The square wave signal coming from the collector of TR2 is blocked and does not reach the output point ‘C’.   It is as if a physical ‘gate’ has been closed, blocking the signal from reaching point ‘C’.   As long as the voltage at point ‘A’ is low, the gate is open.   If the voltage at point ‘A’ goes high, the gate is closed and the output is blocked.

There is no need for a manual switch at point ‘A’.   Any electronic switching circuit will do:

Here, a slow-running astable is substituted for the manual switch.   When the output voltage of ‘Astable 2’ goes high, it switches the gate transistor ‘TR3’, holding it hard on and blocking the square-wave signal from ‘Astable 1’.   When the output voltage of ‘Astable 2’ goes low, it frees transistor ‘TR3’ and it then passes the ‘Astable 1’ signal through again.   The resulting gated waveform is shown in red at point ‘C’ and it is bursts of signal, controlled by the running rate of ‘Astable 2’.   This is the sort of waveform which Stan Meyer found very effective in splitting water into Hydrogen and Oxygen (see Chapter 10).

This circuit could also be drawn as:

The small circle on the output side of logic devices is to show that they are inverting circuits, in other words, when the input goes up, the output goes down.   The two logic devices we have encountered so far have had this circle: the Inverter and the NAND gate.

If you wish, you can use a NAND gate chip which has the circuitry also built as a Schmitt trigger, which as you will recall, has a fast-switching output even with a slowly moving input.   With a chip like that, you can get three different functions from the one device:

If the two inputs of a NAND gate are connected together, then the output will always be the opposite of the input, i.e. the gate acts as an inverter.   This arrangement also works as a Schmitt Trigger due to the way the NAND gate circuitry is built.   There are several packages built with this type of circuitry, the one shown here is the “74132” chip which contains four “dual-input” NAND gates.   Gates can have almost any number of inputs but it is rare to need more than two in any given circuit.   Another chip with identical pin connections is the 4011 chip (which is not a Schmitt circuit).   This ‘quad dual-input’ NAND gate package uses a construction method called “CMOS” which is very easily damaged by static electricity until actually connected into a circuit.   CMOS chips can use a wide range of voltages and take very little current.   They are cheap and very popular

The number of devices built into an Integrated Circuit is usually limited by the number of pins in the package and one pin is needed for one connection to ‘the outside world’.   Packages are made with 6 pins (typically for opto-isolators), 8 pins (many general circuits), 14 pins (many general circuits, mostly computer logic circuits), 16 pins (ditto, but not as common) and then a jump to large numbers of pins for Large Scale devices such as microprocessors, memory chips, etc.   The standard IC package is small:

Prototype circuits are often built on ‘strip board’ which is a stiff board with strips of copper running along one face, and punched with a matrix of holes.   The strips are used to make the electrical connections and are broken where necessary.   This strip board is usually called “Veroboard”:

Nowadays, the strip board holes are spaced 2.5 mm (1/10”) apart which means that the gaps between the copper strips is very small indeed.   I personally, find it quite difficult to make good solder joints on the strips without the solder bridging between two adjacent strips.   Probably, a smaller soldering iron is needed.   I need to use an 8x magnifying glass to be sure that no solder bridging remains in place before a new circuit is powered up for the first time.   Small fingers and good eyesight are a decided advantage for circuit board construction.   The narrow spacing of the holes is so that the standard IC DIL package will fit directly on the board.

Circuits built using computer circuitry, can experience problems with mechanical switches.   An ordinary light switch turns the light on and off.   You switch it on and the light comes on.   You switch it off and the light goes off.   The reason it works so well is that the light bulb takes maybe, a tenth of a second to come on.   Computer circuits can switch on and off 100,000 times in that tenth of a second, so some circuits will not work reliably with a mechanical switch.   This is because the switch contact bounces when it closes.   It may bounce once, twice or several times depending on how the switch is operated.   If the switch is being used as an input to a counting circuit, the circuit may count 1, 2 or several switch inputs for one operation of the switch.   It is normal to “de-bounce” any mechanical switch.   This could be done using a couple of NAND gates connected like this:

Here, the mechanical switch is buffered by a ‘latch’.   When the ‘Set’ switch is operated, the output goes low.   The unconnected input of gate ‘1’ acts as if it has a High voltage on it (due to the way the NAND gate circuit was built).   The other input is held low by the output of gate ‘2’.   This pushes the output of gate ‘1’ high, which in turn, holds the output of gate ‘2’ low.   This is the first stable state.

When the ‘Set’ switch is operated, the output of gate ‘2’ is driven high.   Now, both inputs of gate ‘1’ are high which causes its output to go low.   This in turn, drives one input of gate ‘2’ low, which holds the output of gate ‘2’ high.   This is the second stable state.

To summarise: pressing the ‘Set’ switch any number of times, causes the output to go low, once and only once.   The output will stay low until the ‘Reset’ switch is operated once, twice or any number of times, at which point the output will go high and stay there.

This circuit uses just half of one cheap NAND gate chip to create a bistable multivibrator which is physically very small and light.

Electronics Tutorials

Advertisements
  1. Hello you have a nice website over here! Thanks for sharing this interesting information for us! If you keep up this good work I’ll visit your blog again. Thanks!

  2. What i don’t realize is in reality how you are no longer actually much more neatly-appreciated than you may be now. You’re so intelligent.
    You already know therefore considerably with regards to this subject,
    produced me in my opinion believe it from numerous varied angles.
    Its like men and women aren’t fascinated unless it’s something to accomplish with
    Woman gaga! Your own stuffs excellent. At all times maintain it up!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: