Tuesday, March 22, 2011

Water Level Indicator with alarm.

Water Level Indicator with alarm.
This circuit not only indicates the amount of water present in the overhead tank but also gives an alarm when the tank is full.
The circuit uses the widely available CD4066, bilateral switch CMOS IC to indicate the water level through LEDs.
When the water is empty the wires in the tank are open circuited and the 180K resistors pulls the switch low hence opening the switch and LEDs are OFF. As the water starts filling up, first the wire in the tank connected to S1 and the + supply are shorted by water. This closes the switch S1 and turns the LED1 ON. As the water continues to fill the tank, the LEDs2 , 3 and 4 light up gradually.
The no. of levels of indication can be increased to 8 if 2 CD4066 ICs are used in a similar fashion.
When the water is full, the base of the transistor BC148 is pulled high by the water and this saturates the transistor, turning the buzzer ON. The SPST switch has to be opened to turn the buzzer OFF.
Remember to turn the switch ON while pumping water otherwise the buzzer will not sound!



Theft preventer alarm

This circuit utilising a 555 timer IC can be used as an alarm system to prevent the theft of your luggage, burglars breaking into your house etc. The alarms goes ON when a thin wire, usually as thin as a hair is broken.
The circuit is straightforward. It uses a 555 IC wired as an astable multivibrator to produce a tone of frequency of about 1kHz which gives out a shrill noise to scare away the burglar.
The wire used to set off the alarm can be made of a thin copper wire like SWG 36 or higher.
You can even use single strands of copper form a power cable.

The circuit operates on a wide range of voltages from 5V to 15V.
The speaker and the circuit could be housed inside a tin can with holes drilled on the speaker side for the sound to come out.




Rain Alarm.

Rain Alarm.

This circuit gives out an alarm when its sensor is wetted by water.
A 555 astable multivibrator is used here which gives a tone of about 1kHz upon detecting water.
The sensor when wetted by water completes the circuit and makes the 555 oscillate at about 1kHz.

The sensor is also shown in the circuit diagram.
It has to placed making an angle of about 30 - 45 degrees to the ground. This makes the rain water to flow through it to the ground and prevents the alarm from going on due to the stored water on the sensor.
The metal used to make the sensor has to be aluminium and not copper. This is because copper forms a blue oxide on its layer on prolonged exposure to moisture and has to be cleaned regularly.
The aluminium foils may be secured to the wooden / plastic board via epoxy adhesive or small screws.
The contact X and Y from the sensor may be obtained by small crocodile clips or you may use screws.




Police Siren circuit

Police Siren circuit

This circuit produces a sound similar to the police siren.
It makes use of two 555 timer ICs used as astable multivibrators. The frequency is controlled by the pin 5 of the IC.
The first IC (left) is wired to work around 1Hz. The 47uF capacitor is charged and discharged periodically and the voltage across it gradually increases and decreases periodically.
This varying voltage modulates the frequency of the 2nd IC. This process repeats and what you hear is the sound remarkably similar to the police siren.

Two presets VR1 and VR2 are provided to vary the siren period of repetition and the tone of the siren.
By varying VR1 you can set how fast the siren changes from high freq. to low freq.
VR2 sets the siren frequency. Adjust VR1 and VR2 to suit your taste.




Factory Siren

This circuit produces a sound similar to a factory siren. Uses a 555 timer Ic used as an astable multivibrator of a center frequency of about 300Hz. The frequency is controlled by the pin 5 of IC. When supply is turned on, the capacitor charges slowly and this alters the voltage on pin 5 of IC so the frequenct increases gradually. After the capacitor is fully charged, the frequency no longer increases. Now when the switch button siren control is pressed, the capacitor discharges and the siren frequency also decreases. The presets VR1 and VR2 should be adjusted for optimum performance.


Car Antitheft wireless Alarm

Car Antitheft wireless Alarm
This anti-theft alarm FM radio-control can be used with any vehicle having 6 - with the power supply 12 volt DC. The mini VHF, FM transmitter is installed in the vehicle at night when parked in the car porch or car park. CXA1019 receiver with a single module IC-based FM radio, which is freely available on the market at reasonable prices, remains inside. The receiver is tuned to the frequency of the transmitter. When the transmitter is on and the signals are being received by FM radio receiver, no hissing is available at the output of the receiver. Thus transistor T2 (BC548) does not hold. This results in the driver transistor T3 getting its relay forward base bias via 10k resistor R5 and the relay is energized. When an intruder tries to drive the car and takes a few meters from the driveway, the radio link between the car (transmitter) and alarm (receiver) is broken. As a result FM radio module gene-rates hiss. Hissing AC signals are coupled to relay switching circ-uit via audio transformer. These AC signals are rectified and filtered by diode D1 and C8 capacitor and the resulting positive DC voltage provides a forward bias of transistor T2. Thus transistor T2 conducts, and pull the base of relay driver transistor T3 to ground level. The relay which disables the alarm connected via N / C relay is on. If, by chance, the intruder learns the wireless alarm transmitter and disconnect the battery, the alarm is still remote, because in the absence of the signal, the receiver continues to produce hissing noise at its output. So the burglar alarm is foolproof and reliable. 
 




