Showing posts with label Transducers. Show all posts
Showing posts with label Transducers. Show all posts


A relay is usually an electromechanical device that is actuated by an electrical current. The current flowing in one circuit causes the opening or closing of another circuit.
Relays are the devices that detect conditions in circuits and cause the contacts to be ON or OFF to CLOSE or OPEN the circuit as required with suitable arrangements.

Sound Transducer

The Sound Transducer

Sound TransducerSound is the general name given to "acoustic waves" that have frequencies ranging from just 1Hz up to many tens of thousands of Hertz with the upper
limit of human hearing being around the 20 kHz, (20,000Hz) range. The sound we hear is basically made up from mechanical vibrations produced by aSound Transducer to generate the acoustic waves and for sound to be "heard" it requires a medium for transmission either through the air, a liquid, or a solid.

Piezo Sound Transducer
Also, sound need not be a continuous frequency sound wave such as a single tone or a musical note, but may be an acoustic wave made from a mechanical vibration, noise or even a single pulse of sound such as a "bang".
Sound Transducers include both sensors, that convert sound into and electrical signal such as a microphone, and actuators that convert the electrical signals back into sound such as a loudspeaker. We tend to think of sound as only existing in the range of frequencies detectable by the human ear, from 20Hz up to 20kHz (a typical loudspeaker frequency response).
But sound transducers can also both detect and transmit sound from very low frequencies called infra-sound up to very high frequencies called ultrasound. But in order for a sound transducer to either detect or produce "sound" we first need to understand what sound is?.
Sound is basically a waveform that is produced by some form of a mechanical vibration such as a tuning fork, and which has a "frequency" determined by the origin of the sound for example, a bass drum has a low frequency sound while a cymbal has a higher frequency sound.
A sound waveform has the same characteristics as that of an electrical waveform which areWavelength (λ), Frequency (ƒ) and Velocity (m/s). Both the sounds frequency and wave shape are determined by the origin or vibration that originally produced the sound but the velocity is dependent upon the medium of transmission (air, water etc.) that carries the sound wave. The relationship between wavelength, velocity and frequency is given below as:

Sound Wave Relationship

A Sound Wave
Relationship between frequency, wavelength
  • Where:
  •   Wavelength is the time period of one complete cycle in Seconds.
  •   Frequency is the number of wavelengths per second in Hertz. 
  •   Velocity is the speed of sound through a transmission medium in m/s-1.

The Microphone Transducer

The Microphone, also called a "mic", is a sound transducer that can be classed as a "sound sensor". This is because it produces an electrical analogue output signal which is proportional to the "acoustic" sound wave acting upon its flexible diaphragm. This signal is an "electrical image" representing the characteristics of the acoustic waveform. Generally, the output signal from a microphone is an analogue signal either in the form of a voltage or current which is proportional to the actual sound wave.
The most common types of microphones available as sound transducers are DynamicElectret CondenserRibbon and the newer Piezo-electric Crystal types. Typical applications for microphones as a sound transducer include audio recording, reproduction, broadcasting as well as telephones, television, digital computer recording and body scanners, where ultrasound is used in medical applications. An example of a simple "Dynamic" microphone is shown below.

Dynamic Moving-coil Microphone Sound Transducer

Dynamic Moving Coil Microphone Sound Transducer

The construction of a dynamic microphone resembles that of a loudspeaker, but in reverse. It is a moving coil type microphone which uses electromagnetic induction to convert the sound waves into an electrical signal. It has a very small coil of thin wire suspended within the magnetic field of a permanent magnet. As the sound wave hits the flexible diaphragm, the diaphragm moves back and forth in response to the sound pressure acting upon it causing the attached coil of wire to move within the magnetic field of the magnet.
The movement of the coil within the magnetic field causes a voltage to be induced in the coil as defined by Faraday's Law of Electromagnetic Induction. The resultant output voltage signal from the coil is proportional to the pressure of the sound wave acting upon the diaphragm so the louder or stronger the sound wave the larger the output signal will be, making this type of microphone design pressure sensitive.
As the coil of wire is usually very small the range of movement of the coil and attached diaphragm is also very small producing a very linear output signal which is 90o out of phase to the sound signal. Also, because the coil is a low impedance inductor, the output voltage signal is also very low so some form of "pre-amplification" of the signal is required.
As the construction of this type of microphone resembles that of a loudspeaker, it is also possible to use an actual loudspeaker as a microphone. Obviously, the average quality of a loudspeaker will not be as good as that for a studio type recording microphone but the frequency response of a reasonable speaker is actually better than that of a cheap "freebie" microphone. Also the coils impedance of a typical loudspeaker is different at between 8 to 16Ω. Common applications where speakers are generally used as microphones are in intercoms and walki-talkie's.

The Loudspeaker Transducer

Sound can also be used as an output device to produce an alert noise or act as an alarm, and loudspeakers, buzzers, horns and sounders are all types of sound transducer that can be used for this purpose with the most commonly used audible type actuator being the "Loudspeaker".
Loudspeaker Sound Transducer
Loudspeaker Transducer
Loudspeakers are also sound transducers that are classed as "sound actuators" and are the exact opposite of microphones. Their job is to convert complex electrical analogue signals into sound waves being as close to the original input signal as possible.
Loudspeakers are available in all shapes, sizes and frequency ranges with the more common types being moving coil, electrostatic, isodynamic and piezo-electric. Moving coil type loudspeakers are by far the most commonly used speaker in electronic circuits and kits, and it is this type of sound transducer we will examine below.
The principle of operation of the Moving Coil Loudspeaker is the exact opposite to that of the "Dynamic Microphone" we look at above. A coil of fine wire, called the "speech or voice coil", is suspended within a very strong magnetic field, and is attached to a paper or Mylar cone, called a "diaphragm" which itself is suspended at its edges to a metal frame or chassis. Then unlike the microphone which is pressure sensitive, this type of sound transducer is a pressure generating device.

Moving Coil Loudspeaker

Moving Coil Loudspeaker

When an analogue signal passes through the voice coil of the speaker, an electro-magnetic field is produced and whose strength is determined by the current flowing through the "voice" coil, which inturn is determined by the volume control setting of the driving amplifier. The electro-magnetic force produced by this field opposes the main permanent magnetic field around it and tries to push the coil in one direction or the other depending upon the interaction between the north and south poles.
As the voice coil is permanently attached to the cone/diaphragm this also moves in tandem and its movement causes a disturbance in the air around it thus producing a sound or note. If the input signal is a continuous sine wave then the cone will move in and out acting like a piston pushing and pulling the air as it moves and a continuous single tone will be heard representing the frequency of the signal. The strength and therefore its velocity, by which the cone moves and pushes the surrounding air produces the loudness of the sound.
As the speech or voice coil is essentially a coil of wire it has, like an inductor an impedance value. This value for most loudspeakers is between 4 and 16Ω's and is called the "nominal impedance" value of the speaker measured at 0Hz, or DC It is important to always match the output impedance of the amplifier with the nominal impedance of the speaker to obtain maximum power transfer between the amplifier and speaker with most amplifier-speaker combinations having and efficiency rating as low as 1 or 2%.
Although disputed by some, the selection of good speaker cable is also an important factor in the efficiency of the speaker, as the internal capacitance and magnetic flux characteristics of the cable change with the signal frequency, thereby causing both frequency and phase distortion attenuating the input signal. Also, with high power amplifiers large currents are flowing through these cables so small thin bell wire type cables can overheat during extended periods of use.
The human ear can generally hear sounds from between 20Hz to 20kHz, and the frequency response of modern loudspeakers called general purpose speakers are tailored to operate within this frequency range as well as headphones, earphones and other types of commercially available headsets used as sound transducers. However, for high performance High Fidelity (Hi-Fi) type audio systems, the frequency response of the sound is split up into different smaller sub-frequencies thereby improving both the loudspeakers efficiency and overall sound quality as follows:

