Search This Blog

Powered by Blogger.

Translate

[TC] Water Level Indicator with Alarm using 8051 Micro controller (AT89C51)

This article illustrates the construction and working of a liquid/water level indicator. Such an indicator is used in tanks to indicate the level of liquids and alert us when the tank is full. So by this circuit we can monitor the various levels of the tank and can avoid spillage of water and also we can configure our supplies according to the various levels of tank. Such module or circuit can be installed in big buildings where manual monitor of tanks is difficult and its indicator can be placed at some centralized place.





This water level indicator circuit works on the principle that water conducts electricity. A wire connected to VCC and four other wires are dipped in tank at different levels namely quarter, half, three-fourth, full and their output are taken on pins P3.0, P3.1, P3.2, P3.3 via a transistor BC547. Port P2 is connected to data pins of LCD and P1.0, P1.1, P1.2 are respectively connected to RS, RW, and EN pins of LCD.

Initially when the tank is empty LCD will show the message VACANT. As the tank starts filling up wire at different levels get some positive voltage, due to conducting nature of water. This voltage is then fed to their corresponding pins on controller. When level reaches to quarter level, LCD displays the messageQUARTER. On further rise of level, HALF and 3/4 QUARTER are displayed on LCD. When tank gets full LCD shows the message FULL CLOSE TAP. A buzzer is also provided to produce a alert the user when the tank gets filled. This buzzer can be made off by pressing the switch connected between pin 15 of controller and VCC.
Circuit Diagram :



CODE
// Program to make a Liquid level indicator using LCD
#include<reg51.h>
sbit rs=P1^0; //register select pin
sbit rw=P1^1; //read/write pin
sbit e=P1^2; //enable pin
sbit quat=P3^0; //pin connected to quater level of tank
sbit half=P3^1; //pin connected to half level of tank
sbit quat_3=P3^2; //pin connected to three -fourth level of tank
sbit full=P3^3; //pin connected to full level of tank
sbit spkr_on=P3^4;  
sbit spkr_off=P3^5; // pin to off speaker

void delay(int k) //delay function
{
int i,j;
for(i=0;i<k;i++)
  for(j=0;j<1275;j++);
}

void write(int j) //write function
{
rs=1;  //selecting command register
rw=0;  //selecting to write
P2=j;  //putting value on the pins
e=1;  //strobe the enable pin
delay(1);
e=0;
return;
}

void cmd(int j)  //command function
{
P2=j;  //put the value on pins
rs=0;  //selecting command register
rw=0;  //selecting to write
e=1;  //strobe enable pin
delay(1);
e=0;
return;
}

void puts(char *a) //puts function to print a string
{
unsigned int p=0;
for(;a[p]!=0;p++)
write(a[p]);
}

void lcd_init(void) // function to initialise the LCD
{
cmd(0x38); //setting 8-bit interface, 2 lines, 5*7 Pixels
delay(1);
cmd(0x0e); //turning on underline visible cursor
delay(1);     
cmd(0x01); //clearing screen
cmd(0x80); //moving cursor to the begining of line 1 of LCD
}

void main()
{
quat=half=quat_3=full=spkr_off=1; //configuring as input pins
quat=half=quat_3=full=spkr_off=0; //lowering input pins
spkr_on=1;    // making speaker on pin high,as it works on negative logic
while(1)
{
  while(quat==0&&half==0&&quat_3==0&&full==0&&spkr_off==0)   //condition when tank is empty
  {
   lcd_init();        // initialising LCD
   puts("VACANT");       //printing VACANT on lcd
  }
  while(quat==1&&half==0&&quat_3==0&&full==0&&spkr_off==0)	//condition when tank is quater
  {
   lcd_init();
   puts("QUATER");      //printing QUATER on lcd
  }
  while(quat==1&&half==1&&quat_3==0&&full==0&&spkr_off==0)	//condition when tank is half
  {
   lcd_init();     
   puts("HALF");      //printing HALF on lcd
  }
  while(quat==1&&half==1&&quat_3==1&&full==0&&spkr_off==0)	//condition when tank is three-fourth
  {
   lcd_init();
   puts("3/4 FULL");     //printing 3/4 FULL on lcd
  }
  while(quat==1&&half==1&&quat_3==1&&full==1&&spkr_off==0)	//condition when tank is full
  {
   lcd_init();
   puts("FULL;CLOSE TAP");     //printing FULL;CLOSE TAP on lcd
   spkr_on=0;// Enabling speaker
  }
  while(quat==1&&half==1&&quat_3==1&&full==1&&spkr_on==0&&spkr_off==1)//enabling high speaker_off pin
  {
   spkr_on=1;//disabling speaker
  }
}
}


[TC] Bicycle Theft Guard

