Pages

Tuesday, 7 February 2012

Ethernet Cable - Color Coding Diagram

Ethernet Cable - Color Coding Diagram

The information listed here is to assist Network Administrators in the color coding of Ethernet cables. Please be aware that modifying Ethernet cables improperly may cause loss of network connectivity. Use this information at your own risk, and insure all connectors and cables are modified in accordance with standards. The Internet Centre and its affiliates cannot be held liable for the use of this information in whole or in part.
T-568A Straight-Through Ethernet Cable
The TIA/EIA 568-A standard which was ratified in 1995, was replaced by the TIA/EIA 568-B standard in 2002 and has been updated since. Both standards define the T-568A and T-568B pin-outs for using Unshielded Twisted Pair cable and RJ-45 connectors for Ethernet connectivity. The standards and pin-out specification appear to be related and interchangeable, but are not the same and should not be used interchangeably.
T-568B Straight-Through Ethernet Cable
Both the T-568A and the T-568B standard Straight-Through cables are used most often as patch cords for your Ethernet connections. If you require a cable to connect two Ethernet devices directly together without a hub or when you connect two hubs together, you will need to use a Crossover cable instead.
RJ-45 Crossover Ethernet Cable
A good way of remembering how to wire a Crossover Ethernet cable is to wire one end using the T-568A standard and the other end using the T-568B standard. Another way of remembering the color coding is to simply switch the Green set of wires in place with the Orange set of wires. Specifically, switch the solid Green (G) with the solid Orange, and switch the green/white with the orange/white.
Ethernet Cable Instructions:
  1. Pull the cable off the reel to the desired length and cut. If you are pulling cables through holes, its easier to attach the RJ-45 plugs after the cable is pulled. The total length of wire segments between a PC and a hub or between two PC's cannot exceed 100 Meters (328 feet) for 100BASE-TX and 300 Meters for 10BASE-T.
  2. Start on one end and strip the cable jacket off (about 1") using a stripper or a knife. Be extra careful not to nick the wires, otherwise you will need to start over.
  3. Spread, untwist the pairs, and arrange the wires in the order of the desired cable end. Flatten the end between your thumb and forefinger. Trim the ends of the wires so they are even with one another, leaving only 1/2" in wire length. If it is longer than 1/2" it will be out-of-spec and susceptible to crosstalk. Flatten and insure there are no spaces between wires.
  4. Hold the RJ-45 plug with the clip facing down or away from you. Push the wires firmly into the plug. Inspect each wire is flat even at the front of the plug. Check the order of the wires. Double check again. Check that the jacket is fitted right against the stop of the plug. Carefully hold the wire and firmly crimp the RJ-45 with the crimper.
  5. Check the color orientation, check that the crimped connection is not about to come apart, and check to see if the wires are flat against the front of the plug. If even one of these are incorrect, you will have to start over. Test the Ethernet cable.
Ethernet Cable Tips:
  • A straight-thru cable has identical ends.
  • A crossover cable has different ends.
  • A straight-thru is used as a patch cord in Ethernet connections.
  • A crossover is used to connect two Ethernet devices without a hub or for connecting two hubs.
  • A crossover has one end with the Orange set of wires switched with the Green set.
  • Odd numbered pins are always striped, even numbered pins are always solid colored.
  • Looking at the RJ-45 with the clip facing away from you, Brown is always on the right, and pin 1 is on the left.
  • No more than 1/2" of the Ethernet cable should be untwisted otherwise it will be susceptible to crosstalk.
  • Do not deform, do not bend, do not stretch, do not staple, do not run parallel with power cables, and do not run Ethernet cables near noise inducing components.
Basic Theory:

By looking at a T-568A UTP Ethernet straight-thru cable and an Ethernet crossover cable with a T-568B end, we see that the TX (transmitter) pins are connected to the corresponding RX (receiver) pins, plus to plus and minus to minus. You can also see that both the blue and brown wire pairs on pins 4, 5, 7, and 8 are not used in either standard. What you may not realize is that, these same pins 4, 5, 7, and 8 are not used or required in 100BASE-TX as well. So why bother using these wires, well for one thing its simply easier to make a connection with all the wires grouped together. Otherwise you'll be spending time trying to fit those tiny little wires into each of the corresponding holes in the RJ-45 connector.

Variable Resistors

Variable Resistors




Construction

variable resistor track and wiper
variable resistor
Standard Variable Resistor
Photograph © Rapid Electronics
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.
The resistance and type of track are marked on the body:
    4K7 LIN means 4.7 kohm linear track.
    1M LOG means 1 Mohm 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.

Rheostat

rheostat symbol
Rheostat Symbol
 
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.


Potentiometer

potentiometer symbol
Potentiometer Symbol
 
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.


Presets

preset symbol
Preset Symbol
 
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.


preset presets multiturn preset
Preset
(open style)
Presets
(closed style)
Multiturn preset
Photographs © Rapid Electronics

74 Series Logic ICs

74 Series Logic ICs




 

General characteristics

There are several families of logic ICs numbered from 74xx00 onwards with letters (xx) in the middle of the number to indicate the type of circuitry, eg 74LS00 and 74HC00. The original family (now obsolete) had no letters, eg 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 ICs 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 ICs 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.
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 IC 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 IC 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 ICs.
  • 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 IC 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 IC to remove the 'spikes' generated as it switches state, one capacitor is needed for every 4 ICs.
  • 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 IC itself) is a few mW.
