الجمعة، 21 مايو 2010

Tools required for electronics


Soldering iron, photograph © Rapid Electronics

Soldering iron

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.

Photograph © Rapid Electronics
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.


Soldering iron stand, photograph © Rapid Electronics

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.

Photograph © Rapid Electronics


Solder sucker, photograph © Rapid Electronics

Desoldering pump (solder sucker)

A tool for removing solder when desoldering a joint to correct a mistake or replace a component.

Photograph © Rapid Electronics


Solder remover wick (copper braid)

This is an alternative to the desoldering pump shown above.

Photograph © Rapid Electronics


Solder reels, photograph © Rapid Electronics

Reel of solder

The best size for electronics is 22swg (swg = standard wire gauge).

Photograph © Rapid Electronics


Side  cutters, photograph © Rapid Electronics

Side cutters

For trimming component leads close to the circuit board.

Photograph © Rapid Electronics


Wire  strippers (automatic), photograph © Rapid Electronics

Wire strippers

Most designs include a cutter as well, but they are not suitable for trimming component leads.

Photograph © Rapid Electronics


Snipe nose pliers, photograph © Rapid Electronics

Small pliers

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.

Photograph © Rapid Electronics


Screwdriver, photograph © Rapid Electronics

Small flat-blade screwdriver

For scraping away excess flux and dirt between tracks, as well as driving screws!

Photograph © Rapid Electronics


Crocodile clip, photograph © Rapid Electronics

Heat sink

You can buy a special tool, but a standard crocodile clip works just as well and is cheaper.

Photograph © Rapid Electronics


Track cutter, photograph © Rapid Electronics The following tool is only required if you are using stripboard:

Track cutter

A 3mm drill bit can be used instead, in fact the tool is usually just a 3mm drill bit with a proper handle fitted.

Photograph © Rapid Electronics


PCB  rubber, photograph © Rapid Electronics The following tools are only required if you make your own PCBs:

PCB rubber

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.

Photograph © Rapid Electronics

PCB  drill in stand, photograph © Rapid Electronics

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. Photograph © Rapid Electronics

Stripboard



Stripboard
Stripboard circuit (copper tracks side)
Stripboard has parallel strips of copper track on one side. The tracks are 0.1" (2.54mm) apart and there are holes every 0.1" (2.54mm).

Stripboard is used to make up permanent, soldered circuits. It is ideal for small circuits with one or two ICs (chips) but with the large number of holes it is very easy to connect a component in the wrong place. For large, complex circuits it is usually best to use a printed circuit board (PCB) if you can buy or make one.

Stripboard requires no special preparation other than cutting to size. It can be cut with a junior hacksaw, or simply snap it along the lines of holes by putting it over the edge of a bench or table and pushing hard, but take care 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. If the copper looks dull, or you can clearly see finger marks, clean the tracks with fine emery paper, a PCB rubber or a dry kitchen scrub before you start soldering.


Placing components on stripboard

stripboard Components are placed on the non-copper side, then the stripboard is turned over to solder the component leads to the copper tracks.

Stripboard layouts are shown from the component side, so the tracks are out of sight under the board. Layouts are normally shown with the tracks running horizontally across the diagram.

Placing components on stripboard requires care. The large number of holes means it is very easy to make a mistake! For most small circuits the best method is to very carefully place the IC holder(s) in the correct position and solder in place. Then you can position all the other components relative to the IC holder(s).

Minor position errors left and right will not usually be a problem because the component will still be connected to the correct tracks. However, up and down position errors must be avoided because just one hole too high or too low will connect the component to the wrong track and therefore the wrong part of the circuit.

Some people like to label the holes with letters (up/down) and numbers (across) to give each hole a 'grid reference' but this still requires careful counting of holes.


Cutting stripboard tracks

Track  cutter, photograph © Rapid Electronics
Track cutter
Photograph © Rapid Electronics
Most stripboard circuits will need to have some tracks cut to break the connection at that point. This is always necessary under ICs, except for the rare cases where opposite pins must be connected. The tracks are cut with a special track cutter tool or a 3mm drill bit.

Places where the tracks must be broken are usually shown with a cross (X). The cuts are made on the underside (copper side) so extra care is needed to identify the correct hole. It is best to cut the track after soldering because the solder joints will make it easier to identify the correct position.

Place the track cutter on the correct hole and twist it to and fro using moderate force. The aim is to break the copper track, not drill a hole through the board! Inspect the cut closely to ensure there is no fine thread of copper left across the break, because even the tiniest piece will conduct.


Planning a stripboard layout

Converting a circuit diagram to a stripboard layout is not straightforward because the arrangement of components is quite different. Concentrate on the connections between components, not their positions on the circuit diagram.