Generalised Frequency Ranges

Descriptive UnitFrequency Range
Sub-Woofer10Hz to 100Hz
Bass20Hz to 3kHz
Mid-Range1kHz to 10kHz
Tweeter3kHz to 30kHz

In multi speaker enclosures which have a separate Woofer, Tweeter and Mid-range speakers housed together within a single enclosure, a passive or active "crossover" network is used to ensure that the audio signal is accurately split and reproduced by all the different sub-speakers. This crossover network consists of ResistorsInductorsCapacitorsRLC type passive filters or op-amp active filters whose crossover or cut-off frequency point is finely tuned to that of the individual loudspeakers characteristics and an example of a multi-speaker "Hi-fi" type design is given below.

Multi-speaker (Hi-Fi) Design

Multispeaker Sound Transducer

 we have looked at different Sound Transducers that can be used to both detect and generate sound waves. Microphones and loudspeakers are the most commonly available sound transducer, but other lots of other types of sound transducers available which use piezoelectric devices to detect very high frequencies, hydrophones designed to be used underwater for detecting underwater sounds and sonar transducers which both transmit and recieve sound waves to detect submarines and ships.

DC Motor

Electrical Motors

Small DC MotorElectrical Motors are continuous actuators that convert electrical energy into mechanical energy in the form of a continuous angular
rotation that can be used to rotate pumps, fans, compressors, wheels, etc. As well as rotary motors, linear motors are also available. There are basically three types of conventional electrical motor available: AC type Motors, DC type Motors and Stepper Motors.

A Typical Small DC Motor
AC Motors are generally used in high power single or multi-phase industrial applications were a constant rotational torque and speed is required to control large loads. In this tutorial on motors we will look only at simple light duty DC Motors and Stepper Motors which are used in many electronics, positional control, microprocessor, PIC and robotic circuits.

The DC Motor

The DC Motor or Direct Current Motor to give it its full title, is the most commonly used actuator for producing continuous movement and whose speed of rotation can easily be controlled, making them ideal for use in applications were speed control, servo type control, and/or positioning is required. A DC motor consists of two parts, a "Stator" which is the stationary part and a "Rotor" which is the rotating part. The result is that there are basically three types of DC Motor available.
  • Brushed Motor - This type of motor produces a magnetic field in a wound rotor (the part that rotates) by passing an electrical current through a commutator and carbon brush assembly, hence the term "Brushed". The stators (the stationary part) magnetic field is produced by using either a wound stator field winding or by permanent magnets. Generally brushed DC motors are cheap, small and easily controlled.
  • Brushless Motor - This type of motor produce a magnetic field in the rotor by using permanent magnets attached to it and commutation is achieved electronically. They are generally smaller but more expensive than conventional brushed type DC motors because they use "Hall effect" switches in the stator to produce the required stator field rotational sequence but they have better torque/speed characteristics, are more efficient and have a longer operating life than equivalent brushed types.
  • Servo Motor - This type of motor is basically a brushed DC motor with some form of positional feedback control connected to the rotor shaft. They are connected to and controlled by a PWM type controller and are mainly used in positional control systems and radio controlled models.
Normal DC motors have almost linear characteristics with their speed of rotation being determined by the applied DC voltage and their output torque being determined by the current flowing through the motor windings. The speed of rotation of any DC motor can be varied from a few revolutions per minute (rpm) to many thousands of revolutions per minute making them suitable for electronic, automotive or robotic applications. By connecting them to gearboxes or gear-trains their output speed can be decreased while at the same time increasing the torque output of the motor at a high speed.

The "Brushed" DC Motor

A conventional brushed DC Motor consist basically of two parts, the stationary body of the motor called the Stator and the inner part which rotates producing the movement called the Rotor or "Armature" for DC machines.
The motors wound stator is an electromagnet circuit which consists of electrical coils connected together in a circular configuration to produce the required North-pole then a South-pole then a North-pole etc, type stationary magnetic field system for rotation, unlike AC machines whose stator field continually rotates with the applied frequency. The current which flows within these field coils is known as the motor field current.
These electromagnetic coils which form the stator field can be electrically connected in series, parallel or both together (compound) with the motors armature. A series wound DC motor has its stator field windings connected in series with the armature. Likewise, a shunt wound DC motor has its stator field windings connected in parallel with the armature as shown.

Series and Shunt Connected DC Motor

Series and Shunt DC Motor

The rotor or armature of a DC machine consists of current carrying conductors connected together at one end to electrically isolated copper segments called the commutator. The commutator allows an electrical connection to be made via carbon brushes (hence the name "Brushed" motor) to an external power supply as the armature rotates.
The magnetic field setup by the rotor tries to align itself with the stationary stator field causing the rotor to rotate on its axis, but can not align itself due to commutation delays. The rotational speed of the motor is dependent on the strength of the rotors magnetic field and the more voltage that is applied to the motor the faster the rotor will rotate. By varying this applied DC voltage the rotational speed of the motor can also be varied.

Conventional (Brushed) DC Motor

Brushed DC Motor

Permanent magnet (PMDC) brushed motors are generally much smaller and cheaper than their equivalent wound stator type DC motor cousins as they have no field winding. In permanent magnet DC (PMDC) motors these field coils are replaced with strong rare earth (i.e. Samarium Cobolt, or Neodymium Iron Boron) type magnets which have very high magnetic energy fields. This gives them a much better linear speed/torque characteristic than the equivalent wound motors because of the permanent and sometimes very strong magnetic field, making them more suitable for use in models, robotics and servos.
Although DC brushed motors are very efficient and cheap, problems associated with the brushed DC motor is that sparking occurs under heavy load conditions between the two surfaces of the commutator and carbon brushes resulting in self generating heat, short life span and electrical noise due to sparking, which can damage any semiconductor switching device such as a MOSFET or transistor. To overcome these disadvantages, Brushless DC Motors were developed.

The "Brushless" DC Motor

The brushless DC motor (BDCM) is very similar to a permanent magnet DC motor, but does not have any brushes to replace or wear out due to commutator sparking. Therefore, little heat is generated in the rotor increasing the motors life. The design of the brushless motor eliminates the need for brushes by using a more complex drive circuit were the rotor magnetic field is a permanent magnet which is always in synchronisation with the stator field allows for a more precise speed and torque control. Then the construction of a brushless DC motor is very similar to the AC motor making it a true synchronous motor but one disadvantage is that it is more expensive than an equivalent "brushed" motor design.
The control of the brushless DC motors is very different from the normal brushed DC motor, in that it this type of motor incorporates some means to detect the rotors angular position (or magnetic poles) required to produce the feedback signals required to control the semiconductor switching devices. The most common position/pole sensor is the "Hall Effect Sensor", but some motors also use optical sensors.
Using Hall effect sensors, the polarity of the electromagnets is switched by the motor control drive circuitry. Then the motor can be easily synchronized to a digital clock signal, providing precise speed control. Brushless DC motors can be constructed to have, an external permanent magnet rotor and an internal electromagnet stator or an internal permanent magnet rotor and an external electromagnet stator.
Advantages of the Brushless DC Motor compared to its "brushed" cousin is higher efficiencies, high reliability, low electrical noise, good speed control and more importantly, no brushes or commutator to wear out producing a much higher speed. However their disadvantage is that they are more expensive and more complicated to control.

The DC Servo Motor

DC Servo motors are used in closed loop type applications were the position of the output motor shaft is fed back to the motor control circuit. Typical positional "Feedback" devices include Resolvers, Encoders and Potentiometers as used in radio control models such as airplanes and boats etc. A servo motor generally includes a built-in gearbox for speed reduction and is capable of delivering high torques directly. The output shaft of a servo motor does not rotate freely as do the shafts of DC motors because of the gearbox and feedback devices attached.

DC Servo Motor Block Diagram

DC Servo Motor

