Thursday, July 9, 2009


DC Servo Motor Basics A Servo Motor is a small device that has an output shaft which can be positioned to specific angular positions by sending the servo a Pulse Coded Modulation signal. As the coded signal changes, the angular position of the shaft changes. DC servo motors are used in radio controlled airplanes, radio controlled cars, robots and a host of other applications that one can think of. A picture of a servo motor is as shown below.

Though the servo is small in size, it has a printed circuit board with control circuit built in and a standard servo manufactured by Futaba is model S3003. The power consumed is proportional to the mechanical load, thus saving energy when it is used in a varying type of load. The servo motor consist of a motor, gears and its casing. Three wires are used to interface to other control circuitry which are +5V DC, Ground and Control Signal.

It is using a control called proportional control of which the amount of power applied to the motor is proportional to the distance it needs to travel. This means that if the shaft needs to turn a large distance, the motor will run at higher speed. Usually a servo is used to control an angular motion of between 0 and 180 degrees.

The servo expects to see a pulse every 20 milliseconds (.02 seconds). The length of the pulse will determine how far the motor turns. A 1.5 millisecond pulse, for example, will make the motor turn to the 90 degree position (often called the neutral position). If the pulse is shorter than 1.5 ms, then the motor will turn the shaft to closer to 0 degress. If the pulse is longer than 1.5ms, the shaft turns closer to 180 degress.




DC Servo Motor Driver Circuit Description

The input signals are between 0 - 5V delivered by connecting up the 10K potentiometers as voltage dividers. The Microchip PIC 16C71 has an AD converter that changes the voltage signal into the Pulse Code Modulation system used by the servo motors. This signal is a 5V pulse between 1 and 2 msec long repeated 50 times per second. The width of the pulse determines the position of the server. Most servos will move to the center of their travel when they receive a 1.5msec pulse. One extreme of motion generally equates to a pulse width of 1.0msec; the other extreme to 2.0msec with a smooth variation throughout the range, and neutral at 1.5msec.

It will be a good experience to experiment the control of servo motors in this project by doing your own software programming using PIC 16C71 microcontroller.

Experimenting a simple DC Motor Driver



Simple DC Motor Driver

This simple DC motor driver circuit uses a 741 operational amplifier operating as a voltage follower where its non inverting input is connected to the speed and rotation direction of a potentiometer VR1. When VR1 is at mid position, the op-amp output is near zero and both Q1 and Q2 is OFF.

When VR1 is turned towards the positive supply side, the output will go positive voltage and Q1 will supply the current to the motor and Q2 will be OFF. When VR1 is turned to the negative supply side, the op-amp output switches to the negative voltage and Q1 will turn OFF and Q2 ON which reverses the rotation of the motor's direction.

As the potentiometer VR1 is moved toward either end, the speed increases in whichever direction it is turning.

The TIP3055 Q1 NPN power transistor has a collector current specs of 15A and VCE0 of 60V DC.

The MJE34 Q2 PNP power transistor has a collector current specs of 10A and VCE0 of 40V DC.


Stepping motors can be viewed as electric motors without commutators. Typically, all windings in the motor are part of the stator, and the rotor is either a permanent magnet or, in the case of variable reluctance motors, a toothed block of some magnetically soft material. They can be stepped at audio frequencies thus allowing them to spin quite quickly, and with an appropriate controller, they may be started and stopped at controlled orientations.

Stepper motors are used in many applications in our daily life. They include home appliances like air conditioners, automobile, radio antenna control, telescope control where the azimuth, elevation & focus must be varied independently, moving table positioning for test lab and other usage, and a host of other applications that one can think of. These applications required that the continuous stepping at varying speeds and a single stepping, fine control to get the final position.

This project is a Stepper Motor Control driver for 5, 6 & 8 lead unipolar stepper motors and they are common items that one can get easily from the open market.


Stepper Motor Control Motor Identification

This is straight forward because the number of wires coming out of the motor identifies it. Bipolar motors have 4 leads coming out of them. One winding is on each stator pole. These motors are not supported in this project.