Collect all the parts you will be using in the circuit so you can use a piece of stripboard to work out the minimum space they require. For some components (such as IC holders) the space required is fixed, but for others you can increase the space to obtain a better layout. For example most resistors require at least 3 hole-spacings if they are to lie flat on the board, but they can easily span across a greater distance.

resistors mounted vertically and horizontally If necessary resistors can be mounted vertically between adjacent tracks (0.1" spacing) as shown in the diagram. This arrangement can help to produce a simpler layout but the tracks are more likely to be damaged if the resistor is knocked. If you are designing a stripboard layout for a serious long-term purpose it is best to mount all resistors horizontally.

Plan the layout with a pencil and paper (or on computer if you have suitable software) and check your plan very carefully against the circuit diagram BEFORE you attempt to solder any part of the circuit. The best way to explain the planning process is by example, so there is a step-by-step example to follow below.

Download a Stripboard Planning Sheet

The Planning Sheet is supplied as a PDF file, to view and print it you need an Acrobat Reader which may be downloaded free for Windows, Mac, RISC OS, or UNIX/Linux computers. If you are not sure which type of computer you have it is probably Windows.
To make planning easier it is best to use paper marked with a 0.1" grid to match the spacing of stripboard holes. You can use graph paper or try our Stripboard Planning Sheet which you can download and print out.

Working 'real size' on a 0.1" grid makes it easy to allow the correct space for components, but you will need to draw very neatly. If you prefer to work at an enlarged scale you can use a piece of stripboard for measuring component sizes in 'number of holes'.

IC pin  numbers

IC pin numbers

IC pins are numbered anti-clockwise around the IC 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.


Components without suitable leads

Soldering  leads onto switches Some components such as switches and variable resistors do not have suitable leads of their own so you must solder some on yourself. Use stranded plastic-coated wire, single-core wire is not suitable unless the circuit is going to be permanently mounted in a box with no flexing of the wires.

Planning an example stripboard layout

When planning a stripboard layout you must concentrate on the connections between components, not their positions on the circuit diagram. The best way to explain the planning process is by example, so the section below explains the process step-by-step for a 555 astable circuit which flashes an LED.

The stripboard tracks are horizontal in all the diagrams.

555 astable  circuit diagram
Astable Circuit Diagram

The circuit diagram

The circuit diagram is the starting point for any stripboard layout, even if you have already built a trial circuit on breadboard.

The LED flashes at a rate determined by the resistors R1 and R2 and the capacitor C1. R1 must be at least 1kohm and both R1 and R2 should not be more than 1Mohm. To select a value for the LED resistor R3 please see the LEDs page.

LED on time: Tm = 0.7 × (R1 + R2) × C1
LED off time: Ts = 0.7 × R2 × C1
T = Tm + Ts = 0.7 × (R1 + 2R2) × C1
Frequency (flashes per second), f = 1/T
Tm and Ts are about equal if R2 is much larger than R1.

For further information please see 555 astable.

Planning the layout

    planning a  stripboard layout: IC, supply, wire links
  1. Place the IC holder near the centre of your planning sheet with pin 1 at the top left (as in the diagram). You may find it helpful to number the pins.

  2. Mark breaks in each track under the IC holder with a cross (X). The breaks prevent opposite pins of the IC being connected together. The track beside each pin of the IC is connected to that pin, the diagram shows this for pins 3 and 6.

  3. Mark the power supply tracks +Vs and 0V, choose tracks which are 2 or 3 spaces above and below the IC holder as shown in the diagram.

  4. Now add the wire links. Draw a 'blob' () at each end of a link. The links are vertical because the stripboard tracks make the horizontal connections. Tinned copper wire (with no insulation) can be used for these links unless there is a risk of them touching other wires (in which case use single core insulated wire). Work round the IC pin-by-pin from pin 1.

    • Draw all the direct links to the supply tracks (+Vs and 0V). The diagram shows pin 1 connected to 0V and pins 4 and 8 connected to +Vs.

    • Draw any links required between pins on the same side of the IC. There are none in the example, but these links are straightforward to add.

    • Links to pins on the other side of the IC require more thought. If the pins happen to be opposite one another you can erase the track break (X) between them. Otherwise the pins can be linked by connecting both of them to an unused track above or below the IC. The diagram shows pins 2 and 6 linked in this way. Another method is to link them with insulated wire bent around the IC (see the Flashing LED project for example).

    planning a  stripboard layout: adding components

  5. Add components which will be mounted on the stripboard such as resistors, capacitors and diodes. Make sure you allow for their size which determines the minimum number of holes, and sometimes the maximum as well. This is usually the most difficult stage of planning a layout so expect to change your plan several times! Remember to label the components, otherwise it will become confusing once there are several on the plan.

    Connections which do not involve the IC are made using an unused track. For example resistor R3 and the LED are connected by an unused track above the IC.

    Watch for alternative arrangements using the links you have already made. For example the LED needs to connect to 0V but it is a long stretch to the 0V track. It is easier to connect the LED to the same track as pin 1 of the IC because that track is already connected to 0V by a wire link.

    Resistor R2 needs to connect from pin 7 to pin 6 and it could do this directly by mounting it vertically. However, it has been connected from pin 7 to the track used to link pins 2 and 6, the extra space this gives allows R2 to lie horizontally on the board.


    planning a  stripboard layout: adding wires

  6. Add wires to components which will be off the stripboard such as switches. These should normally be on the left and right at the edges of the board. Start by adding the battery clip or power supply leads to the +Vs and 0V tracks. Connections for the other off-board components are usually easy because you do not need to allow for their size, just draw wires to the correct tracks.

  7. Check your plan very carefully by checking every connection shown on the circuit diagram. A good way to do this is to work round the IC pin-by-pin. Check all the connections and components connected to pin 1, then move on to pin 2, and so on.


    planning a  stripboard layout: improving the plan

  8. Look for ways to improve your plan. For example it may be possible to eliminate an unused track by moving a supply track nearer to the IC - but make sure there is still sufficient space for the components. It may also be possible to move links and components closer to the IC horizontally to make the area of board required a little smaller.

    Unused tracks above and below the IC have been eliminated in the example. This affected two components, resistor R1 and capacitor C1, but both will still fit in the reduced space. The plan could be compressed a little further by moving components and links closer to the IC horizontally but this has not been done.


    planning a  stripboard layout: final version

  9. Finally, check your plan again and make a neat copy fully labelled with all the component references or values. Work out the size of stripboard required. Notice that an extra hole has been allowed on the left and right to avoid soldering at the end of a track. Joints made at the end of a track are likely to break because the small piece of track beyond the last hole easily breaks away from the board.

    It is tempting to rush straight into soldering the circuit, but do check your plan carefully first. It is much easier to correct errors on the plan than it is to correct to correct them on the soldered board!

Breadboard

Breadboard, photograph © Rapid Electronics
Small Breadboard
Photograph © Rapid Electronics

Uses of Breadboard

A breadboard is used to make up temporary circuits for testing or to try out an idea. No soldering is required so it is easy to change connections and replace components. Parts will not be damaged so they will be available to re-use afterwards.

Almost all the Electronics Club projects started life on a breadboard to check that the circuit worked as intended.

The photograph shows a typical small breadboard which is suitable for beginners building simple circuits with one or two ICs (chips). Larger sizes are available and you may wish to buy one of these to start with.


Connections on Breadboard

Breadboards have many tiny sockets (called 'holes') arranged on a 0.1" grid. The leads of most components can be pushed straight into the holes. ICs are inserted across the central gap with their notch or dot to the left.

Wire links can be made with single-core plastic-coated wire of 0.6mm diameter (the standard size). Stranded wire is not suitable because it will crumple when pushed into a hole and it may damage the board if strands break off.

The diagram shows how the breadboard holes are connected: Connections on breadboard

The top and bottom rows are linked horizontally all the way across as shown by the red and black lines on the diagram. The power supply is connected to these rows, + at the top and 0V (zero volts) at the bottom.

I suggest using the upper row of the bottom pair for 0V, then you can use the lower row for the negative supply with circuits requiring a dual supply (e.g. +9V, 0V, -9V).

The other holes are linked vertically in blocks of 5 with no link across the centre as shown by the blue lines on the diagram. Notice how there are separate blocks of connections to each pin of ICs.

Large Breaboards
On larger breadboards there may be a break halfway along the top and bottom power supply rows. It is a good idea to link across the gap before you start to build a circuit, otherwise you may forget and part of your circuit will have no power!


Building a Circuit on Breadboard

Converting a circuit diagram to a breadboard layout is not straightforward because the arrangement of components on breadboard will look quite different from the circuit diagram.

When putting parts on breadboard you must concentrate on their connections, not their positions on the circuit diagram. The IC (chip) is a good starting point so place it in the centre of the breadboard and work round it pin by pin, putting in all the connections and components for each pin in turn.

555 monostable  circuit diagram
Monostable Circuit Diagram
The best way to explain this is by example, so the process of building this 555 timer circuit on breadboard is listed step-by-step below.

The circuit is a monostable which means it will turn on the LED for about 5 seconds when the 'trigger' button is pressed. The time period is determined by R1 and C1 and you may wish to try changing their values. R1 should be in the range 1kohm to 1Mohm.

Time Period, T = 1.1 × R1 × C1

For further information please see 555 monostable.

IC pin  numbers

IC pin numbers

IC pins are numbered anti-clockwise around the IC 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.


Components without suitable leads

Soldering  leads onto switches Some components such as switches and variable resistors do not have suitable leads of their own so you must solder some on yourself. Use single-core plastic-coated wire of 0.6mm diameter (the standard size). Stranded wire is not suitable because it will crumple when pushed into a hole and it may damage the board if strands break off.


Building the example circuit

Begin by carefully insert the 555 IC in the centre of the breadboard with its notch or dot to the left.

Then deal with each pin of the 555:

Monostable  Circuit on Breadboard
Monostable Circuit on Breadboard

  1. Connect a wire (black) to 0V.
  2. Connect the 10k resistor to +9V.
    Connect a push switch to 0V (you will need to solder leads onto the switch)
  3. Connect the 470 resistor to an used block of 5 holes, then...
    Connect an LED (any colour) from that block to 0V (short lead to 0V).
  4. Connect a wire (red) to +9V.
  5. Connect the 0.01µF capacitor to 0V.
    You will probably find that its leads are too short to connect directly, so put in a wire link to an unused block of holes and connect to that.
  6. Connect the 100µF capacitor to 0V (+ lead to pin 6).
    Connect a wire (blue) to pin 7.
  7. Connect 47k resistor to +9V.
    Check: there should be a wire already connected to pin 6.
  8. Connect a wire (red) to +9V.
Finally...
  • Check all the connections carefully.
  • Check that parts are the correct way round (LED and 100µF capacitor).
  • Check that no leads are touching (unless they connect to the same block).
  • Connect the breadboard to a 9V supply and press the push switch to test the circuit.
If your circuit does not work disconnect (or switch off) the power supply and very carefully re-check every connection against the circuit diagram.

Types of Circuit Board


Breadboard, photograph © Rapid Electronics
Photograph © Rapid Electronics

Breadboard

Temporary, no soldering required

This is a way of making a temporary circuit, for testing purposes or to try out an idea. No soldering is required and all the components can be re-used afterwards. It is easy to change connections and replace components. Almost all the Electronics Club projects started life on a breadboard to check that the circuit worked as intended.

For further details please see the Breadboard page.


Stripboard

Stripboard  circuit Permanent, soldered

Stripboard has parallel strips of copper track on one side. The strips are 0.1" (2.54mm) apart and there are holes every 0.1" (2.54mm). Stripboard requires no special preparation other than cutting to size. It can be cut with a junior hacksaw, or simply snap it along the lines of holes by putting it over the edge of a bench or table and pushing hard.

For further details please see the Stripboard page.


PCB circuit

Printed Circuit Board

Permanent, soldered

Printed circuit boards have copper tracks connecting the holes where the components are placed. They are designed specially for each circuit and make construction very easy. However, producing the PCB requires special equipment so this method is not recommended if you are a beginner unless the PCB is provided for you.


Soldering - How to Solder ?


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.
If you are unlucky (or careless!) enough to burn yourself please read the First Aid section.

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:

Good and  bad soldered joints
  • 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.


What is solder?

Reels of solder
Photograph © Rapid Electronics
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 oxidise and the solder itself will not flow properly onto a dirty, oxidised, metal surface.

The best size of solder for electronics is 22swg (swg = standard wire gauge).



Desoldering

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:

Using a desoldering pump (solder sucker)
1. With a desoldering pump (solder sucker)

  • Set the pump by pushing the spring-loaded 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.

Solder remover wick
Photograph © Rapid Electronics
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.

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 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.

Relays

relay symbol
Circuit symbol for a relay
Relay,  photograph © Rapid Electronics
Relay,  photograph © Rapid Electronics
Relays

Photographs © Rapid Electronics

working  relay
Relay showing coil and switch contacts
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 most have double throw (changeover) switch contacts as shown in the diagram.

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 usuallly 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 labelled 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.

  • 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
    For example: A 12V supply relay with a coil resistance of 400ohm 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.
  4. 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".
  5. 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

Protection  diode for a relay Transistors and ICs must be protected from the brief high voltage produced when a relay coil is switched off. The diagram shows how a signal diode (eg 1N4148) is connected 'backwards' across the relay coil to provide this protection.

Current flowing through a relay coil creates a magnetic field which collapses suddenly when the current is switched off. The sudden collapse of the magnetic field induces a brief high voltage across the relay coil which is very likely to damage transistors and ICs. The protection diode allows the induced voltage to drive a brief current through the coil (and diode) so the magnetic field dies away quickly rather than instantly. This prevents the induced voltage becoming high enough to cause damage to transistors and ICs.


Reed relays

Reed  Relay, photograph © Rapid Electronics
Reed Relay

Photograph © Rapid Electronics

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 (1000ohm 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 ('IC holder').

For further information about reed switches please see the page on switches.


Relays and transistors compared

Like relays, transistors can be used as an electrically operated switch. For switching small DC 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 higher voltages than standard transistors.
  • Relays are often 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 ICs can provide, so a low power transistor may be needed to switch the current for the relay's coil.