This antitheft device for bicycles is inexpensive and can be constructed easily using a few components.

At the heart of the circuit is a wheel rotation detector, realised using a DC micro motor. For the purpose, you can use the micromotor (spindle motor) of a discarded local CD deck mechanism. With a little skill and patience, you can easily attach a small metallic pulley covered with a rubber washer to the motor spindle. Thereafter, fix the unit in the back wheel of the cycle, like the existing dynamo assembly.






Power supply switch S1 should be kept ‘on’ when you are using this bicycle guard. When it is flipped towards ‘on’ position, the circuit gets power from the miniature 12V battery. Now LED1 lights up and resistor R4 limits the LED current. Next, the monostable built around IC1, which is CMOS version of timer LM555, is powered through a low-current, fixed-voltage regulator IC2 (78L05).

Initially, when the bicycle is standing still, the monostable output at pin 3 of IC1 is low and the circuit is in idle state. In the event of a theft attempt, forward or reverse rotation of the DC motor induces a small voltage at its DC input terminals and the internal LED of 4-pin DIP AC input isolator optocoupler IC3 (PS2505-1 or PC814) glows. As a result, the internal transistor of IC3 conducts and pin 2 of IC1 is pulled low by the optocoupler and the monostable built around IC1 is triggered.

The output at pin 3 of IC1 now drives piezobuzzer-driver transistor T1 via resistor R3 and the buzzer starts sounding to alert you. In this circuit, the buzzer remains ‘on’ for around two minutes. You can change this time by changing the values of resistor R2 and capacitor C1.

Zener diodes ZD1 and ZD2 (each 5.1V) act as a protector for optocoupler IC3. The costly GP12V/27A battery is used here due to its compact size and reliability. 12V active buzzers with high-pitched tone output may be used with this circuit. These are readily available in the market.

Note. The specific optocoupler is used here deliberately, instead of a bridge rectifier, to increase the circuit’s detection sensitivity. Never replace the same with a DC optocoupler



Source : http://electronicsforu.com/

[TC] Simple Rain Alarm

GIVES BEEP WHEN WATER IS IN CONTACT WITH THE WIRE

Rain Alarm Project view

Water is a conductor of electricity. When water is in contact with the probe then there is a flow of current which reaches to the base of Q1. Transistor Q1 is a NPN transistor which conducts. With the conduction of Q1 electron reaches to Q2 which is a PNP transistor .Q2 also conducts and current flows through the speaker. In a speaker there is inductive coil which causes motion in one direction and also produce induce current which is in opposite direction to the flow of current this induce current in the form of pulse flows through a capacitor, resistance and switches off Q1 and relax .this process repeats again and again till probe is in contact with water or we can say there is a oscillation in the circuit thus speaker diaphragm vibrates and gives a tone. Frequency of the circuit depends on the value of Speaker Coil impedance, Capacitor and Resistance Value.

Circuit Diagram of Rain Alarm
Circuit Diagram of Rain Alarm

[TC] Arduino Based Sunrise Alarm Clock

So We Want To Make Sunrise Alarm Clock Based On Arduino Board