A servo motor consists of a DC motor, reduction gearbox, positional feedback device and some form of error correction. The speed or position is controlled in relation to a positional input signal or reference signal applied to the device.
RC Servo Motor
RC Servo Motor
The error detection amplifier looks at this input signal and compares it with the feedback signal from the motors output shaft and determines if the motor output shaft is in an error condition and, if so, the controller makes appropriate corrections either speeding up the motor or slowing it down. This response to the positional feedback device means that the servo motor operates within a "Closed Loop System".
As well as large industrial applications, servo motors are also used in small remote control models and robotics, with most servo motors being able to rotate up to about 180 degrees in both directions making them ideal for accurate angular positioning. However, these RC type servos are unable to continually rotate at high speed like conventional DC motors unless specially modified.
A servo motor consist of several devices in one package, the motor, gearbox, feedback device and error correction for controlling position, direction or speed. They are widley used in robotics and models as they are easily controlled using just three wires, PowerGround and Signal Control.

DC Motor Switching and Control

Small DC motors can be switched "On" or "Off" by means of switches, relays, transistors or mosfet circuits with the simplest form of motor control being "Linear" control. This type of circuit uses a bipolarTransistor as a Switch (A Darlington transistor may also be used were a higher current rating is required) to control the motor from a single power supply.
By varying the amount of base current flowing into the transistor the speed of the motor can be controlled for example, if the transistor is turned on "half way", then only half of the supply voltage goes to the motor. If the transistor is turned "fully ON" (saturated), then all of the supply voltage goes to the motor and it rotates faster. Then for this linear type of control, power is delivered constantly to the motor as shown below.

Unipolar Transistor Switch

Unipolar Transistor Switch
The simple switching circuit on the left, shows the circuit for a Uni-directional (one direction only) motor control circuit. A continuous logic "1" or logic "0" is applied to the input of the circuit to turn the motor "ON" (saturation) or "OFF" (cut-off) respectively.
A flywheel diode is connected across the motor terminals to protect the switching transistor or MOSFET from any back emf generated by the motor when the transistor turns the supply "OFF".
As well as the basic "ON/OFF" control the same circuit can also be used to control the motors rotational speed. By repeatedly switching the motor current "ON" and "OFF" at a high enough frequency, the speed of the motor can be varied between stand still (0 rpm) and full speed (100%). This is achieved by varying the proportion of "ON" time (tON) to the "OFF" time (tOFF) and this can be achieved using a process known as Pulse Width Modulation.

Pulse Width Speed Control

The rotational speed of a DC motor is directly proportional to the mean (average) value of its supply voltage and the higher this value, up to maximum allowed motor volts, the faster the motor will rotate. In other words more voltage more speed. By varying the ratio between the "ON" (tON) time and the "OFF" (tOFF) time durations, called the "Duty Ratio", "Mark/Space Ratio" or "Duty Cycle", the average value of the motor voltage and hence its rotational speed can be varied. For simple unipolar drives the duty ratioβ is given as:
Duty Cycle
and the mean DC output voltage fed to the motor is given as: Vmean = β x Vsupply. Then by varying the width of pulse a, the motor voltage and hence the power applied to the motor can be controlled and this type of control is called Pulse Width Modulation or PWM.
Another way of controlling the rotational speed of the motor is to vary the frequency (and hence the time period of the controlling voltage) while the "ON" and "OFF" duty ratio times are kept constant. This type of control is called Pulse Frequency Modulation or PFM. With pulse frequency modulation, the motor voltage is controlled by applying pulses of variable frequency for example, at a low frequency or with very few pulses the average voltage applied to the motor is low, and therefore the motor speed is slow. At a higher frequency or with many pulses, the average motor terminal voltage is increased and the motor speed will also increase.
Then, Transistors can be used to control the amount of power applied to a DC motor with the mode of operation being either "Linear" (varying motor voltage), "Pulse Width Modulation" (varying the width of the pulse) or "Pulse Frequency Modulation" (varying the frequency of the pulse).

H-bridge Motor Control

While controlling the speed of a DC motor with a single transistor has many advantages it also has one main disadvantage, the direction of rotation is always the same, its a "Uni-directional" circuit. In many applications we need to operate the motor in both directions forward and back. One very good way of achieving this is to connect the motor into a Transistor H-bridge circuit arrangement and this type of circuit will give us "Bi-directional" DC motor control as shown below.

Basic Bi-directional H-bridge Circuit

H-Bridge Circuit

The H-bridge circuit above, is so named because the basic configuration of the four switches, either electro-mechanical relays or transistors resembles that of the letter "H" with the motor positioned on the centre bar. The Transistor or MOSFET H-bridge is probably one of the most commonly used type of bi-directional DC motor control circuits. It uses "complementary transistor pairs" both NPN and PNP in each branch with the transistors being switched together in pairs to control the motor.
Control input A operates the motor in one direction ie, Forward rotation while input B operates the motor in the other direction ie, Reverse rotation. Then by switching the transistors "ON" or "OFF" in their "diagonal pairs" results in directional control of the motor.
For example, when transistor TR1 is "ON" and transistor TR2 is "OFF", point A is connected to the supply voltage (+Vcc) and if transistor TR3 is "OFF" and transistor TR4 is "ON" point B is connected to 0 volts (GND). Then the motor will rotate in one direction corresponding to motor terminal A being positive and motor terminal B being negative. If the switching states are reversed so that TR1 is "OFF", TR2 is "ON", TR3 is "ON" and TR4 is "OFF", the motor current will now flow in the opposite direction causing the motor to rotate in the opposite direction.
Then, by applying opposite logic levels "1" or "0" to the inputs A and B the motors rotational direction can be controlled as follows.

H-bridge Truth Table

Input AInput BMotor Function
TR1 and TR4TR2 and TR3
00Motor Stopped (OFF)
10Motor Rotates Forward
01Motor Rotates Reverse
It is important that no other combination of inputs are allowed as this may cause the power supply to be shorted out, ie both transistors, TR1 and TR2 switched "ON" at the same time, (fuse = bang!).
As with uni-directional DC motor control as seen above, the rotational speed of the motor can also be controlled using Pulse Width Modulation or PWM. Then by combining H-bridge switching with PWM control, both the direction and the speed of the motor can be accurately controlled. Commercial off the shelf decoder IC's such as the SN754410 Quad Half H-Bridge IC or the L298N which has 2 H-Bridges are available with all the necessary control and safety logic built in are specially designed for H-bridge bi-directional motor control circuits.

The Stepper Motor

