June 30, 2009

Wireless Switch

Wireless Switch
Normally, home appliances are controlled by means of switches, sensors, etc. However, physical contact with switches may be dangerous if there is any shorting. The circuit described here requires no physical contact for operating the appliance. You just need to move your hand between the infrared LED (IR LED1) and the photo transistor (T1).

The infrared rays transmitted by IR LED1 is detected by the photo transistor to activate the circuit. This circuit is very stable and sensitive compared to other AC appliance control circuits. It is simple, compact and cheap. Current consumption is low in milliamperes. The circuit is built around an IC CA3140, IR LED1, photo transistor and other discrete components. When regulated 5V is connected to the circuit, IR LED1 emits infrared rays, which are received by photo transistor T1 if it is properly aligned. The collector of T1
is connected to non-inverting pin 3 of IC1. Inverting pin 2 of IC1 is connected to voltage-divider preset VR1. Using preset VR1 you can vary the reference voltage at pin 2, which also affects sensitivity of the photo transistor. Op-amp IC1 amplifies the signal received from the photo transistor. Resistor R3 controls the base current of transistor BC548 (T2). The high output
of IC1 at pin 6 drives transistor T2 to energise relay RL1 and switch on the appliance, say, hand dryer, through the relay contacts. The working of the circuit is simple. In order to switch on the appliance, you simply interrupt the infrared rays falling on the photo transistor through your hand. During the interruption, the appliance remains on through the relay. When you remove your hand from the infrared beam, the appliance turns off through the relay. connect +5V supply to the circuit.

Circuit Diagram

Click the Diagram for better Quality

Long Range IR Transimmiter

Long Range IR Transimmiter
Most of the IR remotes work reliably within a range of 5 metres The circuit complexity
increases if you design the IR transmitter for reliable operation over a longer range, say, 10 metres. To double the range from 5 metres to 10 metres, you need to increase the transmitted power four times. Here is a simple circuit that will give you a pretty long range. It uses
three infrared transmitting LEDs (IR1 through IR3) in series to increase the radiated power. Further, to increase the directivity and so also the power density, you may assemble the IR LEDs inside the reflector of a torch. For increasing the circuit efficiency, a MOSFET (BS170) has been used, which acts as a switch and thus reduces the power loss that would result if a transistor were used. To avoid any dip during its ‘on’/‘off’ operations, a 100μF reservoir capacitor C2 is used across the battery supply. Its advantage will be more obvious when the
IR transmitter is powered by ordinary batteries. Capacitor C2 supplies extra charge during ‘switching on’ operations. As the MOSFET exhibits large capacitance across gate-source terminals, a special drive arrangement has been made using npn-pnp Darlington pair of
BC547 and BC557 (as emitter followers), to avoid distortion of the gate drive input. Data
(CMOS-compatible) to be transmitted is used for modulating the 38 kHz frequency generated
by CD4047 (IC1). However, in the circuit shown here, tactile switch S1 has been used for modulating and transmitting the IR signal. Use switch S2 for power ‘on’/‘off’ control. commercially available IR receiver modules (e.g., TSOP1738) could be used for efficient reception of the transmitted IR signals.

Circuit Diagram

NOTE : Click the image for better Quality

Pin Configuration

Automatic Emergency Light

Here is a white-LED-based emergency light

1. It is highly bright due to the use of white LED s.
2. The light turns on automatically when mains supply fails, and turns off when mains power resumes.
3. It has its own battery charger.When the battery is fully charged, charging stops automatically.

The circuit comprises two sections charger power supply and LED driver.

The charger power supply section
It is built around 3-terminal adjustable regulator IC LM317 (IC1), while the LED driver section is built around transistor BD140 (T2). In the charger power supply section, input AC mains is stepped down by transformer X1 to deliver 9V, 500 mA to the bridge rectifier, which comprises diodes D1 through D4. Filter capacitor C1 eliminates ripples. Unregulated DC voltage is fed to input pin 3 of IC1 and provides charging current through diode D5 and limiting resistor R16. By adjusting preset VR1, the output voltage can be adjusted to deliver the required charging
current. When the battery gets charged to 6.8V, zener diode ZD1 conducts and charging current from regulator IC1 finds a path through transistor T1 to ground and it stops charging of the battery.

LED Driver section
The LED driver section uses a total of twelve 10mm white LEDs. All the LEDs are connected in parallel with a 100-ohm resistor in series with each. The common-anode junction of all the twelve LEDs is connected to the collector of pnp transistor T2 and the emitter of transistor T2 is directly connected to the positive terminal of 6V battery. The unregulated DC voltage, produced at the cathode junction of diodes D1 and D3, is fed to the base of transistor T2 through a 1-
kilo-ohm resistor. When mains power is available, the base of transistor T2 remains high and
T2 does not conduct. Thus LEDs are off. On the other hand, when mains fails, the base of transistor T2 becomes low and it conducts. This makes all the LEDs (LED1 through LED12) glow.The mains power supply, when available , charges the battery and keeps the LEDs off as
transistor T2 remains cut-off. During mains failure, the charging section stops working and
the battery supply makes the LEDs glow. You can use more LEDs provided the total current consumption does not exceed 1.5A. Driver transistor T2 can deliver up to 1.5A with proper heat-sink arrangement.