Brakelight bulb flasher

Brakelight bulb flasher This is basically a modified flash circuit on and off a bulb instead of LED. Use a 555 timer IC working as an astable multivibrator.
The blink rate can vary from very fast to a maximum of once in 1.5 seconds, varying preset VR1. The starting time of the circuit is given by: TON = 0.69xC1x (R1 + VR1) second and time off is: T OFF = 0.69xC1xVR1 second You can increase the value of C1 to 100uF for flashing a slower rate up once every 10 sec.
we can use this circuit to control bulb of breaklight flasher.


Monday, March 14, 2011

pic Metal Detector

A metal detector is a device which responds to metal that may not be readily apparent.
The simplest form of a metal detector consists of an oscillator producing an alternating current that passes through a coil producing an alternating magnetic field. If a piece of electrically conductive metal is close to the coil, eddy currents will be induced in the metal, and this produces an alternating magnetic field of its own. If another coil is used to measure the magnetic field (acting as a magnetometer), the change in the magnetic field due to the metallic object can be detected.
metal-detector Video Clip







metal-detector circuit schematic

Metal-detector source code
/*
 ********************************************************************
 * picoDetector : an ultra simple and cheap metal detector
 ********************************************************************
 *
 * Author : Bruno Gavand, april 2009
 * see more details on http://www.micro-examples.com/
 *
 * source code for mikroC PRO compiler V1.65
 * feel free to use this code at your own risks
 *
 * target : PIC12, oscillator in HS mode, watchdog enabled
 *
 * PIC PIN Assignemnt :
 *
 * GP0 : detect LED indicator
 * GP1 : calibrate LED indicator
 * GP2 : NC
 * GP3 : NC
 * GP4, GP5 : inductor
 *
 *******************************************************************************
 */

#define MAXTRY 15       // number of watchdog restart to calibrate loop counter

unsigned char   ctr ;           // number of loops between two watchdog resets
unsigned char   previous ;      // previous value of ctr
unsigned char   calibr ;        // calibration value when oscillator runs free
unsigned char   restarts ;      // number of watchdog restarts
unsigned char   en ;            // enable flag, allows detection

/*
 * main loop
 */
void    main()
        {
        unsigned char   i ;

        /*
         * configure GPIO as digital port
         */
        CMCON0 = 7 ;
        ANSEL = 0 ;
        TRISIO = 0 ;
        GPIO = 0 ;

        /*
         * power up ?
         */
        if(STATUS.NOT_TO)
                {
                /*
                 * yes, init variables
                 */
                restarts = 0 ;
                calibr = 1 ;
                }

        /*
         * watchdog reset counter
         */
        if(restarts < 255) restarts++ ;

        /*
         * if counter differs too much from calibration value
         */
        if((previous ^ ctr) > calibr)
                {
                /*
                 * turn detect LED on
                 */
                GPIO.F0 = en ;

                /*
                 * if not on power up
                 */
                if(STATUS.NOT_TO == 0)
                        {
                        /*
                         * while in calibration mode
                         */
                        if(restarts < MAXTRY)
                                {
                                /*
                                 * shift calibration value
                                 * and wait a little bit
                                 */
                                calibr <<= 1 ;
                                Delay_ms(5) ;
                                }
                        }
                else
                        {
                        /*
                         * turn detect LED off
                         */
                        GPIO.F0 = 0 ;
                        }
                }

        /*
         * save last counter
         */
        previous = ctr ;

        /*
         * is calibration over ?
         */
        if(restarts > MAXTRY)
                {
                /*
                 * yes, turn calibrate LED off
                 * and set enable flag
                 */
                GPIO.F1 = 0 ;
                en = 1 ;
                }
        else
                {
                /*
                 * no, turn calibrate LED on
                 * and clear enable flag
                 */
                GPIO.F1 = 1 ;
                en = 0 ;
                }

        /*
         * set watchdog prescaler
         */
        OPTION_REG = 0b11111001 ;

        /*
         * start counter, to be interrupted by watchdog
         */
        ctr = 0 ;
        for(;;)
               {
               ctr++ ;
               }
        }

Saturday, March 12, 2011

Led flasher or led oscillator

Led flasher on this page will introduce you to the bi-polar transistor.Led flasher Transistor theory is a complex subject and too big for this website.Led flasher
I can however show you some useful things about how to use a transistor in various circuits.
A transistor is a semiconductor whose conductance can be controlled from very high conductance to very low conductance using a very tiny control current. The connections to the transistor are the “base”, “emitter”, and “collector”.
Led flasher
The base controls the current flow between the emitter and collector. Like the diode, the transistor must be biased correctly to operate. There are two types a PNP and a NPN version. The letters indicate the three layers of semiconductor material sandwiched together to make the transistor. This also determines voltage polarity to bias them correctly.


