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.

Constructional Countdown Timer Project using 555 Timer


Introduction to Countdown Timer

In this Countdown Timer project, a 555 IC, a counter IC and a transistor switch to activate a relay either ON/OFF (mode selected by a jumper) as soon as the counting period is over. The circuit consists of an oscillator, a ripple counter and two switching transistors.

Oscillator

The 555 is configured in the standard astable oscillator circuit designed to give a square wave cycle at a period of around 1 cycle/sec. A potentiometer is included in the design so the period can be set to exactly 1 second by timing the LED flashes. A jumper connection is provided so the LED can be turned off. As soon as power is applied to the circuit counting begins. The output pulse from pin 3 of the 555 is fed to a the clock input pin 10 of the 14-stage binary ripple counter, the 4020 (or 14020.)

Ripple Counter

The counter output wanted is set by a jumper. Ten counter outputs are available: 8/16/32/64/128/256/512/1024/4096 and 8192 counts. If the 555 is set to oscillate at exactly 1.0Hz by the on-board trimpot then the maximum timer interval which can be set is 8192 seconds (just over 2 hours.) At the end of the counting of the countdown timer period a pulse is output on the pin with the jumper on it. The 14020 ripple counter advances its count on each negative transistion of the clock pulse from the 555. So for each output cycle of low-high-low-high the count is advanced by two. It can be set to an zero state (all outputs low) by a logic high applied to pin 11.

In this circuit C3, R4 and D1 are arranged as a power-on reset. When power is applied to the circuit C3 is in a discharged state so pin 11 will be pulled high. C3 will quickly charge via R4 and the level at pin 11 falls thus enabling the counter. The 14020 then counts clock pulses until the selected counter output goes high. D1 provides a discharge path for C3 when the power is disconnected.

You can change the components values of R1 and C1 to set the 555 count frequency to more than 1.0 Hz. If you change the count to 10 seconds then a maximum timer delay of 81920 seconds, or 22.7 hours, can be obtained.


Transistors

The output from the 4020 goes to a transistor switch arrangement. Two BC547 are connected so that either switching option for the relay is available. A jumper sets the option. The relay can turn ON when power and counting start then turn OFF after the count period, or it can do the opposite. The relay will turn ON after the end of the count period and stay on so long as power is supplied to the circuit. Note that the reset pin of the 555 is connected to the collector of Q1. This enables the 555 during the counting as the collector of Q1 is pulled low.

Time Delay Circuit

Time Delay Circuit

In the design of analog circuits, there are times when you would need to delay a pulse that came into a circuit before being used for the next process. This time delay circuit uses a 555 timer to delay a pulse that comes in to a maximum time of 75 seconds. The timing of the delay can also be changed by changing the resistor value of VR1 and the capacitor value of E based on the time delay formula of t=0.69RC.

In order for the output to go high, the reset pin of 555 timer (pin 4) must be high and the TRIGGER pin (pin 2) voltage level must be below a third of the level of the power supply to the IC. When there is no pulse being applied to the input, transistor Q1 will turn ON and capacitor E is charged.


Once a pulse is applied to the input, transistor Q1 will turn OFF and pin 4 reset pin is held to high. This caused the capacitor E1 to be discharged through VR1 resistor. The time delay will depend on the discharged of capacitor E to a third of the supply before the output of 555 goes high. Experiment with different values of VR1 and E to get different time delay.

If the maximum value of potentiometer is set to 5M ohm, the time delay of the pulse will be 75 seconds.

Analog Timing Light Project

Timing Light Project

This analog timing light project uses RC circuit as a delay OFF timer to control the duration an incandescent light turns ON. When the accuracy of a timer is not critical, the use of RC circuit is a good choice as it is more cost effective and simple. Once the normally open switch SW is pressed, the light will turn ON for a duration of 10 - 20 seconds before it turns OFF. The duration of the turn ON time can be varied by varying the values of R1, R2 and E1.

Schematic Diagram

The schematic of the project is as shown below.

When SW is pressed, the base of the transistor Q1 is forward bias and it turns ON. This turns ON the 12V relay that is connected to the transistor. The contact of the relay RLY must be able to withstand the current of the load. At the same time, the electrolytic capacitor E1 is being charged to a voltage of approximately 0.7V.

Once SW is released, E1 will discharged through resistor R2 and the base of the transistor. After some time, When the voltage across E1 drops to approximately 0.5V, the transistor will turn OFF. This in turn will cause the relay to turn OFF and the incandescent light will turn OFF. The timing of the turn OFF can be changed by changing the values of E1, R1 and R2.




Church Bell Counter

Description

This circuit is a church bell controller. Basic component is an ATmega32 microcontroller. At 1 24LC32 eeprom memories is being used.

As control I created a menu who will be appeared on 4x20 LCD . The menu browsing can be done by 6 buttons at the face of the circuit's box (Menu, Up, Down, Enter, Start, Stop). The all firmware binds about 30Kbytes flash memory and can be increased by adding new features-functions. This program has been written in C with CVAVR compiler.

The idea of this circuit is being given by a friend of mine who has an foundry and he is building bells. I have made the PCB by my self.

Featuers


1. More 75 different melodies (ADAM, PANYGJRJKO, AGJORJKO, etc)
2. Control of electrometrical clock of church with the production of pulse of duration 1Sec each one minute.
3. Automatic correction in case of power loss.
4. Percussion of clock each half but also entire hours, with possibility of choice of hours of silence (for tourist regions and hours of common quietness).
5. Manual correction of electromechanical clock.
6. All regulations become with the help of guidance (menu, up, down, enter, start, stop)
7. When it runs a rhythm we have the possibility of increase or decrease her speed, the information will stored in memory 24LC32.
8. Display time (DS1307), with backup battery.
9. All the in formations are displayed on 4X20 LCD.
10. Control up to 5 bells and 1 clock.
11. The user create his own program





Two Way Light Switch


Two Way Light Switch Wiring


Have you ever wonder how a lamp that is used to light up the stairs of a building is connected to the two switches that controls it from either end? These two way switches have a single pole double throw (SPDT) configuration. Each has a common terminal (COM) with a pole that can be switched between position L1 or L2. The two way light switch wiring can be implemented by using 2 different methods. Both of the methods used are described below.



The first method as shown in the figure above have the COM, L1 and L2 of both the SPDT switches connected together. For incandescent lamp, the recommended wire gauge used is AWG #18. The LIVE AC Source is connected to L1 of SW1 and one side of the load is connected to L2 of SW2. The other side of the load is then connected to NEUTRAL of the AC Source. With this configuration, the lamp will be turned ON when one switch is at ON position and the other is at OFF position. If both switches are in the same position, the lamp will be OFF.