This action might not be possible to undo. Are you sure you want to continue?
From: Electronics Club Home Page
• • • • • • • • • • • • • • • • • • • • • • • •
Block Diagrams Circuit Diagrams Circuit Symbols - including the functions of components Electricity and the Electron Series and Parallel Connections Voltage and Current Meters - voltmeters, ammeters, galvanometers and ohmmeters Multimeters - choosing and using Resistance - resistors in series and parallel, conductors and insulators Ohm's Law - including the VIR triangle and calculations Power and Energy AC, DC and Electrical Signals Oscilloscopes (CRO) - setting up; measuring voltage and time Power Supplies Transducers Voltage Dividers Transistor Circuits Analogue and Digital Systems Logic Gates Capacitance and Uses of Capacitors Impedance and Reactance 555 and 556 Timer Circuits Counting Circuits Quantities and Units used in Electronics Capacitors Connectors and Cables Diodes including zener diodes Integrated Circuits (Chips) o 4000 series logic ICs (pin connections etc) o 74 series logic ICs (pin connections etc) Lamps LEDs (Light Emitting Diodes) Relays Resistors Switches Transistors Heat sinks for transistors Variable Resistors Other components including LDR and Thermistor Soldering Guide Tools required for electronics Starter kit of components Frequently Asked Questions
• • • •
• • • • • • • • • • • • •
Block diagrams are used to understand (and design) complete circuits by breaking them down into smaller sections or blocks. Each block performs a particular function and the block diagram shows how they are connected together. No attempt is made to show the components used within a block, only the inputs and outputs are shown. This way of looking at circuits is called the systems approach. Power supply (or battery) connections are usually not shown on block diagrams.
Audio Amplifier System
The power supply (not shown) is connected to the pre-amplifier and power amplifier blocks.
• • •
Microphone - a transducer which converts sound to voltage. Pre-Amplifier - amplifies the small audio signal (voltage) from the microphone. Tone and Volume Controls - adjust the nature of the audio signal. The tone control adjusts the balance of high and low frequencies. The volume control adjusts the strength of the signal. Power Amplifier - increases the strength (power) of the audio signal. Loudspeaker - a transducer which converts the audio signal to sound.
Radio Receiver System
The power supply (not shown) is connected to the audio amplifier block.
• • • • •
Aerial - picks up radio signals from many stations. Tuner - selects the signal from just one radio station. Detector - extracts the audio signal carried by the radio signal. Audio Amplifier - increases the strength (power) of the audio signal. This could be broken down into the blocks like the Audio Amplifier System shown above. Loudspeaker - a transducer which converts the audio signal to sound.
Regulated Power Supply System
• • • •
Transformer - steps down 230V AC mains to low voltage AC. Rectifier - converts AC to DC, but the DC output is varying. Smoothing - smooth the DC from varying greatly to a small ripple. Regulator - eliminates ripple by setting DC output to a fixed voltage.
Feedback Control System
The power supply (not shown) is connected to the control circuit block.
• • •
• • •
Sensor - a transducer which converts the state of the controlled quantity to an electrical signal. Selector (control input) - selects the desired state of the output. Usually it is a variable resistor. Control Circuit - compares the desired state (control input) with the actual state (sensor) of the controlled quantity and sends an appropriate signal to the output transducer. Output Transducer - converts the electrical signal to the controlled quantity. Controlled Quantity - usually not an electrical quantity, e.g. motor speed. Feedback Path - usually not electrical, the Sensor detects the state of the controlled quantity.
Circuit diagrams show how electronic components are connected together. Each component is represented by a symbol and a few are shown here, for other symbols please see the Circuit Symbols page.
Circuit diagrams and component layouts
Circuit diagrams show the connections as clearly as possible with all wires drawn neatly as straight lines. The actual layout of the components is usually quite different from the circuit diagram and this can be confusing for the beginner. The secret is to concentrate on the connections, not the actual positions of components. The circuit diagram and stripboard layout for the Adjustable Timer project are shown here so you can see the difference. A circuit diagram is useful when testing a circuit and for understanding how it works. This is why the instructions for projects include a circuit diagram as well as the stripboard or printed circuit board layout which you need to build the circuit.
Drawing circuit diagrams
Drawing circuit diagrams is not difficult but it takes a little practice to draw neat, clear diagrams. This is a useful skill for science as well as for electronics. You will certainly need to draw circuit diagrams if you design your own circuits. Follow these tips for best results:
• • • • •
Make sure you use the correct symbol for each component. Draw connecting wires as straight lines (use a ruler). Put a 'blob' ( ) at each junction between wires. Label components such as resistors and capacitors with their values. The positive (+) supply should be at the top and the negative (-) supply at the bottom. The negative supply is usually labeled 0V, zero volts. If you are drawing the circuit diagram for science please see the section about drawing diagrams the 'electronics way'.
If the circuit is complex:
Try to arrange the diagram so that signals flow from left to right: inputs and controls should be on the left, outputs on the right. You may omit the battery or power supply symbols, but you must include (and label) the supply lines at the top and bottom.
Drawing circuit diagrams the 'electronics way'
Circuit diagrams for electronics are drawn with the positive (+) supply at the top and the negative (-) supply at the bottom. This can be helpful in understanding the operation of the circuit because the voltage decreases as you move down the circuit diagram. Circuit diagrams for science are traditionally drawn with the battery or power supply at the top. This is not wrong, but there is usually no advantage in drawing them this way and I think it is less helpful for understanding the circuit. I suggest that you always draw your circuit diagrams the 'electronics way', even for science! Note that the negative supply is usually called 0V (zero volts). This is explained on the Voltage and Current page.
Circuit symbols are used in circuit diagrams which show how a circuit is connected together. The actual layout of the components is usually quite different from the circuit diagram. To build a circuit you need a different diagram showing the layout of the parts on stripboard or printed circuit board.
Wires and connections
Component Wire Circuit Symbol Function of Component To pass current very easily from one part of a circuit to another. A 'blob' should be drawn where wires are connected (joined), but it is sometimes omitted. Wires connected at 'crossroads' should be staggered slightly to form two T-junctions, as shown on the right. In complex diagrams it is often necessary to draw wires crossing even though they are not connected. I prefer the 'bridge' symbol shown on the right because the simple crossing on the left may be misread as a join where you have forgotten to add a 'blob'!
Wires not joined
Component Circuit Symbol Function of Component Supplies electrical energy. The larger terminal (on the left) is positive (+). A single cell is often called a battery, but strictly a battery is two or more cells joined together. Supplies electrical energy. A battery is more than one cell. The larger terminal (on the left) is positive (+). Supplies electrical energy. DC = Direct Current, always flowing in one direction. Supplies electrical energy. AC = Alternating Current, continually changing direction. A safety device which will 'blow' (melt) if the current flowing through it exceeds a specified value. Two coils of wire linked by an iron core. Transformers are used to step up (increase) and step down (decrease) AC voltages. Energy is transferred between the coils by the magnetic field in the core. There is no electrical connection between the coils. A connection to earth. For many electronic circuits this is the 0V (zero volts) of the power supply, but for mains electricity and some radio circuits it really means the earth. It is also known as ground.
Output Devices: Lamps, Heater, Motor, etc.
Component Circuit Symbol Function of Component A transducer which converts electrical energy to light. This symbol is used for a lamp providing illumination, for example a car headlamp or torch bulb. A transducer which converts electrical energy to light. This symbol is used for a lamp which is an indicator, for example a warning light on a car dashboard. A transducer which converts electrical energy to heat. A transducer which converts electrical energy to kinetic energy (motion).
A transducer which converts electrical energy to sound.
A transducer which converts electrical energy to sound. A coil of wire which creates a magnetic field when current passes through it. It may have an iron core inside the coil. It can be used as a transducer converting electrical energy to mechanical energy by pulling on something.
Inductor (Coil, Solenoid)
Component Push Switch (push-tomake) Push-to-Break Switch On-Off Switch (SPST) Circuit Symbol Function of Component A push switch allows current to flow only when the button is pressed. This is the switch used to operate a doorbell. This type of push switch is normally closed (on), it is open (off) only when the button is pressed. SPST = Single Pole, Single Throw. An on-off switch allows current to flow only when it is in the closed (on) position. SPDT = Single Pole, Double Throw. A 2-way changeover switch directs the flow of current to one of two routes according to its position. Some SPDT switches have a central off position and are described as 'on-off-on'. DPST = Double Pole, Single Throw. A dual on-off switch which is often used to switch mains electricity because it can isolate both the live and neutral connections.
2-way Switch (SPDT)
Dual On-Off Switch (DPST)
Reversing Switch (DPDT)
DPDT = Double Pole, Double Throw. This switch can be wired up as a reversing switch for a motor. Some DPDT switches have a central off position.
An electrically operated switch, for example a 9V battery circuit connected to the coil can switch a 230V AC mains circuit. NO = Normally Open, COM = Common, NC = Normally Closed.
Component Circuit Symbol Function of Component A resistor restricts the flow of current, for example to limit the current passing through an LED. A resistor is used with a capacitor in a timing circuit. Some publications still use the old resistor symbol: This type of variable resistor with 2 contacts (a rheostat) is usually used to control current. Examples include: adjusting lamp brightness, adjusting motor speed, and adjusting the rate of flow of charge into a capacitor in a timing circuit. This type of variable resistor with 3 contacts (a potentiometer) is usually used to control voltage. It can be used like this as a transducer converting position (angle of the control spindle) to an electrical signal. This type of variable resistor (a preset) is operated with a small screwdriver or similar tool. It is designed to be set when the circuit is made and then left without further adjustment. Presets are cheaper than normal variable resistors so they are often used in projects to reduce the cost.
Variable Resistor (Rheostat)
Variable Resistor (Potentiometer)
Variable Resistor (Preset)
Component Circuit Symbol Function of Component A capacitor stores electric charge. A capacitor is used with a resistor in a timing circuit. It can also be used as a filter, to block DC signals but pass AC signals. A capacitor stores electric charge. This type must be connected the correct way round. A capacitor is used with a resistor in a timing circuit. It can also be used as a filter, to block DC signals but pass AC signals. A variable capacitor is used in a radio tuner. This type of variable capacitor (a trimmer) is operated with a small screwdriver or similar tool. It is designed to be set when the circuit is made and then left without further adjustment.
Component Diode LED Light Emitting Diode Zener Diode Circuit Symbol Function of Component A device which only allows current to flow in one direction. A transducer which converts electrical energy to light. A special diode which is used to maintain a fixed voltage across its terminals. A light-sensitive diode.
Component Circuit Symbol Function of Component
A transistor amplifies current. It can be used with other components to make an amplifier or switching circuit.
A transistor amplifies current. It can be used with other components to make an amplifier or switching circuit.
A light-sensitive transistor.
Audio and Radio Devices
Component Microphone Circuit Symbol Function of Component A transducer which converts sound to electrical energy.
A transducer which converts electrical energy to sound.
- 10 -
A transducer which converts electrical energy to sound.
A transducer which converts electrical energy to sound.
Amplifier (general symbol)
An amplifier circuit with one input. Really it is a block diagram symbol because it represents a circuit rather than just one component.
A device which is designed to receive or transmit radio signals. It is also known as an antenna.
Meters and Oscilloscope
Component Voltmeter Circuit Symbol Function of Component A voltmeter is used to measure voltage. The proper name for voltage is 'potential difference', but most people prefer to say voltage! An ammeter is used to measure current. A galvanometer is a very sensitive meter which is used to measure tiny currents, usually 1mA or less. An ohmmeter is used to measure resistance. Most multimeters have an ohmmeter setting. An oscilloscope is used to display the shape of electrical signals and it can be used to measure their voltage and time period.
Sensors (input devices)
Component Circuit Symbol Function of Component A transducer which converts brightness (light) to resistance (an electrical property). LDR = Light Dependent Resistor A transducer which converts temperature (heat) to resistance (an electrical property).
- 11 -
Logic gates process signals which represent true (1, high, +Vs, on) or false (0, low, 0V, off). There are two sets of symbols: traditional and IEC (International Electrotechnical Commission). Gate Type Traditional Symbol IEC Symbol Function of Gate A NOT gate can only have one input. The 'o' on the output means 'not'. The output of a NOT gate is the inverse (opposite) of its input, so the output is true when the input is false. A NOT gate is also called an inverter. An AND gate can have two or more inputs. The output of an AND gate is true when all its inputs are true. A NAND gate can have two or more inputs. The 'o' on the output means 'not' showing that it is a Not AND gate. The output of a NAND gate is true unless all its inputs are true. An OR gate can have two or more inputs. The output of an OR gate is true when at least one of its inputs is true. A NOR gate can have two or more inputs. The 'o' on the output means 'not' showing that it is a Not OR gate. The output of a NOR gate is true when none of its inputs are true. An EX-OR gate can only have two inputs. The output of an EX-OR gate is true when its inputs are different (one true, one false). An EX-NOR gate can only have two inputs. The 'o' on the output means 'not' showing that it is a Not EX-OR gate. The output of an EX-NOR gate is true when its inputs are the same (both true or both false).
Sets of circuit symbols to download
You can download complete sets of all the circuit symbols shown above. The sets are 'zipped' for convenience and they are provided in three formats:
WMF circuit symbols (32K) - Windows Metafiles. These vector drawings are the best format for printed documents on most computer systems, including Windows where they can be used in Word documents for example.
- 12 -
They can be enlarged without loss of quality. If you are not sure which format is best for you I suggest you try this one first. GIF circuit symbols (43K) - Graphics Interchange Format. These bitmap images are the best format for web pages but they print poorly and their bitmap nature will become obvious if they are enlarged. You can download individual symbols by saving the images used above on this page. Drawfile circuit symbols (29K) - for RISC OS (Acorn) computers. These high quality vector drawings are suitable for almost all documents on a RISC OS computer. All the symbols were originally drawn in this format. They print perfectly and can be enlarged without loss of quality. Sorry, this format is NOT suitable for Windows computers.
Electricity and the Electron
What is electricity?
Electricity is the flow of charge around a circuit carrying energy from the battery (or power supply) to components such as lamps and motors. Electricity can flow only if there is a complete circuit from the battery through wires to components and back to the battery again. The diagram shows a simple circuit of a battery, wires, a switch and a lamp. The switch works by breaking the circuit. With the switch open the circuit is broken - so electricity cannot flow and the lamp is off. With the switch closed the circuit is complete - allowing electricity to flow and the lamp is on. The electricity is carrying energy from the battery to the lamp. We can see, hear or feel the effects of electricity flowing such as lamp lighting, a bell ringing, or a motor turning - but we cannot see the electricity itself, so which way is it flowing?
- 13 -
Picture below shows an Imaginary positive particles moving in the direction of the conventional current.
Which way does electricity flow?
We say that electricity flows from the positive (+) terminal of a battery to the negative (-) terminal of the battery. We can imagine particles with positive electric charge flowing in this direction around the circuit, like the red dots in the diagram. This flow of electric charge is called conventional current. This direction of flow is used throughout electronics and it is the one you should remember and use to understand the operation of circuits. However this is not the whole answer because the particles that move in fact have negative charge! And they flow in the opposite direction!
When electricity was discovered scientists tried many experiments to find out which way the electricity was flowing around circuits, but in those early days they found it was impossible to find the direction of flow. They knew there were two types of electric charge, positive (+) and negative (-), and they decided to say that electricity was a flow of positive charge from + to -. They knew this was a guess, but a decision had to be made! Everything known at that time could also be explained if electricity was negative charge flowing the other way, from - to +.
- 14 -
The electron was discovered in 1897 and it was found to have a negative charge. The guess made in the early days of electricity was wrong! Electricity in almost all conductors is really the flow of electrons (negative charge) from - to +. By the time the electron was discovered the idea of electricity flowing from + to - (conventional current) was firmly established. Luckily it is not a problem to think of electricity in this way because positive charge flowing forwards is equivalent to negative charge flowing backwards. To prevent confusion you should always use conventional current when trying to understand how circuits work, imagine positively charged particles flowing from + to -.
Series and Parallel Connections
There are two ways of connecting components:
so that each component has the same current. The battery voltage is divided between the two lamps Each lamp will have half the battery voltage if the lamps are identical.
so that each component has the same voltage. Both lamps have the full battery voltage across them. The battery current is divided between the two lamps.
Most circuits contain a mixture of series and parallel connections
- 15 -
The terms series circuit and parallel circuit are sometimes used, but only the simplest of circuits are entirely one type or the other. It is better to refer to specific components and say they are connected in series or connected in parallel. For example: the circuit on the right shows a resistor and LED connected in series (on the right) and two lamps connected in parallel (in the centre). The switch is connected in series with the two lamps.
Lamps in Series
If several lamps are connected in series they will all be switched on and off together by a switch connected anywhere in the circuit. The supply voltage is divided equally between the lamps (assuming they are all identical). If one lamp blows, all the lamps will go out because the circuit is broken.
Christmas Tree Lights
The lamps on a Christmas tree are connected in series. Normally you would expect all the lamps to go out if one blew, but Christmas tree lamps are special! They are designed to short circuit (conduct like a wire link) when they blow, so the circuit is not broken and the other lamps remain lit, making it easier to locate the faulty lamp. Sets also include one 'fuse' lamp which blows normally. If there are 20 lamps and the mains electricity voltage is 240V, each lamp must be suitable for a 12V supply because the 240V is divided equally between the 20 lamps: 240V ÷ 20 = 12V. WARNING! The Christmas tree lamps may seem safe because they use only 12V but they are connected to the mains supply which can be lethal. Always unplug from the mains before changing lamps. The voltage across the holder of a missing lamp is the full 240V of the mains supply! (Yes, it really is!)
- 16 -
Lamps in Parallel
If several lamps are connected in parallel each one has the full supply voltage across it. The lamps may be switched on and off independently by connecting a switch in series with each lamp as shown in the circuit diagram. This arrangement is used to control the lamps in buildings. This type of circuit is often called a parallel circuit but you can see that it is not really so simple the switches are in series with the lamps, and it is these switch and lamp pairs that are connected in parallel.
Switches in Series
If several on-off switches are connected in series they must all be closed (on) to complete the circuit. The diagram shows a simple circuit with two switches connected in series to control a lamp. Switch S1 AND Switch S2 must be closed to light the lamp.
- 17 -
Switches in Parallel
If several on-off switches are connected in parallel only one needs to be closed (on) to complete the circuit. The diagram shows a simple circuit with two switches connected in parallel to control a lamp. Switch S1 OR Switch S2 (or both of them) must be closed to light the lamp.
Voltage and Current
Voltage and Current are vital to understanding electronics, but they are quite hard to grasp because we can't see them directly.
Voltage is the Cause, Current is the Effect
Voltage attempts to make a current flow, and current will flow if the circuit is complete. Voltage is sometimes described as the 'push' or 'force' of the electricity, it isn't really a force but this may help you to imagine what is happening. It is possible to have voltage without current, but current cannot flow without voltage.
No Voltage and No Current Voltage but No Current Voltage and Current The switch is closed making a The switch is open so the circuit Without the cell there is no source of voltage so current is broken and current cannot complete circuit so current can cannot flow. flow. flow.
- 18 -
Connecting a voltmeter in parallel
• • • • • • • •
Voltage is a measure of the energy carried by the charge. Strictly: voltage is the "energy per unit charge". The proper name for voltage is potential difference or p.d. for short, but this term is rarely used in electronics. Voltage is supplied by the battery (or power supply). Voltage is used up in components, but not in wires. We say voltage across a component. Voltage is measured in volts, V. Voltage is measured with a voltmeter, connected in parallel. The symbol V is used for voltage in equations.
Voltage at a point and 0V (zero volts)
Voltage is a difference between two points, but in electronics we often refer to voltage at a point meaning the voltage difference between that point and a reference point of 0V (zero volts). Zero volts could be any point in the circuit, but to be consistent it is normally the negative terminal of the battery or power supply. You will often see circuit diagrams labeled with 0V as a reminder. You may find it helpful to think of voltage like height in geography. The reference point of zero height is the mean (average) sea level and all heights are measured from that point. The zero volts in an electronic circuit is like the mean sea level in geography.
- 19 -
Zero volts for circuits with a dual supply
Some circuits require a dual supply with three supply connections as shown in the diagram. For these circuits the zero volts reference point is the middle terminal between the two parts of the supply. On complex circuit diagrams using a dual supply the earth symbol is often used to indicate a connection to 0V, this helps to reduce the number of wires drawn on the diagram. The diagram shows a ±9V dual supply, the positive terminal is +9V, the negative terminal is -9V and the middle terminal is 0V.
Connecting an ammeter in series
• • • • •
Current is the rate of flow of charge. Current is not used up, what flows into a component must flow out. We say current through a component. Current is measured in amps (amperes), A. Current is measured with an ammeter, connected in series. To connect in series you must break the circuit and put the ammeter across the gap, as shown in the diagram. The symbol I is used for current in equations. Why is the letter I used for current? ... see Frequently Ask Questions.
1A (1 amp) is quite a large current for electronics, so mA (milliamps) are often used. m (milli) means "thousandth": 1mA = 0.001A, or 1000mA = 1A
- 20 -
The need to break the circuit to connect in series means that ammeters are difficult to use on soldered circuits. Most testing in electronics is done with voltmeters which can be easily connected without disturbing circuits.
Voltage and Current for components in Series
Voltages add up for components connected in series. Currents are the same through all components connected in series. In this circuit the 4V across the resistor and the 2V across the LED add up to the battery voltage: 2V + 4V = 6V. The current through all parts (battery, resistor and LED) is 20mA.
Voltage and Current for components in Parallel
Voltages are the same across all components connected in parallel. Currents add up for components connected in parallel. In this circuit the battery, resistor and lamp all have 6V across them. The 30mA current through the resistor and the 60mA current through the lamp add up to the 90mA current through the battery.
- 21 -
Analogue displays have a pointer which moves over a graduated scale. They can be difficult to read because of the need to work out the value of the smallest scale division. For example the scale in the picture has 10 small divisions between 0 and 1 so each small division represents 0.1. The reading is therefore 1.25V (the pointer is estimated to be half way between 1.2 and 1.3). The maximum reading of an analogue meter is called full-scale deflection or FSD (it is 5V in the example shown). Analogue meters must be connected the correct way round to prevent them being damaged when the pointer tries to move in the wrong direction. They are useful for monitoring continuously changing values (such as the voltage across a capacitor discharging) and they can be good for quick rough readings because the movement of the pointer can be seen without looking away from the circuit under test.
Taking accurate readings
To take an accurate reading from an analogue scale you must have your eye in line with the pointer. Avoid looking at an angle from the left or right because you will see a reading which is a little too high or too low. Many analogue meters have a small strip of mirror along the scale to help you. When your eye is in the correct position the reflection of the pointer is hidden behind the pointer itself. If you can see the reflection you are looking at an angle. Correct Wrong Instead of a mirror, some meters have a twisted pointer to reflection hidden reflection visible aid accurate readings. The end of the pointer is turned through 90° so it appears very thin when viewed correctly. The meter shown in the galvanometers section has a twisted pointer although it is too small to see in the picture.
Values can be read directly from digital displays so they are easy to read accurately. It is normal for the least significant digit (on the right) to continually change between two or three values, this is a feature of the way digital meters work, not an error! Normally you will not need great precision and the least significant digit can be ignored or rounded up.
- 22 -
Digital meters may be connected either way round without damage, they will show a minus sign (-) when connected in reverse. If you exceed the maximum reading most digital meters show an almost blank display with just a 1 on the left-hand side. All digital meters contain a battery to power the display so they use virtually no power from the circuit under test. This means that digital voltmeters have a very high resistance (usually called input impedance) of 1M or more, usually 10M , and they are very unlikely to affect the circuit under test. For general use digital meters are the best type. They are easy to read, they may be connected in reverse and they are unlikely to affect the circuit under test.
It is important to connect meters the correct way round:
The positive terminal of the meter, marked + or colored red should be connected nearest to + on the battery or power supply. The negative terminal of the meter, marked - or colored black should be connected nearest to - on the battery or power supply.
• • • •
Voltmeters measure voltage. Voltage is measured in volts, V. Voltmeters are connected in parallel across components. Voltmeters have a very high resistance.
Connecting a voltmeter in parallel
Measuring voltage at a point
When testing circuits you often need to find the voltages at various points, for example the voltage at pin 2 of a 555 timer chip. This can seem confusing - where should you connect the second voltmeter lead?
- 23 -
• • • •
Connect the black (negative -) voltmeter lead to 0V, normally the negative terminal of the battery or power supply. Connect the red (positive +) voltmeter lead to the point you where you need to measure the voltage. The black lead can be left permanently connected to 0V while you use the red lead as a probe to measure voltages at various points. You may wish to use a crocodile clip on the black lead to hold it in place.
Voltage at a point really means the voltage difference between that point and 0V (zero volts) which is normally the negative terminal of the battery or power supply. Usually 0V will be labelled on the circuit diagram as a reminder. Analogue meters take a little power from the circuit under test to operate their pointer. This may upset the circuit and give an incorrect reading. To avoid this voltmeters should have a resistance of at least 10 times the circuit resistance (take this to be the highest resistor value near where the meter is connected). Most analogue voltmeters used in school science are not suitable for electronics because their resistance is too low, typically a few k . 100k or more is required for most electronics circuits.
Ammeters measure current. Current is measured in amps (amperes), A. 1A is quite large, so mA (milliamps) and µA (microamps) are often used. 1000mA = 1A, 1000µA = 1mA, 1000000µA = 1A. Ammeters are connected in series. To connect in series you must break the circuit and put the ammeter across the gap, as shown in the diagram. Ammeters have a very low resistance.
The need to break the circuit to connect in series means that ammeters are difficult to use on soldered circuits. Most testing in electronics is done with voltmeters which can be easily connected without disturbing circuits.
- 24 -
Connecting an ammeter in series
Galvanometers are very sensitive meters which are used to measure tiny currents, usually 1mA or less. They are used to make all types of analogue meters by adding suitable resistors as shown in the diagrams below. The photograph shows an educational 100µA galvanometer for which various multipliers and shunts are available.
Making a Voltmeter A galvanometer with a high resistance multiplier in series to make a voltmeter.
Making an Ammeter A galvanometer with a low resistance shunt in parallel to make an ammeter.
Galvanometer with multiplier and shunt Maximum meter current 100µA (or 20µA reverse). This meter is unusual in allowing small reverse readings to be shown.
- 25 -
An ohmmeter is used to measure resistance in ohms ( ). Ohmmeters are rarely found as separate meters but all standard multimeters have an ohmmeter setting. 1 is quite small so k and M are often used. 1k = 1000 , 1M = 1000k = 1000000 .
Multimeters are very useful test instruments. By operating a multi-position switch on the meter they can be quickly and easily set to be a voltmeter, an ammeter or an ohmmeter. They have several settings (called 'ranges') for each type of meter and the choice of AC or DC. Some multimeters have additional features such as transistor testing and ranges for measuring capacitance and frequency. Analogue multimeters consist of a galvanometer with various resistors which can be switched in as multipliers (voltmeter ranges) and shunts (ammeter ranges).
Choosing a multimeter
The photographs below show modestly priced multimeters which are suitable for general electronics use, you should be able to buy meters like these for less than £15. A digital multimeter is the best choice for your first multimeter, even the cheapest will be suitable for testing simple projects. If you are buying an analogue multimeter make sure it has a high sensitivity of 20k /V or greater on DC voltage ranges, anything less is not suitable for electronics. The sensitivity is normally marked in a corner of the scale, ignore the lower AC value (sensitivity on AC ranges is less important), the higher DC value is the critical one. Beware of cheap analogue multimeters sold for electrical work on cars because their sensitivity is likely to be too low.
- 26 -
All digital meters contain a battery to power the display so they use virtually no power from the circuit under test. This means that on their DC voltage ranges they have a very high resistance (usually called input impedance) of 1M or more, usually 10M , and they are very unlikely to affect the circuit under test. Typical ranges for digital multimeters like the one illustrated: (the values given are the maximum reading on each range)
• • •
DC Voltage: 200mV, 2000mV, 20V, 200V, 600V. AC Voltage: 200V, 600V. DC Current: 200µA, 2000µA, 20mA, 200mA, 10A*. *The 10A range is usually unfused and connected via a special socket. AC Current: None. (You are unlikely to need to measure this). Resistance: 200 , 2000 , 20k , 200k , 2000k , Diode Test.
Digital meters have a special diode test setting because their resistance ranges cannot be used to test diodes and other semiconductors.
Analogue meters take a little power from the circuit under test to operate their pointer. They must have a high sensitivity of at least 20k /V or they may upset the circuit under test and give an incorrect reading. See the section below on sensitivity for more details. Batteries inside the meter provide power for the resistance ranges, they will last several years but you should avoid leaving the meter set to a resistance range in case the leads touch accidentally and run the battery flat. Typical ranges for analogue multimeters like the one illustrated: (the voltage and current values given are the maximum reading on each range)
• • • • •
Analogue Multimeter DC Voltage: 0.5V, 2.5V, 10V, 50V, 250V, 1000V. AC Voltage: 10V, 50V, 250V, 1000V. DC Current: 50µA, 2.5mA, 25mA, 250mA. A high current range is often missing from this type of meter. AC Current: None. (You are unlikely to need to measure this). Resistance: 20 , 200 , 2k , 20k , 200k . These resistance values are in the middle of the scale for each range.
It is a good idea to leave an analogue multimeter set to a DC voltage range such as 10V when not in use. It is less likely to be damaged by careless use on this range, and there is a good chance that it will be the range you need to use next anyway!
- 27 -
Sensitivity of an analogue multimeter
Multimeters must have a high sensitivity of at least 20k /V otherwise their resistance on DC voltage ranges may be too low to avoid upsetting the circuit under test and giving an incorrect reading. To obtain valid readings the meter resistance should be at least 10 times the circuit resistance (take this to be the highest resistor value near where the meter is connected). You can increase the meter resistance by selecting a higher voltage range, but this may give a reading which is too small to read accurately! On any DC voltage range: Analogue Meter Resistance = Sensitivity × Max. reading of range e.g. a meter with 20k /V sensitivity on its 10V range has a resistance of 20k /V × 10V = 200k . By contrast, digital multimeters have a constant resistance of at least 1M (often 10M ) on all their DC voltage ranges. This is more than enough for almost all circuits.
Measuring voltage and current with a multimeter
1. Select a range with a maximum greater than you expect the reading to be. 2. Connect the meter, making sure the leads are the correct way round. Digital meters can be safely connected in reverse, but an analogue meter may be damaged. 3. If the reading goes off the scale: immediately disconnect and select a higher range. Multimeters are easily damaged by careless use so please take these precautions:
• • •
Always disconnect the multimeter before adjusting the range switch. Always check the setting of the range switch before you connect to a circuit. Never leave a multimeter set to a current range (except when actually taking a reading). The greatest risk of damage is on the current ranges because the meter has a low resistance.
Measuring voltage at a point
When testing circuits you often need to find the voltages at various points, for example the voltage at pin 2 of a 555 timer chip. This can seem confusing - where should you connect the second multimeter lead?
Measuring voltage at a point
- 28 -
• • • •
Connect the black (negative -) lead to 0V, normally the negative terminal of the battery or power supply. Connect the red (positive +) lead to the point you where you need to measure the voltage. The black lead can be left permanently connected to 0V while you use the red lead as a probe to measure voltages at various points. You may wish to fit a crocodile clip to the black lead of your multimeter to hold it in place while doing testing like this.
Voltage at a point really means the voltage difference between that point and 0V (zero volts) which is normally the negative terminal of the battery or power supply. Usually 0V will be labeled on the circuit diagram as a reminder.
Analogue Multimeter Scales These can appear daunting at first but remember that you only need to read one scale at a time! The top scale is used when measuring resistance.
Reading analogue scales
Check the setting of the range switch and choose an appropriate scale. For some ranges you may need to multiply or divide by 10 or 100 as shown in the sample readings below. For AC voltage ranges use the red markings because the calibration of the scale is slightly different. Sample readings on the scales shown: DC 10V range: 4.4V (read 0-10 scale directly) DC 50V range: 22V (read 0-50 scale directly) DC 25mA range: 11mA (read 0-250 and divide by 10) AC 10V range: 4.45V (use the red scale, reading 0-10) If you are not familiar with reading analogue scales generally you may wish to see the analogue display section on the general meters page.
Measuring resistance with a multimeter
To measure the resistance of a component it must not be connected in a circuit. If you try to measure resistance of components in a circuit you will obtain false readings (even if the supply is disconnected) and you may damage the multimeter.
- 29 -
The techniques used for each type of meter are very different so they are treated separately:
Measuring resistance with a DIGITAL multimeter
1. Set the meter to a resistance range greater than you expect the resistance to be. Notice that the meter display shows "off the scale" (usually blank except for a 1 on the left). Don't worry, this is not a fault, it is correct - the resistance of air is very high! 2. Touch the meter probes together and check that the meter reads zero. If it doesn't read zero, turn the switch to 'Set Zero' if your meter has this and try again. 3. Put the probes across the component. Avoid touching more than one contact at a time or your resistance will upset the reading!
Measuring resistance with an ANALOGUE multimeter
The resistance scale on an analogue meter is normally at the top, it is an unusual scale because it reads backwards and is not linear (evenly spaced). This is unfortunate, but it is due to the way the meter works. 1. Set the meter to a suitable resistance range. Choose a range so that the resistance you expect will be near the middle of the scale. For example: with the scale shown below and an expected resistance of about 50k choose the × 1k range. 2. Hold the meter probes together and adjust the control on the front of the meter which is usually labeled "0 ADJ" until the pointer reads zero (on the RIGHT remember!). If you can't adjust it to read zero, the battery inside the meter needs replacing. 3. Put the probes across the component. Avoid touching more than one contact at a time or your resistance will upset the reading!
Analogue Multimeter Scales The resistance scale is at the top, note that it reads backwards and is not linear (evenly spaced).
Reading analogue resistance scales
For resistance use the upper scale, noting that it reads backwards and is not linear (evenly spaced). Check the setting of the range switch so that you know by how much to multiply the reading.
- 30 -
Sample readings on the scales shown: × 10 range: 260 × 1k range: 26k If you are not familiar with reading analogue scales generally you may wish to see the analogue display section on the general meters page.
Testing a diode with a multimeter
The techniques used for each type of meter are very different so they are treated separately:
Diodes a = anode k = cathode
Testing a diode with a DIGITAL multimeter
Digital multimeters have a special setting for testing a diode, usually labeled with the diode symbol. Connect the red (+) lead to the anode and the black (-) to the cathode. The diode should conduct and the meter will display a value (usually the voltage across the diode in mV, 1000mV = 1V). Reverse the connections. The diode should NOT conduct this way so the meter will display "off the scale" (usually blank except for a 1 on the left).
Testing a diode with an ANALOGUE multimeter
Set the analogue multimeter to a low value resistance range such as × 10. It is essential to note that the polarity of analogue multimeter leads is reversed on the resistance ranges, so the black lead is positive (+) and the red lead is negative (-)! This is unfortunate, but it is due to the way the meter works. Connect the black (+) lead to anode and the red (-) to the cathode. The diode should conduct and the meter will display a low resistance (the exact value is not relevant). Reverse the connections. The diode should NOT conduct this way so the meter will show infinite resistance (on the left of the scale).
Testing a transistor with a multimeter
Set a digital multimeter to diode test and an analogue multimeter to a low resistance range such as × 10, as described above for testing a diode.
- 31 -
Test each pair of leads both ways (six tests in total):
• • •
The base-emitter (BE) junction should behave like a diode and conduct one way only. The base-collector (BC) junction should behave like a diode and conduct one way only. The collector-emitter (CE) should not conduct either way.
Testing an NPN transistor The diagram shows how the junctions behave in an NPN transistor. The diodes are reversed in a PNP transistor but the same test procedure can be used. Some multimeters have a 'transistor test' function; please refer to the instructions supplied with the meter for details.
Resistance is the property of a component which restricts the flow of electric current. Energy is used up as the voltage across the component drives the current through it and this energy appears as heat in the component. Resistance is measured in ohms, the symbol for ohm is an omega 1 is quite small for electronics so resistances are often given in k 1 k = 1000 1 M = 1000000 . Resistors used in electronics can have resistances as low as 0.1 . and M .
or as high as 10 M .
Resistors connected in Series
- 32 -
When resistors are connected in series their combined resistance is equal to the individual resistances added together. For example if resistors R1 and R2 are connected in series their combined resistance, R, is given by: Combined resistance in series: R = R1 + R2 This can be extended for more resistors: R = R1 + R2 + R3 + R4 + ... Note that the combined resistance in series will always be greater than any of the individual resistances.
Resistors connected in Parallel
When resistors are connected in parallel their combined resistance is less than any of the individual resistances. There is a special equation for the combined resistance of two resistors R1 and R2: Combined resistance of R1 × R2 R= two resistors in parallel: R1 + R2 For more than two resistors connected in parallel a more difficult equation must be used. This adds up the reciprocal ("one over") of each resistance to give the reciprocal of the combined resistance, R: 1 1 1 1 = + + + ... R R1 R2 R3 The simpler equation for two resistors in parallel is much easier to use! Note that the combined resistance in parallel will always be less than any of the individual resistances.
Conductors, Semiconductors and Insulators
The resistance of an object depends on its shape and the material from which it is made. For a given material, objects with a smaller cross-section or longer length will have a greater resistance.
- 33 -
Materials can be divided into three groups:
Conductors which have low resistance. Examples: metals (aluminum, copper, silver etc.) and carbon. Metals are used to make connecting wires, switch contacts and lamp filaments. Resistors are made from carbon or long coils of thin wire. Semiconductors which have moderate resistance. Examples: germanium, silicon. Semiconductors are used to make diodes, LEDs, transistors and integrated circuits (chips). Insulators which have high resistance. Examples: most plastics such as polythene and PVC (polyvinyl chloride), paper, glass. PVC is used as an outer covering for wires to prevent them making contact.
To make a current flow through a resistance there must be a voltage across that resistance. Ohm's Law shows the relationship between the voltage (V), current (I) and resistance (R). It can be written in three ways:
V = voltage in volts (V) I = current in amps (A) R = resistance in ohms ( )
V = voltage in volts (V) I = current in milliamps (mA) R = resistance in kilohms (k )
For most electronic circuits the amp is too large and the ohm is too small, so we often measure current in milliamps (mA) and resistance in kilohms (k ). 1 mA = 0.001 A and 1 k = 1000 . The Ohm's Law equations work if you use V, A and , or if you use V, mA and k . You must not mix these sets of units in the equations so you may need to convert between mA and A or k and .
The VIR Triangle
Ohm's Law Triangle You can use the VIR triangle to help you remember the three versions of Ohm's Law. Write down V, I and R in a triangle like the one in the yellow box on the right.
- 34 -
• • •
To calculate voltage, V: put your finger over V, this leaves you with I R, so the equation is V = I × R To calculate current, I: put your finger over I, this leaves you with V over R, so the equation is I = V/R To calculate resistance, R: put your finger over R, this leaves you with V over I, so the equation is R = V/I
Ohm's Law Calculations
Use this method to guide you through calculations: 1. Write down the Values, converting units if necessary. 2. Select the Equation you need (use the VIR triangle). 3. Put the Numbers into the equation and calculate the answer. It should be Very Easy Now!
3 V is applied across a 6 resistor, what is the current? o Values: V = 3 V, I = ?, R = 6 o Equation: I = V/R o Numbers: Current, I = 3/6 = 0.5 A A lamp connected to a 6 V battery passes a current of 60 mA, what is the lamp's resistance? o Values: V = 6 V, I = 60 mA, R = ? o Equation: R = V/I o Numbers: Resistance, R = 6/60 = 0.1 k = 100 (using mA for current means the calculation gives the resistance in k ) A 1.2 k resistor passes a current of 0.2 A, what is the voltage across it? o Values: V = ?, I = 0.2 A, R = 1.2 k = 1200 (1.2 k is converted to 1200 because A and k must not be used together) o Equation: V = I × R o Numbers: V = 0.2 × 1200 = 240 V
Power and Energy
What is power?
Power is the rate of using or supplying energy: Energy Power = Time Power is measured in watts (W) Energy is measured in joules (J) Time is measured in seconds (s)
Electronics is mostly concerned with small quantities of power, so the power is often measured in milliwatts (mW), 1mW = 0.001W. For example an LED uses about 40mW and a bleeper uses about 100mW, even a lamp such as a torch bulb only uses about 1W. The typical power used in mains electrical circuits is much larger, so this power may be measured in kilowatts (kW), 1kW = 1000W. For example a typical mains lamp uses 60W and a kettle uses about 3kW.
- 35 -
Calculating power using current and voltage
There are three ways of writing an equation for power, current and voltage: P V P I
Power = Current × Voltage so P = I × V
P = power in watts (W) V = voltage in volts (V) I = current in amps (A)
P = power in milliwatts (mW) V = voltage in volts (V) I = current in milliamps (mA)
You can use the PIV triangle to help you remember the three versions of the power equations. Use it in the same way as the Ohm's Law triangle. For most electronic circuits the amp is too large, so we often measure current in milliamps (mA) and power in milliwatts (mW). 1mA = 0.001A and 1mW = 0.001W.
Calculating power using resistance and current or voltage
Using Ohm's Law V = I × R we can convert P = I × V to: P = I² × R where: P = power in watts (W) or I = current in amps (A) R = resistance in ohms ( ) P = V² / R V = voltage in volts (V) PI²R triangle V²PR triangle
Wasted power and overheating
Normally electric power is useful, making a lamp light or a motor turn for example. However, electrical energy is converted to heat whenever a current flow through a resistance and this can be problems if it makes a device or wire overheat. In electronics the effect is usually negligible, but if the resistance is low (a wire or low value resistor for example) the current can be sufficiently large to cause a problem.
- 36 -
You can see from the equation P = I² × R that for a given resistance the power depends on the current squared, so doubling the current will give 4 times the power. Resistors are rated by the maximum power they can have developed in them without damage, but power ratings are rarely quoted in parts lists because the standard ratings of 0.25W or 0.5W are suitable for most circuits. Further information is available on the Resistors page. Wires and cables are rated by the maximum current they can pass without overheating. They have a very low resistance so the maximum current is relatively large. For further information about current rating please see the Connectors and Cables page.
The amount of energy used (or supplied) depends on the power and the time for which it is used: Energy = Power × Time A low power device operating for a long time can use more energy than a high power device operating for a short time. For example:
A 60W lamp switched on for 8 hours uses 60W × 8 × 3600s = 1728kJ. A 3kW kettle switched on for 5 minutes uses 3000W × 5 × 60s = 900kJ.
The standard unit for energy is the joule (J), but 1J is a very small amount of energy for mains electricity so kilojoule (kJ) or megajoule (MJ) are sometimes used in scientific work. In the home we measure electrical energy in kilowatt-hours (kWh). 1kWh is the energy used by a 1kW power appliance when it is switched on for 1 hour: 1kWh = 1kW × 1 hour = 1000W × 3600s = 3.6MJ For example:
A 60W lamp switched on for 8 hours uses 0.06kW × 8 = 0.48kWh. A 3kW kettle switched on for 5 minutes uses 3kW × 5/60 = 0.25kWh.
AC, DC and Electrical Signals
AC means Alternating Current and DC means Direct Current. AC and DC are also used when referring to voltages and electrical signals which are not currents! For example: a 12V AC power supply has an alternating voltage (which will make an alternating current flow). An electrical signal is a voltage or current which conveys information, usually it means a voltage. The term can be used for any voltage or current in a circuit.
- 37 -
Alternating Current (AC)
Alternating Current (AC) flows one way, then the other way, continually reversing direction. An AC voltage is continually changing between positive (+) and negative (-).
The rate of changing direction is called the frequency of the AC and it is measured in hertz (Hz) which is the number of forwards-backwards cycles per second. An AC supply is suitable for powering some devices such as lamps and heaters but almost all electronic circuits require a steady DC supply (see below).
Direct Current (DC)
Direct Current (DC) always flows in the same direction, but it may increase and decrease.
- 38 -
A DC voltage is always positive (or always negative), but it may increase and decrease. Electronic circuits normally require a steady DC supply which is constant at one value or a smooth DC supply which has a small variation called ripple. Cells, batteries and regulated power supplies provide steady DC which is ideal for electronic circuits. Power supplies contain a transformer which converts the mains AC supply to a safe low voltage AC. Then the AC is converted to DC by a bridge rectifier but the output is varying DC which is unsuitable for electronic circuits. Some power supplies include a capacitor to provide smooth DC which is suitable for lesssensitive electronic circuits, including most of the projects on this website. Lamps, heaters and motors will work with any DC supply.
Properties of electrical signals
An electrical signal is a voltage or current which conveys information, usually it means a voltage. The term can be used for any voltage or current in a circuit. The voltage-time graph on the right shows various properties of an electrical signal. In addition to the properties labeled on the graph, there is frequency which is the number of cycles per second. The diagram shows a sine wave but these properties apply to any signal with a constant shape.
• • • •
Amplitude is the maximum voltage reached by the signal. It is measured in volts, V. Peak voltage is another name for amplitude. Peak-peak voltage is twice the peak voltage (amplitude). When reading an oscilloscope trace it is usual to measure peak-peak voltage. Time period is the time taken for the signal to complete one cycle. It is measured in seconds (s), but time periods tend to be short so milliseconds (ms) and microseconds (µs) are often used. 1ms = 0.001s and 1µs = 0.000001s. Frequency is the number of cycles per second. It is measured in hertz (Hz), but frequencies tend to be high so kilohertz (kHz) and megahertz (MHz) are often used. 1kHz = 1000Hz and 1MHz = 1000000Hz. frequency = 1 time period and time period =
- 39 -
Mains electricity in the UK has a frequency of 50Hz, so it has a time period of 1/50 = 0.02s = 20ms.
Root Mean Square (RMS) Values
The value of an AC voltage is continually changing from zero up to the positive peak, through zero to the negative peak and back to zero again. Clearly for most of the time it is less than the peak voltage, so this is not a good measure of its real effect. Instead we use the root mean square voltage (VRMS) which is 0.7 of the peak voltage (Vpeak): VRMS = 0.7 × Vpeak and Vpeak = 1.4 × VRMS These equations also apply to current. They are only true for sine waves (the most common type of AC) because the 0.7 and 1.4 are different values for other shapes.
The RMS value is the effective value of a varying voltage or current. It is the equivalent steady DC (constant) value which gives the same effect. For example a lamp connected to a 6V RMS AC supply will light with the same brightness when connected to a steady 6V DC supply. However, the lamp will be dimmer if connected to a 6V peak AC supply because the RMS value of this is only 4.2V (it is equivalent to a steady 4.2V DC). You may find it helps to think of the RMS value as a sort of average, but please remember that it is NOT really the average! In fact the average voltage (or current) of an AC signal is zero because the positive and negative parts exactly cancel out!
What do AC meters show, is it the RMS or peak voltage?
AC voltmeters and ammeters show the RMS value of the voltage or current. DC meters also show the RMS value when connected to varying DC providing the DC is varying quickly, if the frequency is less than about 10Hz you will see the meter reading fluctuating instead.
What does '6V AC' really mean, is it the RMS or peak voltage?
If the peak value is meant it should be clearly stated, otherwise assume it is the RMS value. In everyday use AC voltages (and currents) are always given as RMS values because this allows
- 40 -
a sensible comparison to be made with steady DC voltages (and currents), such as from a battery. For example a '6V AC supply' means 6V RMS, the peak voltage is 8.6V. The UK mains supply is 230V AC, this means 230V RMS so the peak voltage of the mains is about 320V!
So what does root mean square (RMS) really mean?
First square all the values, then find the average (mean) of these square values over a complete cycle, and find the square root of this average. That is the RMS value. Confused? Ignore the math (it looks more complicated than it really is), just accept that RMS values for voltage and current are a much more useful quantity than peak values.
An oscilloscope is a test instrument which allows you to look at the 'shape' of electrical signals by displaying a graph of voltage against time on its screen. It is like a voltmeter with the valuable extra function of showing how the voltage varies with time. A graticule with a 1cm grid enables you to take measurements of voltage and time from the screen. The graph, usually called the trace, is drawn by a beam of electrons striking the phosphor coating of the screen making it emit light, usually green or blue. This is similar to the way a television picture is produced. Oscilloscopes contain a vacuum tube with a cathode (negative electrode) at one end to emit electrons and an anode (positive electrode) to accelerate them so they move rapidly down the tube to the screen. This arrangement is called an electron gun. The tube also contains electrodes to deflect the electron beam up/down and left/right.
Circuit symbol for an oscilloscope
Cathode Ray Oscilloscope (CRO)
The electrons are called cathode rays because they are emitted by the cathode and this gives the oscilloscope its full name of cathode ray oscilloscope or CRO. A dual trace oscilloscope can display two traces on the screen, allowing you to easily compare the input and output of an amplifier for example. It is well worth paying the modest extra cost to have this facility. Precautions
An oscilloscope should be handled gently to protect its fragile (and expensive) vacuum tube. Oscilloscopes use high voltages to create the electron beam and these remain for some time after switching off - for your own safety do not attempt to examine the inside of an oscilloscope!
- 41 -
Setting up an oscilloscope
Oscilloscopes are complex instruments with many controls and they require some care to set up and use successfully. It is quite easy to 'lose' the trace off the screen if controls are set wrongly! There is some variation in the arrangement and labeling of the many controls so the following instructions may need to be adapted for your instrument.
• • • • • • • • • • • •
Switch on the oscilloscope to warm up (it takes a minute or two). Do not connect the input lead at this stage. Set the AC/GND/DC switch (by the Y INPUT) to DC. Set the SWP/X-Y switch to SWP (sweep). Set Trigger Level to AUTO. Set Trigger Source to INT (internal, the y input). Set the Y AMPLIFIER to 5V/cm (a moderate This is what you should see value). after setting up, when there Set the TIMEBASE to 10ms/cm (a moderate is no input signal connected speed). Turn the timebase VARIABLE control to 1 or CAL. Adjust Y SHIFT (up/down) and X SHIFT (left/right) to give a trace across the middle of the screen, like the picture. Adjust INTENSITY (brightness) and FOCUS to give a bright, sharp trace. The oscilloscope is now ready to use! Connecting the input lead is described in the next section.
Further information on the controls: Timebase | Y amplifier | AC/GND/DC switch
Connecting an Oscilloscope
The Y INPUT lead to an oscilloscope should be a co-axial lead and the diagram shows its construction. The central wire carries the signal and the screen is connected to earth (0V) to shield the signal from electrical interference (usually called noise). Most oscilloscopes have a BNC socket for the y input and the lead is connected with a push and twist action, to disconnect you need to twist and pull. Oscilloscopes used in schools may have red and black 4mm sockets so that ordinary, unscreened, 4mm plug leads can be used if necessary. Professionals use a specially designed lead and probes kit Oscilloscope lead and probes kit for best results with high frequency signals and when testing high resistance circuits, but this is not essential for simpler work at audio frequencies (up to 20kHz).
Construction of a co-axial lead
- 42 -
An oscilloscope is connected like a voltmeter but you must be aware that the screen (black) connection of the input lead is connected to mains earth at the oscilloscope! This means it must be connected to earth or 0V on the circuit being tested.
Obtaining a clear and stable trace
Once you have connected the oscilloscope to the circuit you wish to test you will need to adjust the controls to obtain a clear and stable trace on the screen:
The Y AMPLIFIER (VOLTS/CM) control determines the height of the trace. Choose a setting so the trace occupies at least half the screen height, but does not disappear off the screen. The TIMEBASE (TIME/CM) control determines the rate at which the dot sweeps across the screen. Choose a setting so the trace shows at least one cycle of the signal across the screen. Note that a steady DC input signal gives a horizontal line trace for which the timebase setting is not critical. The TRIGGER control is usually best left set to AUTO.
The trace of an AC signal with the oscilloscope controls correctly set
If you are using an oscilloscope for the first time it is best to start with an easy signal such as the output from an AC power pack set to about 4V. Further information on the controls: Timebase | Y amplifier | AC/GND/DC switch
Measuring voltage and time period
The trace on an oscilloscope screen is a graph of voltage against time. The shape of this graph is determined by the nature of the input signal. In addition to the properties labeled on the graph, there is frequency which is the number of cycles per second. The diagram shows a sine wave but these properties apply to any signal with a constant shape.
Amplitude is the maximum voltage reached by the signal. It is measured in volts, V. Peak voltage is another name for amplitude.
- 43 -
Peak-peak voltage is twice the peak voltage (amplitude). When reading an oscilloscope trace it is usual to measure peak-peak voltage. Time period is the time taken for the signal to complete one cycle. It is measured in seconds (s), but time periods tend to be short so milliseconds (ms) and microseconds (µs) are often used. 1ms = 0.001s and 1µs = 0.000001s. Frequency is the number of cycles per second. It is measured in hertz (Hz), but frequencies tend to be high so kilohertz (kHz) and megahertz (MHz) are often used. 1kHz = 1000Hz and 1MHz = 1000000Hz. frequency = 1 time period and time period = 1 frequency
Voltage is shown on the vertical y-axis and the scale is determined by the Y AMPLIFIER (VOLTS/CM) control. Usually peak-peak voltage is measured because it can be read correctly even if the position of 0V is not known. The amplitude is half the peak-peak voltage. If you wish to read the amplitude voltage directly you must check the position of 0V (normally halfway up the screen): move the AC/GND/DC switch to GND (0V) and use Y-SHIFT (up/down) to adjust the position of the trace if necessary, switch back to DC afterwards so you can see the signal again. Voltage = distance in cm × volts/cm Example: peak-peak voltage = 4.2cm × 2V/cm = 8.4V amplitude (peak voltage) = ½ × peak-peak voltage = 4.2V
The trace of an AC signal Y AMPLIFIER: 2V/cm TIMEBASE: 5ms/cm Example measurements: peak-peak voltage = 8.4V amplitude voltage = 4.2V time period = 20ms frequency = 50Hz
Time is shown on the horizontal x-axis and the scale is determined by the TIMEBASE (TIME/CM) control. The time period (often just called period) is the time for one cycle of the signal. The frequency is the number of cycles per second, frequency = 1/time period
Ensure that the variable timebase control is set to 1 or CAL (calibrated) before attempting to take a time reading. Time = distance in cm × time/cm Example: time period = 4.0cm × 5ms/cm = 20ms and frequency = 1/time period = 1/20ms = 50Hz
- 44 -
Timebase (time/cm) and trigger controls
The oscilloscope sweeps the electron beam across the screen from left to right at a steady speed set by the TIMEBASE control. Each setting is labeled with the time the dot takes to move 1cm, effectively it is setting the scale on the x-axis. The timebase control may be labeled TIME/CM. At slow timebase settings (such as 50ms/cm) you can see a dot moving across the screen but at faster settings (such as 1ms/cm) the dot is moving so fast that it appears to be a line. The VARIABLE timebase control can be turned to make a fine adjustment to the speed, but it must be left at the position labeled 1 or CAL (calibrated) if you wish to take time readings from the trace drawn on the screen. The TRIGGER controls are used to maintain a steady trace on the screen. If they are set wrongly you may see a trace drifting sideways, a confusing 'scribble' on the screen, or no trace at all! The trigger maintains a steady trace by starting the dot sweeping across the screen when the input signal reaches the same point in its cycle each time. For straightforward use it is best to leave the trigger level set to AUTO, but if you have difficulty obtaining a steady trace try adjusting this control to set the level manually. Fast timebase, no input The dot is too fast to see so it appears to be a line Slow timebase, no input You can see the dot moving
Y amplifier (volts/cm) control
The oscilloscope moves the trace up and down in proportion to the voltage at the Y INPUT and the setting of the Y AMPLIFIER control. This control sets the voltage represented by each centimeter (cm) on the screen; effectively it is setting the scale on the y-axis. Positive voltages make the trace move up, negative voltages make it move down. The y amplifier control may be labeled Y-GAIN or VOLTS/CM. The input voltage moving the dot up and down at the same time as the dot is swept across the screen means that the trace on the Varying DC (always positive) screen is a graph of voltage (y-axis) against time (x-axis) for the input signal.
- 45 -
The AC/GND/DC switch
The normal setting for this switch is DC for all signals, including AC! Switching to GND (ground) connects the y input to 0V and allows you to quickly check the position of 0V on the screen (normally halfway up). There is no need to disconnect the input lead while you do this because it is disconnected internally. Switching to AC inserts a capacitor in series with the input to block out any DC signal present and pass only AC signals. This is used to examine signals showing a small variation around one Switching to GND allows you constant value, such as the ripple on the output of a smooth DC to quickly check the position supply. Reducing the VOLTS/CM to see more detail of the ripple of 0V (normally halfway up). would normally take the trace off the screen! The AC setting removes the constant (DC) part of the signal, allowing you to view just the varying (AC) part which can now be examined more closely by reducing the VOLTS/CM. This is shown in the diagrams below:
Displaying a ripple signal using the AC switch
Switch in normal DC position. Switch moved to AC position. The constant (DC) part of the The ripple is difficult to see, signal is removed, leaving but if VOLTS/CM is reduced just the ripple (AC) part. to enlarge it the trace will disappear off the screen!
VOLTS/CM reduced to enlarge the ripple. The ripple can now be examined more closely.
There are many types of power supply. Most are designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronics circuits and other devices. A power supply can by broken down into a series of blocks, each of which performs a particular function. For example a 5V regulated supply:
- 46 -
Each of the blocks is described in more detail below:
• • • •
Transformer - steps down high voltage AC mains to low voltage AC. Rectifier - converts AC to DC, but the DC output is varying. Smoothing - smooth the DC from varying greatly to a small ripple. Regulator - eliminates ripple by setting DC output to a fixed voltage.
Power supplies made from these blocks are described below with a circuit diagram and a graph of their output:
• • • •
Transformer only Transformer + Rectifier Transformer + Rectifier + Smoothing Transformer + Rectifier + Smoothing + Regulator
Some electronic circuits require a power supply with positive and negative outputs as well as zero volts (0V). This is called a 'dual supply' because it is like two ordinary supplies connected together as shown in the diagram. Dual supplies have three outputs, for example a ±9V supply has +9V, 0V and -9V outputs.
The low voltage AC output is suitable for lamps, heaters and special AC motors. It is not suitable for electronic circuits unless they include a rectifier and a smoothing capacitor.
- 47 -
Transformer + Rectifier
The varying DC output is suitable for lamps, heaters and standard motors. It is not suitable for electronic circuits unless they include a smoothing capacitor.
Transformer + Rectifier + Smoothing
The smooth DC output has a small ripple. It is suitable for most electronic circuits.
Transformer + Rectifier + Smoothing + Regulator
The regulated DC output is very smooth with no ripple. It is suitable for all electronic circuits.
- 48 -
Transformers convert AC electricity from one voltage to another with little loss of power. Transformers work only with AC and this is one of the reasons why mains electricity is AC. Step-up transformers increase voltage, step-down transformers reduce voltage. Most power supplies use a step-down transformer to reduce the dangerously high mains voltage (230V in UK) to a safer low voltage. The input coil is called the primary and the output coil is called the secondary. There is no electrical connection between the two coils, instead they are linked by an alternating magnetic field created in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol represent the core. Transformers waste very little power so the power out is (almost) equal to the power in. Note that as voltage is stepped down current is stepped up. The ratio of the number of turns on each coil, called the Transformer turns ratio, determines the ratio of the voltages. A stepdown transformer has a large number of turns on its primary (input) coil which is connected to the high voltage mains supply, and a small number of turns on its secondary (output) coil to give a low output voltage. turns ratio = Vp Np = Vs Ns and power out = power in Vs × Is = Vp × Ip
Transformer circuit symbol
Vp = primary (input) voltage Np = number of turns on primary coil Ip = primary (input) current
Vs = secondary (output) voltage Ns = number of turns on secondary coil Is = secondary (output) current
There are several ways of connecting diodes to make a rectifier to convert AC to DC. The bridge rectifier is the most important and it produces full-wave varying DC. A full-wave rectifier can also be made from just two diodes if a centre-tap transformer is used, but this method is rarely used now that diodes are cheaper. A single diode can be used as a rectifier but it only uses the positive (+) parts of the AC wave to produce half-wave varying DC.
A bridge rectifier can be made using four individual diodes, but it is also available in special packages containing the four diodes required. It is called a full-wave rectifier because it uses all the AC wave (both positive and negative sections). 1.4V is used up in the bridge rectifier because each diode uses 0.7V when conducting and there are always two diodes conducting, as shown in the diagram below. Bridge rectifiers are rated by the maximum current they can
- 49 -
pass and the maximum reverse voltage they can withstand (this must be at least three times the supply RMS voltage so the rectifier can withstand the peak voltages). Please see the Diodes page for more details, including pictures of bridge rectifiers.
Bridge rectifier Alternate pairs of diodes conduct, changing over the connections so the alternating directions of AC are converted to the one direction of DC.
Output: full-wave varying DC (using all the AC wave)
Single diode rectifier
A single diode can be used as a rectifier but this produces half-wave varying DC which has gaps when the AC is negative. It is hard to smooth this sufficiently well to supply electronic circuits unless they require a very small current so the smoothing capacitor does not significantly discharge during the gaps. Please see the Diodes page for some examples of rectifier diodes.
Single diode rectifier
Output: half-wave varying DC (using only half the AC wave)
Smoothing is performed by a large value electrolytic capacitor connected across the DC supply to act as a reservoir, supplying current to the output when the varying DC voltage from the rectifier is falling. The diagram shows the unsmoothed varying DC (dotted line) and the smoothed DC (solid line). The capacitor charges quickly near the peak of the varying DC, and then discharges as it supplies current to the output.
- 50 -
Note that smoothing significantly increases the average DC voltage to almost the peak value (1.4 × RMS value). For example 6V RMS AC is rectified to full wave DC of about 4.6V RMS (1.4V is lost in the bridge rectifier), with smoothing this increases to almost the peak value giving 1.4 × 4.6 = 6.4V smooth DC. Smoothing is not perfect due to the capacitor voltage falling a little as it discharges, giving a small ripple voltage. For many circuits a ripple which is 10% of the supply voltage is satisfactory and the equation below gives the required value for the smoothing capacitor. A larger capacitor will give less ripple. The capacitor value must be doubled when smoothing halfwave DC. Smoothing capacitor for 10% ripple, C = 5 × Io Vs × f
C = smoothing capacitance in farads (F) Io = output current from the supply in amps (A) Vs = supply voltage in volts (V), this is the peak value of the unsmoothed DC f = frequency of the AC supply in hertz (Hz)
Voltage regulator Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or variable output voltages. They are also rated by the maximum current they can pass. Negative voltage regulators are available, mainly for use in dual supplies. Most regulators include some automatic protection from excessive current ('overload protection') and overheating ('thermal protection'). Many of the fixed voltage regulator ICs have 3 leads and look like power transistors, such as the 7805 +5V 1A regulator shown on the right. They include a hole for attaching a heatsink if necessary.
- 51 -
Zener Diode Regulator
Zener diode a = anode, k = cathode
For low current power supplies a simple voltage regulator can be made with a resistor and a zener diode connected in reverse as shown in the diagram. Zener diodes are rated by their breakdown voltage Vz and maximum power Pz (typically 400mW or 1.3W). The resistor limits the current (like an LED resistor). The current through the resistor is constant, so when there is no output current all the current flows through the zener diode and its power rating Pz must be large enough to withstand this. Choosing a zener diode and resistor: 1. The zener voltage Vz is the output voltage required 2. The input voltage Vs must be a few volts greater than Vz (this is to allow for small fluctuations in Vs due to ripple) 3. The maximum current Imax is the output current required plus 10% 4. The zener power Pz is determined by the maximum current: Pz > Vz × Imax 5. The resistor resistance: R = (Vs - Vz) / Imax 6. The resistor power rating: P > (Vs - Vz) × Imax Example: output voltage required is 5V, output current required is 60mA. 1. 2. 3. 4. 5. 6. Vz = 4.7V (nearest value available) Vs = 8V (it must be a few volts greater than Vz) Imax = 66mA (output current plus 10%) Pz > 4.7V × 66mA = 310mW, choose Pz = 400mW R = (8V - 4.7V) / 66mA = 0.05k = 50 , choose R = 47 Resistor power rating P > (8V - 4.7V) × 66mA = 218mW, choose P = 0.5W
A transducer is a device which converts a signal from one form to another. Most electronics circuits use both input and output transducers:
- 52 -
Input Transducers convert a quantity to an electrical signal (voltage) or to resistance (which can be converted to voltage). Input transducers are also called sensors. Examples:
• • • •
LDR converts brightness (of light) to resistance. Thermistor converts temperature to resistance. Microphone converts sound to voltage. Variable resistor converts position (angle) to resistance. LDR
Output Transducers convert an electrical signal to another quantity. Examples:
• • • • •
Lamp converts electricity to light. LED converts electricity to light. Loudspeaker converts electricity to sound. Motor converts electricity to motion. Heater converts electricity to heat. Loudspeaker
Using input transducers (sensors)
Most input transducers (sensors) vary their resistance and this can be used directly in some circuits but it is usually converted to an electrical signal in the form of a voltage. The voltage signal can be fed to other parts of the circuit, such as the input to a chip or a transistor switch. The conversion of varying resistance to varying voltage is performed by a simple circuit called a voltage divider. Voltage divider circuit
- 53 -
Voltage divider (also called potential divider)
A voltage divider consists of two resistances R1 and R2 connected in series across a supply voltage Vs. The supply voltage is divided up between the two resistances to give an output voltage Vo which is the voltage across R2. This depends on the size of R2 relative to R1:
If R2 is much smaller than R1, Vo is small (low, almost 0V) (because most of the voltage is across R1) If R2 is about the same as R1, Vo is about half Vs (because the voltage is shared about equally between R1 and R2) If R2 is much larger than R1, Vo is large (high, almost Vs) (because most of the voltage is across R2) Vo =
Vs × R2
R1 + R2 If you need a precise value for the output voltage Vo you can use Ohm's law and a little algebra to work out the formula for Vo shown on the right. The formula and the approximate rules given above assume that negligible current flows from the output. This is true if Vo is connected to a device with a high resistance such as voltmeter or a chip input. For further information please see the page on impedance. If the output is connected to a transistor Vo cannot become much greater than 0.7V because the transistor's base-emitter junction behaves like a diode. Voltage dividers are also called potential dividers, a name which comes from potential difference (the proper name for voltage). One of the main uses of voltage dividers is to connect input transducers into circuits...
Using an input transducer (sensor) in a voltage divider
Most input transducers (sensors) vary their resistance and usually a voltage divider is used to convert this to a varying voltage which is more useful. The voltage signal can be fed to other parts of the circuit, such as the input to a chip or a transistor switch. The sensor is one of the resistances in the voltage divider. It can be at the top (R1) or at the bottom (R2), the choice is determined by when you want a large value for the output voltage Vo:
Put the sensor at the top (R1) if you want a large Vo when the sensor has a small resistance. Put the sensor at the bottom (R2) if you want a large Vo when the sensor has a large resistance.
Then you need to choose a value for the resistor...
- 54 -
Choosing a resistor value
The value of the resistor R will determine the range of the output voltage Vo. For best results you need a large 'swing' (range) for Vo and this is achieved if the resistor is much larger than the sensor's minimum resistance Rmin, but much smaller than the sensor's maximum resistance Rmax. You can use a multimeter to help you find the minimum and maximum values of the sensor's resistance (Rmin and Rmax). There is no need to be precise, approximate values will do. Then choose resistor value: R = square root of (Rmin × Rmax) Choose a standard value which is close to this calculated value. or For example: An LDR: Rmin = 100 , Rmax = 1M , so R = square root of (100 × 1M) = 10k .
Swapping over the resistor and sensor
The resistor and sensor can be swapped over to invert the action of the voltage divider. For example an LDR has a high resistance when dark and a low resistance when brightly lit, so:
If the LDR is at the top (near +Vs), Vo will be low in the dark and high in bright light. If the LDR is at the bottom (near 0V), Vo will be high in the dark and low in bright light.
Using a variable resistor
A variable resistor may be used in place of the fixed resistor R. It will enable you to adjust the output voltage Vo for a given resistance of the sensor. For example you can use a variable resistor to set the exact brightness level which makes a chip change state. The variable resistor value should be larger than the fixed resistor value. For finer control you can use a fixed resistor in series with the variable resistor. For example if a 10k fixed resistor is suitable you could replace it with a fixed 4.7k resistor in series with a 10k variable resistor, allowing you to adjust the resistance from 4.7k to 14.7k . The sensor and variable If you are planning to use a variable resistor connected between resistor can be swapped the +Vs supply and the base of a transistor you must include a over if necessary resistor in series with the variable resistor. This is to prevent excessive base current destroying the transistor when the variable resistor is reduced to zero. For further information please see the page on Transistor Circuits.
- 55 -
This page explains the operation of transistors in circuits. Practical matters such as testing, precautions when soldering and identifying leads are covered by the Transistors page.
Types of transistor
There are two types of standard transistors, NPN and PNP, with different circuit symbols. The letters refer to the layers of semiconductor material used to make the transistor. Most transistors used today are NPN because this is the easiest type to make from silicon. This page is mostly about NPN transistors and if you are new to electronics it is best to start by learning how to use these first. Transistor circuit symbols The leads are labeled base (B), collector (C) and emitter (E). These terms refer to the internal operation of a transistor but they are not much help in understanding how a transistor is used, so just treat them as labels! A Darlington pair is two transistors connected together to give a very high current gain. In addition to standard (bipolar junction) transistors, there are field-effect transistors which are usually referred to as FET. They have different circuit symbols and properties and they are not (yet) covered by this page.
The diagram shows the two current paths through a transistor. You can build this circuit with two standard 5mm red LEDs and any general purpose low power NPN transistor (BC108, BC182 or BC548 for example). The small base current controls the larger collector current.
- 56 -
When the switch is closed a small current flows into the base (B) of the transistor. It is just enough to make LED B glow dimly. The transistor amplifies this small current to allow a larger current to flow through from its collector (C) to its emitter (E). This collector current is large enough to make LED C light brightly. When the switch is open no base current flows, so the transistor switches off the collector current. Both LEDs are off. A transistor amplifies current and can be used as a switch. This arrangement where the emitter (E) is in the controlling circuit (base current) and in the controlled circuit (collector current) is called common emitter mode. It is the most widely used arrangement for transistors so it is the one to learn first.
Functional model of an NPN transistor
The operation of a transistor is difficult to explain and understand in terms of its internal structure. It is more helpful to use this functional model:
• • • •
The base-emitter junction behaves like a diode. A base current IB flows only when the voltage VBE across the base-emitter junction is 0.7V or more. The small base current IB controls the large collector current Ic. Ic = hFE × IB (unless the transistor is full on and saturated) hFE is the current gain (strictly the DC current gain), a typical value for hFE is 100 (it has no units because it is a ratio) The collector-emitter resistance RCE is controlled by the base current IB: o IB = 0 RCE = infinity transistor off o IB small RCE reduced transistor partly on o IB increased RCE = 0 transistor full on ('saturated')
B B B B B B B
- 57 -
• • • • • •
A resistor is often needed in series with the base connection to limit the base current IB and prevent the transistor being damaged. Transistors have a maximum collector current Ic rating. The current gain hFE can vary widely, even for transistors of the same type! A transistor that is full on (with RCE = 0) is said to be 'saturated'. When a transistor is saturated the collector-emitter voltage VCE is reduced to almost 0V. When a transistor is saturated the collector current Ic is determined by the supply voltage and the external resistance in the collector circuit, not by the transistor's current gain. As a result the ratio Ic/IB for a saturated transistor is less than the current gain hFE. The emitter current IE = Ic + IB, but Ic is much larger than IB, so roughly IE = Ic.
B B B B
There is a table showing technical data for some popular transistors on the transistors page.
This is two transistors connected together so that the current amplified by the first is amplified further by the second transistor. The overall current gain is equal to the two individual gains multiplied together: Darlington pair current gain, hFE = hFE1 × hFE2 (hFE1 and hFE2 are the gains of the individual transistors) This gives the Darlington pair a very high current gain, such as 10000, so that only a tiny base current is required to make the pair switch on. A Darlington pair behaves like a single transistor with a very high current gain. It has three leads (B, C and E) which are equivalent to the leads of a standard individual transistor. To turn on there must be 0.7V across both the base-emitter junctions which are connected in series inside the Darlington pair, therefore it requires 1.4V to turn on. Darlington pairs are available as complete packages but you can make up your own from two transistors; TR1 can be a low power type, but normally TR2 will need to be high power. The maximum collector current Ic(max) for the pair is the same as Ic(max) for TR2.
Touch Switch Circuit
A Darlington pair is sufficiently sensitive to respond to the small current passed by your skin and it can be used to make a touch-switch as shown in the diagram. For this circuit which just lights an LED the two transistors can be any general purpose low power transistors. The 100k resistor protects the transistors if the contacts are linked with a piece of wire.
- 58 -
Using a Transistor as a Switch
When a transistor is used as a switch it must be either OFF or fully ON. In the fully ON state the voltage VCE across the transistor is almost zero and the transistor is said to be saturated because it cannot pass any more collector current Ic. The output device switched by the transistor is usually called the 'load'. The power developed in a switching transistor is very small:
In the OFF state: power = Ic × VCE, but Ic = 0, so the power is zero. In the full ON state: power = Ic × VCE, but VCE = 0 (almost), so the power is very small.
This means that the transistor should not become hot in use and you do not need to consider its maximum power rating. The important ratings in switching circuits are the maximum collector current Ic(max) and the minimum current gain hFE(min). The transistor's voltage ratings may be ignored unless you are using a supply voltage of more than about 15V. There is a table showing technical data for some popular transistors on the transistors page. For information about the operation of a transistor please see the functional model above.
If the load is a motor, relay or solenoid (or any other device with a coil) a diode must be connected across the load to protect the transistor (and chip) from damage when the load is switched off. The diagram shows how this is connected 'backwards' so that it will normally NOT conduct. Conduction only occurs when the load is switched off, at this moment current tries to continue flowing through the coil and it is harmlessly diverted through the diode. Without the diode no current could flow and the coil would produce a damaging high voltage 'spike' in its attempt to keep the current flowing.
- 59 -
When to use a Relay
Transistors cannot switch AC or high voltages (such as mains electricity) and they are not usually a good choice for switching large currents (> 5A). In these cases a relay will be needed, but note that a low power transistor may still be needed to switch the current for the relay's coil!
Advantages of relays:
• • • •
Relays can switch AC and DC, transistors can only switch DC. Relays can switch high voltages, transistors cannot. Relays are a better choice for switching large currents (> 5A). Relays can switch many contacts at once.
Disadvantages of relays:
• • • •
Relays are bulkier than transistors for switching small currents. Relays Relays cannot switch rapidly; transistors can switch many times per second. Relays use more power due to the current flowing through their coil. Relays require more current than many chips can provide, so a low power transistor may be needed to switch the current for the relay's coil.
Connecting a Transistor to the Output from a Chip
Most chips cannot supply large output currents so it may be necessary to use a transistor to switch the larger current required for output devices such as lamps, motors and relays. The 555 timer chip is unusual because it can supply a relatively large current of up to 200mA which is sufficient for some output devices such as low current lamps, buzzers and many relay coils without needing to use a transistor. A transistor can also be used to enable a chip connected to a low voltage supply (such as 5V) to switch the current for an output device with a separate higher voltage supply (such as 12V). The two power supplies must be linked, normally this is done by linking their 0V connections. In this case you should use an NPN transistor. A resistor RB is required to limit the current flowing into the base of the transistor and prevent it being damaged. However, RB must be sufficiently low to ensure that the transistor is thoroughly saturated to prevent it overheating, this is particularly important if the transistor is switching a large current (> 100mA). A safe rule is to make the base current IB about five times larger than the value which should just saturate the transistor.
B B B
Choosing a suitable NPN Transistor
The circuit diagram shows how to connect an NPN transistor; this will switch on the load when the chip output is high. If you need the opposite action, with the load switched on when the chip output is low (0V) please see the circuit for a PNP transistor below. The procedure below explains how to choose a suitable switching transistor.
- 60 -
1. The transistor's maximum collector current Ic(max) must be greater than the load current Ic. load current Ic = supply voltage Vs load resistance RL
2. The transistor's minimum current gain hFE(min) must be at least five times the load current Ic divided by the maximum output current from the chip. hFE(min) > 5 × load current Ic max. chip current NPN transistor switch (load is on when chip output is high)
Using units in calculations 3. Choose a transistor which meets these Remember to use V, A and or requirements and make a note of its properties: V, mA and k . For more details Ic(max) and hFE(min). please see the Ohm's Law page. There is a table showing technical data for some popular transistors on the transistors page. 4. Calculate an approximate value for the base resistor: RB =
Vc × hFE where Vc = chip supply voltage 5 × Ic (in a simple circuit with one supply this is Vs)
5. For a simple circuit where the chip and the load share the same power supply (Vc = Vs) you may prefer to use: RB = 0.2 × RL × hFE 6. Then choose the nearest standard value for the base resistor. 7. Finally, remember that if the load is a motor or relay coil a protection diode is required.
The output from a 4000 series CMOS chip is required to operate a relay with a 100 coil. The supply voltage is 6V for both the chip and load. The chip can supply a maximum current of 5mA. 1. Load current = Vs/RL = 6/100 = 0.06A = 60mA, so transistor must have Ic(max) > 60mA. 2. The maximum current from the chip is 5mA, so transistor must have hFE(min) > 60 (5 × 60mA/5mA). 3. Choose general purpose low power transistor BC182 with Ic(max) = 100mA and hFE(min) = 100. 4. RB = 0.2 × RL × hFE = 0.2 × 100 × 100 = 2000 . so choose RB = 1k8 or 2k2. 5. The relay coil requires a protection diode.
- 61 -
Choosing a suitable PNP Transistor
The circuit diagram shows how to connect a PNP transistor, this will switch on the load when the chip output is low (0V). If you need the opposite action, with the load switched on when the chip output is high please see the circuit for an NPN transistor above. The procedure for choosing a suitable PNP transistor is exactly the same as that for an NPN transistor described above. PNP Transistor Switch (load is on when chip output is low)
Using a Transistor Switch with Sensors
The top circuit diagram shows an LDR (light sensor) connected so that the LED lights when the LDR is in darkness. The variable resistor adjusts the brightness at which the transistor switches on and off. Any general purpose low power transistor can be used in this circuit. The 10k fixed resistor protects the transistor from excessive base current (which will destroy it) when the variable resistor is reduced to zero. To make this circuit switch at a suitable brightness you may need to experiment with different values for the fixed resistor, but it must not be less than 1k . If the transistor is switching a load with a coil, such as a motor or relay, remember to add a protection diode across the load. The switching action can be inverted, so the LED lights when the LDR is brightly lit, by swapping the LDR and variable resistor. In this case the fixed resistor can be omitted because the LDR resistance cannot be reduced to zero. Note that the switching action of this circuit is not particularly good because there will be an intermediate brightness when the transistor will be partly on (not saturated). In this state the transistor is in danger of overheating unless it is switching a small current. There is no problem with the small LED current, but the larger current for a lamp, motor or relay is likely to cause overheating. LED lights when the LDR is dark
LED lights when the LDR is bright
Other sensors, such as a thermistor, can be used with this circuit, but they may require a different variable resistor. You can calculate an approximate value for the variable resistor (Rv) by using a multimeter to find the minimum and maximum values of the sensor's resistance (Rmin and Rmax):
- 62 -
Variable resistor, Rv = square root of (Rmin × Rmax) For example an LDR: Rmin = 100 , Rmax = 1M , so Rv = square root of (100 × 1M) = 10k . You can make a much better switching circuit with sensors connected to a suitable IC (chip). The switching action will be much sharper with no partly on state.
A Transistor Inverter (NOT gate)
Inverters (NOT gates) are available on logic chips but if you only require one inverter it is usually better to use this circuit. The output signal (voltage) is the inverse of the input signal:
When the input is high (+Vs) the output is low (0V). When the input is low (0V) the output is high (+Vs).
Any general purpose low power NPN transistor can be used. For general use RB = 10k and RC = 1k , then the inverter output can be connected to a device with an input impedance (resistance) of at least 10k such as a logic chip or a 555 timer (trigger and reset inputs). If you are connecting the inverter to a CMOS logic chip input (very high impedance) you can increase RB to 100k and RC to 10k , this will reduce the current used by the inverter.
- 63 -
Analogue and Digital Systems
Analogue systems process analogue signals which can take any value within a range, for example the output from an LDR (light sensor) or a microphone. An audio amplifier is an example of an analogue system. The amplifier produces an output voltage which can be any value within the range of its power supply. Analogue signal An analogue meter can display any value within the range available on its scale. However, the precision of readings is limited by our ability to read them. For example the meter on the right shows 1.25V because the pointer is estimated to be half way between 1.2 and 1.3. The analogue meter can show any value between 1.2 and 1.3 but we are unable to read the scale more precisely than about half a division.
Analogue meter display
All electronic circuits suffer from 'noise' which is unwanted signal mixed in with the desired signal, for example an audio amplifier may pick up some mains 'hum' (the 50Hz frequency of the UK mains electricity supply). Noise can be difficult to eliminate from analogue signals because it may be hard to distinguish from the desired signal.
Digital systems process digital signals which can take only a limited number of values (discrete steps), usually just two values are used: the positive supply voltage (+Vs) and zero volts (0V). Digital systems contain devices such as logic gates, flipflops, shift registers and counters. A computer is an example of a digital system. A digital meter can display many values, but not every value within its range. For example the display on the right can show 6.25 and 6.26 but not a value between them. This is not a problem because digital meters normally have sufficient digits to show values more precisely than it is possible to read an analogue display.
Digital (logic) signal
Digital meter display
Most digital systems use the simplest possible type of signal which has just two values. This type of signal is called a logic signal because the two values (or states) can be called true and false. Normally the positive supply voltage +Vs represent true and 0V represents false. Other labels for the true and false states are shown in the table below.
- 64 -
Logic states True False 1 High +Vs On 0 Low 0V Off
Noise is relatively easy to eliminate from digital signals because it is easy to distinguish from the desired signal which can only have particular values. For example: if the signal is meant to be +5V (true) or 0V (false), noise of up to 2.5V can be eliminated by treating all voltages greater than 2.5V as true and all voltages less than 2.5V as false.
Logic gates process signals which represent true or false. Normally the positive Logic states supply voltage +Vs represent true and 0V represents false. Other terms which are used for the true and false states are shown in the table on the right. It is best True False to be familiar with them all. 1 0 Gates are identified by their function: NOT, AND, NAND, OR, NOR, EX-OR and EX-NOR. Capital letters are normally used to make it clear that the term refers to a logic gate. High +Vs On Low 0V Off
Note that logic gates are not always required because simple logic functions can be performed with switches or diodes:
• • •
Switches in series (AND function) Switches in parallel (OR function) Combining chip outputs with diodes (OR function)
Logic Gate Symbols
There are two series of symbols for logic gates:
The traditional symbols have distinctive shapes making them easy to recognize so they are widely used in industry and education.
- 65 -
The IEC (International Electrotechnical Commission) symbols are rectangles with a symbol inside to show the gate function. They are rarely used despite their official status, but you may need to know them for an examination.
Inputs and Outputs
Gates have two or more inputs, except a NOT gate which has only one input. All gates have only one output. Usually the letters A, B, C and so on are used to label inputs, and Q is used to label the output. On this page the inputs are shown on the left and the output on the right.
The Inverting Circle (o)
Some gate symbols have a circle on their output which means that their function includes inverting of the output. It is equivalent to feeding the output through a NOT gate. For example the NAND (Not AND) gate symbol shown on the right is the same as an AND gate symbol but with the addition of an inverting circle on the output.
A truth table is a good way to show the function of a logic gate. It shows the output states for every possible combination of input states. The symbols 0 (false) and 1 (true) are usually used in truth tables. The example truth table on the right shows the inputs and output of an AND gate. Input A Input B Output Q 0 0 1 0 1 0 0 0 0
1 1 1 There are summary truth tables below showing the output states for all types of 2-input and 3-input gates. These can be helpful if you are trying to select a suitable gate.
- 66 -
Logic gates are available on special ICs (chips) which usually contain several gates of the same type, for example the 4001 IC contains four 2-input NOR gates. There are several families of logic ICs and they can be split into two groups:
4000 Series 74 Series
To quickly compare the different families please see:
Summary table of logic families
The 4000 and 74HC families are the best for battery powered projects because they will work with a good range of supply voltages and they use very little power. However, if you are using them to design circuits and investigate logic gates please remember that all unused inputs MUST be connected to the power supply (either +Vs or 0V), this applies even if that part of the IC is not being used in the circuit!
NOT gate (Inverter)
The output Q is true when the input A is NOT true, the output is the inverse of the input: Q = NOT A A NOT gate can only have one input. A NOT gate is also called an inverter.
Input A Output Q 0 1 1 0
- 67 -
The output Q is true if input A AND input B are both true: Q = A AND B An AND gate can have two or more inputs, its output is true if all inputs are true.
Input A Input B Output Q 0 0 1 1 Traditional symbol IEC symbol 0 1 0 1 Truth Table 0 0 0 1
NAND gate (NAND = Not AND)
This is an AND gate with the output inverted, as shown by the 'o' on the output. The output is true if input A AND input B are NOT both true: Q = NOT (A AND B) A NAND gate can have two or more inputs, its output is true if NOT all inputs are true.
Input A Input B Output Q 0 0 1 1 Traditional symbol IEC symbol 0 1 0 1 Truth Table 1 1 1 0
The output Q is true if input A OR input B is true (or both of them are true): Q = A OR B An OR gate can have two or more inputs, its output is true if at least one input is true.
Input A Input B Output Q 0 0 1 1 Traditional symbol IEC symbol
- 68 -
0 1 0 1 Truth Table
0 1 1 1
NOR gate (NOR = Not OR)
This is an OR gate with the output inverted, as shown by the 'o' on the output. The output Q is true if NOT inputs A OR B are true: Q = NOT (A OR B) A NOR gate can have two or more inputs, its output is true if no inputs are true.
Input A Input B Output Q 0 0 1 1 Traditional symbol IEC symbol 0 1 0 1 Truth Table 1 0 0 0
EX-OR (EXclusive-OR) gate
The output Q is true if either input A is true OR input B is true, but not when both of them are true: Q = (A AND NOT B) OR (B AND NOT A) This is like an OR gate but excluding both inputs being true. The output is true if inputs A and B are DIFFERENT. EX-OR gates can only have 2 inputs.
Input A Input B Output Q 0 0 1 1 Traditional symbol IEC symbol 0 1 0 1 Truth Table 0 1 1 0
EX-NOR (EXclusive-NOR) gate
This is an EX-OR gate with the output inverted, as shown by the 'o' on the output. The output Q is true if inputs A and B are the SAME (both true or both false): Q = (A AND B) OR (NOT A AND NOT B) EX-NOR gates can only have 2 inputs.
- 69 -
Input A Input B Output Q 0 0 1 1 Traditional symbol IEC symbol 0 1 0 1 Truth Table 1 0 0 1
Summary Truth Tables
The summary truth tables below show the output states for all types of 2-input and 3-input gates. Summary for all 2-input Gates Inputs 0 0 1 1 0 1 0 1 0 0 0 1 1 1 1 0 Output of each Gate 0 1 1 1 1 0 0 0 0 1 1 0 1 0 0 1 0 0 0 0 1 Note that EX-OR and EX-NOR gates can only have 2 inputs 1 1 1 A B AND NAND OR NOR EX-OR EX-NOR Summary for all 3-input Gates Inputs 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 Output of each Gate 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 A B C AND NAND OR NOR
Combinations of Logic Gates
Logic gates can be combined to produce more complex functions. They can also be combined to substitute one type of gate for another. For example to produce an output Q which is true only when input A is true and input B is false, as shown in the truth table on the right, we can combine a NOT gate and an AND gate like this: Input A Input B Output Q 0 0 1 Q = A AND NOT B 1 0 1 0 1 0 0 1 0
- 70 -
Working out the function of a combination of gates
Truth tables can be used to work out the function of a combination of gates. For example the truth table on the right show the intermediate outputs D and E as well as the final output Q for the system shown below. Inputs 0 0 0 0 1 1 D = NOT (A OR B) E = B AND C Q = D OR E = (NOT (A OR B)) OR (B AND C) 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 Outputs 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 0 0 1
A B C D E Q
Substituting one type of gate for another
Logic gates are available on ICs which usually contain several gates of the same type, for example four 2-input NAND gates or three 3-input NAND gates. This can be wasteful if only a few gates are required unless they are all the same type. To avoid using too many ICs you can reduce the number of gate inputs or substitute one type of gate for another.
Reducing the number of inputs
The number of inputs to a gate can be reduced by connecting two (or more) inputs together. The diagram shows a 3-input AND gate operating as a 2-input AND gate.
Making a NOT gate from a NAND or NOR gate
Reducing a NAND or NOR gate to just one input creates a NOT gate. The diagram shows this for a 2-input NAND gate.
- 71 -
Any gate can be built from NAND or NOR gates
As well as making a NOT gate, NAND or NOR gates can be combined to create any type of gate! This enables a circuit to be built from just one type of gate, either NAND or NOR. For example an AND gate is a NAND gate then a NOT gate (to undo the inverting function). Note that AND and OR gates cannot be used to create other gates because they lack the inverting (NOT) function. To change the type of gate, such as changing OR to AND, you must do three things:
• • •
Invert (NOT) each input. Change the gate type (OR to AND, or AND to OR) Invert (NOT) the output.
For example an OR gate can be built from NOTed inputs fed into a NAND (AND + NOT) gate.
NAND gate equivalents
The table below shows the NAND gate equivalents of NOT, AND, OR and NOR gates: Gate Equivalent in NAND gates
- 72 -
Substituting gates in an example logic system
The original system has 3 different gates: NOR, AND and OR. This requires three ICs (one for each type of gate). To re-design this system using NAND gates only begin by replacing each gate with its NAND gate equivalent, as shown in the diagram below.
- 73 -
Then simplify the system by deleting adjacent pairs of NOT gates (marked X above). This can be done because the second NOT gate cancels the action of the first. The final system is shown on the right. It has five NAND gates and requires two ICs (with four gates on each IC). This is better than the original system which required three ICs (one for each type of gate). Substituting NAND (or NOR) gates does not always increase the number of gates, but when it does (as in this example) the increase is usually only one or two gates. The real benefit is reducing the number of ICs required by using just one type of gate.
Capacitance and Uses of Capacitors
Capacitance (symbol C) is a measure of a capacitor's ability to store charge. A large capacitance means that more charge can be stored. Capacitance is measured in farads, symbol F. However 1F is very large, so prefixes (multipliers) are used to show the smaller values:
• • •
unpolarized capacitor symbol
µ (micro) means 10 (millionth), so 1000000µF = 1F n (nano) means 10-9 (thousand-millionth), so 1000nF = 1µF p (pico) means 10-12 (million-millionth), so 1000pF = 1nF
polarized capacitor symbol
Charge and Energy Stored
The amount of charge (symbol Q) stored by a capacitor is given by: Q = charge in coulombs (C) where: C = capacitance in farads (F) V = voltage in volts (V)
Charge, Q = C × V
When they store charge, capacitors are also storing energy: Energy, E = ½QV = ½CV² where E = energy in joules (J).
Note that capacitors return their stored energy to the circuit. They do not 'use up' electrical energy by converting it to heat as a resistor does. The energy stored by a capacitor is much smaller than the energy stored by a battery so they cannot be used as a practical source of energy for most purposes.
- 74 -
Capacitive Reactance Xc
Capacitive reactance (symbol Xc) is a measure of a capacitor's opposition to AC (alternating current). Like resistance it is measured in ohms, , but reactance is more complex than resistance because its value depends on the frequency (f) of the electrical signal passing through the capacitor as well as on the capacitance, C. Xc = reactance in ohms ( ) where: f = frequency in hertz (Hz) 2 fC C = capacitance in farads (F) 1
Capacitive reactance, Xc =
The reactance Xc is large at low frequencies and small at high frequencies. For steady DC which is zero frequency, Xc is infinite (total opposition), hence the rule that capacitors pass AC but block DC. For example a 1µF capacitor has a reactance of 3.2k for a 50Hz signal, but when the frequency is higher at 10kHz its reactance is only 16 . Note: the symbol Xc is used to distinguish capacitive reactance from inductive reactance XL which is a property of inductors. The distinction is important because XL increases with frequency (the opposite of Xc) and if both XL and Xc are present in a circuit the combined reactance (X) is the difference between them. See the page on Impedance.
Capacitors in Series and Parallel
Combined capacitance (C) of capacitors connected in series: 1 C = 1 1 1 + + + ... C1 C2 C3
Combined capacitance (C) of C = C1 + C2 + C3 + ... capacitors connected in parallel:
- 75 -
Two or more capacitors are rarely deliberately connected in series in real circuits, but it can be useful to connect capacitors in parallel to obtain a very large capacitance, for example to smooth a power supply. Note that these equations are the opposite way round for resistors in series and parallel.
Charging a Capacitor
The capacitor (C) in the circuit diagram is being charged from a supply voltage (Vs) with the current passing through a resistor (R). The voltage across the capacitor (Vc) is initially zero but it increases as the capacitor charges. The capacitor is fully charged when Vc = Vs. The charging current (I) is determined by the voltage across the resistor (Vs - Vc): Charging current, I = (Vs - Vc) / R (note that Vc is increasing) At first Vc = 0V so the initial current, Io = Vs / R Vc increases as soon as charge (Q) starts to build up (Vc = Q/C), this reduces the voltage across the resistor and therefore reduces the charging current. This means that the rate of charging becomes progressively slower. time constant is in seconds (s) R = resistance in ohms ( ) C = capacitance in farads (F)
time constant = R × C
For example: If R = 47k and C = 22µF, then the time constant, RC = 47k × 22µF = 1.0s. If R = 33k and C = 1µF, then the time constant, RC = 33k × 1µF = 33ms. A large time constant means the capacitor charges slowly. Note that the time constant is a property of the circuit containing the capacitance and resistance, it is not a property of a capacitor alone. The time constant is the time taken for the charging (or discharging) current (I) to fall to 1/e of its initial value (Io). 'e' is the base of natural logarithms, an important number in mathematics (like ). e = 2.71828 (to 6 significant figures) so we can roughly say that the time constant is the time taken for the current to fall to 1/3 of its initial value.
- 76 -
After each time constant the current falls by 1/e (about 1/3). After 5 time constants (5RC) the current has fallen to less than 1% of its initial value and we can reasonably say that the capacitor is fully charged, but in fact the capacitor takes for ever to charge fully! The bottom graph shows how the voltage (V) increases as the capacitor charges. At first the voltage changes rapidly because the current is large; but as the current decreases, the charge builds up more slowly and the voltage increases more slowly. After 5 time constants (5RC) the capacitor is almost fully charged with its voltage almost equal to the supply voltage. We can reasonably say that the capacitor is fully charged after 5RC, although really charging continues for ever (or until the circuit is changed). Time Voltage Charge 0RC 1RC 2RC 3RC 4RC 5RC 0.0V 5.7V 7.8V 8.6V 8.8V 8.9V 0% 63% 86% 95% 98% 99%
Graphs showing the current and voltage for a capacitor charging time constant = RC
Discharging a capacitor
The top graph shows how the current (I) decreases as the capacitor discharges. The initial current (Io) is determined by the initial voltage across the capacitor (Vo) and resistance (R): Initial current, Io = Vo / R. Note that the current graphs are the same shape for both charging and discharging a capacitor. This type of graph is an example of exponential decay. The bottom graph shows how the voltage (V) decreases as the capacitor discharges. At first the current is large because the voltage is large, so charge is lost quickly and the voltage decreases rapidly. As charge is lost the voltage is reduced making the current smaller so the rate of discharging becomes progressively slower. After 5 time constants (5RC) the voltage across the capacitor is almost zero and we can reasonably say that the capacitor is fully discharged, although really discharging continues for ever (or until the circuit is changed).
- 77 -
Graphs showing the current and voltage for a capacitor discharging time constant = RC
Time Voltage Charge 0RC 1RC 2RC 3RC 4RC 5RC 9.0V 3.3V 1.2V 0.4V 0.2V 0.1V 100% 37% 14% 5% 2% 1%
Uses of Capacitors
Capacitors are used for several purposes:
• • • • • •
Timing - for example with a 555 timer IC controlling the charging and discharging. Smoothing - for example in a power supply. Coupling - for example between stages of an audio system and to connect a loudspeaker. Filtering - for example in the tone control of an audio system. Tuning - for example in a radio system. Storing energy - for example in a camera flash circuit.
- 78 -
Capacitor Coupling (CR-coupling)
Sections of electronic circuits may be linked with a capacitor because capacitors pass AC (changing) signals but block DC (steady) signals. This is called capacitor coupling or CRcoupling. It is used between the stages of an audio system to pass on the audio signal (AC) without any steady voltage (DC) which may be present, for example to connect a loudspeaker. It is also used for the 'AC' switch setting on an oscilloscope. The precise behavior of a capacitor coupling is determined by its time constant (RC). Note that the resistance (R) may be inside the next circuit section rather than a separate resistor. For successful capacitor coupling in an audio system the signals must pass through with little or no distortion. This is achieved if the time constant (RC) is larger than the time period (T) of the lowest frequency audio signals required (typically 20Hz, T = 50ms).
Output when RC >> T
When the time constant is much larger than the time period of the input signal the capacitor does not have sufficient time to significantly charge or discharge, so the signal passes through with negligible distortion.
Output when RC = T
When the time constant is equal to the time period you can see that the capacitor has time to partly charge and discharge before the signal changes. As a result there is significant distortion of the signal as it passes through the CR-coupling. Notice how the sudden changes of the input signal pass straight through the capacitor to the output.
- 79 -
Output when RC << T
When the time constant is much smaller than the time period the capacitor has time to fully charge or discharge after each sudden change in the input signal. Effectively only the sudden changes pass through to the output and they appear as 'spikes', alternately positive and negative. This can be useful in a system which must detect when a signal changes suddenly, but must ignore slow changes.
Impedance and Reactance
Impedance (symbol Z) is a measure of the overall opposition of a circuit to current, in other words: how much the circuit impedes the flow of current. It is like resistance, but it also takes into account the effects of capacitance and inductance. Impedance is measured in ohms, symbol . Impedance is more complex than resistance because the effects of capacitance and inductance vary with the frequency of the current passing through the circuit and this means impedance varies with frequency! The effect of resistance is constant regardless of frequency.
Impedance, Z = V I
Resistance, R = V I
V = voltage in volts (V) I = current in amps (A) Z = impedance in ohms ( ) R = resistance in ohms ( )
The term 'impedance' is often used (quite correctly) for simple circuits which have no capacitance or inductance - for example to refer to their 'input impedance' or 'output impedance'. This can seem confusing if you are learning electronics, but for these simple circuits you can assume that it is just another word for resistance. Four electrical quantities determine the impedance (Z) of a circuit: resistance (R), capacitance (C), inductance (L) and frequency (f). Impedance can be split into two parts:
Resistance R (the part which is constant regardless of frequency) Reactance X (the part which varies with frequency due to capacitance and inductance)
For further details please see the section on Reactance below.
- 80 -
The capacitance and inductance cause a phase shift* between the current and voltage which means that the resistance and reactance cannot be simply added up to give impedance. Instead they must be added as vectors with reactance at right angles to resistance as shown in the diagram. * Phase shift means that the current and voltage are out of step with each other. Think of charging a capacitor. When the voltage across the capacitor is zero, the current is at a maximum; when the capacitor has charged and the voltage is at a maximum, the current is at a minimum. The charging and discharging occur continually with AC and the current reaches its maximum shortly before the voltage reaches its maximum: so we say the current leads the voltage.
Reactance (symbol X) is a measure of the opposition of capacitance and inductance to current. Reactance varies with the frequency of the electrical signal. Reactance is measured in ohms, symbol . There are two types of reactance: capacitive reactance (Xc) and inductive reactance (XL). The total reactance (X) is the difference between the two:
X = XL - Xc
Capacitive reactance, Xc Xc = reactance in ohms ( ) 1 Xc = 2 fC where: f = frequency in hertz (Hz) C = capacitance in farads (F)
Xc is large at low frequencies and small at high frequencies. For steady DC which is zero frequency, Xc is infinite (total opposition), hence the rule that capacitors pass AC but block DC. For example: a 1µF capacitor has a reactance of 3.2k for a 50Hz signal, but when the frequency is higher at 10kHz its reactance is only 16 . Inductive reactance, XL XL = 2 fL where: XL = reactance in ohms ( ) f = frequency in hertz (Hz) L = inductance in henrys (H)
XL is small at low frequencies and large at high frequencies. For steady DC (frequency zero), XL is zero (no opposition), hence the rule that inductors pass DC but block high frequency AC. For example: a 1mH inductor has a reactance of only 0.3 for a 50Hz signal, but when the frequency is higher at 10kHz its reactance is 63 .
- 81 -
Input Impedance ZIN
Input impedance (ZIN) is the impedance 'seen' by anything connected to the input of a circuit or device (such as an amplifier). It is the combined effect of all the resistance, capacitance and inductance connected to the input inside the circuit or device. It is normal to use the term 'input impedance' even for simple cases where there is only resistance and the term 'input resistance' could be used instead. In fact it is usually reasonable to assume that input impedance is just resistance providing the input signal has a low frequency (less than 1kHz say). The effects of capacitance and inductance vary with frequency, so if these are present the input impedance will vary with frequency. The effects of capacitance and inductance are generally most significant at high frequencies. Usually input impedances should be high, at least ten times the output impedance of the circuit (or component) supplying a signal to the input. This ensures that the input will not 'overload' the source of the signal and reduce the strength (voltage) of the signal by a substantial amount.
Output Impedance ZOUT
The output of any circuit or device is equivalent to output impedance (ZOUT) in series with a perfect voltage source (VSOURCE). This is called the equivalent circuit and it represents the combined effect of all the voltage sources, resistance, capacitance and inductance connected to the output inside the circuit or device. Note that VSOURCE is usually not the same as the supply voltage Vs. It is normal to use the term 'output impedance' even for simple cases where there is only resistance and the term 'output resistance' could be used instead. In fact it is usually reasonable to assume that an output impedance is just resistance providing the output signal has a low frequency (less than 1kHz say).
The equivalent circuit of any output
The effects of capacitance and inductance vary with frequency, so if these are present the output impedance will vary with frequency. The effects of capacitance and inductance are generally most significant at high frequencies.
- 82 -
Usually output impedances should be low, less than a tenth of the load impedance connected to the output. If an output impedance is too high it will be unable to supply a sufficiently strong signal to the load because most of the signal's voltage will be 'lost' inside the circuit driving current through the output impedance ZOUT. The load could be a single component or the input impedance of another circuit.
Low output impedance, ZOUT << ZLOAD Most of VSOURCE appears across the load, very little voltage is 'lost' driving the output current through the output impedance. Usually this is the best arrangement. Matched impedances, ZOUT = ZLOAD Half of VSOURCE appears across the load, the other half is 'lost' driving the output current through the output impedance. This arrangement is useful in some situations (such as an The load can be a single component or amplifier driving a loudspeaker) the input impedance of another circuit because it delivers maximum power to the load. Note that an equal amount of power is wasted driving the output current through ZOUT, an efficiency of 50%. High output impedance, ZOUT >> ZLOAD Only a small portion of appears across the load, most is 'lost' driving the output current through the output impedance. This arrangement is unsatisfactory.
The output resistance of a voltage divider
- 83 -
Voltage dividers are widely used in electronics, for example to connect an input transducer such as an LDR to a circuit input. For successful use the output impedance of the voltage divider should be much smaller than the input impedance of the circuit it is connected to. Ideally the output impedance should be less than a tenth of the input impedance. In the equivalent circuit of a voltage divider the output impedance is just a resistance and the term 'output resistance' could be used. ROUT is equal to the two resistances (R1 and R2) connected in parallel: Output impedance, ROUT = R1 × R2 R1 + R2
The voltage source VSOURCE in the equivalent circuit is the value of the output voltage Vo when there is nothing connected to the output (and therefore no output current). It is sometimes called the 'open circuit' voltage. Voltage source, VSOURCE = Vs × R2 R1 + R2
In most voltage dividers one of the resistors will be an input transducer such as an LDR. The transducer's resistance varies and this will make both VSOURCE and ROUT vary too. To check that ROUT is sufficiently low you should work out its highest value which will occur when the transducer has its maximum resistance (this applies wherever the transducer is connected in the voltage divider). For example: If R1 = 10k and R2 is an LDR with maximum resistance 1M , ROUT = 10k × 1M / (10k + 1M) = 9.9k (say 10k ). This means it should be connected to a load or input resistance of at least 100k .
- 84 -
555 and 556 Timer Circuits
The 8-pin 555 timer must be one of the most useful chips ever made and it is used in many projects. With just a few external components it can be used to build many circuits, not all of them involve timing! A popular version is the NE555 and this is suitable in most cases where a '555 timer' is specified. The 556 is a dual version of the 555 housed in a 14-pin package, the two timers (A and B) share the same power supply pins. The circuit diagrams on this page show a 555, but they could all be adapted to use one half of a 556. Low power versions of the 555 are made, such as the ICM7555, but these should only be used when specified (to increase battery life) because their maximum output current of about 20mA (with a 9V supply) is too low for many standard 555 circuits. The ICM7555 has the same pin arrangement as a standard 555. The circuit symbol for a 555 (and 556) is a box with the pins arranged to suit the circuit diagram: for example 555 pin 8 at the top for the +Vs supply, 555 pin 3 output on the right. Usually just the pin numbers are used and they are not labeled with their function. The 555 and 556 can be used with a supply voltage (Vs) in the range 4.5 to 15V (18V absolute maximum). Standard 555 and 556 chips create a significant 'glitch' on the supply when their output changes state. This is rarely a problem in simple circuits with no other ICs, but in more complex circuits a smoothing capacitor (e.g. 100µF) should be connected across the +Vs and 0V supply near the 555 or 556. The input and output pin functions are described briefly below and there are fuller explanations covering the various circuits:
• • • •
Example circuit symbol (above) Actual pin arrangements (below)
Astable - producing a square wave Monostable - producing a single pulse when triggered Bistable - a simple memory which can be set and reset Buffer - an inverting buffer (Schmitt trigger)
- 85 -
Inputs of 555 / 556
Trigger input: when < 1/3 Vs ('active low') this makes the output high (+Vs). It monitors the discharging of the timing capacitor in an astable circuit. It has a high input impedance > 2M . Threshold input: when > 2/3 Vs ('active high') this makes the output low (0V)*. It monitors the charging of the timing capacitor in astable and monostable circuits. It has a high input impedance > 10M . * providing the trigger input is > 1/3 Vs, otherwise the trigger input will override the threshold input and hold the output high (+Vs). Reset input: when less than about 0.7V ('active low') this makes the output low (0V), overriding other inputs. When not required it should be connected to +Vs. It has an input impedance of about 10k . Control input: this can be used to adjust the threshold voltage which is set internally to be 2 /3 Vs. Usually this function is not required and the control input is connected to 0V with a 0.01µF capacitor to eliminate electrical noise. It can be left unconnected if noise is not a problem. The discharge pin is not an input, but it is listed here for convenience. It is connected to 0V when the timer output is low and is used to discharge the timing capacitor in astable and monostable circuits.
Output of 555 / 556
The output of a standard 555 or 556 can sink and source up to 200mA. This is more than most chips and it is sufficient to supply many output transducers directly, including LEDs (with a resistor in series), low current lamps, piezo transducers, loudspeakers (with a capacitor in series), relay coils (with diode protection) and some motors (with diode protection). The output voltage does not quite reach 0V and +Vs, especially if a large current is flowing.
- 86 -
To switch larger currents you can connect a transistor. The ability to both sink and source current means that two devices can be connected to the output so that one is on when the output is low and the other is on when the output is high. The top diagram shows two LEDs connected in this way. This arrangement is used in the Level Crossing project to make the red LEDs flash alternately.
A loudspeaker (minimum resistance 64 ) may be connected to the output of a 555 or 556 astable circuit but a capacitor (about 100µF) must be connected in series. The output is equivalent to a steady DC of about ½Vs combined with a square wave AC (audio) signal. The capacitor blocks the DC, but allows the AC to pass as explained in capacitor coupling. Piezo transducers may be connected directly to the output and do not require a capacitor in series.
Relay coils and other inductive loads
Like all ICs, the 555 and 556 must be protected from the brief high voltage 'spike' produced when an inductive load such as a relay coil is switched off. The standard protection diode must be connected 'backwards' across the relay coil as shown in the diagram.
- 87 -
However, the 555 and 556 require an extra diode connected in series with the coil to ensure that a small 'glitch' cannot be fed back into the IC. Without this extra diode monostable circuits may re-trigger themselves as the coil is switched off! The coil current passes through the extra diode so it must be a 1N4001 or similar rectifier diode capable of passing the current, a signal diode such as a 1N4148 is usually not suitable.
555 / 556 Astable
An astable circuit produces a 'square wave', this is a digital waveform with sharp transitions between low (0V) and high (+Vs). Note that the durations of the low and high states may be different. The circuit is called an astable because it is not stable in any state: the output is continually changing between 'low' and 'high'. The time period (T) of the square wave is the time for one complete cycle, but it is usually better to consider frequency (f) which is the number of cycles per second. T = 0.7 × (R1 + 2R2) × C1 and f = 1.4 (R1 + 2R2) × C1 T = time period in seconds (s) f = frequency in hertz (Hz) R1 = resistance in ohms ( ) R2 = resistance in ohms ( ) C1 = capacitance in farads (F) The time period can be split into two parts: T = Tm + Ts Mark time (output high): Tm = 0.7 × (R1 + R2) × C1 Space time (output low): Ts = 0.7 × R2 × C1 Many circuits require Tm and Ts to be almost equal; this is achieved if R2 is much larger than R1. For a standard astable circuit Tm cannot be less than Ts, but this is not too restricting because the output can both sink and source current. For example an LED can be made to flash briefly with long gaps by connecting it (with its resistor) between +Vs and the output. This way the LED is on during Ts, so brief flashes are achieved with R1 larger than R2, making Ts short and Tm
- 88 -
long. If Tm must be less than Ts a diode can be added to the circuit as explained under duty cycle below.
Choosing R1, R2 and C1
R1 and R2 should be in the range 1k to 1M . It is best to choose C1 first because capacitors are available in just a few values.
555 astable frequencies C1 R2 = 10k R1 = 1k 68kHz 6.8kHz 680Hz 68Hz 6.8Hz R2 = 100k R1 = 10k 6.8kHz 680Hz 68Hz 6.8Hz R2 = 1M R1 = 100k 680Hz 68Hz 6.8Hz 0.68Hz
Choose C1 to suit the frequency range 0.001µF you require (use the table as a guide). 0.01µF Choose R2 to give the frequency (f) 0.1µF you requires. Assume that R1 is much 1µF smaller than R2 (so that Tm and Ts are almost equal), then you can use: 10µF R2 = 0.7 f × C1
0.68Hz 0.068Hz (41 per min.) (4 per min.)
• • •
Choose R1 to be about a tenth of R2 (1k min.) unless you want the mark time Tm to be significantly longer than the space time Ts. If you wish to use a variable resistor it is best to make it R2. If R1 is variable it must have a fixed resistor of at least 1k in series (this is not required for R2 if it is variable).
With the output high (+Vs) the capacitor C1 is charged by current flowing through R1 and R2. The threshold and trigger inputs monitor the capacitor voltage and when it reaches 2/3Vs (threshold voltage) the output becomes low and the discharge pin is connected to 0V. The capacitor now discharges with current flowing through R2 into the discharge pin. When the voltage falls to 1/3Vs (trigger voltage) the output becomes high again and the discharge pin is disconnected, allowing the capacitor to start charging again. This cycle repeats continuously unless the reset input is connected to 0V which forces the output low while reset is 0V. An astable can be used to provide the clock signal for circuits such as counters.
- 89 -
A low frequency astable (< 10Hz) can be used to flash an LED on and off, higher frequency flashes are too fast to be seen clearly. Driving a loudspeaker or piezo transducer with a low frequency of less than 20Hz will produce a series of 'clicks' (one for each low/high transition) and this can be used to make a simple metronome. An audio frequency astable (20Hz to 20kHz) can be used to produce a sound from a loudspeaker or piezo transducer. The sound is suitable for buzzes and beeps. The natural (resonant) frequency of most piezo transducers is about 3kHz and this will make them produce a particularly loud sound.
The duty cycle of an astable circuit is the proportion of the complete cycle for which the output is high (the mark time). It is usually given as a percentage. For a standard 555/556 astable circuit the mark time (Tm) must be greater than the space time (Ts), so the duty cycle must be at least 50%: Duty cycle = Tm Tm + Ts = R1 + R2 R1 + 2R2
To achieve a duty cycle of less than 50% a diode can be added in parallel with R2 as shown in the diagram below. This bypasses R2 during the charging (mark) part of the cycle so that Tm depends only on R1 and C1:
Tm = 0.7 × R1 × C1 (ignoring 0.7V across diode) Ts = 0.7 × R2 × C1 (unchanged)
- 90 -
Duty cycle with diode =
Tm Tm + Ts
R1 R1 + R2
555 / 556 Monostable
A monostable circuit produces a single output pulse when triggered. It is called a monostable because it is stable in just one state: 'output low'. The 'output high' state is temporary. The duration of the pulse is called the time period (T) and this is determined by resistor R1 and capacitor C1: time period, T = 1.1 × R1 × C1 T = time period in seconds (s) R1 = resistance in ohms ( ) C1 = capacitance in farads (F) The maximum reliable time period is about 10 minutes. Why 1.1? The capacitor charges to 2/3 = 67% so it is a bit longer than the time constant (R1 × C1) which is the time taken to charge to 63%.
• • • •
Choose C1 first (there are relatively few values available). Choose R1 to give the time period you need. R1 should be in the range 1k to 1M , so use a fixed resistor of at least 1k in series if R1 is variable. Beware that electrolytic capacitor values are not accurate, errors of at least 20% are common. Beware that electrolytic capacitors leak charge which substantially increases the time period if you are using a high value resistor - use the formula as only a very rough guide! For example the Timer Project should have a maximum time period of 266s (about 4½ minutes), but many electrolytic capacitors extend this to about 10 minutes!
- 91 -
The timing period is triggered (started) when the trigger input (555 pin 2) is less than 1/3 Vs, this makes the output high (+Vs) and the capacitor C1 starts to charge through resistor R1. Once the time period has started further trigger pulses are ignored. The threshold input (555 pin 6) monitors the voltage across C1 and when this reaches 2/3 Vs the time period is over and the output becomes low. At the same time discharge (555 pin 7) is connected to 0V, discharging the capacitor ready for the next trigger. The reset input (555 pin 4) overrides all other inputs and the timing may be cancelled at any time by connecting reset to 0V, this instantly makes the output low and discharges the capacitor. If the reset function is not required the reset pin should be connected to +Vs.
Power-On Reset or Trigger
It may be useful to ensure that a monostable circuit is reset or triggered automatically when the power supply is connected or switched on. This is achieved by using a capacitor instead of (or in addition to) a push switch as shown in the diagram. The capacitor takes a short time to charge, briefly holding the input close to 0V when the circuit is switched on. A switch may be connected in parallel with the capacitor if manual operation is also required.
- 92 -
If the trigger input is still less than 1/3 Vs at the end of the time period the output will remain high until the trigger is greater than 1/3 Vs. This situation can occur if the input signal is from an on-off switch or sensor. The monostable can be made edge triggered, responding only to changes of an input signal, by connecting the trigger signal through a capacitor to the trigger input. The capacitor passes sudden changes (AC) but blocks a constant (DC) signal. For further information please see the page on capacitance. The circuit is 'negative edge triggered' because it responds to a sudden fall in the input signal. The resistor between the trigger (555 pin 2) and +Vs ensures that the trigger is normally high (+Vs).
555 / 556 Bistable (flip-flop) - a Memory Circuit
The circuit is called a bistable because it is stable in two states: output high and output low. It is also known as a 'flip-flop'. It has two inputs:
Trigger (555 pin 2) makes the output high. Trigger is 'active low', it functions when < 1/3 Vs. Reset (555 pin 4) makes the output low. Reset is 'active low', it resets when < 0.7V.
555 Bistable Circuit
The power-on reset, power-on trigger and edge-triggering circuits can all be used as described above for the monostable.
- 93 -
555 / 556 Inverting Buffer (Schmitt trigger) or NOT gate
The buffer circuit's input has a very high impedance (about 1M ) so it requires only a few µA, but the output can sink or source up to 200mA. This enables a high impedance signal source (such as an LDR) to switch a low impedance output transducer (such as a lamp). It is an inverting buffer or NOT gate because the output logic state (low/high) is the inverse of the input state:
Input low (< 1/3 Vs) makes output high, +Vs Input high (> 2/3 Vs) makes output low, 0V 555 inverting buffer circuit (NOT gate)
When the input voltage is between 1/3 and 2/3 Vs the output remains in its present state. This intermediate input region is a deadspace where there is no response, a property called hysteresis, it is like backlash in a mechanical linkage. This type of circuit is called a Schmitt trigger.
If high sensitivity is required the hysteresis is a problem, but in many circuits it is a helpful property. It gives the NOT gate symbol input a high immunity to noise because once the circuit output has switched high or low the input must change back by at least 1/3 Vs to make the output switch back.
Electronic circuits count in binary. This is the simplest possible counting system because it uses just two digits, 0 and 1, exactly like logic signals where 0 represents false and 1 represents true. The terms low and high are also used for 0 and 1 respectively as shown in the table. Counting one, two, three, four, five in binary: 1, 10, 11, 100, 101. Binary numbers rapidly become very long as the count increases and this makes them difficult for us to read at a glance. Fortunately it is rarely necessary to read more than 4 binary digits at a time in counting circuits. Logic states True False 1 High +Vs On 0 Low 0V Off
In a binary number each digit represents a multiple of two (1, 2, 4, 8, 16 etc), in the same way that each digit in decimal represents a multiple of ten (1, 10, 100, 1000 etc). For example 10110110 in binary equals 182 in decimal: Digit value: 128 64 32 16 8 4 2 1 Binary number: 1 0 1 1 0 1 1 0 Decimal value: 128 + 0 + 32 + 16 + 0 + 4 + 2 + 0 = 182
- 94 -
Bits, Bytes and Nibbles
Each binary digit is called a bit, so 10110110 is an 8-bit number. A block of 8 bits is called a byte and it can hold a maximum number of 11111111 = 255 in decimal. Computers and PIC microcontrollers work with blocks of 8 bits. Two (or more) bytes make a word, for example PICs work with a 16-bit word (two bytes) which can hold a maximum number of 65535. A block of 4 bits is called a nibble (half a byte!) and it can hold a maximum number of 1111 = 15 in decimal. Many counting circuits work with blocks of 4 bits because this number of bits is required to count up to 9 in decimal. (The maximum number with 3 bits is only 7). Hexadecimal (base 16) Hexadecimal (often just called 'hex') is base 16 counting with 16 digits. It starts with the decimal digits 0-9, then continues with letters A (10), B (11), C (12), D (13), E (14) and F (15). Each hexadecimal digit is equivalent to 4 binary digits, making conversion between the two systems relatively easy. You may find hexadecimal used with PICs and computer systems but it is not generally used in simple counting circuits. Example: 10110110 binary = B6 hexadecimal = 182 decimal.
Hex Binary Decimal base 16 DCBA 0 0 0000 The labels A, B, C, D are widely used in electronics to represent the 0 0 0 1 1 1 four bits: 2 2 0010 3 3 0011 • A = 1, the 'least significant bit' (LSB) 4 4 0100 • B=2 5 5 0101 • C=4 6 6 0110 • D = 8, the 'most significant bit' (MSB) 7 7 0111 8 8 1000 Binary Coded Decimal, BCD 9 9 1001 A 10 1010 B 11 1011 Binary Coded Decimal, BCD, is a special version of 4-bit binary C 12 where the count resets to zero (0000) after the ninth count (1001). It 1 1 0 0 D 13 1101 is used by decade counters and is easily converted to display the E 14 1110 decimal digits 0-9 on a 7-segment display. F 15 1111 Several decade counters using BCD can be linked together to separately count the decimal ones, tens, hundreds, and so on. This is much easier than attempting to convert large binary numbers (such as 10110110) to display their decimal value. Do not confuse BCD which stands for Binary Coded Decimal with the labels A, B, C, D used to represent the four binary digits; it is an unfortunate coincidence that the letters BCD occur in both! The table on the right shows the 4-bit numbers and their decimal values.
- 95 -
All counters require a 'square wave' clock signal to make them count. This is a digital waveform with sharp transitions between low (0V) and high (+Vs), such as the output from a 555 astable circuit. Most switches bounce when the contacts close giving a rapid series of pulses. Connecting a switch directly to a clock input will usually give several counts when the switch is operated once! One way to 'debounce' the switch is to make it trigger a 555 monostable circuit with a short time period (such as 0.1s) and use the monostable output to drive the clock input. The animated block diagram shows a clock signal driving a 4-bit (0-15) counter with LEDs connected to show the state of the clock and counter outputs QA-QD (Q indicates an output). The LED on the first output QA flashes at half the frequency of the clock LED. In fact the frequency of each stage of the counter is half the frequency of the previous stage. You can see this pattern too in the table above showing the 4-bit numbers. A 4-bit counter and clock input. In this example counting advances on the falling-edge of the clock signal LED on = 1 LED off = 0 A square wave clock signal
The bouncing output from a switch
Notice how output QA changes state every time the clock input changes from high to low (that is when the clock LED turns off), this is called the falling-edge. If you watch the counting closely you can see that QB changes on the falling-edge of QA, QC on the falling-edge of QB and so on. You may be surprised to see the diagram drawn with the input on the right and signals flowing from right to left, the opposite way to the usual convention in electronics! Drawing counter circuits like this means that the outputs are in the correct binary order for us to read easily and I think this is more helpful than rigidly sticking to the usual 'left to right' convention.
Ripple and Synchronous Counters
There are two main types of counter: ripple and synchronous. In simple circuits their behavior appears almost identical, but their internal structure is very different. A ripple counter contains a chain of flip-flops with the output of each one feeding the input of the next. A flip-flop output changes state every time the input changes from high to low (on the fallingedge). This simple arrangement works well, but there is a slight delay as the effect of the clock 'ripples' through the chain of flip-flops.
The operation of a flip-flop. Notice how the output frequency is half the input frequency
In most circuits the ripple delay is not a problem because it is far too short to be seen on a display. However, a logic system connected to ripple counter outputs will briefly see false counts which may produce 'glitches' in the logic system and may disrupt its operation. For example a
- 96 -
ripple counter changing from 0111 (7) to 1000 (8) will very briefly show 0110, 0100 and 0000 before 1000! A synchronous counter has a more complex internal structure to ensure that all its outputs change precisely together on each clock pulse, avoiding the brief false counts which occur with ripple counters.
Rising-edge and Falling-edge clock inputs
Counting occurs when the clock input changes state.
Most synchronous counters count on the rising-edge which is the low to high transition of the clock signal. Most ripple counters count on the falling-edge which is the high to low transition of the clock signal.
It may seem odd that ripple counters use the falling-edge, but in fact this makes it easy to link counters because the most significant bit (MSB) of one counter can drive the clock input of the next. This works because the next bit must change state when the previous bit changes from high to low - the point at which a carry must occur to the next bit. Synchronous counters usually have carry out and carry in pins for linking counters without introducing any ripple delays.
Resetting a Counter
Counters can be reset to zero before their maximum count by connecting one (or more) of their outputs to their reset input, using an AND gate to combine outputs if necessary.
- 97 -
If the reset input is 'active-low' a NOT or NAND gate will be required to produce a low output at the desired count. If you see a line drawn above reset it means it is active low, for example: (say 'reset-bar'). The reset function normally occurs immediately and you should reset on the next count above the maximum you require. For example to count 0-5 (0000-0101) you should reset on 6 (0110). Some synchronous counters have a synchronous reset which occurs on the next clock pulse rather than immediately. This is important because you must reset on the maximum count you require. For example to count 0-5 (0000-0101), reset on 5 (0101).
Some counters can be preset by presenting a number to their inputs A-D and activating a preset input to load the number into the counter. By making inputs A-D all low you can also use this to reset the counter to zero.
Counters can be used to reduce the frequency of an input (clock) signal. Each stage of a counter halves the frequency, so for a 4-bit (0-15) counter QA is 1/2, QB is 1/4, QC is 1/8 and QD is 1/16 of the clock frequency. Division by numbers that are not powers of 2 is possible by resetting counters. Frequency division is one of the main purposes of counters with more than 4 bits and their outputs are usually labeled Q1, Q2 and so on. Qn is the nth stage of the counter, representing 2n. For example Q4 is 24 = 16 (1/16 of clock frequency) and Q12 is 212 = 4096 (1/4096 of clock frequency).
The most popular type is a 1-of-10 decoder which contains a network of logic gates to make one of its ten outputs Q0-9 become high (or low) in response to the BCD (binary coded decimal) inputs A-D. For example an input of binary 0101 (=5) will activate output Q5.
- 98 -
Decoders can be used for a simple counting display and for switching LEDs in sequences. The outputs must never be directly connected together, but diodes can be used to combine them as shown in the diagram. For example using diodes to combine the 2nd (Q1) and 4th (Q3) outputs will make an LED flash twice followed by a longer gap. The top diagram shows this for a decoder where the outputs become low when activated (such as the 7442), and the bottom diagram for a decoder where the outputs become high when activated (such as the 4028).
7-Segment Display Drivers
The inputs A-D of a display driver are connected to the BCD (binary coded decimal) outputs QA-D from a decade counter. A network of logic gates inside the display driver makes its outputs a-g become high or low as appropriate to light the required segments a-g of a 7-segment display. A resistor is required in series with each segment to protect the LEDs, 330 is a suitable value for many displays with a 4.5V to 6V supply. Beware that these resistors are sometimes omitted from circuit diagrams! There are two types of 7-segment displays:
Common Anode (CA or SA) with all the LED anodes connected together. These need a display driver with outputs which become low to light each segment, for example the 7447. Connect the common anode to +Vs. Common Cathode (CC or SC) with all the cathodes connected together. These need a display driver with Decade counter with display outputs which become high to light each segment, for example the 4511. Connect the common cathode to 0V. driver and 7-segment display
The common anode/cathode is often available on 2 pins. Displays also have a decimal point (DP) but this is not controlled by the display driver. The segments of larger displays have two LEDs in series. For display connections please see your supplier's catalogue or manufacturer's datasheet.
If there are many 7-segment display digits multiplexing is usually used. This is a system of switching so that of all the decade counters share a single display driver which is connected to all of the displays. The output of each counter is connected in turn to the inputs of the display driver and at the same time the common anode/cathode of the corresponding 7-segment display is connected so that only one display lights at a time. The switching is done very rapidly (typically 400 - 1000Hz) and the segment current is larger than normal so the display appears continuous and of normal brightness. Multiplexing requires ICs to do the switching, but the complete circuit has fewer ICs than having one display driver for each display.
- 99 -
Counters may be linked together in a chain to count larger numbers. It may seem tempting to use a 12-bit or 14-bit counter, but it is not practical to convert their large binary numbers to decimal. You should use a chain of decade (0-9) counters which use BCD (binary coded decimal) to make the conversion to decimal very easy: the first counts the units, the second counts the tens, the third the hundreds and so on. Some dual counter ICs are available with two separate counters on the same IC, the two counters must be linked externally if required (there is no internal link). The way that counters are linked depends on the nature of the counter. The diagrams below show the general arrangements for standard ripple and synchronous counters but it is important to read the detailed information for particular counters, consulting a datasheet if necessary.
Linking Ripple Counters
The diagram below shows how to link standard ripple counters. Notice how the highest output QD of each counter drives the clock (CK) input of the next counter. This works because ripple counters have clock inputs that are 'active-low' which means that the count advances as the clock input becomes low, on the falling-edge. Remember that with all ripple counters there will be a slight delay before the later outputs respond to the clock signal, especially with a long counter chain. This is not a problem in simple circuits driving displays, but it may cause glitches in logic systems connected to the counter outputs.
Linking Synchronous Counters
The diagram below shows how to link standard synchronous counters. Notice how all the clock (CK) inputs are linked, and carry out (CO) is used to feed the carry in (CI) of the next counter. This ensures that the entire counter chain is synchronous, with every output changing at the same time. Carry in (CI) of the first counter should be made low or high to suit the particular counter IC being used.
- 100 -
Quantities and Units in Electronics
The table shows electrical quantities which are used in electronics. The relationship between quantities can be written using words or symbols (letters), but symbols are normally used because they are much shorter; for example V is used for voltage, I for current and R for resistance: As a word equation: voltage = current × resistance The same equation using symbols: V = I × R To prevent confusion we normally use the same symbol (letter) for each quantity and these symbols are shown in the second column of the table. Quantity Voltage Current Charge Resistance Capacitance Inductance Reactance Impedance Power Energy Time Frequency Usual Symbol V I Q R C L X Z P E t f Unit volt amp* coulomb ohm farad henry ohm ohm watt joule second hertz W J s Hz F H Unit Symbol V A C
* strictly the unit is ampere, but this is almost always shortened to amp.
The first table shows the unit (and unit symbol) which is used to measure each quantity. For example: Charge is measured in coulombs and the symbol for a coulomb is C. Some of the units have a convenient size for electronics, but most are either too large or too small to be used directly so they are used with the prefixes shown in the second table. The prefixes make the unit larger or smaller by the value shown. Prefix milli micro nano pico kilo mega giga Some examples: tera 25 mA = 25 × 10-3 A = 25 × 0.001 A = 0.025 A 47µF = 47 × 10-6 F = 47 × 0.000 001 F = 0.000 047 F 270k = 270 × 103 = 270 × 1000 = 270 000 Prefix Value Symbol m µ n p k M G T 10-3 = 0.001 10-6 = 0.000 001 10-9 = 0.000 000 001 10-12 = 0.000 000 000 001 103 = 1000 106 = 1000 000 109 = 1000 000 000 1012 = 1000 000 000 000
Why not change the units to be better sizes?
It might seem a good idea to make the farad (F) much smaller to avoid having to use µF, nF and pF, but if we did this most of the equations in electronics would have to have factors of 1000000 or more included as well as the quantities. Overall it is much better to have the units with their present sizes which are defined logically from the equations.
- 101 -
In fact if you use an equation frequently you can use special sets of prefixed units which are more convenient... For example: Ohm's Law, V = I × R the standard units are volt (V), amp (A) and ohm ( ), but you could use volt (V), milliamp (mA) and kilo-ohm (k ) if you prefer. Take care though; you must never mix sets of units: using V, A and k in Ohm's Law would give you wrong values.
Capacitors store electric charge. They are used with resistors in timing circuits because it takes time for a capacitor to fill with charge. They are used to smooth varying DC supplies by acting as a reservoir of charge. They are also used in filter circuits because capacitors easily pass AC (changing) signals but they block DC (constant) signals.
This is a measure of a capacitor's ability to store charge. A large capacitance means that more charge can be stored. Capacitance is measured in farads, symbol F. However 1F is very large, so prefixes are used to show the smaller values. Three prefixes (multipliers) are used, µ (micro), n (nano) and p (pico):
• • •
µ means 10-6 (millionth), so 1000000µF = 1F n means 10-9 (thousand-millionth), so 1000nF = 1µF p means 10-12 (million-millionth), so 1000pF = 1nF
Capacitor values can be very difficult to find because there are many types of capacitor with different labeling systems! There are many types of capacitor but they can be split into two groups, polarized and unpolarized. Each group has its own circuit symbol.
Polarized Capacitors (large values, 1µF +)
- 102 -
Electrolytic capacitors are polarized and they must be connected the correct way round, at least one of their leads will be marked + or -. They are not damaged by heat when soldering. There are two designs of electrolytic capacitors; axial where the leads are attached to each end (220µF in picture) and radial where both leads are at the same end (10µF in picture). Radial capacitors tend to be a little smaller and they stand upright on the circuit board. It is easy to find the value of electrolytic capacitors because they are clearly printed with their capacitance and voltage rating. The voltage rating can be quite low (6V for example) and it should always be checked when selecting an electrolytic capacitor. It the project parts list does not specify a voltage; choose a capacitor with a rating which is greater than the project's power supply voltage. 25V is a sensible minimum for most battery circuits.
Tantalum Bead Capacitors
Tantalum bead capacitors are polarized and have low voltage ratings like electrolytic capacitors. They are expensive but very small, so they are used where a large capacitance is needed in a small size. Modern tantalum bead capacitors are printed with their capacitance, voltage and polarity in full. However older ones use a color-code system which has two stripes (for the two digits) and a spot of color for the number of zeros to give the value in µF. The standard color code is used, but for the spot, grey is used to mean × 0.01 and white means × 0.1 so that values of less than 10µF can be shown. A third color stripe near the leads shows the voltage (yellow 6.3V, black 10V, green 16V, blue 20V, grey 25V, white 30V, pink 35V). The positive (+) lead is to the right when the spot is facing you: 'when the spot is in sight, the positive is to the right'.
For example: blue, grey, black spot means 68µF For example: blue, grey, white spot means 6.8µF For example: blue, grey, grey spot means 0.68µF
Unpolarized Capacitors (small values, up to 1µF)
Small value capacitors are unpolarized and may be connected either way round. They are not damaged by heat when soldering, except for one unusual type (polystyrene). They have high voltage ratings of at least 50V, usually 250V or so. It can be difficult to find the values of these small capacitors because there are many types of them and several different labeling systems!
- 103 -
Many small value capacitors have their value printed but without a multiplier, so you need to use experience to work out what the multiplier should be! For example 0.1 means 0.1µF = 100nF. Sometimes the multiplier is used in place of the decimal point: For example: 4n7 means 4.7nF.
Capacitor Number Code
A number code is often used on small capacitors where printing is difficult:
• • • •
the 1st number is the 1st digit, the 2nd number is the 2nd digit, the 3rd number is the number of zeros to give the capacitance in pF. Ignore any letters - they just indicate tolerance and voltage rating.
For example: 102 means 1000pF = 1nF (not 102pF) For example: 472J means 4700pF = 4.7nF (J means 5% tolerance). Capacitor Color Code A color code was used on polyester capacitors for many years. It is now obsolete, but of course there are many still around. The colors should be read like the resistor code, the top three color bands giving the value in pF. Ignore the 4th band (tolerance) and 5th band (voltage rating). Color Code Color Black Brown Red Orange Yellow Green Blue For example: brown, black, orange means 10000pF = 10nF = 0.01µF. Violet Grey White Number 0 1 2 3 4 5 6 7 8 9
- 104 -
Note that there are no gaps between the colors bands, so 2 identical bands actually appear as a wide band.
For example: wide red, yellow means 220nF = 0.22µF.
This type is rarely used now. Their value (in pF) is normally printed without units. Polystyrene capacitors can be damaged by heat when soldering (it melts the polystyrene!) so you should use a heat sink (such as a crocodile clip). Clip the heat sink to the lead between the capacitor and the joint.
Real capacitor values (the E3 and E6 series)
You may have noticed that capacitors are not available with every possible value, for example 22µF and 47µF are readily available, but 25µF and 50µF are not! Why is this? Imagine that you decided to make capacitors every 10µF giving 10, 20, 30, 40, 50 and so on. That seems fine, but what happens when you reach 1000? It would be pointless to make 1000, 1010, 1020, 1030 and so on because for these values 10 is a very small difference, too small to be noticeable in most circuits and capacitors cannot be made with that accuracy. To produce a sensible range of capacitor values you need to increase the size of the 'step' as the value increases. The standard capacitor values are based on this idea and they form a series which follows the same pattern for every multiple of ten. The E3 series (3 values for each multiple of ten) 10, 22, 47, ... then it continues 100, 220, 470, 1000, 2200, 4700, 10000 etc. Notice how the step size increases as the value increases (values roughly double each time). The E6 series (6 values for each multiple of ten) 10, 15, 22, 33, 47, 68, ... then it continues 100, 150, 220, 330, 470, 680, 1000 etc. Notice how this is the E3 series with an extra value in the gaps. The E3 series is the one most frequently used for capacitors because many types cannot be made with very accurate values.
- 105 -
Variable capacitors are mostly used in radio tuning circuits and they are sometimes called 'tuning capacitors'. They have very small capacitance values, typically between 100pF and 500pF (100pF = 0.0001µF). The type illustrated usually has trimmers built in (for making small adjustments - see below) as well as the main variable capacitor. Many variable capacitors have very short spindles which are not suitable for the standard knobs used for variable resistors and rotary switches. It would be wise to check that a suitable knob is available before ordering a variable capacitor. Variable Capacitor Variable capacitors are not normally used in timing circuits because their capacitance is too small to be practical and the range of values available is very limited. Instead timing circuits use a fixed capacitor and a variable resistor if it is necessary to vary the time period.
Variable Capacitor Symbol
Trimmer capacitors (trimmers) are miniature variable capacitors. They are designed to be mounted directly onto the circuit board and adjusted only when the circuit is built. A small screwdriver or similar tool is required to adjust trimmers. The process of adjusting them requires patience because the presence of your hand and the tool will slightly change the capacitance of the circuit in the region of the trimmer! Trimmer capacitors are only available with very small capacitances, normally less than 100pF. It is impossible to reduce their capacitance to zero, so they are usually specified by their minimum and maximum values, for example 2-10pF. Trimmer Capacitor Symbol
Trimmers are the capacitor equivalent of presets which are miniature variable resistors.
- 106 -
Connectors and Cables
Battery clips and holders
The standard battery clip fits a 9V PP3 battery and many battery holders such as the 6 × AA cell holder shown. Battery holders are also available with wires attached, with pins for PCB mounting, or as a complete box with lid, switch and wires. Many small electronic projects use a 9V PP3 battery but if you wish to use the project for long periods a better choice is a battery holder with 6 AA cells. This has the same voltage but a much longer battery life and it will work out cheaper in the long run. Larger battery clips fit 9V PP9 batteries but these are rarely used now.
Terminal blocks and PCB terminals
Terminal blocks are usually supplied in 12-way lengths but they can be cut into smaller blocks with a sharp knife, large wire cutters or a junior hacksaw. They are sometimes called 'chocolate blocks' because of the way they can be easily cut to size. PCB PCB mounting terminal blocks provide an easy way terminal of making semi-permanent connections to PCBs. block Many are designed to interlock to provide more connections. Terminal Block
The 'standard' crocodile clip has no cover and a screw contact. However, miniature insulated crocodile clips are more suitable for many purposes including test leads. They have a solder contact and lugs which fold down to grip the cable's insulation, increasing the strength of the Crocodile Clips joint. Remember to feed the cable through the plastic cover before soldering! Add and remove the cover by fully opening the clip, a piece of wood can be used to hold the jaws open.
- 107 -
4mm Plugs, Sockets and Terminals
These are the standard single pole connectors used on meters and other electronic equipment. They are capable of passing high currents (typically 10A) and most designs are very robust. Shrouded plugs and sockets are available for use with high voltages where there is a risk of electric shock. A wide variety of colors is available from most suppliers.
Plugs may have a screw or solder terminal to hold the cable. Check if you need to thread the cable through the cover before connecting it. Some plugs, such as those illustrated, are 'stackable' which means that they include a socket to accept another plug, allowing several plugs to be connected to the same point - a very useful feature for test leads.
These are usually described as 'panel mounting' because they are designed to be fitted to a case. Most sockets have a solder contact but the picture shows other options. Fit the socket in the case before attaching the wire otherwise you will be unable to add the mounting nut.
4mm terminal and solder tag
In addition to a socket these have provision for attaching a wire by threading it through a hole (or wrapping it around the post) and tightening the top nut by hand. They usually have a threaded stud to fit a solder tag inside the case.
2mm Plugs and Sockets
These are smaller versions of the 4mm plugs and sockets described above, but terminals are not readily available. The plugs illustrated are stackable. Despite their small size these connectors can pass large currents and some are rated at 10A.
DC Power Plugs and Sockets
These 2-pole plugs and sockets ensure that the polarity of a DC supply cannot be accidentally reversed. The standard sizes are 2.1 and 2.5mm plug diameter. Standard plugs have a 10mm shaft, 'long' plugs have a 14mm shaft. Sockets are available for PCB or chassis mounting and most include a switch on the outer contact which is normally used to disconnect an internal battery when a plug is inserted.
- 108 -
Miniature versions with a 1.3mm diameter plug are used where small size is essential, such as for personal cassette players.
Jack Plugs and Sockets
These are intended for audio signals so mono and stereo versions are available. The sizes are determined by the plug diameter: ¼" (6.3mm), 3.5mm and 2.5mm. The 2.5mm size is only available for mono. Screened plugs have metal bodies connected to the COM contact. Most connections are soldered, remember to thread cables through plug covers before soldering! Sockets are designed for PCB or chassis mounting. ¼" plug connections are similar to those for 3.5mm plugs shown below. ¼" socket connections are COM, R and L in that order from the mounting nut, ignore R for mono use. Most ¼" sockets have switches on all contacts which open as the plug is inserted so they can be used to isolate internal speakers for example.
¼" (6.3mm) jack plug and socket
3.5mm jack plug and socket
3.5mm jack line socket The connections for 3.5mm plugs and (for fitting to a cable) sockets are shown below. Plugs have a lug which should be folded down to grip the cable's insulation and increase the strength of the joint. 3.5mm mono sockets have a switch contact which can be used to switch off an internal speaker as the plug is inserted. Ignore this contact if you do not require the switching action.
3.5mm jack plug and socket connections (the R connection is not present on mono plugs) L = left channel signal R = right channel signal COM = common (0V, screen) Do not use jack plugs for power supply connections because the contacts may be briefly shorted as the plug is inserted. Use DC power connectors for this.
- 109 -
Phono Plugs and Sockets
These are used for screened cables carrying audio and video signals. Stereo connections are made using a pair of phono plugs and sockets. The centre contact is for the signal and the outer contact for the screen (0V, common). Screened plugs have metal bodies connected to the outer contact to give the signal additional protection from electrical noise. Sockets are available for PCB or chassis mounting, singly for mono, or in pairs for stereo. Line sockets are available for making extension leads.
Construction of a screened cable
Coax Plugs and Sockets
These are similar to the phono plugs and sockets described above but they are designed for use with screened cables carrying much higher frequency signals, such as TV aerial leads. They provide better screening because at high frequencies this is essential to reduce electrical noise.
BNC Plugs and Sockets
These are designed for screened cables carrying high frequency signals where an undistorted and noise free signal is essential, for example oscilloscope leads. BNC plugs are connected with a push and twist action, to disconnect you need to twist and pull. Plugs and sockets are rated by their impedance (50 or 75 ) which must be the same as the cable's impedance. If the connector and cable impedances are not matched the signal will be distorted because it will be partly reflected at the connection, this is the electrical equivalent of the weak reflection which occurs when light passes through a glass window.
- 110 -
DIN Plugs and Sockets
These are intended for audio signals but they can be used for other low-current purposes where a multi-way connector is required. They are available from 3 way to 8 way. 5 way is used for stereo audio connections. The contacts are numbered on the connector, but they are not in numerical order! For audio use the 'common' (0V) wire is connected to contact 2. 5 way plugs and sockets are available in two versions: 180° and 270° (the angle refers to the arc formed by the contacts). Plastic covers of DIN plugs (and line sockets) are removed by depressing the retaining lug with a small screwdriver. You may also need small pliers to extract the body from the cover but do not pull on the pins themselves to avoid damage. Remember to thread the cable through the cover before starting to solder the connections! Soldering DIN plugs is easier if you clamp the insert with the pins. Wires should be pushed into the hollow pins - first 'tin' the wires (coat them with a thin layer of solder) then melt a little solder into the hollow pin and insert the wire while keeping the solder molten. Take care to avoid melting the plastic base, stop and allow the pin to cool if necessary.
5 way 180° DIN socket (chassis mounting)
Mini-DIN connectors are used for computer equipment such as keyboards and mice but they are not a good choice for general use unless small size is essential.
These are multi-pole connectors with provision for screw fittings to make semi-permanent connections, for example on computer equipment. The D shape prevents incorrect connection. Standard D-connectors have 2 rows of contacts (top picture); 9, 15 and 25way versions are the most popular. High Density D-connectors have 3 rows of contacts (bottom picture); a 15-way version is used to connect computer monitors for example. Note that covers (middle picture) are usually sold separately because both plugs and sockets can be fitted to cables by fitting a cover to a chassis mounted connector. PCB mounting versions of plugs and sockets are also available. The contacts are usually numbered on the body of the connector, although you may need a magnifying glass to see the very small markings. Soldering Dconnectors requires a steady hand due to the closeness of the contacts, it is easy to accidentally unsolder a contact you have just completed while attempting to solder the next one!
- 111 -
IDC Communication Connectors
These multi-pole insulation displacement connectors are used for computer and telecommunications equipment. They automatically cut through the insulation on wires when installed and special tools are required to fit them. They are available as 4, 6 and 8way versions. The 8-way RJ45 is the standard connector for modern computer networks. Standard UK telephone connectors are similar in style but a slightly different shape. They are called BT (British Telecom) connectors.
Cable... flex... lead... wire... what do all these terms mean?
• • • •
A cable is an assembly of one or more conductors (wires) with some flexibility. A flex is the proper name for the flexible cable fitted to mains electrical appliances. A lead is a complete assembly of cable and connectors. A wire is a single conductor which may have an outer layer of insulation (usually plastic).
Single core equipment wire
This is one solid wire with a plastic coating available in a wide variety of colors. It can be bent to shape but will break if repeatedly flexed. Use it for connections which will not be disturbed, for example links between points of a circuit board. Typical specification: 1/0.6mm (1 strand of 0.6mm diameter), maximum current 1.8A.
This consists of many fine strands of wire covered by an outer plastic coating. It is flexible and can withstand repeated bending without breaking. Use it for connections which may be disturbed, for example wires outside cases to sensors and switches. A very flexible version ('extra-flex') is used for test leads.
- 112 -
Typical specifications: 10/0.1mm (10 strands of 0.1mm diameter), maximum current 0.5A. 7/0.2mm (7 strands of 0.2mm diameter), maximum current 1.4A. 16/0.2mm (16 strands of 0.2mm diameter), maximum current 3A. 24/0.2mm (24 strands of 0.2mm diameter), maximum current 4.5A. 55/0.1mm (55 strands of 0.1mm diameter), maximum current 6A, used for test leads.
'Figure 8' (speaker) Cable
'Figure 8' cable consists of two stranded wires arranged in a figure of 8 shape. One wire is usually marked with a line. It is suitable for low voltage, low current (maximum 1A) signals where screening from electrical interference is not required. It is a popular choice for connecting loudspeakers and is often called 'speaker cable'.
Signal cable consists of several color-coded cores of stranded wire housed within an outer plastic sheath. With a typical maximum current of 1A per core it is suitable for low voltage, low current signals where screening from electrical interference is not required. The picture shows 6-core cable, but 4-core and 8-core are also readily available.
The diagram shows the construction of screened cable. The central wire carries the signal and the screen is connected to 0V (common) to shield the signal from electrical interference. Screened cable is used for audio signals and dual versions are available for stereo.
Screened cable (mono)
Screened cable (stereo)
Construction of a screened cable
Screened cable (stereo)
- 113 -
This type of screened cable (see above) is designed to carry high frequency signals such as those found in TV aerials and oscilloscope leads.
Flex is the proper name for the flexible cable used to connect appliances to the mains supply. It contains 2 cores (for live and neutral) or 3 cores (for live, neutral and earth). Mains flex has thick insulation for the high voltage (230V in UK) and it is available with various current ratings: 3A, 6A and 13A are popular sizes in the UK. Mains flex is sometimes used for low voltage circuits which pass a high current, but please think carefully before using it in this way. The distinctive colors of mains flex should act as a warning of the mains high voltage which can be lethal; using mains flex for low voltage circuits can undermine this warning.
Example: Circuit symbol:
Diodes allow electricity to flow in only one direction. The arrow of the circuit symbol shows the direction in which the current can flow. Diodes are the electrical version of a valve and early diodes were actually called valves.
- 114 -
Forward Voltage Drop
Electricity uses up a little energy pushing its way through the diode, rather like a person pushing through a door with a spring. This means that there is a small voltage across a conducting diode, it is called the forward voltage drop and is about 0.7V for all normal diodes which are made from silicon. The forward voltage drop of a diode is almost constant whatever the current passing through the diode so they have a very steep characteristic (current-voltage graph).
When a reverse voltage is applied a perfect diode does not conduct, but all real diodes leak a very tiny current of a few µA or less. This can be ignored in most circuits because it will be very much smaller than the current flowing in the forward direction. However, all diodes have a maximum reverse voltage (usually 50V or more) and if this is exceeded the diode will fail and pass a large current in the reverse direction, this is called breakdown. Ordinary diodes can be split into two types: Signal diodes which pass small currents of 100mA or less and Rectifier diodes which can pass large currents. In addition there are LEDs (which have their own page) and Zener diodes (at the bottom of this page).
Connecting and Soldering
Diodes must be connected the correct way round, the diagram may be labeled a or + for anode and k or - for cathode (yes, it really is k, not c, for cathode!). The cathode is marked by a line painted on the body. Diodes are labeled with their code in small print; you may need a magnifying glass to read this on small signal diodes! Small signal diodes can be damaged by heat when soldering, but the risk is small unless you are using a germanium diode (codes beginning OA...) in which case you should use a heat sink clipped to the lead between the joint and the diode body. A standard crocodile clip can be used as a heat sink. Rectifier diodes are quite robust and no special precautions are needed for soldering them.
You can use a multimeter or a simple tester (battery, resistor and LED) to check that a diode conducts in one direction but not the other. A lamp may be used to test a rectifier diode, but do NOT use a lamp to test a signal diode because the large current passed by the lamp will destroy the diode!
- 115 -
Signal Diodes (small current)
Signal diodes are used to process information (electrical signals) in circuits, so they are only required to pass small currents of up to 100mA. General purpose signal diodes such as the 1N4148 are made from silicon and have a forward voltage drop of 0.7V. Germanium diodes such as the OA90 have a lower forward voltage drop of 0.2V and this makes them suitable to use in radio circuits as detectors which extract the audio signal from the weak radio signal. For general use, where the size of the forward voltage drop is less important, silicon diodes are better because they are less easily damaged by heat when soldering, they have a lower resistance when conducting, and they have very low leakage currents when a reverse voltage is applied.
Protection Diodes for Relays
Signal diodes are also used with relays to protect transistors and integrated circuits from the brief high voltage produced when the relay coil is switched off. The diagram shows how a protection diode is connected across the relay coil, note that the diode is connected 'backwards' so that it will normally NOT conduct. Conduction only occurs when the relay coil is switched off, at this moment current tries to continue flowing through the coil and it is harmlessly diverted through the diode. Without the diode no current could flow and the coil would produce a damaging high voltage 'spike' in its attempt to keep the current flowing.
Rectifier Diodes (large current)
Rectifier diodes are used in power supplies to convert alternating current (AC) to direct current (DC), a process called rectification. They are also used elsewhere in circuits where a large current must pass through the diode. Maximum Maximum Diode Reverse Current Voltage 1N4001 1A 1A 1A 3A 3A 50V 100V 1000V 100V 1000V
1N4002 All rectifier diodes are made from silicon and therefore have a forward voltage drop of 0.7V. The table shows maximum current 1N4007 and maximum reverse voltage for some popular rectifier diodes. 1N5401 The 1N4001 is suitable for most low voltage circuits with a 1N5408 current of less than 1A.
- 116 -
There are several ways of connecting diodes to make a rectifier to convert AC to DC. The bridge rectifier is one of them and it is available in special packages containing the four diodes required. Bridge rectifiers are rated by their maximum current and maximum reverse voltage. They have four leads or terminals: the two DC outputs are labeled + and -, the two AC inputs are labeled .
The diagram shows the operation of a bridge rectifier as it converts AC to DC. Notice how alternate pairs of diodes conduct.
Various types of Bridge Rectifiers Note that some have a hole through their centre for attaching to a heat sink
Example: a = anode, k = cathode Zener diodes are used to maintain a fixed voltage. They are designed to 'breakdown' in a reliable and non-destructive way so that they can be used in reverse to maintain a fixed voltage across their terminals. The diagram below shows how they are connected, with a resistor in series to limit the current.
- 117 -
Zener diodes can be distinguished from ordinary diodes by their code and breakdown voltage which are printed on them. Zener diode codes begin BZX... or BZY... Their breakdown voltage is printed with V in place of a decimal point, so 4V7 means 4.7V for example. Zener diodes are rated by their breakdown voltage and maximum power:
The minimum voltage available is 2.7V. Power ratings of 400mW and 1.3W are common.
Integrated Circuits (Chips)
Integrated Circuits are usually called ICs or chips. They are complex circuits which have been etched onto tiny chips of semiconductor (silicon). The chip is packaged in a plastic holder with pins spaced on a 0.1" (2.54mm) grid which will fit the holes on stripboard and breadboards. Very fine wires inside the package link the chip to the pins.
The pins are numbered anti-clockwise around the IC (chip) starting near the notch or dot. The diagram shows the numbering for 8-pin and 14-pin ICs, but the principle is the same for all sizes.
Chip Holders (DIL Sockets)
ICs (chips) are easily damaged by heat when soldering and their short pins cannot be protected with a heat sink. Instead we use a chip holder, strictly called a DIL socket (DIL = Dual In-Line), which can be safely soldered onto the circuit board. The chip is pushed into the holder when all soldering is complete.
- 118 -
Chip holders are only needed when soldering so they are not used on breadboards. Commercially produced circuit boards often have chips soldered directly to the board without a chip holder, usually this is done by a machine which is able to work very quickly. Please don't attempt to do this yourself because you are likely to destroy the chip and it will be difficult to remove without damage by de-soldering.
Removing a Chip from its Holder
If you need to remove a chip it can be gently pull out of the holder with a small flat-blade screwdriver. Carefully lever up each end by inserting the screwdriver blade between the chip and its holder and gently twisting the screwdriver. Take care to start lifting at both ends before you attempt to remove the chip, otherwise you will bend and possibly break the pins.
Many ICs are static sensitive and can be damaged when you touch them because your body may have become charged with static electricity, from your clothes for example. Static sensitive ICs will be supplied in antistatic packaging with a warning label and they should be left in this packaging until you are ready to use them. It is usually adequate to earth your hands by touching a metal water pipe or window frame before handling the IC but for the more sensitive Antistatic bags for ICs (and expensive!) ICs special equipment is available, including earthed wrist straps and earthed work surfaces. You can make an earthed work surface with a sheet of aluminum kitchen foil and using a crocodile clip to connect the foil to a metal water pipe or window frame with a 10k resistor in series.
Datasheets are available for most ICs giving detailed information about their ratings and functions. In some cases example circuits are shown. The large amount of information with symbols and abbreviations can make datasheets seem overwhelming to a beginner, but they are worth reading as you become more confident because they contain a great deal of useful information for more experienced users designing and testing circuits. Datasheets are available as PDF files from:
• • •
DatasheetArchive.com Datasheets.org.uk DatasheetCatalog.com
- 119 -
Sinking and Sourcing Current
Chip outputs are often said to 'sink' or 'source' current. The terms refer to the direction of the current at the chip's output. If the chip is sinking current it is flowing into the output. This means that a device connected between the positive supply (+Vs) and the chip output will be switched on when the output is low (0V). If the chip is sourcing current it is flowing out of the output. This means that a device connected between the chip output and the negative supply (0V) will be switched on when the output is high (+Vs). It is possible to connect two devices to a chip output so that one is on when the output is low and the other is on when the output is high. The maximum sinking and sourcing currents for a chip output are usually the same but there are some exceptions, for example 74LS TTL logic chips can sink up to 16mA but only source 2mA.
Using Diodes to Combine Outputs
- 120 -
The outputs of chips (ICs) must never be directly connected together. However, diodes can be used to combine two or more digital (high/low) outputs from a chip such as a counter. This can be a useful way of producing simple logic functions without using logic gates! The diagram shows two ways of combining outputs using diodes. The diodes must be capable of passing the output current. 1N4148 signal diodes are suitable for low current devices such as LED. For example the outputs Q0 - Q9 of a 4017 1-of-10 counter go high in turn. Using diodes to combine the 2nd (Q1) and 4th (Q3) outputs as shown in the bottom diagram will make the LED flash twice followed by a longer gap. The diodes are performing the function of an OR gate.
The 555 and 556 Timers
The 8-pin 555 timer chip is used in many projects, a popular version is the NE555. Most circuits will just specify '555 timer IC' and the NE555 is suitable for these. The 555 output (pin 3) can sink and source up to 200mA. This is more than most chips and it is sufficient to supply LED, relay coils and low current lamps. To switch larger currents you can connect a transistor. The 556 is a dual version of the 555 housed in a 14-pin package. The two timers (A and B) share the same power supply pins. Low power versions of the 555 are made, such as the ICM7555, but these should only be used when specified (to increase battery life) because their maximum output current of about 20mA (with 9V supply) is too low for many standard 555 circuits. The ICM7555 has the same pin arrangement as a standard 555.
- 121 -
Logic ICs (chips)
Logic ICs process digital signals and there are many devices, including logic gates, flip-flops, shift registers, counters and display drivers. They can be split into two groups according to their pin arrangements: the 4000 series and the 74 series which consists of various families such as the 74HC, 74HCT and 74LS. For most new projects the 74HC family is the best choice. The older 4000 series is the only family which works with a supply voltage of more than 6V. The 74LS and 74HCT families require a 5V supply so they are not convenient for battery operation. The table below summarizes the important properties of the most popular logic families: Property Technology Power Supply 4000 Series CMOS 3 to 15V 74 Series 74HC Highspeed CMOS 2 to 6V 74 Series 74HCT High-speed CMOS TTL compatible 5V ±0.5V Very high impedance. Unused inputs must be connected to +Vs or 0V. Compatible with 74LS (TTL) outputs. Can sink and source about 20mA, enough to light an LED. To switch larger currents use a transistor. 74 Series 74LS TTL Low-power Schottky 5V ±0.25V 'Float' high to logic 1 if unconnected. 1mA must be drawn out to hold them at logic 0. Can sink up to 16mA (enough to light an LED), but source only about 2mA. To switch larger currents use a transistor.
Very high impedance. Unused inputs must be connected to +Vs or 0V. Inputs cannot be reliably driven by 74LS outputs unless a 'pull-up' resistor is used (see below). Can sink and source about 5mA (10mA with 9V supply), enough to light an LED. To switch larger currents use a transistor. One output can drive up to 50 CMOS, 74HC or 74HCT inputs, but only one 74LS input. about 1MHz Can sink and source about 20mA, enough to light an LED. To switch larger currents use a transistor.
One output can drive up to 50 CMOS, 74HC or 74HCT inputs, but only 10 74LS inputs.
One output can drive up to 10 74LS inputs or 50 74HCT inputs. about 35MHz
Maximum Frequency Power consumption of the IC itself
A few µW.
A few µW.
A few µW.
A few mW.
Mixing Logic Families
It is best to build a circuit using just one logic family, but if necessary the different families may be mixed providing the power supply is suitable for all of them. For example mixing 4000 and 74HC requires the power supply to be in the range 3 to 6V. A circuit which includes 74LS or 74HCT ICs must have a 5V supply.
- 122 -
Driving 4000 or 74HC inputs from a 74LS output using a pull-up resistor. A 74LS output cannot reliably drive a 4000 or 74HC input unless a 'pull-up' resistor of 2.2k is connected between the +5V supply and the input to correct the slightly different logic voltage ranges used. Note that a 4000 series output can drive only one 74LS input.
74 Series Logic ICs
There are several families of logic chips numbered from 74xx00 onwards with letters (xx) in the middle of the number to indicate the type of circuitry, e.g. 74LS00 and 74HC00. The original family (now obsolete) had no letters, e.g. 7400. The 74LS (Low-power Schottky) family (like the original) uses TTL (Transistor-Transistor Logic) circuitry which is fast but requires more power than later families. The 74 series is often still called the 'TTL series' even though the latest chips do not use TTL! The 74HC family has High-speed CMOS circuitry, combining the speed of TTL with the very low power consumption of the 4000 series. They are CMOS chips with the same pin arrangements as the older 74LS family. Note that 74HC inputs cannot be reliably driven by 74LS outputs because the voltage ranges used for logic 0 are not quite compatible, use 74HCT instead. The 74HCT family is a special version of 74HC with 74LS TTL-compatible inputs so 74HCT can be safely mixed with 74LS in the same system. In fact 74HCT can be used as low-power direct replacements for the older 74LS ICs in most circuits. The minor disadvantage of 74HCT is a lower immunity to noise, but this is unlikely to be a problem in most situations. The CMOS circuitry used in the 74HC and 74HCT series ICs means that they are static sensitive. Touching a pin while charged with static electricity (from your clothes for example) may damage the IC. In fact most ICs in regular use are quite tolerant and earthing your hands by touching a metal water pipe or window frame before handling them will be adequate. ICs should be left in their protective packaging until you are ready to use them. To compare the different logic families please see the Summary table of logic families For most new projects the 74HC family is the best choice. The 74LS and 74HCT families require a 5V supply so they are not convenient for battery operation.
- 123 -
74HC and 74HCT family characteristics:
• • •
• • • •
74HC Supply: 2 to 6V, small fluctuations are tolerated. 74HCT Supply: 5V ±0.5V, a regulated supply is best. Inputs have very high impedance (resistance), this is good because it means they will not affect the part of the circuit where they are connected. However, it also means that unconnected inputs can easily pick up electrical noise and rapidly change between high and low states in an unpredictable way. This is likely to make the chip behave erratically and it will significantly increase the supply current. To prevent problems all unused inputs MUST be connected to the supply (either +Vs or 0V), this applies even if that part of the chip is not being used in the circuit! Note that 74HC inputs cannot be reliably driven by 74LS outputs because the voltage ranges used for logic 0 are not quite compatible. For reliability use 74HCT if the system includes some 74LS chips. Outputs can sink and source about 4mA if you wish to maintain the correct output voltage to drive logic inputs, but if there is no need to drive any inputs the maximum current is about 20mA. To switch larger currents you can connect a transistor. Fan-out: one output can drive many inputs (50+), except 74LS inputs because these require a higher current and only 10 can be driven. Gate propagation time: about 10ns for a signal to travel through a gate. Frequency: up to 25MHz. Power consumption (of the chip itself) is very low, a few µW. It is much greater at high frequencies, a few mW at 1MHz for example.
74LS family TTL characteristics:
• • • • •
Supply: 5V ±0.25V, it must be very smooth, a regulated supply is best. In addition to the normal supply smoothing, a 0.1µF capacitor should be connected across the supply near the chip to remove the 'spikes' generated as it switches state, one capacitor is needed for every 4 chips. Inputs 'float' high to logic 1 if unconnected, but do not rely on this in a permanent (soldered) circuit because the inputs may pick up electrical noise. 1mA must be drawn out to hold inputs at logic 0. In a permanent circuit it is wise to connect any unused inputs to +Vs to ensure good immunity to noise. Outputs can sink up to 16mA (enough to light an LED), but they can source only about 2mA. To switch larger currents you can connect a transistor. Fan-out: one output can drive up to 10 74LS inputs, but many more 74HCT inputs. Gate propagation time: about 10ns for a signal to travel through a gate. Frequency: up to about 35MHz (under the right conditions). Power consumption (of the chip itself) is a few mW.
Open Collector Outputs
Some 74 series ICs have open collector outputs, this means they can sink current but they cannot source current. They behave like an NPN transistor switch. The diagram below shows how an open collector output can be connected to sink current from a supply which has a higher voltage than the logic IC supply. The maximum load supply is 15V for most open collector ICs.
- 124 -
Open collector outputs can be safely connected together to switch on a load when any one of them is low; unlike normal outputs which must be combined using diodes. There are many ICs in the 74 series and this page only covers a selection, concentrating on the most useful gates, counters, decoders and display drivers. For each IC there is a diagram showing the pin arrangement and brief notes explain the function of the pins where necessary. For simplicity the family letters after the 74 are omitted in the diagrams below because the pin connections apply to all 74 series ICs with the same number. For example 7400 NAND gates are available as 74HC00, 74HCT00 and 74LS00. If you are using another reference please be aware that there is some variation in the terms used to describe pin functions, for example reset is also called clear. Some inputs are 'active low' which means they perform their function when low. If you see a line drawn above a label it means it is active low, for example: (say 'reset-bar').
Quad 2-Input Gates
• • • • • • •
7400 quad 2-input NAND 7403 quad 2-input NAND with open collector outputs 7408 quad 2-input AND 7409 quad 2-input AND with open collector outputs 7432 quad 2-input OR 7486 quad 2-input EX-OR 74132 quad 2-input NAND with Schmitt trigger inputs
- 125 -
The 74132 has Schmitt trigger inputs to provide good noise immunity. They are ideal for slowly changing or noisy signals.
7402 quad 2-input NOR (Note the unusual gate layout)
Triple 3-Input Gates
• • •
7410 triple 3-input NAND 7411 triple 3-input AND 7412 triple 3-input NAND with open collector outputs
- 126 -
7427 triple 3-input NOR
Notice how gate 1 is spread across the two sides of the package.
Dual 4-Input Gates
7420 dual 4-input NAND 7421 dual 4-input AND
NC = No Connection (a pin that is not used).
7430 8-Input NAND Gate
NC = No Connection (a pin that is not used).
- 127 -
Hex NOT Gates (also called Inverter)
• • •
7404 hex NOT 7405 hex NOT with open collector outputs 7414 hex NOT with Schmitt trigger inputs
The 7414 has Schmitt trigger inputs to provide good noise immunity. They are ideal for slowly changing or noisy signals.
7490 decade (0-9) ripple counter 7493 4-bit (0-15) ripple counter
These are ripple counters so beware that glitches may occur in any logic gate systems connected to their outputs due to the slight delay before the later counter outputs respond to a clock pulse. The count advances as the clock input becomes low (on the falling-edge), this is indicated by . the bar over the clock label. This is the usual clock behavior of ripple counters and it means a counter output can directly drive the clock input of the next counter in a chain.
- 128 -
Note: NC = No Connection (a pin that is not used). # on the 7490 pins 6 and 7 connect to an internal AND gate for resetting to 9.
The counter is in two sections: clockA-QA and clockB-QB-QC-QD. For normal use connect QA to clockB to link the two sections, and connect the external clock signal to clockA. For normal operation at least one reset0 input should be low, making both high resets the counter to zero (0000, QA-QD low). Note that the 7490 has a pair of reset9 inputs on pins 6 and 7, these reset the counter to nine (1001) so at least one of them must be low for counting to occur. Counting to less than the maximum (9 or 15) can be achieved by connecting the appropriate output(s) to the two reset0 inputs. If only one reset input is required the two inputs can be connected together. For example: to count 0 to 8 connect QA (1) and QD (8) to the reset inputs.
74390 Dual Decade (0-9) Ripple Counter
The 74390 contains two separate decade (0 to 9) counters, one on each side of the chip. They are ripple counters so beware that glitches may occur in any logic gate systems connected to their outputs due to the slight delay before the later counter outputs respond to a clock pulse. The count advances as the clock input becomes low (on the falling-edge), this is indicated by the bar over the clock label. This is the usual clock behavior of ripple counters and it means a counter output can directly drive the clock input of the next counter in a chain. Each counter is in two sections: clockA-QA and clockB-QB-QC-QD. For normal use connect QA to clockB to link the two sections, and connect the external clock signal to clockA. The reset input should be low; making it high resets the counter to zero (0000, QA-QD low). Counting to less than 9 can be achieved by connecting the appropriate output(s) to the reset input, using an AND gate if necessary. For example: to count 0 to 7 connect QD (8) to reset, to count 0 to 8 connect QA (1) and QD (8) to reset using an AND gate.
- 129 -
74393 Dual 4-Bit (0-15) Ripple Counter
The 74393 contains two separate 4-bit (0 to 15) counters, one on each side of the chip. They are ripple counters so beware that glitches may occur in logic systems connected to their outputs due to the slight delay before the later outputs respond to a clock pulse. The count advances as the clock input becomes low (on the falling-edge), this is indicated by the bar over the clock label. This is the usual clock behavior of ripple counters and it means a counter output can directly drive the clock input of the next counter in a chain. For normal operation the reset input should be low, making it high resets the counter to zero (0000, QA-QD low). Counting to less than 15 can be achieved by connecting the appropriate output(s) to the reset input, using an AND gate if necessary. For example to count 0 to 8 connect QA (1) and QD (8) to reset using an AND gate.
Connecting ripple counters in a chain
The diagram below shows how to link ripple counters in a chain, notice how the highest output QD of each counter drives the clock input of the next counter.
74160-3 Synchronous Counters
• • • •
74160 synchronous decade counter (standard reset) 74161 synchronous 4-bit counter (standard reset) 74162 synchronous decade counter (synchronous reset) 74163 synchronous 4-bit counter (synchronous reset)
- 130 -
These are synchronous counters so their outputs change precisely together on each clock pulses. This is helpful if you need to connect their outputs to logic gates because it avoids the glitches which occur with ripple counters. The count advances as the clock input becomes high (on the rising-edge). The decade counters count from 0 to 9 (0000 to 1001 in binary). The 4-bit counters count from 0 to 15 (0000 to 1111 in binary). For normal operation (counting) the reset, preset, count enable and carry in inputs should all be high. When count enable is low the clock input is ignored and counting stops. The counter may be preset by placing the desired binary number on the inputs A-D, making the preset input low, and applying a positive pulse to the clock input. The inputs A-D may be left unconnected if not required; preset is also known as parallel enable (PE) The reset input is active-low so it should be high (+Vs) for normal operation (counting). When low it resets the count to zero (0000, QA-QD low), this happens immediately with the 74160 and 74161 (standard reset), but with the 74162 and 74163 (synchronous reset) the reset occurs on the rising-edge of the clock input. Counting to less than the maximum (15 or 9) can be achieved by connecting the appropriate output(s) through a NOT or NAND gate to the reset input. For the 74162 and 74163 (synchronous reset) you must use the output(s) representing one less than the reset count you require, e.g. to reset on 7 (counting 0 to 6) use QB (2) and QC (4).
Connecting synchronous counters in a chain
The diagram below shows how to link synchronous counters such as 74160-3, notice how all the clock (CK) inputs are linked. Carry out (CO) is used to feed the carry in (CI) of the next counter. Carry in (CI) of the first 74160-3 counter should be high.
- 131 -
74192 up/down decade (0-9) counter 74193 up/down 4-bit (0-15) counter
These are synchronous counters so their outputs change precisely together on each clock pulse. This is helpful if you need to connect their outputs to logic gates because it avoids the glitches which occur with ripple counters.
These counters have separate clock inputs for counting up and down. The count increases as the up clock input becomes high (on the rising-edge). The count decreases as the down clock input becomes high (on the rising-edge). In both cases the other clock input should be high. For normal operation (counting) the preset input should be high and the reset input low. When the reset input is high it resets the count to zero (0000, QA-QD low) The counter may be preset by placing the desired binary number on the inputs A-D and briefly making the preset input low. Note that a clock pulse is not required to preset, unlike the 741603 counters. The inputs A-D may be left unconnected if not required.
Connecting counters with separate up and down clock inputs in a chain
The diagram below shows how to link 74192-3 up/down counters with separate up and down clock inputs, notice how carry and borrow are connected to the up clock and down clock inputs respectively of the next counter.
- 132 -
74HC4017 decade counter (1-of-10) 74HC4020 14-bit ripple counter 74HC4040 12-bit ripple counter 74HC4060 14-bit ripple counter with internal oscillator
These are the 74HC equivalents of 4000 series CMOS counters. Like all 74HC ICs they need a power supply of 2 to 6V. For pin connections and functions see: 4017, 4020, 4040, 4060
7442 BCD to Decimal (1 of 10) Decoder
The 7442 outputs are active-low which means they become low when selected but are high at other times. They can sink up to about 20mA. The appropriate output becomes low in response to the BCD (binary coded decimal) input. For example an input of binary 0101 (=5) will make output Q5 low and all other outputs high. The 7442 is a BCD (binary coded decimal) decoder intended for input values 0 to 9 (0000 to 1001 in binary). With inputs from 10 to 15 (1010 to 1111 in binary) all outputs are high. Note that the 7442 can be used as a 1-of-8 decoder if input D is held low. Also see: 74HC4017 and 4017 both are a decade counter and 1-of-10 decoder in a single IC.
- 133 -
7-Segment Display Drivers
7447 BCD to 7-Segment Display Driver
The appropriate outputs a-g becomes low to display the BCD (binary coded decimal) number supplied on inputs A-D. The 7447 has open collector outputs a-g which can sink up to 40mA. The 7-segment display segments must be connected between +Vs and the outputs with a resistor in series (330 with a 5V supply). A common anode display is required. Display test and blank input are active-low so they should be high for normal operation. When display test is low all the display segments should light (showing number 8). If the blank input is low the display will be blank when the count input is zero (0000). This can be used to blank leading zeros when there are several display digits driven by a chain of counters. To achieve this blank output should be connected to blank input of the next display down the chain (the next most significant digit). The 7447 is intended for BCD (binary coded decimal) which is input values 0 to 9 (0000 to 1001 in binary). Inputs from 10 to 15 (1010 to 1111 in binary) will light odd display segments but will do no harm.
74HC4511 BCD to 7-Segment Display Driver
This is the 74HC equivalent of the CMOS 4511 display driver. Like all 74HC ICs it needs a power supply of 2 to 6V. For pin connections and functions see 4511.
- 134 -
4000 Series CMOS Logic ICs
This family of logic ICs is numbered from 4000 onwards, and from 4500 onwards. They have a B at the end of the number (e.g. 4001B) which refers to an improved design introduced some years ago. Most of them are in 14-pin or 16-pin packages. They use CMOS circuitry which means they use very little power and can tolerate a wide range of power supply voltages (3 to 15V) making them ideal for battery powered projects. CMOS is pronounced 'see-moss' and stands for Complementary Metal Oxide Semiconductor. General characteristics
• • • •
Supply: 3 to 15V, small fluctuations are tolerated. Inputs have very high impedance (resistance), this is good because it means they will not affect the part of the circuit where they are connected. However, it also means that unconnected inputs can easily pick up electrical noise and rapidly change between high and low states in an unpredictable way. This is likely to make the chip behave erratically and it will significantly increase the supply current. To prevent problems all unused inputs MUST be connected to the supply (either +Vs or 0V), this applies even if that part of the chip is not being used in the circuit! Outputs can sink and source only about 1mA if you wish to maintain the correct output voltage to drive CMOS inputs. If there is no need to drive any inputs the maximum current is about 5mA with a 6V supply, or 10mA with a 9V supply (just enough to light an LED). To switch larger currents you can connect a transistor. Fan-out: one output can drive up to 50 inputs. Gate propagation time: typically 30ns for a signal to travel through a gate with a 9V supply, it takes a longer time at lower supply voltages. Frequency: up to 1MHz, above that the 74 series is a better choice. Power consumption (of the chip itself) is very low, a few µW. It is much greater at high frequencies, a few mW at 1MHz for example.
There are many ICs in the 4000 series and this page only covers a selection, concentrating on the most useful gates, counters, decoders and display drivers. For each IC there is a diagram showing the pin arrangement and brief notes explain the function of the pins where necessary. The notes also explain if the IC's properties differ substantially from the standard characteristics listed above. If you are using another reference please be aware that there is some variation in the terms used to describe input pins. I have tried to be logically consistent so the term I have used describes the pin's function when high (true). For example 'disable clock' on the 4026 is often labeled 'clock enable' but this can be confusing because it enables the clock when low (false). An input described as 'active low' is like this, it performs its function when low. If you see a line (say 'reset-bar'). drawn above a label it means it is active low, for example:
The CMOS circuitry means that 4000 series ICs are static sensitive. Touching a pin while charged with static electricity (from your clothes for example) may damage the IC. In fact most ICs in regular use are quite tolerant and earthing your hands by touching a metal water pipe or window frame before handling them will be adequate. ICs should be left in their protective packaging until you are ready to use them.
- 135 -
Quad 2-Input Gates
• • • • • • • •
4001 quad 2-input NOR 4011 quad 2-input NAND 4030 quad 2-input EX-OR (now obsolete) 4070 quad 2-input EX-OR 4071 quad 2-input OR 4077 quad 2-input EX-NOR 4081 quad 2-input AND 4093 quad 2-input NAND with Schmitt trigger inputs
The 4093 has Schmitt trigger inputs to provide good noise immunity. They are ideal for slowly changing or noisy signals. The hysteresis is about 0.5V with a 4.5V supply and almost 2V with a 9V supply.
Triple 3-Input Gates
• • • •
4023 triple 3-input NAND 4025 triple 3-input NOR 4073 triple 3-input AND 4075 triple 3-input OR
- 136 -
Dual 4-Input Gates
• • • •
4002 dual 4-input NOR 4012 dual 4-input NAND 4072 dual 4-input OR 4082 dual 4-input AND
NC = No Connection (a pin that is not used).
4068 8-Input NAND/AND* Gate
This gate has a propagation time which is about 10 times longer than normal so it is not suitable for high speed circuits. NC = No Connection (a pin that is not used). * = The AND output (pin 1) is not available on some versions of the 4068.
- 137 -
4069 Hex NOT (Inverting Buffer)
4049 Hex NOT and 4050 Hex Buffer
4049 hex NOT (inverting buffer) 4050 hex non-inverting buffer
Inputs: These ICs are unusual because their gate inputs can withstand up to +15V even if the power supply is a lower voltage. Outputs: These ICs are unusual because they are capable of driving 74LS gate inputs directly. To do this they must have a +5V supply (74LS supply voltage). The gate output is sufficient to drive four 74LS inputs. NC = No Connection (a pin that is not used). Note the unusual arrangement of the power supply pins for these ICs!
- 138 -
4000 Dual 3-Input NOR Gate and NOT Gate
Two 3-input NOR gates and a single NOT gate in one package. NC = No Connection (a pin that is not used).
Decade and 4-Bit Counters
4017 Decade Counter (1-of-10)
The count advances as the clock input becomes high (on the rising-edge). Each output Q0-Q9 goes high in turn as counting advances. For some functions (such as flash sequences) outputs may be combined using diodes. The reset input should be low (0V) for normal operation (counting 0-9). When high it resets the count to zero (Q0 high). This can be done manually with a switch between reset and +Vs and a 10k resistor between reset and 0V. Counting to less than 9 is achieved by connecting the relevant output (Q0-Q9) to reset, for example to count 0,1,2,3 connect Q4 to reset. The disable input should be low (0V) for normal operation. When high it disables counting so that clock pulses are ignored and the count is kept constant.
- 139 -
The ÷10 output is high for counts 0-4 and low for 5-9, so it provides an output at 1/10 of the clock frequency. It can be used to drive the clock input of another 4017 (to count the tens).
4026 Decade Counter and 7-Segment Display Driver
The count advances as the clock input becomes high (on the rising-edge). The outputs a-g go high to light the appropriate segments of a common-cathode 7-segment display as the count advances. The maximum output current is about 1mA with a 4.5V supply and 4mA with a 9V supply. This is sufficient to directly drive many 7-segment LED displays. The table below shows the segment sequence in detail. The reset input should be low (0V) for normal operation (counting 0-9). When high it resets the count to zero. The disable clock input should be low (0V) for normal operation. When high it disables counting so that clock pulses are ignored and the count is kept constant. The enable display input should be high (+Vs) for normal operation. When low it makes outputs a-g low, giving a blank display. The enable out follows this input but with a brief delay. The ÷10 output (h in table) is high for counts 0-4 and low for 5-9, so it provides an output at 1/10 of the clock frequency. It can be used to drive the clock input of another 4026 to provide multidigit counting. The not 2 output is high unless the count is 2 when it goes low.
- 140 -
4029 Up/Down Synchronous Counter with Preset
The 4029 is a synchronous counter so its outputs change precisely together on each clock pulse. This is helpful if you need to connect the outputs to logic gates because it avoids the glitches which occur with ripple counters. The count occurs as the clock input becomes high (on the rising-edge). The up/down input determines the direction of counting: high for up, low for down. The state of up/down should be changed when the clock is high. For normal operation (counting) preset, and carry in should be low. The binary/decade input selects the type of counter: 4-bit binary (0-15) when high; decade (09) when low. The counter may be preset by placing the desired binary number on the inputs A-D and briefly making the preset input high. There is no reset input, but preset can be used to reset the count to zero if inputs A-D are all low.
4510 Up/Down Decade (0-9) Counter with Preset 4516 Up/Down 4-Bit (0-15) Counter with Preset
- 141 -
These are synchronous counters so their outputs change precisely together on each clock pulse. This is helpful if you need to connect their outputs to logic gates because it avoids the glitches which occur with ripple counters. The count occurs as the clock input becomes high (on the rising-edge). The up/down input determines the direction of counting: high for up, low for down. The state of up/down should be changed when the clock is high. For normal operation (counting) preset, reset and carry in should be low. When reset is high it resets the count to zero (0000, QA-QD low). The clock input should be low when resetting. The counter may be preset by placing the desired binary number on the inputs A-D and briefly making the preset input high, the clock input should be low when this happens.
Connecting synchronous counters in a chain
The diagram below shows how to link synchronous counters, notice how all the clock (CK) inputs are linked. Carry out (CO) feeds carry in (CI) of the next counter. Carry in (CI) of the first counter should be low for 4029, 4510 and 4516 counters.
4518 Dual Decade (0-9) Counter 4520 Dual 4-Bit (0-15) Counter
These contain two separate synchronous counters, one on each side of the chip. Normally a clock signal is connected to the clock input, with the enable input held high. Counting advances as the clock signal becomes high (on the rising-edge). Special arrangements are used if the 4518/20 counters are linked in a chain, as explained below.
- 142 -
For normal operation the reset input should be low, making it high resets the counter to zero (0000, QA-QD low). Counting to less than the maximum (9 or 15) can be achieved by connecting the appropriate output(s) to the reset input, using an AND gate if necessary. For example to count 0 to 8 connect QA (1) and QD (8) to reset using an AND gate.
Connecting 4518 and 4520 counters in a chain
The diagram below shows how to link 4518 and 4520 counters. Notice how the normal clock inputs are held low, with the enable inputs being used instead. With this arrangement counting advances as the enable input becomes low (on the falling-edge) allowing output QD to supply a clock signal to the next counter. The complete chain is a ripple counter, although the individual counters are synchronous! If it is essential to have truly synchronous counting a system of logic gates is required, please see a 4518/20 datasheet for further details.
7-Bit, 12-Bit and 14-Bit Counters
4020 14-Bit (÷16,384) Ripple Counter
The 4020 is a ripple counter so beware that glitches may occur in any logic gate systems connected to its outputs due to the slight delay before the later counter outputs respond to a clock pulse. The count advances as the clock input becomes low (on the falling-edge), this is indicated by the bar over the clock label. This is the usual clock behavior of ripple counters and it means a counter output can directly drive the clock input of the next counter in a chain.
- 143 -
Output Qn is the nth stage of the counter, representing 2n, for example Q4 is 24 = 16 (1/16 of clock frequency) and Q14 is 214 = 16384 (1/16384 of clock frequency). Note that Q2 and Q3 are not available. The reset input should be low for normal operation (counting). When high it resets the count to zero (all outputs low). Also see: 4040 (12-bit) and 4060 (14-bit with internal oscillator).
4024 7-Bit (÷128) Ripple Counter
The 4024 is a ripple counter so beware that glitches may occur in any logic gate systems connected to its outputs due to the slight delay before the later counter outputs respond to a clock pulse. The count advances as the clock input becomes low (on the falling-edge), this is indicated by the bar over the clock label. This is the usual clock behavior of ripple counters and it means a counter output can directly drive the clock input of the next counter in a chain. Output Qn is the nth stage of the counter, representing 2n, for example Q4 is 24 = 16 (1/16 of clock frequency) and Q7 is 27 = 128 (1/128 of clock frequency). The reset input should be low for normal operation (counting). When high it resets the count to zero (all outputs low).
- 144 -
4040 12-Bit (÷4096) Ripple Counter
The 4040 is a ripple counter so beware that glitches may occur in any logic gate systems connected to its outputs due to the slight delay before the later counter outputs respond to a clock pulse. The count advances as the clock input becomes low (on the falling-edge), this is indicated by the bar over the clock label. This is the usual clock behavior of ripple counters and it means a counter output can directly drive the clock input of the next counter in a chain. Output Qn is the nth stage of the counter, representing 2n, for example Q4 is 24 = 16 (1/16 of clock frequency) and Q12 is 212 = 4096 (1/4096 of clock frequency). The reset input should be low for normal operation (counting). When high it resets the count to zero (all outputs low).
4060 14-Bit (÷16,384) Ripple Counter with Internal Oscillator
The 4060 is a ripple counter so beware that glitches may occur in any logic gate systems connected to its outputs due to the slight delay before the later counter outputs respond to a clock pulse.
- 145 -
The count advances as the clock input becomes low (on the falling-edge), this is indicated by the bar over the clock label. This is the usual clock behavior of ripple counters and it means a counter output can directly drive the clock input of the next counter in a chain. The clock can be driven directly, or connected to the internal oscillator (see below). Output Qn is the nth stage of the counter, representing 2n, for example Q4 is 24 = 16 (1/16 of clock frequency) and Q14 is 214 = 16384 (1/16384 of clock frequency). Note that Q1-3 and Q11 are not available. The reset input should be low for normal operation (counting). When high it resets the count to zero (all outputs low). The 4060 includes an internal oscillator. The clock signal may be supplied in three ways:
From an external source to the clock input, as for a normal counter. In this case there should be no connections to external C and external R (pins 9 and 10). RC oscillator as shown in the diagram. The oscillator drives the clock input with an approximate frequency f = 1/(2×R1×C) (it partly depends on the supply voltage). R1 should be at least 50k if the supply voltage is less than 7V. R2 should be between 2 and 10 times R1. Crystal oscillator as shown in the diagram, note that there is no connection to pin 9. The 32768 Hz crystal will give a 2Hz signal at the last output, Q14.
4028 BCD to Decimal (1 of 10) Decoder
- 146 -
The appropriate output Q0-9 becomes high in response to the BCD (binary coded decimal) input. For example an input of binary 0101 (=5) will make output Q5 high and all other outputs low. The 4028 is a BCD (binary coded decimal) decoder intended for input values 0 to 9 (0000 to 1001 in binary). With inputs from 10 to 15 (1010 to 1111 in binary) all outputs are low. Note that the 4028 can be used as a 1-of-8 decoder if input D is held low. Also see: 4017 (a decade counter and 1-of-10 decoder in a single chip).
7-Segment Display Drivers
4511 BCD to 7-Segment Display Driver
The appropriate outputs a-g becomes high to display the BCD (binary coded decimal) number supplied on inputs A-D. The outputs a-g can source up to 25mA. The 7-segment display segments must be connected between the outputs and 0V with a resistor in series (330 with a 5V supply). A common cathode display is required. Display test and blank input are active-low so they should be high for normal operation. When display test is low all the display segments should light (showing number 8). When blank input is low the display will be blank (all segments off). The store input should be low for normal operation. When store is high the displayed number is stored internally to give a constant display regardless of any changes which may occur to the inputs A-D. The 4511 is intended for BCD (binary coded decimal). Inputs values from 10 to 15 (1010 to 1111 in binary) will give a blank display (all segments off).
- 147 -
Function and Construction Lamps emit light when an electric current passes through them. All of the lamps shown on this page have a thin wire filament which becomes very hot and glows brightly when a current passes through it. The filament is made from a metal with a high melting point such as tungsten and it is usually wound into a small coil. Filament lamps have a shorter lifetime than most electronic components because eventually the filament 'blows' (melts) at a weak point.
There are two circuit symbols for a lamp, one for a lamp used to provide illumination and another for a lamp used as an indicator. Small lamps such as torch bulbs can be used for both purposes so either circuit symbol may use in simple educational circuits.
Lamp used for lighting (for example a car headlamp or torch bulb)
Lamp used as an indicator (for example a warning light on a car dashboard)
Selecting a Lamp
There are three important features to consider when selecting a lamp:
• • •
Voltage rating - the supply voltage for normal brightness. Power or current rating - small lamps are usually rated by current. Lamp type - please see the table below.
The voltage and power (or current) ratings are usually printed or embossed on the body of a lamp.
- 148 -
This is the supply voltage required for normal brightness. If a slightly higher voltage is used the lamp will be brighter but its lifetime will be shorter. With a lower supply voltage the lamp will be dimmer and its lifetime will be longer. The light from dim lamps has a yellow-orange color. Torch lamps pass a relatively large current and this significantly reduces the output voltage of the battery. Some voltage is used up inside the battery driving the large current through the small resistance of the battery itself (its 'internal resistance'). As a result the correct voltage rating for a torch lamp is lower than the normal voltage of the battery which lights it! For example: a lamp rated 3.5V 0.3A is correct for a 4.5V battery (three 1.5V cells) because when the lamp is connected the voltage across the battery falls to about 3.5V.
Power or Current Rating
This is the power or current for the lamp when connected to its rated voltage. Low power lamps are usually rated by their current and high power lamps by their power. It is easy to convert between the two ratings: P = I × V where: P = power in watts (W) or I = current in amps (A) V = voltage in volts (V) I=P/V Examples:
• • •
A lamp rated 3.5V 0.3A has a power rating P = I × V = 0.3 × 3.5 = 1.05W A lamp rated 6V 0.06A has a power rating P = I × V = 0.06 × 6 = 0.36W A lamp rated 12W 2.4W has a current rating I = P / V = 2.4 / 12 = 0.2A
Type of Lamp MES Miniature Edison Screw These are the standard small lamps. The bulb diameter is usually about 10mm, but tubular bulbs are also available. MES lamps have one contact on the base and the body forms the other contact. They are available with a good range of voltage and power (or current) ratings. Lens ended versions are available to produce a focused beam of light. LES Lilliput Edison Screw Smaller than MES, these have a bulb diameter of about 5mm.
- 149 -
MCC Miniature Centre Contact These have a bayonet style fitting, like a standard mains lamp in the UK. They have one contact on the base and the body forms the other contact. The bulb diameter is about 10mm. SBC Small Bayonet Cap These have a bayonet style fitting, like a standard mains lamp in the UK. They have two contacts on the base so the metal body is not connected in the circuit. SBC lamps have high power ratings (24W for example) and their bulbs are large with a diameter of up to about 40mm. Note the two filament arrangements in the lamps shown, horizontal on the left, vertical on the right.
Pre-focus This type of lamp is used in torches and lanterns. The flange at the top of the metal body is used to hold the lamp in place. Lampholders are not readily available so this type is unsuitable for most projects. Wire ended These are very small lamps with a bulb about 3mm diameter and 6mm long. Take care to avoid snapping the wires where they enter the glass bulb. Grain of Wheat These are similar to the wire ended lamps above but they have stranded wire leads usually about 150mm long. The bulb is about 3mm diameter and 6mm long - the size of a grain of wheat!
Connecting and Soldering
Lamps may be connected either way round in a circuit and the supply may be AC or DC. Most lamps are designed to be used in a lampholder but the small 'wire ended' and 'grain of wheat' lamps have wires which may be soldered directly onto a circuit board. Lampholders usually have screw terminals or solder tags to attach wires. Some small holders have contacts which may be soldered directly to a circuit board. screw terminals solder tags Lampholders
- 150 -
Lamps in Series
Several lamps can be successfully connected in series provided they all have identical voltage and power (or current) ratings. The supply voltage is divided equally between identical lamps so their voltage rating must be suitable for this. For example Christmas tree lights may have 20 lamps connected in series to a 240V supply, so each lamp will have 240V ÷ 20 = 12V across it. A disadvantage of connecting lamps in series is that if one lamp blows all of them will go out because the circuit is broken. Christmas tree lamps have a special feature to overcome this problem; they are designed to short circuit (conduct like a wire link) when they blow, so the circuit is not broken and the other lamps remain lit, making it easier to locate the faulty lamp. Sets also include one 'fuse' lamp which blows normally. WARNING! The Christmas tree lamps may seem safe because they use only 12V but they are connected to the mains supply which can be lethal. Always unplug from the mains before changing lamps. The voltage across the holder of a missing lamp is the full 240V of the mains supply!
Light Emitting Diodes (LEDs)
Example: Circuit symbol:
LEDs emit light when an electric current passes through them.
Connecting and Soldering
LEDs must be connected the correct way round, the diagram may be labeled a or + for anode and k or - for cathode (yes, it really is k, not c, for cathode!). The cathode is the short lead and there may be a slight flat on the body of round LEDs. If you can see inside the LED the cathode is the larger electrode (but this is not an official identification method). LEDs can be damaged by heat when soldering, but the risk is small unless you are very slow. No special precautions are needed for soldering most LEDs.
- 151 -
Testing an LED
Never connect an LED directly to a battery or power supply! It will be destroyed almost instantly because too much current will pass through and burn it out. LEDs must have a resistor in series to limit the current to a safe value, for quick testing purposes a 1k resistor is suitable for most LEDs if your supply voltage is 12V or less. Remember to connect the LED the correct way round!
Colors of LEDs
LEDs are available in red, orange, amber, yellow, green, blue and white. Blue and white LEDs are much more expensive than the other colors. The color of an LED is determined by the semiconductor material, not by the coloring of the 'package' (the plastic body). LEDs of all colors are available in uncolored packages which may be diffused (milky) or clear (often described as 'water clear'). The colored packages are also available as diffused (the standard type) or transparent.
- 152 -
The most popular type of tri-color LED has a red and a green LED combined in one package with three leads. They are called tri-color because mixed red and green light appears to be yellow and this is produced when both the red and green LEDs are on. The diagram shows the construction of a tri-color LED. Note the different lengths of the three leads. The centre lead (k) is the common cathode for both LEDs, the outer leads (a1 and a2) are the anodes to the LEDs allowing each one to be lit separately, or both together to give the third color.
A bi-color LED has two LEDs wired in 'inverse parallel' (one forwards, one backwards) combined in one package with two leads. Only one of the LEDs can be lit at one time and they are less useful than the tri-color LEDs described above.
Sizes, Shapes and Viewing Angles of LEDs
LEDs are available in a wide variety of sizes and shapes. The 'standard' LED has a round cross-section of 5mm diameter and this is probably the best type for general use, but 3mm round LEDs are also popular. Round cross-section LEDs are frequently used and they are very easy to install on boxes by drilling a hole of the LED diameter, adding a spot of glue will help to hold the LED if necessary. LED clips are also available to secure LEDs in holes. Other cross-section shapes include square, rectangular and triangular.
As well as a variety of colors, sizes and shapes, LEDs also vary in their viewing angle. This tells you how much the beam of light spreads out. Standard LEDs have a viewing angle of 60° but others have a narrow beam of 30° or less.
- 153 -
Calculating an LED Resistor Value
An LED must have a resistor connected in series to limit the current through the LED, otherwise it will burn out almost instantly. The resistor value, R is given by: R = (VS - VL) / I VS = supply voltage VL = LED voltage (usually 2V, but 4V for blue and white LEDs) I = LED current (e.g. 20mA), this must be less than the maximum permitted If the calculated value is not available choose the nearest standard resistor value which is greater, so that the current will be a little less than you chose. In fact you may wish to choose a greater resistor value to reduce the current (to increase battery life for example) but this will make the LED less bright. For example If the supply voltage VS = 9V, and you have a red LED (VL = 2V), requiring a current I = 20mA = 0.020A, R = (9V - 2V) / 0.02A = 350 , so choose 390 (the nearest standard value which is greater).
Working out the LED resistor formula using Ohm's law
Ohm's law says that the resistance of the resistor, R = V/I, where: V = voltage across the resistor (= VS - VL in this case) I = the current through the resistor So R = (VS - VL) / I
- 154 -
Connecting LEDs in Series
If you wish to have several LEDs on at the same time it may be possible to connect them in series. This prolongs battery life by lighting several LEDs with the same current as just one LED. All the LEDs connected in series pass the same current so it is best if they are all the same type. The power supply must have sufficient voltage to provide about 2V for each LED (4V for blue and white) plus at least another 2V for the resistor. To work out a value for the resistor you must add up all the LED voltages and use this for VL. Example calculations: A red, a yellow and a green LED in series need a supply voltage of at least 3 × 2V + 2V = 8V, so a 9V battery would be ideal. VL = 2V + 2V + 2V = 6V (the three LED voltages added up). If the supply voltage VS is 9V and the current I must be 15mA = 0.015A, Resistor R = (VS - VL) / I = (9 - 6) / 0.015 = 3 / 0.015 = 200 , so choose R = 220 (the nearest standard value which is greater).
Avoid Connecting LEDs in Parallel
Connecting several LEDs in parallel with just one resistor shared between them is generally not a good idea. If the LEDs require slightly different voltages only the lowest voltage LED will light and it may be destroyed by the larger current flowing through it. Although identical LEDs can be successfully
- 155 -
connected in parallel with one resistor this rarely offers any useful benefit because resistors are very cheap and the current used is the same as connecting the LEDs individually. If LEDs are in parallel each one should have its own resistor.
Reading a table of technical data for LEDs
Suppliers' catalogues usually include tables of technical data for components such as LEDs. These tables contain a good deal of useful information in a compact form but they can be difficult to understand if you are not familiar with the abbreviations used. The table below shows typical technical data for some 5mm diameter round LEDs with diffused packages (plastic bodies). Only three columns are important and these are shown in bold. Please see below for explanations of the quantities. Type Standard Standard Standard Standard High intensity Super bright Low current Color Red Yellow Green Blue Red Red IF max. VF VF VR typ. max. max. 5V 5V 5V 5V 5V 5V Luminous intensity 5mcd @ 10mA 80mcd @ 10mA 32mcd @ 10mA 32mcd @ 10mA 60mcd @ 20mA 5mcd @ 2mA Viewing Wavelength angle 60° 60° 60° 60° 50° 60° 60° 660nm 625nm 590nm 565nm 430nm 660nm 625nm
30mA 1.7V 2.1V 30mA 2.1V 2.5V 25mA 2.2V 2.5V 30mA 4.5V 5.5V 30mA 1.85V 2.5V 30mA 1.7V 2.0V
Bright red 30mA 2.0V 2.5V
5V 500mcd @ 20mA
IF max. VF typ.
VF max. VR max. Luminous intensity Viewing angle Wavelength
Maximum forward current, forward just means with the LED connected correctly. Typical forward voltage, VL in the LED resistor calculation. This is about 2V, except for blue and white LEDs for which it is about 4V. Maximum forward voltage. Maximum reverse voltage You can ignore this for LEDs connected the correct way round. Brightness of the LED at the given current, mcd = millicandela. Standard LEDs have a viewing angle of 60°, others emit a narrower beam of about 30°. The peak wavelength of the light emitted, this determines the color of the LED. nm = nanometer.
Flashing LEDs look like ordinary LEDs but they contain an integrated circuit (IC) as well as the LED itself. The IC flashes the LED at a low frequency, typically 3Hz (3 flashes per second).
- 156 -
They are designed to be connected directly to a supply, usually 9 - 12V, and no series resistor is required. Their flash frequency is fixed so their use is limited and you may prefer to build your own circuit to flash an ordinary LED.
LED displays are packages of many LEDs arranged in a pattern, the most familiar pattern being the 7-segment displays for showing numbers (digits 0-9). The pictures below illustrate some of the popular designs:
Pin connections of LED displays
There are many types of LED display and a supplier's catalogue should be consulted for the pin connections. The diagram on the right shows an example. Like many 7segment displays, this example is available in two versions: Common Anode (SA) with all the LED anodes connected together and Common Cathode (SC) with all the cathodes connected together. Letters a-g refers to the 7 segments, A/C is the common anode or cathode as appropriate (on 2 pins). Note that some pins are not present (NP) but their position is still numbered.
Pin connections diagram
- 157 -
Different kind Picture of Relays A relay is an electrically operated switch. Current flowing through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contacts. The coil current can be on or off so relays have two switch positions and they are double throw (changeover) switches. Relays allow one circuit to switch a second circuit which can be completely separate from the first. For example a low voltage battery circuit can use a relay to switch a 230V AC mains circuit. There is no electrical connection inside the relay between the two circuits, the link is magnetic and mechanical. The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but it can be as much as 100mA for relays designed to operate from lower voltages. Most ICs (chips) cannot provide this current and a transistor is usually used to amplify the small IC current to the larger value required for the relay coil. The maximum output current for the popular 555 timer IC is 200mA so these devices can supply relay coils directly without amplification. Relays are usually SPDT or DPDT but they can have many more sets of switch contacts, for example relays with 4 sets of changeover contacts are readily available. For further information about switch contacts and the terms used to describe them please see the page on switches. Most relays are designed for PCB mounting but you can solder wires directly to the pins providing you take care to avoid melting the plastic case of the relay. The supplier's catalogue should show you the relay's connections. The coil will be obvious and it may be connected either way round. Relay coils produce brief high voltage 'spikes' when they are switched off and this can destroy transistors and ICs in the circuit. To prevent damage, you must connect a protection diode across the relay coil. The animated picture shows a working relay with its coil and switch contacts. You can see a lever on the left being attracted by magnetism when the coil is switched on. This lever moves the switch contacts. There is one set of contacts (SPDT) in the foreground and another behind them, making the relay DPDT. The relay's switch connections are usually labeled COM, NC and NO:
• • •
COM = Common, always connect to this, it is the moving part of the switch. NC = Normally Closed, COM is connected to this when the relay coil is off. NO = Normally Open, COM is connected to this when the relay coil is on.
- 158 -
Connect to COM and NO if you want the switched circuit to be on when the relay coil is on. Connect to COM and NC if you want the switched circuit to be on when the relay coil is off.
Choosing a relay
You need to consider several features when choosing a relay: 1. Physical size and pin arrangement If you are choosing a relay for an existing PCB you will need to ensure that its dimensions and pin arrangement are suitable. You should find this information in the supplier's catalogue. 2. Coil voltage The relay's coil voltage rating and resistance must suit the circuit powering the relay coil. Many relays have a coil rated for a 12V supply but 5V and 24V relays are also readily available. Some relays operate perfectly well with a supply voltage which is a little lower than their rated value. 3. Coil resistance The circuit must be able to supply the current required by the relay coil. You can use Ohm's law to calculate the current: Relay coil current = supply voltage coil resistance
4. For example: A 12V supply relay with a coil resistance of 400 passes a current of 30mA. This is OK for a 555 timer IC (maximum output current 200mA), but it is too much for most ICs and they will require a transistor to amplify the current. 5. Switch ratings (voltage and current) The relay's switch contacts must be suitable for the circuit they are to control. You will need to check the voltage and current ratings. Note that the voltage rating is usually higher for AC, for example: "5A at 24V DC or 125V AC". 6. Switch contact arrangement (SPDT, DPDT etc) Most relays are SPDT or DPDT which are often described as "single pole changeover" (SPCO) or "double pole changeover" (DPCO). For further information please see the page on switches.
Protection Diodes for Relays
- 159 -
Transistors and ICs (chips) must be protected from the brief high voltage 'spike' produced when the relay coil is switched off. The diagram shows how a signal diode (e.g. 1N4148) is connected across the relay coil to provide this protection. Note that the diode is connected 'backwards' so that it will normally not conduct. Conduction only occurs when the relay coil is switched off, at this moment current tries to continue flowing through the coil and it is harmlessly diverted through the diode. Without the diode no current could flow and the coil would produce a damaging high voltage 'spike' in its attempt to keep the current flowing.
Reed relays consist of a coil surrounding a reed switch. Reed switches are normally operated with a magnet, but in a reed relay current flows through the coil to create a magnetic field and close the reed switch. Reed relays generally have higher coil resistances than standard relays (1000 for example) and a wide range of supply voltages (9-20V for example). They are capable of switching much more rapidly than standard relays, up to several hundred times per second; but they can only switch low currents (500mA maximum for example).
The reed relay shown in the photograph will plug into a standard 14-pin DIL socket ('chip holder').
Relays and Transistors Compared
Like relays, transistors can be used as an electrically operated switch. For switching small DC currents (< 1A) at low voltage they are usually a better choice than a relay. However transistors cannot switch AC or high voltages (such as mains electricity) and they are not usually a good choice for switching large currents (> 5A). In these cases a relay will be needed, but note that a low power transistor may still be needed to switch the current for the relay's coil! The main advantages and disadvantages of relays are listed below:
Advantages of relays:
• • • •
Relays can switch AC and DC, transistors can only switch DC. Relays can switch high voltages, transistors cannot. Relays are a better choice for switching large currents (> 5A). Relays can switch many contacts at once.
Disadvantages of relays:
• • • •
Relays are bulkier than transistors for switching small currents. Relays cannot switch rapidly (except reed relays), transistors can switch many times per second. Relays use more power due to the current flowing through their coil. Relays require more current than many chips can provide, so a low power transistor may be needed to switch the current for the relay's coil.
- 160 -
Example: Circuit symbol:
Resistors restrict the flow of electric current, for example a resistor is placed in series with a light-emitting diode (LED) to limit the current passing through the LED.
Connecting and Soldering
Resistors may be connected either way round. They are not damaged by heat when soldering.
Resistor Values - the Resistor Color Code
Resistance is measured in ohms, the symbol for ohm is an omega 1 is quite small so resistor values are often given in k and M . 1 M = 1000000 . 1 k = 1000 Resistor values are normally shown using colored bands. Each color represents a number as shown in the table. Most resistors have 4 bands:
• • • •
The Resistor Color Code Color Black Brown Red Orange Yellow Green Blue Violet Grey White Number 0 1 2 3 4 5 6 7 8 9
The first band gives the first digit. The second band gives the second digit. The third band indicates the number of zeros. The fourth band is used to shows the tolerance (precision) of the resistor, this may be ignored for almost all circuits but further details are given below.
This resistor has red (2), violet (7), yellow (4 zeros) and gold bands. So its value is 270000 = 270 k . On circuit diagrams the is usually omitted and the value is written 270K.
Small Value Resistors (less than 10 ohm)
The standard color code cannot show values of less than 10 . To show these small values two special colors are used for the third band: gold which means × 0.1 and silver which means × 0.01. The first and second bands represent the digits as normal. For example: red, violet, gold bands represent 27 × 0.1 = 2.7 green, blue, silver bands represent 56 × 0.01 = 0.56
- 161 -
Tolerance of Resistors (fourth band of color code)
The tolerance of a resistor is shown by the fourth band of the color code. Tolerance is the precision of the resistor and it is given as a percentage. For example a 390 resistor with a tolerance of ±10% will have a value within 10% of 390 , between 390 - 39 = 351 and 390 + 39 = 429 (39 is 10% of 390). A special color code is used for the fourth band tolerance: silver ±10%, gold ±5%, red ±2%, brown ±1%. If no fourth band is shown the tolerance is ±20%. Tolerance may be ignored for almost all circuits because precise resistor values are rarely required.
Resistor values are often written on circuit diagrams using a code system which avoids using a decimal point because it is easy to miss the small dot. Instead the letters R, K and M are used in place of the decimal point. To read the code: replace the letter with a decimal point, then multiply the value by 1000 if the letter was K, or 1000000 if the letter was M. The letter R means multiply by 1. For example: 560R means 560 2K7 means 2.7 k = 2700 39K means 39 k 1M0 means 1.0 M = 1000 k
Real Resistor Values (the E6 and E12 series)
You may have noticed that resistors are not available with every possible value, for example 22k and 47k are readily available, but 25k and 50k are not! Why is this? Imagine that you decided to make resistors every 10 giving 10, 20, 30, 40, 50 and so on. That seems fine, but what happens when you reach 1000? It would be pointless to make 1000, 1010, 1020, 1030 and so on because for these values 10 is a very small difference, too small to be noticeable in most circuits. In fact it would be difficult to make resistors sufficiently accurate. To produce a sensible range of resistor values you need to increase the size of the 'step' as the value increases. The standard resistor values are based on this idea and they form a series which follows the same pattern for every multiple of ten. The E6 series (6 values for each multiple of ten, for resistors with 20% tolerance) 10, 15, 22, 33, 47, 68, ... then it continues 100, 150, 220, 330, 470, 680, 1000 etc. Notice how the step size increases as the value increases. For this series the step (to the next value) is roughly half the value.
- 162 -
The E12 series (12 values for each multiple of ten, for resistors with 10% tolerance) 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82, ... then it continues 100, 120, 150 etc. Notice how this is the E6 series with an extra value in the gaps. The E12 series is the one most frequently used for resistors. It allows you to choose a value within 10% of the precise value you need. This is sufficiently accurate for almost all projects and it is sensible because most resistors are only accurate to ±10% (called their 'tolerance'). For example a resistor marked 390 could vary by ±10% × 390 = ±39 , so it could be any value between 351 and 429 .
Resistors in Series and Parallel
For information on resistors connected in series and parallel, see the Resistance page,
Power Ratings of Resistors
Electrical energy is converted to heat when current flows through a resistor. Usually the effect is negligible, but if the resistance is low (or the voltage across the resistor high) a large current may pass making the resistor become noticeably warm. The resistor must be able to withstand the heating effect and resistors have power ratings to show this. Power ratings of resistors are rarely quoted in parts lists because for most circuits the standard power ratings of 0.25W or 0.5W are suitable. For the rare cases where a higher power is required it should be clearly specified in the parts list, these will be circuits using low value resistors (less than about 300 ) or high voltages (more than 15V). High power Resistors (5W top, 25W bottom) The power, P, developed in a resistor is given by: P = I² × R where: P = power developed in the resistor in watts (W) or I = current through the resistor in amps (A) R = resistance of the resistor in ohms ( ) P = V² / R V = voltage across the resistor in volts (V) Examples:
A 470 resistor with 10V across it, needs a power rating P = V²/R = 10²/470 = 0.21W. In this case a standard 0.25W resistor would be suitable. A 27 resistor with 10V across it, needs a power rating P = V²/R = 10²/27 = 3.7W. A high power resistor with a rating of 5W would be suitable.
- 163 -
Selecting a Switch
There are three important features to consider when selecting a switch:
• • •
Contacts (e.g. single pole, double throw) Ratings (maximum voltage and current) Method of Operation (toggle, slide, key etc.)
Circuit Symbol for a simple ON-OFF Switch
Several terms are used to describe switch contacts:
• • • • • •
Pole - number of switch contact sets. Throw - number of conducting positions, single or double. Way - number of conducting positions, three or more. Momentary - switch returns to its normal position when released. Open - off position, contacts not conducting. Closed - on position, contacts conducting, there may be several on positions.
For example: the simplest on-off switch has one set of contacts (single pole) and one switching position which conducts (single throw). The switch mechanism has two positions: open (off) and closed (on), but it is called 'single throw' because only one position conducts.
Switch Contact Ratings
Switch contacts are rated with a maximum voltage and current, and there may be different ratings for AC and DC. The AC values are higher because the current falls to zero many times each second and an arc is less likely to form across the switch contacts. For low voltage electronics projects the voltage rating will not matter, but you may need to check the current rating. The maximum current is less for inductive loads (coils and motors) because they cause more sparking at the contacts when switched off.
Standard Switches Type of Switch
ON-OFF Single Pole, Single Throw = SPST A simple on-off switch. This type can be used to switch the power supply to a circuit. When used with mains electricity this type of switch must be in the live wire, but it is better to use a DPST switch to isolate both live and neutral.
- 164 -
SPST toggle switch
(ON)-OFF Push-to-make = SPST Momentary A push-to-make switch returns to its normally open (off) position when you release the button, this is shown by the brackets around ON. This is the standard doorbell switch. ON-(OFF) Push-to-break = SPST Momentary A push-to-break switch returns to its normally closed (on) position when you release the button. ON-ON Single Pole, Double Throw = SPDT This switch can be on in both positions, switching on a separate device in each case. It is often called a changeover switch. For example, a SPDT switch can be used to switch on a red lamp in one position and a green lamp in the other position. A SPDT toggle switch may be used as a simple on-off switch by connecting to COM and one of the A or B terminals shown in the diagram. A and B are interchangeable so switches are usually not labeled. ON-OFF-ON SPDT Centre Off A special version of the standard SPDT switch. It has a third switching position in the centre which is off. Momentary (ON)-OFF(ON) versions are also available where the switch returns to the central off position when released. Dual ON-OFF Double Pole, Single Throw = DPST A pair of on-off switches which operate together (shown by the dotted line in the circuit symbol). A DPST switch is often used to switch mains electricity because it can isolate both the live and neutral connections.
SPDT toggle switch
SPDT slide switch (PCB mounting)
SPDT rocker switch
DPST rocker switch
- 165 -
Dual ON-ON Double Pole, Double Throw = DPDT A pair of on-on switches which operate together (shown by the dotted line in the circuit symbol). A DPDT switch can be wired up as a reversing switch for a motor as shown in the diagram. ON-OFF-ON DPDT Centre Off A special version of the standard SPDT switch. It has a third switching position in the centre which is off. This can be very useful for motor control because you have forward, off and reverse positions. Momentary (ON)OFF-(ON) versions are also available where the switch returns to the central off position when released.
DPDT slide switch
Wiring for Reversing Switch
Special Switches Type of Switch
Push-Push Switch (e.g. SPST = ON-OFF) This looks like a momentary action push switch but it is a standard on-off switch: push once to switch on, push again to switch off. This is called a latching action.
Microswitch (usually SPDT = ON-ON) Microswitches are designed to switch fully open or closed in response to small movements. They are available with levers and rollers attached. Also called Limit Switch
Keyswitch A key operated switch. The example shown is SPST. Tilt Switch (SPST) Tilt switches contain a conductive liquid and when tilted this bridges the contacts inside, closing the switch. They can be used as a sensor to detect the position of an object. Some tilt switches contain mercury which is poisonous.
- 166 -
Reed Switch (usually SPST) The contacts of a reed switch are closed by bringing a small magnet near the switch. They are used in security circuits, for example to check that doors are closed. Standard reed switches are SPST (simple on-off) but SPDT (changeover) versions are also available. Warning: reed switches have a glass body which is easily broken! Handling precaution needed. DIP Switch (DIP = Dual In-line Parallel) This is a set of miniature SPST on-off switches, the example shown has 8 switches. The package is the same size as a standard DIL (Dual In-Line) integrated circuit. This type of switch is used to set up circuits, e.g. setting the code of a remote control. Multi-pole Switch The picture shows a 6-pole double throw switch, also known as a 6-pole changeover switch. It can be set to have momentary or latching action. Latching action means it behaves as a push-push switch, push once for the first position, push again for the second position etc. Multi-way Switch Multi-way switches have 3 or more conducting positions. They may have several poles (contact sets). A popular type has a rotary action and it is available with a range of contact arrangements from 1-pole 12-way to 4-pole 3 way. The number of ways (switch positions) may be reduced by adjusting a stop under the fixing nut. For example if you need a 2pole 5-way switch you can buy the 2-pole 6-way version and adjust the stop. Contrast this multi-way switch (many switch positions) with the multi-pole switch (many contact sets) described above. 1-pole 4-way switch symbol
Multi-way rotary switch
- 167 -
This page covers practical matters such as precautions when soldering and identifying leads. The operation and use of transistors is covered by the Transistor Circuits page.
Transistors amplify current, for example they can be used to amplify the small output current from a logic chip so that it can operate a lamp, relay or other high current device. In many circuits a resistor is used to convert the changing current to a changing voltage, so the transistor is being used to amplify voltage. A transistor may be used as a switch (either fully on with maximum current, or fully off with no current) and as an amplifier (always partly on). The amount of current amplification is called the current gain, symbol hFE.
Types of Transistor
There are two types of standard transistors, NPN and PNP, with different circuit symbols. The letters refer to the layers of semiconductor material used to make the transistor. Most transistors used today are NPN because this is the easiest type to make from silicon. If you are new to electronics it is best to start by learning how to use NPN transistors. The leads are labeled base (B), collector (C) and emitter (E). Transistor Symbols These terms refer to the internal operation of a transistor but they are not much help in understanding how a transistor is used, so just treat them as labels! A Darlington pair is two transistors connected together to give a very high current gain. In addition to standard (bipolar junction) transistors, there are field-effect transistors which are usually referred to as FETs. They have different circuit symbols and properties and they are not (yet) covered by this page.
- 168 -
Transistors have three leads which must be connected the correct way round. Please take care with this because a wrongly connected transistor may be damaged instantly when you switch on. If you are lucky the orientation of the transistor will be clear from the PCB or stripboard layout diagram, otherwise you will need to refer to a supplier's catalogue to identify the leads. The drawings on the right show the leads for some of the most common case styles. Please note that transistor lead diagrams show the view from bottom with the leads towards you. This is the opposite of IC (chip) pin diagrams which show the view from above. Transistor leads for some common case styles.
Transistors can be damaged by heat when soldering so if you are not an expert it is wise to use a heat sink clipped to the lead between the joint and the transistor body. A standard crocodile clip can be used as a heat sink. Do not confuse this temporary heat sink with the permanent heat sink (described below) which may be required for a power transistor to prevent it overheating during operation.
Testing a transistor
Transistors can be damaged by heat when soldering or by misuse in a circuit. If you suspect that a transistor may be damaged there are two easy ways to test it:
- 169 -
1. Testing with a multimeter
Use a multimeter or a simple tester (battery, resistor and LED) to check each pair of leads for conduction. Set a digital multimeter to diode test and an analogue multimeter to a low resistance range. Test each pair of leads both ways (six tests in total):
• • •
The base-emitter (BE) junction should behave like a diode and conduct one way only. The base-collector (BC) junction should behave like a diode and conduct one way only. The collector-emitter (CE) should not conduct either way.
Testing an NPN transistor
The diagram shows how the junctions behave in an NPN transistor. The diodes are reversed in a PNP transistor but the same test procedure can be used.
2. Testing in a simple switching circuit
Connect the transistor into the circuit shown on the right which uses the transistor as a switch. The supply voltage is not critical, anything between 5 and 12V is suitable. This circuit can be quickly built on breadboard for example. Take care to include the 10k resistor in the base connection or you will destroy the transistor as you test it! If the transistor is OK the LED should light when the switch is pressed and not light when the switch is released. To test a PNP transistor use the same circuit but reverse the LED and the supply voltage. Some multimeters have a 'transistor test' function which provides a known base current and measures the collector current so as to display the transistor's DC current gain hFE. A simple switching circuit to test an NPN transistor
There are three main series of transistor codes used in the UK:
Codes beginning with B (or A), for example BC108, BC478
The first letter B is for silicon, A is for germanium (rarely used now). The second letter indicates the type; for example C means low power audio frequency; D means high power audio frequency; F means low power high frequency. The rest of the code identifies the particular transistor. There is no obvious logic to the numbering system. Sometimes a letter is added to the end (e.g. BC108C) to identify a special version of the main type, for example a higher current gain or a different case style. If a project specifies a higher gain version (BC108C) it must be used, but if the general code is given (BC108) any transistor with that code is suitable.
- 170 -
Codes beginning with TIP, for example TIP31A
TIP refers to the manufacturer: Texas Instruments Power transistor. The letter at the end identifies versions with different voltage ratings.
Codes beginning with 2N, for example 2N3053
The initial '2N' identifies the part as a transistor and the rest of the code identifies the particular transistor. There is no obvious logic to the numbering system.
Choosing a Transistor
Most projects will specify a particular transistor, but if necessary you can usually substitute an equivalent transistor from the wide range available. The most important properties to look for are the maximum collector current IC and the current gain hFE. To make selection easier most suppliers group their transistors in categories determined either by their typical use or maximum power rating. To make a final choice you will need to consult the tables of technical data which are normally provided in catalogues. They contain a great deal of useful information but they can be difficult to understand if you are not familiar with the abbreviations used. The table below shows the most important technical data for some popular transistors, tables in catalogues and reference books will usually show additional information but this is unlikely to be useful unless you are experienced. The quantities shown in the table are explained below.
Code BC107 BC108 BC108C BC109 BC182 BC182L BC547B BC548B BC549B 2N3053 BFY51 BC639 Structure NPN NPN NPN NPN NPN NPN NPN NPN NPN NPN NPN NPN Case style IC VCE hFE max. max. min. Ptot max. Category (typical use) Possible substitutes BC182 BC547
TO18 100mA 45V 110 300mW Audio, low power TO18 100mA 20V 110 300mW TO18 100mA 20V 420 600mW TO18 200mA 20V 200 300mW TO92C 100mA 50V 100 350mW TO92A 100mA 50V 100 350mW
General purpose, BC108C BC183 low power BC548 General purpose, low power Audio (low noise), low power General purpose, low power General purpose, low power General purpose, low power Audio (low noise), low power General purpose, low power General purpose, medium power General purpose, medium power BC184 BC549 BC107 BC182L BC107 BC182 BC107B BC108B BC109 BFY51 BC639 BFY51
TO92C 100mA 45V 200 500mW Audio, low power TO92C 100mA 30V 220 500mW TO92C 100mA 30V 240 625mW TO39 700mA 40V TO39 TO92A 1A 1A 30V 80V 50 500mW 40 800mW 40 800mW
- 171 -
TIP29A TIP31A TIP31C TIP41A 2N3055
NPN NPN NPN NPN NPN
TO220 TO220 TO220 TO220 TO3
1A 3A 3A 6A 15A
30W 40W 40W 65W 117W
General purpose, high power General purpose, TIP31C TIP41A high power General purpose, high power General purpose, high power General purpose, high power TIP31A TIP41A
100V 10 60V 60V 15 20
Please note: the data in this table was compiled from several sources which are not entirely consistent! Most of the discrepancies are minor, but please consult information from your supplier if you require precise data.
Code BC177 BC178 BC179 BC477 BC478 TIP32A TIP32C Structure PNP PNP PNP PNP PNP PNP PNP Case style IC VCE hFE max. max. min. Ptot max. Category (typical use) General purpose, low power Audio (low noise), low power BC177 BC178 TIP32C TIP32A General purpose, low power General purpose, high power General purpose, high power Possible substitutes BC477 BC478
TO18 100mA 45V 125 300mW Audio, low power TO18 200mA 25V 120 600mW TO18 200mA 20V 180 600mW
TO18 150mA 80V 125 360mW Audio, low power TO18 150mA 40V 125 360mW TO220 TO220 3A 3A 60V 25 40W 40W
Please note: the data in this table was compiled from several sources which are not entirely consistent! Most of the discrepancies are minor, but please consult information from your supplier if you require precise data. Structure This shows the type of transistor, NPN or PNP. The polarities of the two types are different, so if you are looking for a substitute it must be the same type. There is a diagram showing the leads for some of the most common case styles in the Connecting section above. This information is also available in suppliers' catalogues. Maximum collector current. Maximum voltage across the collector-emitter junction. You can ignore this rating in low voltage circuits. This is the current gain (strictly the DC current gain). The guaranteed minimum value is given because the actual value varies from transistor to transistor - even for those of the same type! Note that current gain is just a number so it has no units. The gain is often quoted at a particular collector current IC which is usually in the middle of the transistor's range, for example '100@20mA' means the gain is at least 100 at 20mA. Sometimes minimum and
- 172 -
IC max. VCE max. hFE
maximum values are given. Since the gain is roughly constant for various currents but it varies from transistor to transistor this detail is only really of interest to experts. Why hFE? It is one of a whole series of parameters for transistors, each with their own symbol. There are too many to explain here. Maximum total power which can be developed in the transistor, note that a heat sink will be required to achieve the maximum rating. This rating is important for transistors operating as amplifiers, the power is roughly IC × VCE. For transistors operating as switches the maximum collector current (IC max.) is more important. This shows the typical use for the transistor, it is a good starting point when looking for a substitute. Catalogues may have separate tables for different categories. These are transistors with similar electrical properties which will be suitable substitutes in most circuits. However, they may have a different case style so you will need to take care when placing them on the circuit board.
This is two transistors connected together so that the amplified current from the first is amplified further by the second transistor. This gives the Darlington pair a very high current gain such as 10000. Darlington pairs are sold as complete packages containing the two transistors. They have three leads (B, C and E) which are equivalent to the leads of a standard individual transistor. You can make up your own Darlington pair from two transistors. For example:
For TR1 use BC548B with hFE1 = 220. For TR2 use BC639 with hFE2 = 40.
The overall gain of this pair is hFE1 × hFE2 = 220 × 40 = 8800. The pair's maximum collector current IC(max) is the same as TR2.
- 173 -
Heatsinks for Transistors
Heat sinks are needed for transistors passing large currents.
Why is a Heatsink Needed?
Waste heat is produced in transistors due to the current flowing through them. If you find that a transistor is becoming too hot to touch it certainly needs a heat sink! The heat sink helps to dissipate (remove) the heat by transferring it to the surrounding air. The rate of producing waste heat is called the thermal power, P. Usually the base current IB is too small to contribute much heat, so the thermal power is determined by the collector current IC and the voltage VCE across the transistor:
P = IC × VCE (see diagram below) The heat is not a problem if IC is small or if the transistor is used as a switch because when 'full on' VCE is almost zero. However, power transistors used in circuits such as an audio amplifier or a motor speed controller will be partly on most of the time and VCE may be about half the supply voltage. These power transistors will almost certainly need a heat sink to prevent them overheating.
Power transistors usually have bolt holes for attaching heat sinks, but clip-on heat sinks are also available. Make sure you use the right type for your transistor. Many transistors have metal cases which are Heat-conducting paste connected to one of their leads so it may be necessary to insulate the heat sink from the transistor. Insulating kits are available with a mica sheet and a plastic sleeve for the bolt. Heat-conducting paste can be used to improve heat flow from the transistor to the heat sink, this is especially important if an insulation kit is used.
Heat sinks are rated by their thermal resistance (Rth) in °C/W. For example 2°C/W means the heat sink (and therefore the component attached to it) will be 2°C hotter than the surrounding air for every 1W of heat it is dissipating. Note that a lower thermal resistance means a better heatsink.
This is how you work out the required heat sink rating:
1. Work out thermal power to be dissipated, P = IC × VCE If in doubt use the largest likely value for IC and assume that VCE is half the supply voltage. For example if a power transistor is passing 1A and connected to a 12V supply, the power P is about 1 × ½ × 12 = 6W. 2. Find the maximum operating temperature (Tmax) for the transistor if you can, otherwise assume Tmax = 100°C.
- 174 -
3. Estimate the maximum ambient (surrounding air) temperature (Tair). If the heat sink is going to be outside the case Tair = 25°C is reasonable, but inside it will be higher (perhaps 40°C) allowing for everything to warm up in operation. 4. Work out the maximum thermal resistance (Rth) for the heat sink using: Rth = (Tmax Tair) / P
With the example values given above: Rth = (100-25)/6 = 12.5°C/W. 5. Choose a heat sink with a thermal resistance which is less than the value calculated above (remember lower value means better heat sinking!) for example 5°C/W would be a sensible choice to allow a safety margin. A 5°C/W heat sink dissipating 6W will have a temperature difference of 5 × 6 = 30°C so the transistor temperature will rise to 25 + 30 = 55°C (safely less than the 100°C maximum). 6. All the above assumes the transistor is at the same temperature as the heat sink. This is a reasonable assumption if they are firmly bolted or clipped together. However, you may have to put a mica sheet or similar between them to provide electrical insulation, then the transistor will be hotter than the heat sink and the calculation becomes more difficult. For typical mica sheets you should subtract 2°C/W from the thermal resistance (Rth) value calculated in step 4 above. If this all seems too complex you can try attaching a moderately large heat sink and hope for the best. Cautiously monitor the transistor temperature with your finger, if it becomes painfully hot switch off immediately and use a larger heat sink!
Why Thermal Resistance?
The term 'thermal resistance' is used because it is analogous to electrical resistance:
• • • •
The temperature difference across the heat sink (between the transistor and air) is like voltage (potential difference) across a resistor. The thermal power (rate of heat) flowing through the heat sink from transistor to air is like current flowing through a resistor. So R = V/I becomes Rth = (Tmax - Tair)/P Just as you need a voltage difference to make current flow, you need a temperature difference to make heat flow.
- 175 -
Variable resistors consist of a resistance track with connections at both ends and a wiper which moves along the track as you turn the spindle. The track may be made from carbon, cermet (ceramic and metal mixture) or a coil of wire (for low resistances). The track is usually rotary but straight track versions, usually called sliders, are also available. Variable resistors may be used as a rheostat with two connections (the wiper and just one end of the track) or as a potentiometer with all three connections in use. Miniature versions called presets are made for setting up circuits which will not require further adjustment. Variable resistors are often called potentiometers in books and catalogues. They are specified by their maximum resistance, linear or logarithmic track, and their physical size. The standard spindle diameter is 6mm. Standard Variable Resistor The resistance and type of track are marked on the body: 4K7 LIN means 4.7 k linear track. 1M LOG means 1 M logarithmic track. Some variable resistors are designed to be mounted directly on the circuit board, but most are for mounting through a hole drilled in the case containing the circuit with stranded wire connecting their terminals to the circuit board.
Linear (LIN) and Logarithmic (LOG) tracks
Linear (LIN) track means that the resistance changes at a constant rate as you move the wiper. This is the standard arrangement and you should assume this type is required if a project does not specify the type of track. Presets always have linear tracks. Logarithmic (LOG) track means that the resistance changes slowly at one end of the track and rapidly at the other end, so halfway along the track is not half the total resistance! This arrangement is used for volume (loudness) controls because the human ear has a logarithmic response to loudness so fine control (slow change) is required at low volumes and coarser control (rapid change) at high volumes. It is important to connect the ends of the track the correct way round, if you find that turning the spindle increases the volume rapidly followed by little further change you should swap the connections to the ends of the track.
- 176 -
This is the simplest way of using a variable resistor. Two terminals are used: one connected to an end of the track, the other to the moveable wiper. Turning the spindle changes the resistance between the two terminals from zero up to the maximum resistance. Rheostats are often used to vary current, for example to control the brightness of a lamp or the rate at which a capacitor charges. If the rheostat is mounted on a printed circuit board you may find that all three terminals are connected! However, one of them will be linked to the wiper terminal. This improves the mechanical strength of the mounting but it serves no function electrically.
Variable resistors used as potentiometers have all three terminals connected. This arrangement is normally used to vary voltage, for example to set the switching point of a circuit with a sensor, or control the volume (loudness) in an amplifier circuit. If the terminals at the ends of the track are connected across the power supply then the wiper terminal will provide a voltage which can be varied from zero up to the maximum of the supply.
These are miniature versions of the standard variable resistor. They are designed to be mounted directly onto the circuit board and adjusted only when the circuit is built. For example to set the frequency of an alarm tone or the sensitivity of a light-sensitive circuit. A small screwdriver or similar tool is required to adjust presets.
Presets are much cheaper than standard variable resistors so they are sometimes used in projects where a standard variable resistor would normally be used. Multiturn presets are used where very precise adjustments must be made. The screw must be turned many times (10+) to move the slider from one end of the track to the other, giving very fine control.
- 177 -
Preset (open style)
Presets (closed style)
Light Dependent Resistor (LDR)
An LDR is an input transducer (sensor) which converts brightness (light) to resistance. It is made from cadmium sulphide (CdS) and the resistance decreases as the brightness of light falling on the LDR increases. A multimeter can be used to find the resistance in darkness and bright light, these are the typical results for a standard LDR:
Darkness: maximum resistance, about 1M . Very bright light: minimum resistance, about 100 .
For many years the standard LDR has been the ORP12, now the NORPS12, which is about 13mm diameter. Miniature LDRs are also available and their diameter is about 5mm. An LDR may be connected either way round and no special precautions are required when soldering. circuit symbol
- 178 -
A thermistor is an input transducer (sensor) which converts temperature (heat) to resistance. Almost all thermistors have a negative temperature coefficient (NTC) which means their resistance decreases as their temperature increases. It is possible to make thermistors with a positive temperature coefficient (resistance increases as temperature increases) but these are rarely used. Always assume NTC if no information is given. A multimeter can be used to find the resistance at various temperatures, these are some typical readings for example:
• • •
Icy water 0°C: high resistance, about 12k . Room temperature 25°C: medium resistance, about 5k . Boiling water 100°C: low resistance, about 400 .
Suppliers usually specify thermistors by their resistance at 25°C (room temperature). Thermistors take several seconds to respond to a sudden temperature change, small thermistors respond more rapidly.
A thermistor may be connected either way round and no special precautions are required when soldering. If it is going to be immersed in water the thermistor and its connections should be insulated because water is a weak conductor; for example they could be coated with polyurethane varnish.
Piezo transducers are output transducers which convert an electrical signal to sound. They require a driver circuit (such as a 555 astable) to provide a signal and if this is near their natural (resonant) frequency of about 3kHz they will produce a particularly loud sound. Piezo transducers require a small current, usually less than 10mA, so they can be connected directly to the outputs of most ICs. They are ideal for buzzes and beeps, but are not suitable for speech or music because they distort the sound. They are sometimes supplied with red and black leads, but they may be connected either way round. PCB-mounting versions are also available. circuit symbol Piezo transducers can also be used as input transducers for detecting sudden loud noises or impacts, effectively behaving as a crude microphone.
- 179 -
Loudspeakers are output transducers which convert an electrical signal to sound. Usually they are called 'speakers'. They require a driver circuit, such as a 555 astable or an audio amplifier, to provide a signal. There is a wide range available, but for many electronics projects a 300mW miniature loudspeaker is ideal. This type is about 70mm diameter and it is usually available with resistances of 8 and 64 . If a project specifies a 64 speaker you must use this higher resistance to prevent damage to the driving circuit. Most circuits used to drive loudspeakers produce an audio (AC) signal which is combined with a constant DC signal. The DC will make a large current flow through the speaker due to its low resistance, possibly damaging both the speaker and the driving circuit. To prevent this happening a large value electrolytic capacitor is connected in series with the speaker, this blocks DC but passes audio (AC) signals. See capacitor coupling. Loudspeakers may be connected either way round except in stereo circuits when the + and - markings on their terminals must be observed to ensure the two speakers are in phase. Correct polarity must always be observed for large circuit symbol speakers in cabinets because the cabinet may contain a small circuit (a 'crossover network') which diverts the high frequency signals to a small speaker (a 'tweeter') because the large main speaker is poor at reproducing them. Miniature loudspeakers can also be used as a microphone and they work surprisingly well, certainly good enough for speech in an intercom system for example.
capacitor in series to block DC
Buzzer and Bleeper
These devices are output transducers converting electrical energy to sound. They contain an internal oscillator to produce the sound which is set at about 400Hz for buzzers and about 3kHz for bleeper. Buzzers have a voltage rating but it is only approximate, for example 6V and 12V buzzers can be used with a 9V supply. Their typical current is about 25mA. Bleepers have wide voltage
- 180 -
Buzzer (about 400Hz)
Bleeper (about 3kHz)
ranges, such as 3-30V, and they pass a low current of about 10mA. Buzzers and bleepers must be connected the right way round, their red lead is positive (+).
An inductor is a coil of wire which may have a core of air, iron or ferrite (a brittle material made from iron). Its electrical property is called inductance and the unit for this is the Henry, symbol H. 1H is very large so mH and µH are used, 1000µH = 1mH and 1000mH = 1H. Iron and ferrite cores increase the inductance. Inductors are mainly used in tuned circuits and to block high frequency AC signals (they are sometimes called chokes). They pass DC easily, but block AC signals; this is the opposite of capacitors. Inductors are rarely found in simple projects, but one exception is the tuning coil of a radio receiver. This is an inductor which you may have to make yourself by neatly winding enameled copper wire around a ferrite rod. Enameled copper wire has very thin insulation, allowing the turns of the coil to be close together, but this makes it impossible to strip in the usual way - the best method is to gently pull the ends of the wire through folded emery paper. Warning: a ferrite rod is brittle so treat it like glass, not iron!
An inductor may be connected either way round and no special precautions are required when soldering.
How to Solder First a few safety precautions:
Never touch the element or tip of the soldering iron. They are very hot (about 400°C) and will give you a nasty burn. Take great care to avoid touching the mains flex with the tip of the iron. The iron should have a heatproof flex for extra protection. An ordinary plastic flex will melt immediately if touched by a hot iron and there is a serious risk of burns and electric shock. Always return the soldering iron to its stand when not in use. Never put it down on your workbench, even for a moment! Work in a well-ventilated area. The smoke formed as you melt solder is mostly from the flux and quite irritating. Avoid breathing it by keeping you head to the side of, not above, your work. Wash your hands after using solder. Solder contains lead which is a poisonous metal.
- 181 -
Preparing the soldering iron:
• • •
Place the soldering iron in its stand and plug in. The iron will take a few minutes to reach its operating temperature of about 400°C. Dampen the sponge in the stand. The best way to do this is to lift it out the stand and hold it under a cold tap for a moment, then squeeze to remove excess water. It should be damp, not dripping wet. Wait a few minutes for the soldering iron to warm up. You can check if it is ready by trying to melt a little solder on the tip. Wipe the tip of the iron on the damp sponge. This will clean the tip. Melt a little solder on the tip of the iron. This is called 'tinning' and it will help the heat to flow from the iron's tip to the joint. It only needs to be done when you plug in the iron, and occasionally while soldering if you need to wipe the tip clean on the sponge.
You are now ready to start soldering:
Hold the soldering iron like a pen, near the base of the handle. Imagine you are going to write your name! Remember to never touch the hot element or tip. Touch the soldering iron onto the joint to be made. Make sure it touches both the component lead and the track. Hold the tip there for a few seconds and... Feed a little solder onto the joint. It should flow smoothly onto the lead and track to form a volcano shape as shown in the diagram. Apply the solder to the joint, not the iron. Remove the solder, then the iron, while keeping the joint still. Allow the joint a few seconds to cool before you move the circuit board. Inspect the joint closely. It should look shiny and have a 'volcano' shape. If not, you will need to reheat it and feed in a little more solder. This time ensure that both the lead and track are heated fully before applying solder.
Using a Heatsink
Some components, such as transistors, can be damaged by heat when soldering so if you are not an expert it is wise to use a heat sink clipped to the lead between the joint and the component body. You can buy a special tool, but a standard crocodile clip works just as well and is cheaper.
- 182 -
For a much more detailed guide to soldering, including troubleshooting, please see the Basic Soldering Guide on the Everyday Practical Electronics Magazine website.
Soldering Advice for Components
It is very tempting to start soldering components onto the circuit board straight away, but please take time to identify all the parts first. You are much less likely to make a mistake if you do this! 1. Stick all the components onto a sheet of paper using sticky tape. 2. Identify each component and write its name or value beside it. 3. Add the code (R1, R2, C1 etc.) if necessary. Many projects from books and magazines label the components with codes (R1, R2, C1, D1 etc.) and you should use the project's parts list to find these codes if they are given. 4. Resistor values can be found using the resistor color code which is explained on our Resistors page. 5. Capacitor values can be difficult to find because there are many types with different labeling systems! The various systems are explained on our Capacitors page. Some components require special care when soldering. Many must be placed the correct way round and a few are easily damaged by the heat from soldering. Appropriate warnings are given in the table below, together with other advice which may be useful when soldering.
For most projects it is best to put the components onto the board in the order given below: Components Chip Holders (DIL sockets) Pictures Reminders and Warnings Connect the correct way round by making sure the notch is at the correct end. Do NOT put the ICs (chips) in yet. No special precautions are needed with resistors. These may be connected either way round. Take care with polystyrene capacitors because they are easily damaged by heat. Connect the correct way round. They will be marked with a + or - near one lead. Connect the correct way round. Take care with germanium diodes (e.g. OA91) because they are easily damaged by heat.
Small value capacitors (usually less than 1µF)
Electrolytic capacitors (1µF and greater)
- 183 -
Wire Links between points on the circuit board. single core wire
Connect the correct way round. The diagram may be labeled a or + for anode and k or - for cathode; yes, it really is k, not c, for cathode! The cathode is the short lead and there may be a slight flat on the body of round LEDs. Connect the correct way round. Transistors have 3 'legs' (leads) so extra care is needed to ensure the connections are correct. Easily damaged by heat. Use single core wire, this is one solid wire which is plasticcoated. If there is no danger of touching other parts you can use tinned copper wire, this has no plastic coating and looks just like solder but it is stiffer. Connect the correct way round. You should use stranded wire which is flexible and plasticcoated. Do not use single core wire because this will break when it is repeatedly flexed. Connect the correct way round. Many ICs are static sensitive. Leave ICs in their antistatic packaging until you need them, then earth your hands by touching a metal water pipe or window frame before touching the ICs. Carefully insert ICs in their holders: make sure all the pins are lined up with the socket then push down firmly with your thumb.
Battery clips, buzzers and other parts with their own wires Wires to parts off the circuit board, including switches, relays, variable resistors and loudspeakers.
- 184 -
What is solder?
Solder is an alloy (mixture) of tin and lead, typically 60% tin and 40% lead. It melts at a temperature of about 200°C. Coating a surface with solder is called 'tinning' because of the tin content of solder. Lead is poisonous and you should always wash your hands after using solder. Solder for electronics use contains tiny cores of flux, like the wires inside a mains flex. The flux is corrosive, like an acid, and it cleans the metal surfaces as the solder melts. This is why you must melt the solder actually on the joint, not on the iron tip. Without flux most joints would fail because metals quickly oxidize and the solder itself will not flow properly onto a dirty, oxidized, metal surface.
Reels of solder
The best size of solder for electronics is 22swg (SWG = Standard Wire Gauge).
At some stage you will probably need to desolder a joint to remove or re-position a wire or component. There are two ways to remove the solder: 1. With a desoldering pump (solder sucker)
• • • •
Set the pump by pushing the springloaded plunger down until it locks. Apply both the pump nozzle and the tip of your soldering iron to the joint. Wait a second or two for the solder to melt. Then press the button on the pump to release the plunger and suck the molten solder into the tool. Repeat if necessary to remove as much solder as possible. The pump will need emptying occasionally by unscrewing the nozzle. Using a desoldering pump (solder sucker)
2. With solder remover wick (copper braid)
• • • •
Apply both the end of the wick and the tip of your soldering iron to the joint. As the solder melts most of it will flow onto the wick, away from the joint. Remove the wick first, then the soldering iron. Cut off and discard the end of the wick coated with solder.
Solder remover wick
After removing most of the solder from the joint(s) you may be able to remove the wire or component lead straight away (allow a few seconds for it to cool). If the joint will not come apart
- 185 -
easily apply your soldering iron to melt the remaining traces of solder at the same time as pulling the joint apart, taking care to avoid burning yourself.
First Aid for Burns
Most burns from soldering are likely to be minor and treatment is simple:
Immediately cool the affected area under gently running cold water. Keep the burn in the cold water for at least 5 minutes (15 minutes is recommended). If ice is readily available this can be helpful too, but do not delay the initial cooling with cold water. Do not apply any creams or ointments. The burn will heal better without them. A dry dressing, such as a clean handkerchief, may be applied if you wish to protect the area from dirt. Seek medical attention if the burn covers an area bigger than your hand.
To reduce the risk of burns:
• • •
Always return your soldering iron to its stand immediately after use. Allow joints and components a minute or so to cool down before you touch them. Never touch the element or tip of a soldering iron unless you are certain it is cold.
Tools Required for Electronics
For electronics work the best type is one powered by mains electricity (230V in the UK), it should have a heatproof cable for safety. The iron's power rating should be 15 to 25W and it should be fitted with a small bit of 2 to 3mm diameter.
Other types of soldering iron:
Low voltage soldering irons are available, but their extra safety is undermined if you have a mains lead to their power supply! Temperature controlled irons are excellent for frequent use, but not worth the extra expense if you are a beginner. Gas-powered irons are designed for use where no mains supply is available and are not suitable for everyday use. Pistol shaped solder guns are far too powerful and cumbersome for normal electronics use.
- 186 -
Soldering iron stand
You must have a safe place to put the iron when you are not holding it. The stand should include a sponge which can be dampened for cleaning the tip of the iron.
Desoldering pump (solder sucker)
A tool for removing solder when desoldering a joint to correct a mistake or replace a component.
Solder remover wick (copper braid)
This is an alternative to the desoldering pump shown above.
Reel of solder
The best size for electronics is 22SWG (SWG = Standard Wire Gauge).
- 187 -
For trimming component leads close to the circuit board.
Most designs include a cutter as well, but they are not suitable for trimming component leads.
Usually called 'snipe nose' pliers, these are for bending component leads etc. If you put a strong rubber band across the handles the pliers make a convenient holder for parts such as switches while you solder the contacts.
Small flat-blade screwdriver
For scraping away excess flux and dirt between tracks, as well as driving screws!
You can buy a special tool, but a standard crocodile clip works just as well and is cheaper.
The following tool is only required if you are using stripboard:
- 188 -
A 3mm drill bit can be used instead; in fact the tool is usually just a 3mm drill bit with a proper handle fitted.
The following tools are only required if you make your own PCBs:
This is an abrasive rubber for cleaning PCBs. It can also be used to clean stripboard where the copper tracks have become dull and tarnished.
Small Electric Drill
Ideally this should be mounted in a drill stand. You will need a range of small drill bits, but for most holes a 1mm bit is suitable. Larger holes can be drilled with a hand drill but 1mm bits are too fragile to use reliably in a hand drill.
Starter Kit of Components
If you are new to electronics and would like to try adapting published projects, or designing and building your own circuits, you need to have a small stock of components available. However, there is a very wide range of components and it can be difficult to know which ones you really need! I hope the list below will help you choose a sensible selection which is within your budget.
- 189 -
Remember that circuits built on breadboard can be dismantled after use and the components re-used. Remember that you will need to organize storage of the components!
These are the components used in most projects. The individual components are quite cheap, but the total cost of the set will be significant! One way to spread the cost is to add a few items from this list every time you buy the components for a particular project. Click on the titles for further information.
0.25W carbon film resistors are the cheapest type. Choose ones with 4-band colour codes because these are easier to read (the precision of 5-band codes is unnecessary). Ideally you need a good selection of values over the range 100 to 1M such as the E6 or E12 series, but that is a large number of resistors! As a minimum I suggest: 470*, 1k*, 2k2, 4k7, 10k*, 22k, 33k, 47k, 100k, 220k, 470k and 1M . Buy at least 10 of each value and 20 of those marked *. The 470 resistors are for use with LEDs, even if a project specifies a slightly different value. Resistors may be combined in series and parallel to obtain extra values, for example 100k and 220k in series is 320k which is close enough to 330k .
Low values: 0.01µF and 0.1µF metallized polyester, 10 of each. High values: 1µF 63V, 10µF 25V, and 100µF 25V electrolytic with radial leads, 10 of each; 220µF 25V and 470µF 25V electrolytic with axial leads, 3 of each.
1N4148 signal diode and 1N4001 rectifier diode, 5 of each.
- 190 -
Red, yellow and green 5mm standard LEDs, 10 of each.
About 5 general purpose, low power, NPN transistors. These should have a maximum collector current (Ic max) of 100mA, and a minimum current gain (hFE min) of 200. For example: BC548B (BC108 equivalent). About 5 general purpose, medium power, NPN transistors. These should have a maximum collector current (Ic max) of 1A, and a minimum current gain (hFE min) of 30. For example: BC639 (BFY51 equivalent).
Integrated circuits ('chips') and holders
NE555 timer IC, at least 3 (10 if you plan to solder projects). It is not worth ordering other ICs at this stage unless you know they are needed for some of the projects you wish to try. If you are planning to solder circuits on stripboard or PCB you will also need 8-pin, 14-pin and 16-pin DIL sockets (chip holders), at least 10 of each.
Presets are cheaper than standard variable resistors but most have pins which are too large for breadboards. For breadboard circuits is probably best to buy standard variable resistors and solder short single core 1/0.6mm wires onto them. The useful values are: 10k LIN, 100k LIN and 1M LIN, buy 2 of each. A 1M LOG potentiometer is useful too. Knobs are optional because it is easy to turn the spindles by hand. If you buy presets the horizontal style are best, all presets are LIN.
Standard Variable Resistor
- 191 -
Clip for a 9V PP3 battery; buy 3 (or 10 if you plan to solder projects). Remember to buy a battery too!
Red and black 7/0.2mm stranded wire, one color of single-core 1/0.6mm wire, 10m (or a reel) of each. If you are planning to build projects on breadboard buy extra colors of the single-core wire, including red and black.
Buy at least one standard crocodile clip to use as a heat sink when soldering. Miniature red and black crocodile clips (buy about 10 of each) are useful for making your own test leads using 7/0.2mm stranded wire.
Switches are not essential for breadboard circuits because you can make or break links with pieces of wire. The on/off switch from soldered projects can also be omitted if you are willing to unclip the battery instead. If you wish to buy a few switches the most useful types are pushto-make and miniature SPDT toggle switches, 3 of each.
Buy a large sheet (or two) and cut it up as required. You can cut it neatly to size using a junior hacksaw, cutting along the lines of holes is easiest. For quickness you can break it over the edge of a workbench along the lines of holes - take care though because this needs a fairly large force and the edges will be rough. You may need to use a large pair of pliers to nibble away any jagged parts. Avoid handling stripboard that you are not planning to use immediately because sweat from your hands will corrode the copper tracks and this will make soldering difficult unless you clean the board first.
- 192 -
A small breadboard (such as the Protobloc 1 shown in the picture) is suitable for simple circuits with up to two ICs, but if you intend to build more complex circuits such as counters it is best to buy a larger breadboard (such as the Protobloc 2). Breadboards do not require soldering so the components used on them can be re-used many times. They are ideal for testing your own circuit designs and trying out ideas such as adapting a published project.
Other components to consider
Buy these if you can afford them, or wait until they are needed for a project.
• • • • •
A light dependent resistor (LDR), ORP12 or NORPS12. A thermistor, miniature disc type, NTC about 5k @25°C. A piezo transducer with flying leads. A buzzer or bleeper. A miniature loudspeaker 8 .
Miniature piezo transducer
Storage Systems for Components
You can store all your components in a single container, such as a plastic food box, but as you accumulate more items it will become increasingly difficult to find the smaller components! A cheap solution is to organize the parts into small snap-top plastic bags which can be labeled, in fact you may find that some components are supplied like this. Probably the best storage system is a cabinet of plastic drawers. These can be expensive, but you do not need many drawers because there is no need to have a drawer for every single component value. Many parts can be grouped together, such as decades of resistor values. For example you could organize a 15drawer cabinet like this: 1. Resistors 10 + (third band black) only a few, but they tend to be large 2. Resistors 100 + (third band brown) 3. Resistors 1k + (third band red) 4. Resistors 10k + (third band orange) 5. Resistors 100k + (third band yellow) 6. Resistors 1M + (third band green) and 10M (third band blue) 7. Presets, also variable resistors if they will fit in the drawer 8. Capacitors low values, less than 1µF 9. Capacitors electrolytic 1µF+
- 193 -
Snap-top plastic bags
10. Diodes and transistors 11. LEDs and lamps (also LED clips and lampholders) 12. ICs (chips) and their holders (DIL sockets) 13. Switches and relays 14. Connectors (crocodile clips, plugs and sockets) 15. Other components (battery clips, piezo transducers, LDR, thermistors)
Frequently Asked Questions
Why is the letter I used to represent current? The letter I seem to be an odd choice for the English language, but it was chosen in the early days of electricity to represent intensity of current which we simply call current today. The unit of current, the ampere, is named after the French scientist André-Marie Ampère in recognition of his work on the relationship between electric current and magnetism. Ampère referred to electric current as "l'intensité du courant électrique", so I was a logical choice to represent intensité (intensity). I am grateful to Barry Caruth for suggesting a search of the internet for "Ampère" and "l'intensité du courant électrique" which returns many sites as evidence (most of them French) enabling me to answer this question with confidence.
Why do some books use zigzag lines for resistors in circuit diagrams? The zigzag line is the old symbol for a resistor and you may find it in older books and magazines. Unfortunately a few publications still use it! The correct modern symbol for a resistor is a rectangle.
My project has a resistor labeled 47, does that mean 47k ? No, it means 47 which is 1000 times smaller! 47k would be shortened to 47k (or 47K). The ohm ( ) symbol is often omitted from circuit diagrams and component layouts but the k (meaning kilo = 1000) will always be included if it is needed.
Why do resistors have odd values like 47k and 56k, but not 50k? There is a good reason for these odd values and it is explained on the Resistors page.
- 194 -
A project on another website lists a 10kW resistor! What does it mean? It almost certainly means a 10k resistor. This is a common error which occurs when the web page specifies a Greek font. If this font is not available on your computer you see the character in your standard font and it happens to be W which is the symbol for watt, the unit of power! I avoid the problem on this website by using a small image for . In a few projects a low value resistor with a high power rating is required but the power will be something smaller like 5W, never 10kW which is more powerful than an electric heater!
My soldering iron was supplied with a hook, do I really need to buy a stand as well? For safety you must buy (or make) a stand for your soldering iron. Please don't use the hook because it leaves exposed the very hot element and tip of the iron - it is too easy to accidentally touch them and burn yourself. If you can't afford to buy a stand you could try making your own with a spiral of stiff galvanized iron wire (a coat-hanger?) screwed to a block of wood. Ideally the stand should include a damp sponge for safely wiping the tip of the iron when it needs cleaning.
My teacher says that Christmas tree lights are a series circuit, so when one lamp blew on Christmas Eve why didn't they all go out? Traditional Christmas tree lights are connected in series and you are correct in thinking that if one lamp blows all the lamps should go out. The problem is that Christmas tree lights are not like ordinary lamps! When they blow they automatically short-circuit (they become like a wire link) so the circuit is still complete and the other lamps remain lit. This makes it easy to see the blown lamp, but do remember to switch off before changing it.
What component has a black stripe in the centre (it looks like a diode)? A small component about the size of a resistor or signal diode with a single black stripe in the centre is a zero-ohm resistor, it is really just a wire link! These components are used on commercial PCBs because they are easier for machines to handle than small pieces of wire. The single black stripe is logical because it means zero in the resistor color code. Ordinary resistors have at least four stripes. Diodes have a single stripe near one end, not in the centre.
What is a "short circuit"? A "short circuit" is a connection of very low resistance such as a wire (almost 0 ) which provides a very easy path for current. Think of it as an electrical short-cut. It is normally used to describe a fault or accidental connection rather than a deliberate one. For example: if the leads from a battery touch one another they create a very low resistance connection across the battery, so we say they have caused a short circuit across the battery. Current will flow through this short circuit rather than through the proper circuit. This stops the circuit working and it may cause a fire because the leads and battery will become hot with a large current flowing.
- 195 -
What does "open circuit" mean? "Open circuit" means no connection. It is usually used to describe a break in some part of a circuit which could be deliberate (such as a switch in the open or off position) or a fault (such as a broken wire or burnt out component).
How do I choose a relay to use with one of your projects? The 555 timer chip used in many projects can supply current up to 200mA so it can power most relays directly. However, you must connect a signal diode (a 1N4148 for example) in parallel across the relay coil to protect the 555. Note that this diode is connected 'backwards' so that it will normally not conduct.
I want to use a large number of LEDs, do I need a resistor for each one? No, you can usually connect a few LEDs of the same type in series and just use one resistor. The number of LEDs you can connect in series depends on the circuit's supply voltage. This arrangement has the advantage of reducing the total current required by the circuit. Please see the LEDs page for more details:
I want to build up a stock of components, what should I buy first? Most people build their first few projects from complete kits, but if you want to try adapting published projects or designing and building your own circuits you will need to have a small stock of components available. There is a page with advice on buying a starter kit of components.
What is a Darlington pair? A Darlington pair is two transistors connected together so that the current amplified by the first is further amplified by the second transistor, giving a very high gain of 10000 or so.
What does 'sinking a current' mean? It means current is flowing into the output of a chip. This happens when the output is low (0V) if there is a device connected between the positive supply (+Vs) and the output. It is the opposite of sourcing a current which means current is flowing out of the output. Most chip outputs can both sink and source current.
- 196 -
Are 'time period' and 'time constant' the same thing? No, they have different meanings although both are time. Time period is the duration of a single pulse or the time for one cycle of a repeating electrical signal. Time constant is a property of a changing system, such as a capacitor charging and discharging.
What is a PIC? A PIC is a Programmable Integrated Circuit microcontroller, a 'computer-on-a-chip'. They have a processor and memory to run a program responding to inputs and controlling outputs, so they can easily achieve complex functions which would require several conventional ICs. I can strongly recommend the PICAXE system because it is easy to program (and re-program) the PICs with a standard computer - no specialist equipment is required other than a low-cost download lead. The programming software and extensive documentation is available to download free of charge, making the system ideal for education and users at home.
Why does my circuit count 3 or 4 when I press the switch once? This is likely to happen if a switch is connected directly to the clock input of a counter. Switches contacts tend to rapidly bounce open and closed a few times when the switch is operated. The counter sees this as several clock pulses, not the single pulse you expect. One solution is to make the switch trigger a monostable circuit with a short time constant (0.1s for example) and use this to drive the clock input.
What is a schematic? It is a circuit diagram.
What does 'SMD' mean? 'SMD' means Surface Mount Device. SMDs are components with small pads instead of leads for their contacts. They are designed for soldering by machine onto specially designed PCBs and are not suitable for educational or hobby circuits constructed on breadboard or stripboard. Do not buy SMD components for your projects!
- 197 -