Unipolar motors may have 5 leads but generally have 6 or 8 wires. In most of unipolar motors, the wires for the 6 & 8 types come out in two bundles of 3 or 4 wires. Unipole steppers have two coils per stator pole. In the 8 lead motors the 2 leads from the 2 coils from both stators emerge from the motor. In the 6 lead motors the two coils on each stator pole are joined (opposite sense) together before they emerge from the motor. In the 5 lead motors each of the two joined wires are themselves joined before they leave the motor. Figure below shows the schematic connections of the 3 types of unipolar motors.


In the 6 wire version, the resistance between the centre lead to the other two will be about 40 ohms while the resistance between the outer two leads will be twice that. Call the outer two leads in each of the two bunches of wires A & B, C & D. Solder them into those positions on the PCB. Note that it does not matter which way around the A/B, C/D leads go onto the pads.

In the 5 wire version, both + pads on the PCB are connected together. In the 5 wire motor these centre leads are connected internally. So to power a 5 lead stepper just connect the common centre tap lead from both phases to one of the + pads. The A/B, C/D leads are connected just as in the 6 lead motors.

In the 8 wire version, each bunch of 4 leads find the 2 pairs of wires connected to each phase of the motor. Take one of each and join them together. This is now the common lead to connect to the + pad just as in the 6 lead case. The remaining leads are A & B and C & D to the PCB.. Now there are 1, possibly 2, complications. First the common connection must join the coils in the opposite sense. This refers to the way in which they are wound. This means that the dot on one coil is joined to the no-dot end on the other coil in the diagram. There is no way to tell the sense of the coils unless you have the motor winding colour specification which for surplus motors is generally missing. So you just have to try it. Now if the wires are colour coded the same in both bundles this is just a matter of two possibilities to try. If the wires are not colour coded then there are four possibilities. You will not damage the motor during this testing if connections are wrong. The motor will either not work or oscillate to and fro when the power is connected.


Stepper Motor Control Circuit Description

This Stepper Motor Control works in either free-standing or PC controlled mode. In free-standing mode an internal square-wave oscillator based on IC2:B of the 4093 supplies timing pulses to the OSC output. The frequency of these pulses and thus the speed of the stepper motor is controlled by the trimpot VR1 (100K.) A series 1K resistor controls the maximum frequency. You may increase the value of this resistor for your own needs. These pulses are fed into the STEP input which is buffered and inverted by IC2:D. This helps prevent false triggering. Similarly, IC2:C buffers and inverts the DIRection input. A SPDT taking the input to +5VDC or ground controls the direction of rotation. IC3:C and D (4030 or 4070 exclusive OR gates) invert the outputs available at Q and /Q outputs of each of the flipflops (FF) IC4:A and IC4:B. The incoming step-pulses clock the FF, thus toggling the Q & /Q outputs and this turns the MOSFET’s on and off in sequence. The IRFZ44’s have a low on-resistance and can deliver up to 6A each without needing a heatsink. Power to the stepper motor is connected to V+ and GND terminals. There is a separate power supply to the 78L05 to power the IC’s. 8V – 12VDC will be sufficient. R2/C2 form a low-pass filter to filter fast-rise switching transients from the motor.

In computer-controlled mode use the three pads with pins DIR, STEP and GND. Switch the SPDT switch to EXTernal. The direction SPDT has no effect in external mode. Note if the STEP input is left floating the high impedence to the cmos logic gate might pick up noise and false step. Either connect to a PC or ground via a 10K resistor.

Connect the wires to the terminal block Apply power. Make sure the SPDT switch is set to INTernal. See if the motor is turning. If not then swap M1B & M2B wires only and check again. Now it should be turning. VR1 will vary the stepping speed. Figure below shows the Stepper Motor Control driver circuit that one can experiment.


How to construct your own Ultrasonic Motion Detectors

This project involves constructing ultrasonic motion detectors device at 40 kHz frequency and are used to detect any moving object where this device is installed. The printed circuit board (PCB) measures only 1-1/2 by 3 inches.