A PNP is a positive-negative-positive device and the NPN is a negative-positive-negative device. Don’t worry, you will understand all that after awhile.
The schematic symbol looks like thisAnd like this   for PNP.
Connection leads starting at the bottom and going clockwise on these diagrams are
“emitter”(has arrow) – “base” – “collector” (top) 





Notice the direction of the arrows. They indicate the emitter and the polarity of bias required. The horizontal wire above the emitter is the ‘base’ and the last connection is the collector.
In this project we will be using two NPN transistors. The center letter of the three tells the polarity required to bias the transistor into the “on” mode. We will be using the transistors in the common emitter mode which means that both emitters will be connected to the negative side of the power supply or ground as it is called.
We will apply a small positive voltage to the base to cause the transistor to begin conducting. We will also apply a positive voltage to the collector through the LED diode so the diode will ‘light’ when the transistor conducts.
 Here is the schematic: It is what is known as a “classic” multivibrator which is a type of square wave oscillator. (The name is funny because nothing actually vibrates!)
OK, let’s start at the top and work down. The first thing is the battery connector. It has two wires one red and one black. Of course the red is positive and the black is negative. The red connects to two wires, one goes to the resistor R1 and the other goes to R2. Now these wires can be the wires that come as part of the resistor or they can be separate wires, the choice is yours.
Here is the surprise, the black wire connects to this symbol.  This is the symbol for ground or “common”. It is usually the chassis or metal box the circuit is built in. But in any case it is where the negative terminal of the battery reaches all the needed points.

Notice that the both emitters of transistors Q1 and Q2 connect there, as well as both base resistors R3 and R4. They are all connected to the same common point or ground.it is simple Led flasher.
At this point, we will look at only one half of the schematic since both halfs are identical. On the left side, the other end of R1 connects to LED diode D1′s anode and D1′s cathode connects to the collector of transistor Q1. Then Q1′s emitter goes to ground. Now look at Q1′s base. It connects to three parts, R3,D3 and the other is C1. R3 and D3′s anode connect to ground. The other end of C1 connects over to transistor Q2′s collector.
There are a couple of very important things to watch here. One is to be very sure you have identified the wires correctly for the transistors emitter, base and collector. They are shown on the package they come in. Next capacitor C1 and C2 are polarized. They will have a black mark indicating the negative lead. (usually) Or a big red + marking the positive lead. Be sure to observe the polarity which is shown on the schematic.
How it works:
when the circuit of Led flasher is completed then the work is to check the Led flasher So we connect the battery to Led flasher.
When the battery is connected both capacitors C1 and C2 begin to charge through the diodes and the base resistors R3 and R4 This will begin building a positive voltage on the transistor bases but because not all the parts will be exactly identical, one transistor will turn on before the other.
As soon as one turns on the collector of that transistor will pull down toward ground completing the circuit through one of the LED’s. That LED will light because it’s cathode is pulled to ground through the transistor but look closely and you will see that capacitor connected to that diode will begin to disharge back to ground. This will place a positive voltage on the opposite transistors base and turn on that transistor.
Now that action will cause a positive voltage to be applied to the other transistor’s base turning it back on again which will cause the second transistor to turn on again and so on over and over again. Diode D3 and D4 discharge the capacitors C1 and C2 between cycles so they are ready to charge again on the next cycle.The flash rate is determined by the value of R3, R4 and C1, C2.
we can control the frequency of the Led flasher by using changing the frequencies of c1,c2,r1,r2.

Regulated 12 Volt power supply



Description:
//
This circuit above uses a 13 volt zener diode, D2 which provides the voltage regulation. Aprroximately 0.7 Volts are dropped across the transistors b-e junction, leaving a higher current 12.3 Volt output supply. This circuit can supply loads of up to 500 mA.This circuit is also known as an amplified zener circuit.

A Simple Audio Oscillator and Audio Amplifier

This is a schematic of a type of audio oscillator known as a twin “T” phase shift oscillator. It gets its name from the phase shift network made up of R3, R4 and C3 plus C1, C2 and R2 which shifts the phase of the signal fed back from the collector to the base by 180 degrees to make the oscillator oscillate.
You will notice that the emitter of Q1 is not connected. Bringing this connection to ground will turn on the oscillator or “key it” as it’s called. You could connect this to a telegraph key and make a code practice oscillator, or you could connect this to one of the collectors on the LED flasher.
Then when that LED comes on the oscillator will start. This will cause it to ‘beep’ when the led flashes.Now we need to be able to connect a speaker to it so we can hear the tone. To do this we need an audio amplifier to have enough power to drive a small speaker.Near the bottom of the drawing you will see the output which will connect to the audio amplifier.