Part List:
  1. Arduino
  2. Real Time Clock Module (http://www.sparkfun.com/products/99)
  3. 24xAssorted LEDs (In my case: 3UV, 2 Blue, 4 Red, 3 Yellow, 12 White)
  4. 24xResistors, 220ohm
  5. Solderless Breadboard
  6. Assorted wires
  7. 3x74HC595 shift registers
  8. A Shadow Display Box
  9. Frosting Spray
To put this thing together I used Elco's ShiftPWM Library to control the 24 LEDs. You could go bigger, but I wanted this to all fit into the box.
Personally, I had some PCBs from a previous project that I could fashion to make the LEDs easier to mount.
Everything is hooked up like in the schematic:

The "To SCL" and "To SDA" lines go to the Real Time Clock Module.
The parts are all mounted to the backing board of the shadow display box like so:

Load the program below in and you can set the time on the clock with the following command in serial monitor:
T(00-59)(00-59)(00-23)(1-7)(01-31)(01-12)(00-99)
T(sec)(min)(hour)(dayOfWeek)(dayOfMonth)(month)(year)
You can then set the alarm with a command:
A(00-59)(00-23)(0-1)(0-1)(0-1)(0-1)(0-1)(0-1)(0-1)
A(min)(hour)(sun)(mon)(tue)(wed)(the)(fri)(sat)
The alarm will attempt to be done with the cycle at the appropriate time set, so it will start with the UV LEDs and move through the progression fading the LEDs in and out as indicated in the arrays at the top of the program.

Arduino Code:

Leaked Gas Detector

Description:


As shown by the gas sensor alarm QM, buck rectifier and regulator circuits, integrated circuits KD28, speaker Y and so on. QM gas sensor for the QM-N5 type. Step-down transformer rectifier and regulator circuit consists of B, the bridge's rectifier D1 ~ D4, C1, C2, integrated voltage regulator 7806 and so on.
Work, adjustment potentiometer W, the power for 1 minute. When the air is clean, QM corresponds to a larger resistance value, W the partial pressure is small, so that the KD28 reset the alarm does not occur. When a combustible gas when contact with QM, QM corresponds to the resistance value is small, W partial pressure on the larger, so KD28 set, the 3 foot high output speaker to promote the work of an alarm signal. Gas left the circuit will resume normal operation.



Fridge Door Open Alarm

It beeps if the fridge door is left open for too long or hasn't closed properly, to stop food from spoiling. There are lots of other uses as well. A refrigerator or freezer door that is left open or ajar may cause the food contents to spoil. In some cases, the internal temperature of the fridge or freezer will be maintained if the refrigeration system can cope with the open door.

Complete project:



But without the door sealing in the cold air, it may be a losing battle. Running costs will certainly rise. Typically, refrigerators and freezers are in constant use in the summer months and so it is important to ensure that the door is not open for any longer than is necessary. Otherwise the fridge or freezer will not be able to keep the contents cool. And it will cost more money to needlessly run the fridge’s compressor in a futile effort to keep the contents cool.

Circuit looks like:



Even the most diligent fridge user may sometimes leave the door of the fridge or freezer open without realizing it. And tilting the fridge or freezer slightly backward so that the door will fall shut is not completely fool proof as there may be an obstruction inside the door. The obstruction could be because an item inside the compartment has moved or fallen over or because the compartment is too full. This is where the Fridge Alarm is useful.



It warns when the door of the refrigerator or freezer is left open for longer than a preset time period. It is great for indicating when someone is standing with the door open for too long and a real asset in warning when the door looks shut but is still partially ajar. The fridge alarm operates by detecting when any light enters the compartment area. Therefore it is just as useful for freezers (which normally do not have a light) as it is for fridges (which normally do). As long as there is some ambient light which the alarm can react to, it will operate.

Parts layout:



PCB layout:



Circuit diagram:


The alarm will sound if the light is present for longer than the preset period and will continue to sound until the door is closed. In practice, the preset period is adjusted so that in normal use the alarm will not sound. It will sound when the door is left wide open for too long or if left slightly ajar.

Note:

    You don't have to house it in a transparent box, as we did . . . but if you don't, you'll need another hole in the appropriate place on the box wall so light can strike the LDR inside.

UPDATE:

PCB layout has been added to download. Please click on the image below and get the PCB in EPS format. After downloading, you can view PCB in Corel Draw, Adobe Acrobat or Adobe Photoshop.

Page Rank

google pagerank

Write For Us

Submit a Guest Post

Find us on Facebook

Categories

555 Timer IC 7 segment Display 8051 Project AC Circuits Adafruit Alarms Amplifier Circuits Analog Circuits android Arduino arm processor Assembly Languange Atmel Atom Size Audio Circuits augmented reality Automotive Circuits avr Battery Circuits Bicycle Gurad bluetooth Cable TV Circuits Cambridge University Camera Technology Circuit Boards Clipping And Clamping Circuits Clocking And Timer Circuits Computing contact lens Contact Us Form Contests Controller Circuit Conversion Circuits Counter Circuits Digital Electronics diy circuits Downloads EFY EFYTimes Electronic Books Electronic Components Electronic Locks And Keys Engineering Fan Circuits Filter Circuits Fire Alarm free Frequency Fun And Game Circuits future Google Hack n Mod Ham Radio Circuits heart rate monitoring High Voltage Circuits Home Circuits IC Guide ieee Industrial Circuits Infrared Instructables Inventions ipad lcd Led Circuits Light Related Lighting Circuits Medical Circuits Meter Clocks Microcontrollers Microprocessors Mini Projects modules Movie maker NatGeo Navigation Notice Optical Fiber PC Circuits PCB Boards Physics pnp transistor Power Supplies Printing Projects Programmer Project Ideas Projectors Protection circuits Proximity Detectors Radar Radio Circuits Radio Transmitters Raspberry Raspberry Pie Remote Circuits Retis Lab RFID Robot Cars Robotics Science Science Alert Security And Safety Sensor Circuits Servo Motors Smallest Smartwatches sms Software solar cell sound application Spectram Switch Technology News Telephone Related Television Related Test And Measurement Circuits Thermal Projects Tone generator circuits Touch Screen Tutorials Wearables Wi-Fi Wireless
Like us on Facebook
Follow us on Twitter
Recommend us on Google Plus
Subscribe me on RSS