open collector output

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 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.
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:  reset-bar  (say 'reset-bar').
Datasheets are available from:

Gates


quad 2-input gates
 
7402 quad 2-input NOR gates

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

Triple 3-input gates

  • 7410 triple 3-input NAND
  • 7411 triple 3-input AND
  • 7412 triple 3-input NAND with open collector outputs
  • 7427 triple 3-input NOR
Notice how gate 1 is spread across the two sides of the package.

dual 4-input gates

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

7430 8-input NAND gate

NC = No Connection (a pin that is not used).


hex NOT gates

Hex NOT gates

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


Counters


7490 decade (0-9) ripple counter
7493 4-bit (0-15) ripple counter

7490 and 7493 ripple counters

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.
For normal use connect QA to clockB and
connect the external clock signal to clockA.
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 behaviour of ripple counters and it means a counter output can directly drive the clock input of the next counter in a chain.
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.
Connecting ripple counters in a chain: please see 74393 below.


74390 dual decade (0-9) ripple counter

74390 dual decade counter

For normal use connect QA to clockB and
connect the external clock signal to clockA.
The 74390 contains two separate decade (0 to 9) counters, one on each side of the IC. 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 behaviour 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.
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 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.
Connecting ripple counters in a chain: please see 74393 below.


74393 dual 4-bit (0-15) ripple counter

74393 dual 4-bit counter The 74393 contains two separate 4-bit (0 to 15) counters, one on each side of the IC. 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 behaviour of ripple counters and it means 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.

connecting ripple counters


74160-3 synchronous counters

74160-3 counters

* reset and preset are both active-low
preset is also known as parallel enable (PE)
 
  • 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)
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 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.
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.

connecting synchronous counters


74192 up/down decade (0-9) counter
74193 up/down 4-bit (0-15) counter

74192-3 up/down counters

* preset is active-low
 
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 74160-3 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.
connecting 74192-3 up/down counters


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.

Decoders


7442 BCD to decimal (1 of 10) decoder

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.



7-segment Display Drivers


7447 BCD to 7-segment display driver