The device detects motion from 4 to 7 meters away. Once that occurs, a red LED turns ON, but with additional circuitry attached to the output, the detector can turn on lights, sound buzzers, trip a recording device, or even call the police. Also, the circuit can be made to sound off with a message when anyone moves within its field of detection. Using various voice recording and playback circuits, you might even have the device provide a pleasant greeting or snarl with a barking dog sound when someone approaches the front door. As you can see, the project can be put to work in a variety of ways.

You can place it in the driveway, on the porch, garage, basement or any place where you need to be informed of any object that comes near the location.

You can find the details of the circuit diagram and PCB design for ultrasonic motion detectors here. A detailed explanation of how the circuit works is described here. First timers who construct this project will learn a great deal about ultrasonic frequency application, its concept and the difficulty encountered when installing the completed device.

Infrared Motion Detectors

This Infrared Motion Detectors project is specifically designed and comes with a detailed writeup on one of the numerous applications of Infrared devices. Beginners to electronics will appreciate the construction of this project as it will teach the students of electronics how to identify resistors colour code, identification of capacitor's value, maximum working voltage and its tolerances as well as right soldering method. It includes schematic diagram, parts list, printed circuit board (PCB) pattern layout and a detailed description of each section that makes this device works.

This project describes the concept of Infrared, Operational Amplifiers concept and applications (as comparator, low pass filter, high pass filter, band pass filter etc) and sound generator integrated circuit which gives a ding-dong sound. This document also describes the troubleshooting guide and a quiz to ensure that the concept is clearly understood by the constructor.

There are many applications for the use of the detector. The most common is in the alarm system industry. Some of the new applications are automatic door openers, light switches in hallways, stairways and areas that increase safety for the public. Further applications can be seen in automatic production lines, switching of sanitary facilities, monitors and intercoms. With the ease of installation and the low suspectibility to interference from other forms of radiation, such as heaters or windows, the Infrared motion detectors are ideal devices.

Constructing your own 3V FM Transmitter


This project provides the schematic and the parts list needed to construct a 3V FM Transmitter. This FM transmitter is about the simplest and most basic transmitter to build and have a useful transmitting range. It is surprisingly powerful despite its small component count and 3V operating voltage. It will easily penetrate over three floors of an apartment building and go over 300 meters in the open air.

It may be tuned anywhere in the FM band. Or it may be tuned outside the commercial M band for greater privacy. (Of course this means you must modify your FM radio to be able to receive the transmission or have a broad-band FM receiver.) The output power of this FM transmitter is below the legal limits of many countries (eg, USA and Australia). However, some countries may ban ALL wireless transmissions without a licence. It is the responsibility of the constructor to check the legal requirements for the operation of this kit and to obey them.


The circuit is basically a radio frequency (RF) oscillator that operates around 100 MHz. Audio picked up and amplified by the electret microphone is fed into the audio amplifier stage built around the first transistor. Output from the collector is fed into the base of the second transistor where it modulates the resonant frequency of the tank circuit (the 5 turn coil and the trimcap) by varying the junction capacitance of the transistor. Junction capacitance is a function of the potential difference applied to the base of the transistor. The tank circuit is connected in a Colpitts oscillator circuit.


The electret microphone: an electret is a permanently charged dielectric. It is made by heating a ceramic material, placing it in a magnetic field then allowing it to cool while still in the magnetic field. It is the electrostatic equivalent of a permanent magnet. In the electret microphone a slice of this material is used as part of the dielectric of a capacitor in which the diaphram of the microphone formsone plate. Sound pressure moves one of its plates. The movement of the plate changes the capacitance. The electret capacitor is connected to an FET amplifier. These microphones are small, have excellent sensitivity, a wide frequency response and a very low cost.

First amplification stage: this is a standard self-biasing common emitter amplifier. The 22nF capacitor isolates the microphone from the base voltage of the transistor and only allows alternating current (AC) signals to pass.