Like the DC motor above, Stepper Motors are also electromechanical actuators that convert a pulsed digital input signal into a discrete (incremental) mechanical movement are used widely in industrial control applications. A stepper motor is a type of synchronous brushless motor in that it does not have an armature with a commutator and carbon brushes but has a rotor made up of many, some types have hundreds of permanent magnetic teeth and a stator with individual windings.
Stepper Motor
Stepper Motor
As it name implies, a stepper motor does not rotate in a continuous fashion like a conventional DC motor but moves in discrete "Steps" or "Increments", with the angle of each rotational movement or step dependant upon the number of stator poles and rotor teeth the stepper motor has.
Because of their discrete step operation, stepper motors can easily be rotated a finite fraction of a rotation at a time, such as 1.8, 3.6, 7.5 degrees etc. So for example, lets assume that a stepper motor completes one full revolution (360o in exactly 100 steps. Then the step angle for the motor is given as 360 degrees/100 steps = 3.6 degrees per step. This value is commonly known as the stepper motors Step Angle.
There are three basic types of stepper motor, Variable Reluctance,Permanent Magnet and Hybrid (a sort of combination of both). A Stepper Motor is particularly well suited to applications that require accurate positioning and repeatability with a fast response to starting, stopping, reversing and speed control and another key feature of the stepper motor, is its ability to hold the load steady once the require position is achieved.
Generally, stepper motors have an internal rotor with a large number of permanent magnet "teeth" with a number of electromagnet "teeth" mounted on to the stator. The stators electromagnets are polarized and depolarized sequentially, causing the rotor to rotate one "step" at a time.
Modern multi-pole, multi-teeth stepper motors are capable of accuracies of less than 0.9 degs per step (400 Pulses per Revolution) and are mainly used for highly accurate positioning systems like those used for magnetic-heads in floppy/hard disc drives, printers/plotters or robotic applications. The most commonly used stepper motor being the 200 step per revolution stepper motor. It has a 50 teeth rotor, 4-phase stator and a step angle of 1.8 degrees (360 degs/(50x4)).

Stepper Motor Construction and Control

Variable Reluctance Stepper Motor

In our simple example of a variable reluctance stepper motor above, the motor consists of a central rotor surrounded by four electromagnetic field coils labelled ABC and D. All the coils with the same letter are connected together so that energising, say coils marked A will cause the magnetic rotor to align itself with that set of coils. By applying power to each set of coils in turn the rotor can be made to rotate or "step" from one position to the next by an angle determined by its step angle construction, and by energising the coils in sequence the rotor will produce a rotary motion.
The stepper motor driver controls both the step angle and speed of the motor by energising the field coils in a set sequence for example, "ADCB, ADCB, ADCB, A..." etc, the rotor will rotate in one direction (forward) and by reversing the pulse sequence to "ABCD, ABCD, ABCD, A..." etc, the rotor will rotate in the opposite direction (reverse).
So in our simple example above, the stepper motor has four coils, making it a 4-phase motor, with the number of poles on the stator being eight (2 x 4) which are spaced at 45 degree intervals. The number of teeth on the rotor is six which are spaced 60 degrees apart. Then there are 24 (6 teeth x 4 coils) possible positions or "steps" for the rotor to complete one full revolution. Therefore, the step angle above is given as:   360o/24 = 15o.
Obviously, the more rotor teeth and or stator coils would result in more control and a finer step angle. Also by connecting the electrical coils of the motor in different configurations, Full, Half and micro-step angles are possible. However, to achieve micro-stepping, the stepper motor must be driven by a (quasi) sinusoidal current that is expensive to implement.
It is also possible to control the speed of rotation of a stepper motor by altering the time delay between the digital pulses applied to the coils (the frequency), the longer the delay the slower the speed for one complete revolution. By applying a fixed number of pulses to the motor, the motor shaft will rotate through a given angle and so there would be no need for any form of additional feedback because by counting the number of pulses given to the motor the final position of the rotor will be exactly known. This response to a set number of digital input pulses allows the stepper motor to operate in an "Open Loop System" making it both easier and cheaper to control.
For example, lets assume that our stepper motor above has a step angle of 3.6 degs per step. To rotate the motor through an angle of say 216 degrees and then stop again at the require position would only need a total of: 216 degrees/(3.6 degs/step) = 80 pulses applied to the stator coils.
There are many stepper motor controller IC's available which can control the step speed, speed of rotation and motors direction. One such controller IC is the SAA1027 which has all the necessary counter and code conversion built-in, and can automatically drive the 4 fully controlled bridge outputs to the motor in the correct sequence. The direction of rotation can also be selected along with single step mode or continuous (stepless) rotation in the selected direction, but this puts some burden on the controller. When using an 8-bit digital controller, 256 microsteps per step are also possible

SAA1027 Stepper Motor Control Chip

saa1027 stepper motor control chip

Linear Solenoid

The Linear Solenoid

Linear SolenoidAnother type of electromagnetic actuator that converts an electrical signal into a magnetic field is called a Solenoid. The linear solenoid
works on the same basic principal as the electromechanical relay (EMR) seen in the previous tutorial and like relays, they can also be controlled by transistors or MOSFET. A Linear Solenoid is an electromagnetic device that converts electrical energy into a mechanical pushing or pulling force or motion.

Linear Solenoid
Solenoids basically consist of an electrical coil wound around a cylindrical tube with a ferro-magnetic actuator or "plunger" that is free to move or slide "IN" and "OUT" of the coils body.Solenoids are available in a variety of formats with the more common types being the linear solenoid also known as the linear electromechanical actuator (LEMA) and the rotary solenoid.
Both types, linear and rotational are available as either a holding (continuously energised) or as a latching type (ON-OFF pulse) with the latching types being used in either energised or power-off applications. Linear solenoids can also be designed for proportional motion control were the plunger position is proportional to the power input.
When electrical current flows through a conductor it generates a magnetic field, and the direction of this magnetic field with regards to its North and South Poles is determined by the direction of the current flow within the wire. This coil of wire becomes an "Electromagnet" with its own north and south poles exactly the same as that for a permanent type magnet. The strength of this magnetic field can be increased or decreased by either controlling the amount of current flowing through the coil or by changing the number of turns or loops that the coil has. An example of an "Electromagnet" is given below.

Magnetic Field produced by a Coil

Electromagnetic Coil

When an electrical current is passed through the coils windings, it behaves like an electromagnet and the plunger, which is located inside the coil, is attracted towards the centre of the coil by the magnetic flux setup within the coils body, which inturn compresses a small spring attached to one end of the plunger. The force and speed of the plungers movement is determined by the strength of the magnetic flux generated within the coil.
When the supply current is turned "OFF" (de-energised) the electromagnetic field generated previously by the coil collapses and the energy stored in the compressed spring forces the plunger back out to its original rest position. This back and forth movement of the plunger is known as the solenoids "Stroke", in other words the maximum distance the plunger can travel in either an "IN" or an "OUT" direction, for example, 0 - 30mm.

Linear Solenoids

This type of solenoid is generally called a Linear Solenoid due to the linear directional movement of the plunger. Linear solenoids are available in two basic configurations called a "Pull-type" as it pulls the connected load towards itself when energised, and the "Push-type" that act in the opposite direction pushing it away from itself when energised. Both push and pull types are generally constructed the same with the difference being in the location of the return spring and design of the plunger.

Pull-type Linear Solenoid Construction

linear solenoid construction

Linear solenoids are useful in many applications that require an open or closed (in or out) type motion such as electronically activated door locks, pneumatic or hydraulic control valves, robotics, automotive engine management, irrigation valves to water the garden and even the "Ding-Dong" door bell has one. They are available as open frame, closed frame or sealed tubular types.

Rotary Solenoids

Most electromagnetic solenoids are linear devices producing a linear back and forth force or motion. However, rotational solenoids are also available which produce an angular or rotary motion from a neutral position in either clockwise, anti-clockwise or in both directions (bi-directional).
Rotary Solenoid
Rotary Solenoid
Rotary solenoids can be used to replace small DC motors or stepper motors were the angular movement is very small with the angle of rotation being the angle moved from the start to the end position. Commonly available rotary solenoids have movements of 25, 35, 45, 60 and 90o as well as multiple movements to and from a certain angle such as a 2-position self restoring or return to zero rotation, for example 0-to-90-to-0o, 3-position self restoring, for example 0o to +45o or 0o to -45o as well as 2-position latching.
Rotary solenoids produce a rotational movement when either energised, de-energised, or a change in the polarity of an electromagnetic field alters the position of a permanent magnet rotor. Their construction consists of an electrical coil wound around a steel frame with a magnetic disk connected to an output shaft positioned above the coil. When the coil is energised the electromagnetic field generates multiple north and south poles which repel the adjacent permanent magnetic poles of the disk causing it to rotate at an angle determined by the mechanical construction of the rotary solenoid.
Rotary solenoids are used in vending or gaming machines, valve control, camera shutter with special high speed, low power or variable positioning solenoids with high force or torque are available such as those used in dot matrix printers, typewriters, automatic machines or automotive applications etc.

Solenoid Switching

Generally solenoids either linear or rotary operate with the application of a DC voltage, but they can also be used with AC sinusoidal voltages by using full wave bridge rectifiers to rectify the supply which then can be used to switch the DC solenoid. Small DC type solenoids can be easily controlled usingTransistor or MOSFET switches and are ideal for use in robotic applications, but again as we saw with relays, solenoids are "inductive" devices so some form of electrical protection is required across the solenoid coil to prevent high back emf voltages from damaging the semiconductor switching device. In this case the standard "Flywheel Diode" is used.

Switching Solenoids using a Transistor

Solenoid Switch

Reducing Energy Consumption

One of the main disadvantages of solenoids and especially the linear solenoid is that they are "inductive devices" which convert some of the electrical current into "HEAT", in other words they get hot!, and the longer the time that the power is applied to a solenoid coil, the hotter the coil will become. Also as the coil heats up, its electrical resistance also changes allowing more current to flow.
With a continuous voltage input applied to the coil, the solenoids coil does not have the opportunity to cool down because the input power is always on. In order to reduce this self generated heating effect it is necessary to reduce either the amount of time the coil is energised or reduce the amount of current flowing through it.
One method of consuming less current is to apply a suitable high enough voltage to the solenoid coil so as to provide the necessary electromagnetic field to operate and seat the plunger but then once activated to reduce the coils supply voltage to a level sufficient to maintain the plunger in its seated or latched position. One way of achieving this is to connect a suitable "holding" resistor in series with the solenoids coil, for example:

Reducing Solenoid Energy Consumption

Holding Resistor

Here, the switch contacts are closed shorting out the resistance and passing the full supply current directly to the solenoid coils windings. Once energised the contacts which can be mechanically connected to the solenoids plunger action open connecting the holding resistor, RH in series with the solenoids coil. This effectively connects thr resistor in series with the coil.
By using this method, the solenoid can be connected to its voltage supply indefinitely (continuous duty cycle) as the power consumed by the coil and the heat generated is greatly reduced, which can be up to 85 to 90% using a suitable power resistor. However, the power consumed by the resistor will also generate a certain amount of heat, I2R (Ohm's Law) and this also needs to be taken into account.

Duty Cycle

Another more practical way of reducing the heat generated by the solenoids coil is to use an "intermittent duty cycle". An intermittent duty cycle means that the coil is repeatedly switched "ON" and "OFF" at a suitable frequency so as to activate the plunger mechanism but not allow it to de-energise during the OFF period of the waveform. Intermittent duty cycle switching is a very effective way to reduce the total power consumed by the coil.
The Duty Cycle (%ED) of a solenoid is the portion of the "ON" time that a solenoid is energised and is the ratio of the "ON" time to the total "ON" and "OFF" time for one complete cycle of operation. In other words, the cycle time equals the switched-ON time plus the switched-OFF time. Duty cycle is expressed as a percentage, for example:

Intermittent Duty Cycle

Duty Cycle
Then if a solenoid is switched "ON" or energised for 30 seconds and then switched "OFF" for 90 seconds before being re-energised again, one complete cycle, the total "ON/OFF" cycle time would be 120 seconds, (30+90) so the solenoids duty cycle would be calculated as 30/120 secs or 25%. This means that you can determine the solenoids maximum switch-ON time if you know the values of duty cycle and switch-OFF time.
For example, the switch-OFF time equals 15 secs, duty cycle equals 40%, therefore switch-ON time equals 10 secs. A solenoid with a rated Duty Cycle of 100% means that it has a continuous voltage rating and can therefore be left "ON" or continuously energised without overheating or damage.

The Electrical Relay

Electrical Relays

Thus far we have seen a selection of Input devices that can be used to detect or "sense" a variety of physical variables and signals and are therefore called Sensors. But there are also a variety of devices which are
classed as Output devices used to control or operate some external physical process. These output devices are commonly called Actuators.
Actuators convert an electrical signal into a corresponding physical quantity such as movement, force, sound etc. An actuator is also a transducer because it changes one type of physical quantity into another and is usually activated or operated by a low voltage command signal. Actuators can be classed as either binary or continuous devices based upon the number of stable states their output has.
For example, a relay is a binary actuator as it has two stable states, either energised and latched or de-energised and unlatched, while a motor is a continuous actuator because it can rotate through a full 360o motion. The most common types of actuators or output devices are Electrical RelaysLights,Motors and Loudspeakers and in this tutorial we will look at electrical relays, also called electromechanical relays and solid state relays or SSR's.

The Electromechanical Relay

The term Relay generally refers to a device that provides an electrical connection between two or more points in response to the application of a control signal. The most common and widely used type of electrical relay is the electromechanical relay or EMR.
Electrical Relay
Electrical Relay
The most fundamental control of any equipment is the ability to turn it "ON" and "OFF". The easiest way to do this is using switches to interrupt the electrical supply. Although switches can be used to control something, they have their disadvantages. The biggest one is that they have to be manually (physically) turned "ON" or "OFF". Also, they are relatively large, slow and only switch small electrical currents.
Electrical Relays however, are basically electrically operated switches that come in many shapes, sizes and power ratings suitable for all types of applications. Relays can also have single or multiple contacts with the larger power relays used for high voltage or current switching being called "contactors".
In this tutorial about electrical relays we are just concerned with the fundamental operating principles of "light duty" electromechanical relays we can use in motor control or robotic circuits. Such relays are used in general electrical and electronic control or switching circuits either mounted directly onto PCB boards or connected free standing and in which the load currents are normally fractions of an ampere up to 20+ amperes.
As their name implies, electromechanical relays are electro-magnetic devices that convert a magnetic flux generated by the application of a low voltage electrical control signal either AC or DC across the relay terminals, into a pulling mechanical force which operates the electrical contacts within the relay. The most common form of electromechanical relay consist of an energizing coil called the "primary circuit" wound around a permeable iron core.
This iron core has both a fixed portion called the yoke, and a moveable spring loaded part called the armature, that completes the magnetic field circuit by closing the air gap between the fixed electrical coil and the moveable armature. The armature is hinged or pivoted allowing it to freely move within the generated magnetic field closing the electrical contacts that are attached to it. Connected between the yoke and armature is normally a spring (or springs) for the return stroke to "reset" the contacts back to their initial rest position when the relay coil is in the "de-energized" condition, ie. turned "OFF".

Electromechanical Relay Construction

Electromechanical Relay

In our simple relay above, we have two sets of electrically conductive contacts. Relays may be "Normally Open", or "Normally Closed". One pair of contacts are classed as Normally Open, (NO) or make contacts and another set which are classed as Normally Closed, (NC) or break contacts. In the normally open position, the contacts are closed only when the field current is "ON" and the switch contacts are pulled towards the inductive coil.
In the normally closed position, the contacts are permanently closed when the field current is "OFF" as the switch contacts return to their normal position. These terms Normally Open, Normally Closed orMake and Break Contacts refer to the state of the electrical contacts when the relay coil is "de-energized", i.e, no supply voltage connected to the inductive coil. An example of this arrangement is given below.
Contact Tips
The relays contacts are electrically conductive pieces of metal which touch together completing a circuit and allow the circuit current to flow, just like a switch. When the contacts are open the resistance between the contacts is very high in the Mega-Ohms, producing an open circuit condition and no circuit current flows.
When the contacts are closed the contact resistance should be zero, a short circuit, but this is not always the case. All relay contacts have a certain amount of "contact resistance" when they are closed and this is called the "On-Resistance", similar to FET's.
With a new relay and contacts this ON-resistance will be very small, generally less than 0.2Ω's because the tips are new and clean, but over time the tip resistance will increase.
For example. If the contacts are passing a load current of say 10A, then the voltage drop across the contacts using Ohms Law is 0.2 x 10 = 2 volts, which if the supply voltage is say 12 volts then the load voltage will be only 10 volts (12 - 2). As the contact tips begin to wear, and if they are not properly protected from high inductive or capacitive loads, they will start to show signs of arcing damage as the circuit current still wants to flow as the contacts begin to open when the relay coil is de-energized.
This arcing or sparking across the contacts will cause the contact resistance of the tips to increase further as the contact tips become damaged. If allowed to continue the contact tips may become so burnt and damaged to the point were they are physically closed but do not pass any or very little current.
If this arcing damage becomes to severe the contacts will eventually "weld" together producing a short circuit condition and possible damage to the circuit they are controlling. If now the contact resistance has increased due to arcing to say 1Ω's the volt drop across the contacts for the same load current increases to 1 x 10 = 10 volts dc. This high voltage drop across the contacts may be unacceptable for the load circuit especially if operating at 12 or even 24 volts, then the faulty relay will have to be replaced.
To reduce the effects of contact arcing and high "On-resistances", modern contact tips are made of, or coated with, a variety of silver based alloys to extend their life span as given in the following table.

Contact Tip Materials

Contact Tip
(fine silver)
Electrical and thermal conductivity are the highest of all metals, exhibits low contact resistance, is inexpensive and widely used.
Contacts tarnish through sulphur influence.
(silver copper)
"Hard silver", better wear resistance and less tendency to weld, but slightly higher contact resistance.
(silver cadmium oxide)
Very little tendency to weld, good wear resistance and arc extinguishing properties.
(silver tungsten)
Hardness and melting point are high, arc resistance is excellent.
Not a precious metal.
High contact pressure is required.
Contact resistance is relatively high, and resistance to corrosion is poor.
(silver nickel)
Equals the electrical conductivity of silver, excellent arc resistance.
(silver palladium)
Low contact wear, greater hardness.
platinum, gold and
silver alloys
Excellent corrosion resistance, used mainly for low-current circuits.

Relay manufacturers data sheets give maximum contact ratings for resistive DC loads only and this rating is greatly reduced for either AC loads or highly inductive or capacitive loads. In order to achieve long life and high reliability when switching AC currents with inductive or capacitive loads some form of arc suppression or filtering is required across the relay contacts.
Extending the life of relay tips by reducing the amount of arcing generated as they open is achieved by connecting a Resistor-Capacitor network called an RC Snubber Network electrically in parallel with the contact tips. The voltage peak, which occurs at the instant the contacts open, will be safely short circuited by the RC network, thus suppressing any arc generated at the contact tips. For example.

Relay Snubber Circuit

RC Snubber Network

Relay Contact Types.

As well as the standard descriptions of Normally Open, (NO) and Normally Closed, (NC) used to describe how the relays contacts are connected, relay contact arrangements can also be classed by their actions. Electrical relays can be made up of one or more individual switch contacts with each "contact" being referred to as a "pole". Each one of these contacts or poles can be connected or "thrown" together by energizing the relays coil and this gives rise to the description of the contact types as being:
      SPST - Single Pole Single Throw
      SPDT - Single Pole Double Throw
      DPST - Double Pole Single Throw
      DPDT - Double Pole Double Throw
with the action of the contacts being described as "Make" (M) or "Break" (B). Then a simple relay with one set of contacts as shown above can have a contact description of:

      "Single Pole Double Throw - (Break before Make)", or SPDT - (B-M).
Examples of just some of the more common contact types for relays in circuit or schematic diagrams is given below but there are many more possible configurations.

Relay Contact Configurations

Relay Contact Configurations
  • Where:
  •     C is the Common terminal
  •     NO is the Normally Open contact
  •     NC is the Normally Closed contact
One final point to remember, it is not advisable to connect relay contacts in parallel to handle higher load currents. For example, never attempt to supply a 10A load with two relays in parallel that have 5A contact ratings each as the relay contacts never close or open at exactly the same instant of time, so one relay contact is always overloaded.
While relays can be used to allow low power electronic or computer type circuits to switch a relatively high currents or voltages both "ON" or "OFF". Never mix different load voltages through adjacent contacts within the same relay such as for example, high voltage AC (240v) and low voltage DC (12v), always use sperate relays for safety.
One of the more important parts of any relay is the coil. This converts electrical current into an electromagnetic flux which is used to operate the relays contacts. The main problem with relay coils is that they are "highly inductive loads" as they are made from coils of wire. Any coil of wire has an impedance value made up of resistance ( R ) and inductance ( L ) in series (RL Series Circuit).
As the current flows through the coil a self induced magnetic field is generated around it. When the current in the coil is turned "OFF", a large back emf (electromotive force) voltage is produced as the magnetic flux collapses within the coil (transformer theory). This induced reverse voltage value may be very high in comparison to the switching voltage, and may damage any semiconductor device such as a transistor, FET or microcontroller used to operate the relay coil.
Flywheel Diode
One way of preventing damage to the transistor or any switching semiconductor device, is to connect a reverse biased diode across the relay coil.
When the current flowing through the coil is switched "OFF", an induced back emf is generated as the magnetic flux collapses in the coil.
This reverse voltage forward biases the diode which conducts and dissipates the stored energy preventing any damage to the semiconductor transistor.
When used in this type of application the diode is generally known as a Flywheel DiodeFree-wheeling Diode and even Fly-back Diode, but they all mean the same thing. Other types of inductive loads which require a flywheel diode for protection are solenoids, motors and inductive coils.
As well as using flywheel Diodes for protection of semiconductor components, other devices used for protection include RC Snubber NetworksMetal Oxide Varistors or MOV and Zener Diodes.

The Solid State Relay.

While the electromechanical relay (EMR) are inexpensive, easy to use and allow the switching of a load circuit controlled by a low power, electrically isolated input signal, one of the main disadvantages of an electromechanical relay is that it is a "mechanical device", that is it has moving parts so their switching speed (response time) due to physically movement of the metal contacts using a magnetic field is slow.
Over a period of time these moving parts will wear out and fail, or that the contact resistance through the constant arcing and erosion may make the relay unusable and shortens its life. Also, they are electrically noisy with the contacts suffering from contact bounce which may affect any electronic circuits to which they are connected.
To overcome these disadvantages of the electrical relay, another type of relay called a Solid State Relayor (SSR) for short was developed which is a solid state contactless, pure electronic relay. It has no moving parts with the contacts being replaced by transistors, thyristors or triacs. The electrical separation between the input control signal and the output load voltage is accomplished with the aid of an opto-coupler type Light Sensor.
The Solid State Relay provides a high degree of reliability, long life and reduced electromagnetic interference (EMI), (no arcing contacts or magnetic fields), together with a much faster almost instant response time, as compared to the conventional electromechanical relay. Also the input control power requirements of the solid state relay are generally low enough to make them compatible with most IC logic families without the need for additional buffers, drivers or amplifiers. However, being a semiconductor device they must be mounted onto suitable heatsinks to prevent the output switching semiconductor device from over heating.

Solid State Relay

Solid State Relay

The AC type Solid State Relay turns "ON" at the zero crossing point of the AC sinusoidal waveform, prevents high inrush currents when switching inductive or capacitive loads while the inherent turn "OFF" feature of Thyristors and Triacs provides an improvement over the arcing contacts of the electromechanical relays.
Like the electromechanical relays, a Resistor-Capacitor (RC) snubber network is generally required across the output terminals of the SSR to protect the semiconductor output switching device from noise and voltage transient spikes when used to switch highly inductive or capacitive loads. In most modern SSR's this RC snubber network is built as standard into the relay itself reducing the need for additional external components.
Non-zero crossing detection switching (instant "ON") type SSR's are also available for phase controlled applications such as the dimming or fading of lights at concerts, shows, disco lighting etc, or for motor speed control type applications.
As the output switching device of a solid state relay is a semiconductor device (Transistor for DC switching applications, or a Triac/Thyristor combination for AC switching), the voltage drop across the output terminals of an SSR when "ON" is much higher than that of the electromechanical relay, typically 1.5 - 2.0 volts. If switching large currents for long periods of time an additional heat sink will be required.

Input/Output Interface Modules.

Input/Output Interface Modules, (I/O Modules) are another type of solid state relay designed specifically to interface computers, micro-controller or PIC's to "real world" loads and switches. There are four basic types of I/O modules available, AC or DC Input voltage to TTL or CMOS logic level output, and TTL or CMOS logic input to an AC or DC Output voltage with each module containing all the necessary circuitry to provide a complete interface and isolation within one small device. They are available as individual solid state modules or integrated into 4, 8 or 16 channel devices.

Modular Input/Output Interface System.

Input/Output Interface Module

The main disadvantages of solid state relays (SSR's) compared to that of an equivalent wattage electromechanical relay is their higher costs, the fact that only single pole single throw (SPST) types are available, "OFF"-state leakage currents flow through the switching device, high "ON"-state voltage drop and power dissipation resulting in additional heat sinking requirements. Also they can not switch very small load currents or high frequency signals such as audio or video signals although special Solid State Switches are available for this type of application.

The Light Sensor

Light Sensors

Light Sensor generates an output signal indicating the intensity of light by measuring the radiant energy that exists in a very narrow range of frequencies basically called "light", and which ranges in frequency from "
Infrared" to "Visible" up to "Ultraviolet" light spectrum. The light sensor is a passive devices that convert this "light energy" whether visible or in the infrared parts of the spectrum into an electrical signal output. Light sensors are more commonly known as "Photoelectric Devices" or "Photo Sensors" becuse the convert light energy (photons) into electricity (electrons).
Photoelectric devices can be grouped into two main categories, those which generate electricity when illuminated, such as Photo-voltaics or Photo-emissives etc, and those which change their electrical properties in some way such as Photo-resistors or Photo-conductors. This leads to the following classification of devices.
  • • Photo-emissive Cells - These are photodevices which release free electrons from a light sensitive material such as caesium when struck by a photon of sufficient energy. The amount of energy the photons have depends on the frequency of the light and the higher the frequency, the more energy the photons have converting light energy into electrical energy.
  • • Photo-conductive Cells - These photodevices vary their electrical resistance when subjected to light. Photoconductivity results from light hitting a semiconductor material which controls the current flow through it. Thus, more light increase the current for a given applied voltage. The most common photoconductive material is Cadmium Sulphide used in LDR photocells.
  • • Photo-voltaic Cells - These photodevices generate an emf in proportion to the radiant light energy received and is similar in effect to photoconductivity. Light energy falls on to two semiconductor materials sandwiched together creating a voltage of approximately 0.5V. The most common photovoltaic material is Selenium used in solar cells.
  • • Photo-junction Devices - These photodevices are mainly true semiconductor devices such as the photodiode or phototransistor which use light to control the flow of electrons and holes across their PN-junction. Photojunction devices are specifically designed for detector application and light penetration with their spectral response tuned to the wavelength of incident light.

The Photoconductive Cell

Photoconductive light sensor does not produce electricity but simply changes its physical properties when subjected to light energy. The most common type of photoconductive device is the Photoresistorwhich changes its electrical resistance in response to changes in the light intensity. Photoresistors areSemiconductor devices that use light energy to control the flow of electrons, and hence the current flowing through them. The commonly used Photoconductive Cell is called the Light Dependent Resistor or LDR.

The Light Dependent Resistor

Typical LDR
As its name implies, the Light Dependent Resistor (LDR) is made from a piece of exposed semiconductor material such as cadmium sulphide that changes its electrical resistance from several thousand Ohms in the dark to only a few hundred Ohms when light falls upon it by creating hole-electron pairs in the material.
The net effect is an improvement in its conductivity with a decrease in resistance for an increase in illumination. Also, photoresistive cells have a long response time requiring many seconds to respond to a change in the light intensity.
Materials used as the semiconductor substrate include, lead sulphide (PbS), lead selenide (PbSe), indium antimonide (InSb) which detect light in the infra-red range with the most commonly used of all photoresistive light sensors being Cadmium Sulphide (Cds). Cadmium sulphide is used in the manufacture of photoconductive cells because its spectral response curve closely matches that of the human eye and can even be controlled using a simple torch as a light source. Typically then, it has a peak sensitivity wavelength (λp) of about 560nm to 600nm in the visible spectral range.

The Light Dependent Resistor Cell

Light Dependent Resistor Cell, LDR
The most commonly used photoresistive light sensor is the ORP12 Cadmium Sulphide photoconductive cell. This light dependent resistor has a spectral response of about 610nm in the yellow to orange region of light. The resistance of the cell when unilluminated (dark resistance) is very high at about 10MΩ's which falls to about 100Ω's when fully illuminated (lit resistance).
To increase the dark resistance and therefore reduce the dark current, the resistive path forms a zigzag pattern across the ceramic substrate. The CdS photocell is a very low cost device often used in auto dimming, darkness or twilight detection for turning the street lights "ON" and "OFF", and for photographic exposure meter type applications.
LDR voltage divider
Connecting a light dependant resistor in series with a standard resistor like this across a single DC supply voltage has one major advantage, a different voltage will appear at their junction for different levels of light.
The amount of voltage drop across series resistor, R2 is determined by the resistive value of the light dependant resistor, RLDR. This ability to generate different voltages produces a very handy circuit called a "Potential Divider" orVoltage Divider Network.
As we know, the current through a series circuit is common and as the LDR changes its resistive value due to the light intensity, the voltage present at VOUT will be determined by the voltage divider formula. An LDR’s resistance, RLDR can vary from about 100Ω's in the sun light, to over 10MΩ's in absolute darkness with this variation of resistance being converted into a voltage variation at VOUT as shown.
One simple use of a Light Dependent Resistor, is as a light sensitive switch as shown below.
Simple LDR Switch
LDR Switch
This basic light sensor circuit is of a relay output light activated switch. A potential divider circuit is formed between the photoresistor, LDR and the resistor R1. When no light is present ie in darkness, the resistance of the LDR is very high in the Megaohms range so zero base bias is applied to the transistor TR1 and the relay is de-energised or "OFF".
As the light level increases the resistance of theLDR starts to decrease causing the base bias voltage at V1 to rise. At some point determined by the potential divider network formed with resistorR1, the base bias voltage is high enough to turn the transistor TR1 "ON" and thus activate the relay which inturn is used to control some external circuitry. As the light level falls back to darkness again the resistance of the LDR increases causing the base voltage of the transistor to decrease, turning the transistor and relay "OFF" at a fixed light level determined again by the potential divider network.
By replacing the fixed resistor R1 with a potentiometer VR1, the point at which the relay turns "ON" or "OFF" can be pre-set to a particular light level. This type of simple circuit shown above has a fairly low sensitivity and its switching point may not be consistent due to variations in either temperature or the supply voltage. A more sensitive precision light activated circuit can be easily made by incorporating the LDR into a "Wheatstone Bridge" arrangement and replacing the transistor with an Operational Amplifier as shown.

Light Level Sensing Circuit

Light Activated Switch
In this basic dark sensing circuit, the light dependent resistor LDR1 and the potentiometer VR1 form one adjustable arm of a simple resistance bridge network, also known commomly as a Wheatstone bridge, while the two fixed resistors R1 and R2 form the other arm. Both sides of the bridge form potential divider networks across the supply voltage whose outputs V1 and V2 are connected to the non-inverting and inverting voltage inputs respectively of the operational amplifier.
The operational amplifier is configured as a Differential Amplifier also known as a voltage comparator with feedback whose output voltage condition is determined by the difference between the two input signals or voltages, V1 and V2. The resistor combination R1 and R2 form a fixed voltage reference at input V2, set by the ratio of the two resistors. The LDR - VR1 combination provides a variable voltage input V1 proportional to the light lvel being detected by the photoresistor.
As with the previous circuit the output from the operational amplifier is used to control a relay, which is protected by a free wheel diode, D1. When the light level sensed by the LDR and its output voltage falls below the reference voltage set at V2 the output from the op-amp changes state activating the relay and switching the connected load. Likewise as the light level increases the output will switch back turning "OFF" the relay. The hysteresis of the two switching points is set by the feedback resistor Rf can be chosen to give any suitable voltage gain of the amplifier.
The operation of this type of light sensor circuit can also be reversed to switch the relay "ON" when the light level exceeds the reference voltage level and vice versa by reversing the positions of the light sensor LDR and the potentiometer VR1. The potentiometer can be used to "pre-set" the switching point of the differential amplifier to any particular light level making it ideal as a simple light sensor project circuit.

Photojunction Devices

Photojunction Devices are basically PN-Junction light sensors or detectors made from silicon semiconductor PN-junctions which are sensitive to light and which can detect both visible light and infrared light levels. Photo-junction devices are specifically made for sensing light and this class of photoelectric light sensors include the Photodiode and the Phototransistor.

The Photodiode.

The construction of the Photodiode light sensor is similar to that of a conventional PN-junction diode except that the diodes outer casing is either transparent or has a clear lens to focus the light onto the PN junction for increased sensitivity. The junction will respond to light particularly longer wavelengths such as red and infrared rather than visible light.
This characteristic can be a problem for diodes with transparent or glass bead bodies such as the 1N4148 signal diode. LED's can also be used as photodiodes as they can both emit and detect light from their junction. All PN-junctions are light sensitive and can be used in a photo-conductive unbiased voltage mode with the PN-junction of the photodiode always "Reverse Biased" so that only the diodes leakage or dark current can flow.
The current-voltage characteristic (I/V Curves) of a photodiode with no light on its junction (dark mode) is very similar to a normal signal or rectifying diode. When the photodiode is forward biased, there is an exponential increase in the current, the same as for a normal diode. When a reverse bias is applied, a small reverse saturation current appears which causes an increase of the depletion region, which is the sensitive part of the junction. Photodiodes can also be connected in a current mode using a fixed bias voltage across the junction. The current mode is very linear over a wide range.

Photo-diode Construction and Characteristics


When used as a light sensor, a photodiodes dark current (0 lux) is about 10uA for geranium and 1uA for silicon type diodes. When light falls upon the junction more hole/electron pairs are formed and the leakage current increases. This leakage current increases as the illumination of the junction increases. Thus, the photodiodes current is directly proportional to light intensity falling onto the PN-junction. One main advantage of photodiodes when used as light sensors is their fast response to changes in the light levels, but one disadvantage of this type of photodevice is the relatively small current flow even when fully lit.
The following circuit shows a photo-current-to-voltage convertor circuit using an operational amplifier as the amplifying device. The output voltage (Vout) is given as Vout = Ip × Rf and which is proportional to the light intensity characteristics of the photodiode. This type of circuit also utilizes the characteristics of an operational amplifier with two input terminals at about zero voltage to operate the photodiode without bias. This zero-bias op-amp configuration gives a high impedance loading to the photodiode resulting in less influence by dark current and a wider linear range of the photocurrent relative to the radiant light intensity. Capacitor Cf is used to prevent oscillation or gain peaking and to set the output bandwidth (1/2πRC).

Photo-diode Amplifier Circuit

Photodiode Amplifier

Photodiodes are very versatile light sensors that can turn its current flow both "ON" and "OFF" in nanoseconds and are commonly used in cameras, light meters, CD and DVD-ROM drives, TV remote controls, scanners, fax machines and copiers etc, and when integrated into operational amplifier circuits as infrared spectrum detectors for fibre optic communications, burglar alarm motion detection circuits and numerous imaging, laser scanning and positioning systems etc.

The Phototransistor

An alternative photo-junction device to the photodiode is the Phototransistor which is basically a photodiode with amplification. The Phototransistor light sensor has its collector-base PN-junction reverse biased exposing it to the radiant light source.
Phototransistors operate the same as the photodiode except that they can provide current gain and are much more sensitive than the photodiode with currents are 50 to 100 times greater than that of the standard photodiode and any normal transistor can be easily converted into a phototransistor light sensor by connecting a photodiode between the collector and base.
Phototransistors consist mainly of a bipolar NPN Transistor with its large base region electrically unconnected, although some phototransistors allow a base connection to control the sensitivity, and which uses photons of light to generate a base current which inturn causes a collector to emitter current to flow. Most phototransistors are NPN types whose outer casing is either transparent or has a clear lens to focus the light onto the base junction for increased sensitivity.

Photo-transistor Construction and Characteristics


In the NPN transistor the collector is biased positively with respect to the emitter so that the base/collector junction is reverse biased. therefore, with no light on the junction normal leakage or dark current flows which is very small. When light falls on the base more electron/hole pairs are formed in this region and the current produced by this action is amplified by the transistor.
Usually the sensitivity of a phototransistor is a function of the DC current gain of the transistor. Therefore, the overall sensitivity is a function of collector current and can be controlled by connecting a resistance between the base and the emitter but for very high sensitivity optocoupler type applications, Darlington phototransistors are generally used.
Photodarlington transistors use a second bipolar NPN transistor to provide additional amplification or when higher sensitivity of a photodetector is required due to low light levels or selective sensitivity, but its response is slower than that of an ordinary NPN phototransistor.
Photo darlington devices consist of a normal phototransistor whose emitter output is coupled to the base of a larger bipolar NPN transistor. Because a darlington transistor configuration gives a current gain equal to a product of the current gains of two individual transistors, a photodarlington device produces a very sensitive detector.
Typical applications of Phototransistors light sensors are in opto-isolators, slotted opto switches, light beam sensors, fibre optics and TV type remote controls, etc. Infrared filters are sometimes required when detecting visible light.
Another type of photojunction semiconductor light sensor worth a mention is the Photo-thyristor. This is a light activated thyristor or Silicon Controlled RectifierSCR that can be used as a light activated switch in AC applications. However their sensitivity is usually very low compared to equivalent photodiodes or phototransistors. To increase their sensitivity to light photo-thyristors are made thinner around the gate junction. The downside to this process is that it limits the amount of anode current that they can switch. Then for higher current AC applications they are used as pilot devices in opto-couplers to switch larger more conventional thyristors.

Photovoltaic Cells.

The most common type of photovoltaic light sensor is the Solar Cell. Solar cells convert light energy directly into DC electrical energy in the form of a voltage or current to a resistive load such as a light, battery or motor. Then photovoltaic cells are similar to a battery because they supply DC power. Unlike the other photo devices above which use light intensity even from a torch to operate, photvoltaic cells work best using the suns radiant energy.
Solar cells are used in many different types of applications to offer an alternative power source from conventional batteries, such as in calculators, satellites and now in homes offering a form of renewable power.
Photovoltaic Cell
Photovoltaic Cell
Photovoltaic cells are made from single crystal silicon PN junctions, the same as photodiodes with a very large light sensitive region but are used without the reverse bias. They have the same characteristics as a very large photodiode when in the dark. When illuminated the light energy causes electrons to flow through the PN junction and an individual solar cell can generate an open circuit voltage of about 0.58v (580mV). Solar cells have a "Positive" and a "Negative" side just like a battery.
Individual solar cells can be connected together in series to form solar panels which increases the output voltage or connected together in parallel to increase the available current. Commercially available solar panels are rated in Watts, which is the product of the output voltage and current (Volts times Amps) when fully lit.

Characteristics of a typical Photovoltaic Solar Cell.

Photovoltaic Cell

The amount of available current from a solar cell depends upon the light intensity, the size of the cell and its efficiency which is generally very low at around 15 to 20%. To increase the overall efficiency of the cell commercially available solar cells use polycrystalline silicon or amorphous silicon, which have no crystalline structure, and can generate currents of between 20 to 40mA per cm2.
Other materials used in the construction of photovoltaic cells include Gallium Arsenide, Copper Indium Diselenide and Cadmium Telluride. These different materials each have a different spectrum band response, and so can be "tuned" to produce an output voltage at different wavelengths of light.