Circuit Diagram

NOTE : Click the image for better Quality

Pin Configuration

Drinking Water Alarm

Drinking Water Alarm
The many States supply water for limited duration in a day. Time of water supply is decided by the management and the public does not know the same. In such a situation, this water alarm circuit will save the people from long wait as it will inform them as soon as the water supply starts.

At the heart of this circuit is a small water sensor. For fabricating this water sensor, you need two foils—an aluminium foil and a plastic foil. You can assemble the sensor by rolling aluminium and plastic foils in the shape of a concentric cylinder. Connect one end of the insulated flexible wire on the aluminium foil and the other end to resistor R2. Now mount this sensor inside the water tap such that water can flow through it uninterrupted. To complete the circuit, connect another wire from the junction of pins 2 and 6 of IC1 to the water pipeline or the water tap

The working of the circuit is simple. Timer 555 is wired as an astable multivibrator. The multivibrator will work only when water flows through the water tap and completes the circuit
connection. It oscillates at about 1 kHz. The output of the timer at pin 3 is connected to loudspeaker LS1 via capacitor C3. As soon as water starts flowing through the tap, the speaker
starts sounding, which indicates resumption of water supply. It remains ‘on’ until you switch off the circuit with switch S1 or remove the sensor from the tap. The circuit works off a 9V
battery supply. The water sensor is inserted into the water tap. Connect the lead coming out from the junction of 555 pins 2 and 6 to the body of the water tap. Use on/off switch S1
to power the circuit with the 9V PP3 battery.

Circuit Diagram

Click the image for better Quality

June 28, 2009

IR Bug

Infra Red Bug
This circuit can be used to detect the presence of modulated infrared signals in its vicinity from any electronic source, for instance, an IR handheld remote controller. It can also be used for testing IR burglar alarm systems.

Besides the power supply (one 9V PP3/6F22 compact battery
pack), it consists of an infrared signal detector-cum-preamplifier followed by a melody generator
and a tiny audio amplifier. The amplified signal is fed to the melody generator via resistor R5. The output of the melody generator is fed to LM386 low-power audio amplifier (IC2) via variable resistor VR1, which works as the volume control. The loudspeaker sounds to indicate
the presence of IR signal near the circuit. IC LM386 is wired as a minimum-parts amplifier with
a voltage gain of ‘20,’ which is sufficient for this application. Capacitor C3 is used for decoupling of the positive rail and the R-C combination network comprising C4 and R7 bypasses high frequency to ground. The circuit can be easily wired on a general-purpose PCB. Pin configurations of IC LM386, transistor BC547 and melody generator UM66 are shown. principle, converts the IR signal pulse trains into noticeable aural notes. S1 is used to switch on/off mains power and LED1 indicates power ‘on.’ Resistor R4 and zener diode ZD2 form a low-current voltage stabiliser for providing steady 5.1V DC to the small signal preamplifier circuit. IR LED1 is the main sensing element. The IR signal detected by IR LED1 is amplified by npn transistors T1.

Circuit Diagram

Click the image for better QUALITY

Pin Configuration


Connect this circuit to any of your home appliances (lamp,fan, radio, etc) to make the appliance turn on/off from a TV, VCD or DVD remote control. The circuit can be activated from up to 10 metres.

The 38kHz infrared (IR) rays generated by the remote control are received by IR receiver module TSOP1738 of the circuit. Pin 1 of TSOP1738 is connected to ground, pin 2 is connected to the power supply through resistor R5 and the output is taken from pin 3. The output signal is amplified by transistor T1 (BC558). The amplified signal is fed to clock pin 14 of decade counter IC CD4017 (IC1). Pin 8 of IC1 is grounded, pin 16 is connected to Vcc and pin 3 is connected to LED1 (red), which glows to indicate that the appliance is ‘off.’ The output of IC1 is taken from its pin 2. LED2 (green) connected to pin 2 is used to indicate the ‘on’ state of the appliance. Transistor T2 (BC548) connected to pin 2 of IC1 drives relay RL1. Diode 1N4007 (D1) acts as a freewheeling diode. The appliance to be controlled is connected between the pole of the relay and neutral terminal of mains. It gets connected to live terminal of AC mains via normally opened (N/O) contact when the relay energizes.

Circuit Diagram

Click the image for better QUALITY


In real this is how an rheostat like..

A rheostat is an electrical component that has an adjustable resistance


It is a type of potentiometer that has two terminals instead of three. The two main types of rheostat are the rotary and slider. The symbol for a rheostat is a resistor symbol with an arrow diagonally across it. They are used in many different applications, from light dimmers to the motor controllers in large industrial machines.

Rheostat Construction