The tank (LC) circuit: every FM transmitter needs an oscillator to generate the radio Frequency (RF) carrier waves. The tank (LC) circuit, the BC547 and the feedback 5pF capacitor are the oscillator in the Cadre. An input signal is not needed to sustain the oscillation. The feedback signal makes the base-emitter current of the transistor vary at the resonant frequency. This causes the emitter-collector current to vary at the same frequency. This signal fed to the aerial and radiated as radio waves. The 27pF coupling capacitor on the aerial is to minimise the effect of the aerial capacitance on the LC circuit. The name 'tank' circuit comes from the ability of the LC circuit to store energy for oscillations. In a pure LC circuit (one with no resistance) energy cannot be lost. (In an AC network only the resistive elements will dissipate electrical energy. The purely reactive elements, the C and the L simply store energy to be returned to the system later.) Note that the tank circuit does not oscillate just by having a DC potential put across it. Positive feedback must be provided. (Look up Hartley and Colpitts oscillators in a reference book for more details.)

ASSEMBLY INSTRUCTION

Components may be added to the PCB in any order. Note that the electret microphone should be inserted with the pin connected to the metal case connected to the negative rail (that is, to the ground or zero voltage side of the circuit). The coil should be about 3mm in diameter and 5 turns. The wire is tinned copper wire, 0.61 mm in diameter. After the coil in soldered into place spread the coils apart about 0.5 to 1mm so that they are not touching. (The spacing in not critical since tuning of the Tx will be done by the trim capacitor. It is quite possible, but not as convenient, to use a fixed value capacitor in place of the trimcapacitor - say 47pF - and to vary the Tx frequency by simply adjusting the spacing of the coils. That is by varying L of the LC circuit rather than C.) Adding and removing the batteries acts as a switch.Connect a half or quarter wavelength antenna (length of wire) to the aerial point. At an FM frequency of 100 MHz these lengths are 150 cm and 75 cm respectively.

Remote Control IR Transmitter



Program Remote Control IR Transmitter

This project is based on integrated circuit from Holtek Semiconductor HT6221/HT6222. Similar parts used to be produced by NEC Semiconductor uPD6121/uPD6122. These ICs are commonly used in television and VCR infra red remote controls, garage door controllers, car door controllers, security systems and other remote control applications.

They are capable of encoding 16-bit address codes and 8-bit data codes. Each address/data input can be set to one of the two logic states, 0 and 1. The HT6221 can have keys up to 32(K1~K32) and HT6222 64 keys (K1~K64). When one of the keys is triggered, the programmed address/data is transmitted together with the header bits via an IR (38kHz carrier) transmission medium.

This project provides the transmitter part of the remote control. Designers and hobbyists will have to do their own software at the receiver board. Those who are familiar with microcontroller programming will find this device easy to use. The features of this IC are:

Operating voltage: 1.8V to 3.5V DC
Data output with 38kHz carrier for IR medium
Low standby current
455kHz ceramic resonator or crystal
16-bit address codes
8-bit data codes
Pulse Position Modulation code method

Program Remote Control Circuit Description


The typical 32 pins HT6221 schematic is as shown above. However, the values of 1k ohm and 47 ohm at the output pin 5 of the IC can be reduced to increase the distance the IR signal is transmitted. After the transmission codes are sent, the DOUT pin generates transmission codes with a carrier, and the LED goes low to drive a transmission indicator.

When one of the keys is triggered for over 36ms, the oscillator is enabled and the chip is activated. If the key is pressed and held for 108ms or less, the 108ms transmission codes are enabled and comprised of a header code (9ms), an off code (4.5ms), low byte address codes (9ms-18ms), high byte address codes (9ms-18ms), 8-bit data codes (9ms-18ms), and the inverse codes of the 8-bit data codes (9ms-18ms).

After the pressed key is held for 108ms, if the key is still held down, the transmission codes turn out to be a composition of header (9ms) and off codes (2.5ms) only.

Logic 0 is represented by timing 1.12ms and logic 1 by timing 2.24ms using pulse position modulation method as shown below.