7447 BCD to 7-segment display ddriver The appropriate outputs a-g become 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 (330ohm 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.

Integrated Circuits (Chips)

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.
IC pin numbers

Pin numbers

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.

IC holders (DIL sockets)

IC holder (DIL socket) ICs (chips) are easily damaged by heat when soldering and their short pins cannot be protected with a heat sink. Instead we use an IC holder, strictly called a DIL socket (DIL = Dual In-Line), which can be safely soldered onto the circuit board. The IC is pushed into the holder when all soldering is complete. IC holders are only needed when soldering so they are not used on breadboards.
Commercially produced circuit boards often have ICs soldered directly to the board without an IC 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 IC and it will be difficult to remove without damage by de-soldering.

Removing an IC from its holder

If you need to remove an IC it can be gently prised out of the holder with a small flat-blade screwdriver. Carefully lever up each end by inserting the screwdriver blade between the IC and its holder and gently twisting the screwdriver. Take care to start lifting at both ends before you attempt to remove the IC, otherwise you will bend and possibly break the pins.

Static precautions

Antistatic bags for ICs
Antistatic bags for ICs
Photograph © Rapid Electronics
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 (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 aluminium kitchen foil and using a crocodile clip to connect the foil to a metal water pipe or window frame with a 10kohm resistor in series.


Datasheets

PDF files
To view and print PDF files 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.
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:


sinking and sourcing current

Sinking and sourcing current

IC outputs are often said to 'sink' or 'source' current. The terms refer to the direction of the current at the IC's output. If the IC is sinking current it is flowing into the output. This means that a device connected between the positive supply (+Vs) and the IC output will be switched on when the output is low (0V).
If the IC is sourcing current it is flowing out of the output. This means that a device connected between the IC output and the negative supply (0V) will be switched on when the output is high (+Vs).
It is possible to connect two devices to an IC output so that one is on when the output is low and the other is on when the output is high. This arrangement is used in the Level Crossing project to make the red LEDs flash alternately.
The maximum sinking and sourcing currents for an IC output are usually the same but there are some exceptions, for example 74LS TTL logic ICs can sink up to 16mA but only source 2mA.


Using diodes to combine outputs

using diodes to combine outputs The outputs of ICs must never be directly connected together. However, diodes can be used to combine two or more digital (high/low) outputs from an IC 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 LEDs.
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.
Example projects: Traffic Light | Dice | Model Lighthouse


555 and 556 pins

The 555 and 556 Timers

The 8-pin 555 timer IC 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 ICs and it is sufficient to supply LEDs, 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.
For further information please see the page on 555 and 556 timer circuits.


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 summarises the important properties of the most popular logic families:

Property 4000 Series 74 Series
74HC
74 Series
74HCT
74 Series
74LS
Technology CMOS High-speed CMOS High-speed CMOS
TTL compatible
TTL Low-power Schottky
Power Supply 3 to 15V 2 to 6V 5V ±0.5V 5V ±0.25V
Inputs 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). Very high impedance. Unused inputs must be connected to +Vs or 0V. Compatible with 74LS (TTL) outputs. 'Float' high to logic 1 if unconnected. 1mA must be drawn out to hold them at logic 0.
Outputs Can sink and source about 5mA (10mA with 9V supply), enough to light an LED. To switch larger currents use a transistor. Can sink and source about 20mA, enough to light an LED. To switch larger currents use a transistor. Can sink and source about 20mA, enough to light an LED. To switch larger currents use a transistor. Can sink up to 16mA (enough to light an LED), but source only about 2mA. To switch larger currents use a transistor.
Fan-out One output can drive up to 50 CMOS, 74HC or 74HCT inputs, but only one 74LS input. 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.
Maximum Frequency about 1MHz about 25MHz about 25MHz about 35MHz
Power consumption
of the IC itself
A few µW. A few µW. A few µW. A few mW.


using a pull-up resistor
Driving 4000 or 74HC inputs from a
74LS output using a pull-up resistor.

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. A 74LS output cannot reliably drive a 4000 or 74HC input unless a 'pull-up' resistor of 2.2kohm 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.



 

4000 Series CMOS

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. However the CMOS circuitry also 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. For the more sensitive (and expensive!) ICs special equipment is available, including earthed wrist straps and earthed work surfaces.
For further information, including pin connections, please use the quick links on the right or go to 4000 Series ICs.


74 Series: 74LS, 74HC and 74HCT

There are several families of logic ICs numbered from 74xx00 onwards with letters (xx) in the middle of the number to indicate the type of circuitry, eg 74LS00 and 74HC00. The original family (now obsolete) had no letters, eg 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 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 ICs 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.
Beware that the 74 series is often still called the 'TTL series' even though the latest ICs do not use TTL!


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.


PIC microcontrollers

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.
PICAXE
www.picaxe.co.uk
Programming a PIC microcontroller may seem daunting to a beginner but there are a number of systems designed to make this easy. The PICAXE system is an excellent example because it uses a standard computer to program (and re-program) the PICs; no specialist equipment is required other than a low-cost download lead. Programs can be written in a simple version of BASIC or using a flowchart. The PICAXE programming software and extensive documentation is available to download free of charge, making the system ideal for education and users at home.

Connectors and Cables

Connectors and Cables





battery clip
battery holder
Photographs © Rapid Electronics

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.


PCB terminal block connector block
PCB
terminal
block
Terminal blockPhotographs © Rapid Electronics

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 mounting terminal blocks provide an easy way of making semi-permanent connections to PCBs. Many are designed to interlock to provide more connections.


Crocodile clips

crocodile clip insulated crocodile clip
Crocodile clips
Photographs © Rapid Electronics
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 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.

4mm stackable plug
4mm sockets

4mm terminal
and solder tag
4mm terminal
solder tag
Photographs © Rapid Electronics

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 colours is available from most suppliers. Plugs
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.
Sockets
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.
Terminals
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 stackable plug
Photograph © Rapid Electronics

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

DC power plug DC power socket
Photographs © Rapid Electronics
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. Miniature versions with a 1.3mm diameter plug are used where small size is essential, such as for personal cassette players.


jack plug ¼ inch jack socket ¼ inch
¼" (6.3mm) jack plug and socket
 
3.5mm jack plug 3.5mm jack socket
3.5mm jack plug and socket
 
3.5mm jack line socket
3.5mm jack line socket
(for fitting to a cable) Photographs © Rapid Electronics

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.
The connections for 3.5mm plugs and 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.

jack plug and socket connections
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.


phono plugs
phono socket
Photographs © Rapid Electronics

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.
screened cable
Construction of a screened cable


coax plug coax socket
Photographs © Rapid Electronics

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 plug
BNC plug, photograph © Rapid Electronics

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 (50ohm or 75ohm) 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.


DIN plug
DIN plug
 
DIN socket
5 way 180° DIN socket
(chassis mounting)
 
Photographs © Rapid Electronics

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


D plug
D cover
D socket, high density
Photographs © Rapid Electronics

D connectors

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 25-way 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 D-connectors requires a steady hand due to the closeness of the contacts, it is easy to accidently unsolder a contact you have just completed while attempting to solder the next one!


IDC plugs
IDC socket
Photographs © Rapid Electronics

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 8-way versions. The 8-way RJ45 is the standard connector for modern computer networks. If you regularly use these you may be interested in our network lead tester project.
Standard UK telephone connectors are similar in style but a slightly different shape. They are called BT (British Telecom) connectors.


Cables

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

single core wire This is one solid wire with a plastic coating available in a wide variety of colours. 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.

Stranded wire

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

Signal cable

Signal cable consists of several colour-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.


screened cable
Screened cable (mono)
stereo screened cable
Screened cable (stereo)
stereo screened cable
Screened cable (stereo)
Photographs © Rapid Electronics

Screened cable

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
Construction of a screened cable



coaxial cable
Photograph © Rapid Electronics

Co-axial cable

This type of screened cable (see above) is designed to carry high frequency signals such as those found in TV aerials and oscilloscope leads.

Mains flex

mains flex, 3 way
Photograph © Rapid Electronics
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 colours 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.