Most rheostats are the wire-wound type that have a long length of conductive wire coiled into a tight spiral. The linear type have a straight coil while the rotary type have the coil curved into a torus to save space. The coil and contacts are sealed inside the case to protect them from dirt which can cause an open circuit, and from moisture which can cause a short circuit. Rheostats can be made from other materials such as carbon disks, metal ribbons, and even certain fluids. As long as a material has a significant resistance change over a short length, it can probably be used to make a rheos.

How They Work

The basic principle used by rheostats is Ohm's law, which states that current is inversely proportional to resistance for a given voltage. This means the current decreases as the resistance increases, or it increases as the resistance decreases. Current enters the rheostat through one of its terminals, flows through the wire coil and contact, and exits through the other terminal. Rheostats do not have polarity and operate the same when the terminals are reversed. Three-terminal potentiometers can be used as rheostats by connecting the unused third terminal to the contact terminal.


Some light dimmers use rheostats to limit the current passing through the light bulbs in order to change their brightness. The greater the resistance of the rheostat, the lower the brightness of the light bulbs. Some lights cannot use dimmers, such as fluorescents and gas-discharge lamps. These lights have large resistance loads, called ballasts, that maintain a constant current through them. Rheostats have no effect on their brightness and can even damage them.

Motor controller also use rheostats to control the speed of a motor by limiting the flow of current through them. They are used in many small appliances such as blenders, mixers, fans, and power tools. Rheostats are also used as test instruments to provide an accurate resistance value. While rheostats can be used to control electric ovens and cooktops, thermostats are preferred because they have additional parts which automatically adjust the current flow to maintain a constant temperature.

The rheostat is still a common and fundamental electronic component used to control the flow of current in a circuit. However, it has largely been replaced by the triac, a solid-state device also known as a silicon controlled rectifier (SCR). A triac do not waste as much power as a rheostat and has better reliability due to the absence of mechanical parts. Rheostats commonly fail because their contacts become dirty or the coil wire corrodes and breaks.

June 27, 2009


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

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

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.

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.

    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!

This example plan is just one of the many possible layouts for the circuit. The Flashing LED uses the same circuit, but the stripboard plan is quite different. In this case the aim was to have the minimum number of wire links.
The completed stripboard layout and the circuit diagram for comparison:
Flashing LED Circuit

planning a stripboard layout: final version

555 astable circuit diagram

Logic Gates

Introduction to logic gates:

Logic gates process signals which represent true or false. Normally the positive supply voltage +Vs represents 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 to be familiar with them all.

The different types of gates are as follows:-
    Logic states
    True False

Logic gate symbols...

There are two series of symbols for logic gates: The traditional symbols have distinctive shapes making them easy to recognise so they are widely used in industry and education.

AND gate NOR gate NOT gate

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.

AND gate NOR gate NOT gate

Inputs and outputs

AND gate with inputs and output labelled 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)

NAND gate showing inverting circle 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.

Truth tables

Input AInput BOutput Q
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.

Logic ICs

4001 and other quad 2-input gates 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:

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.
traditional NOT gate symbol IEC NOT gate symbol
Input AOutput Q
Traditional symbol IEC symbol Truth Table

AND gate

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.
traditional AND gate symbol IEC AND gate symbol
Input AInput BOutput Q
Traditional symbol IEC symbol Truth Table

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.
traditional NAND gate symbol IEC NAND gate symbol
Input AInput BOutput Q
Traditional symbol IEC symbol Truth Table

OR gate

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.
traditional OR gate symbol IEC OR gate symbol
Input AInput BOutput Q
Traditional symbol IEC symbol Truth Table

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.
traditional NOR gate symbol IEC NOR gate symbol
Input AInput BOutput Q
Traditional symbol IEC symbol Truth Table

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.
traditional EX-OR gate symbol IEC EX-OR gate symbol
Input AInput BOutput Q
Traditional symbol IEC symbol Truth Table

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

traditional EX-NOR gate symbol IEC EX-NOR gate symbol
Input AInput BOutput Q
Traditional symbol IEC symbol Truth Table

Combinations of logic gates

Logic gates can be combined to produce more complex functions. They can also be combined to one type of gate for another.

Input AInput BOutput Q
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:



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.

Combination of NOR, AND and OR gates

D = NOT (A OR B)
Q = D OR E = (NOT (A OR B)) OR (B AND C)

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.

3-input AND gate operating as a 2-input AND gate

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

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
NOT NOT gate NOT gate made from a NAND gate
AND AND gate AND gate made from NAND gates
OR OR gate OR gate made from NAND gates
NOR NOR gate NOR gate made from NAND gates

Substituting gates in an example logic system

Combination of NOR, AND and OR gates 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.

Equivalent NAND gate system

Simplified NAND gate system 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 gte).

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.


Electronics is the study and use of electrical that operate by controlling the flow of electrons or other electrically charged particles in devices such as thermionic valves. and semiconductors. The pure study of such devices is considered as a branch of physics, while the design and construction electronic circuits to solve practical problems is called electronic engineering.

Popular article