Showing posts with label mini projects. Show all posts
Showing posts with label mini projects. Show all posts
Continuous monitoring of level in an over head tank is an hectic task as we have to turn on the motor pump when ever the level of water is low and to monitor all the time till the water has filled completely in the tank else the water would over flow, to avoid this job of monitoring the water level we have assigned this burden to the technology.
Now well learn how to built a water level monitoring system and how to automatically switch on and switch off the motor.

Basic block diagram ::

Working of devices:

H-bridge:   Micro controller has logic high on all the pins and certain amount of current passing through them, but the current present in the pins is not sufficient to run the motor, so we use the amplifier to obtained the required rated current, to get this one has to use a multi staged amplifier to get the required rated current of the motor, we can normally use a class c amplifier to get the required current, but if we want to change the direction of rotation of motor then we have to physically change the direction of motor, so in order to avoid these issues we have come with a concept called as h-bridge.
the working of the h-bridge is such that when logic [1 0] to the transistors 1 and 4 is given to the pins of the ic then the motor rotates in the clock wise direction and when the input[0 1] to them then the motor rotates in the anti clock wise direction, and if the logics[1 1] or [0 0] is given then the motor will be stopped.

Motor: 
here we use a dc motor which work on 12v dc voltage and a current of 200 mA, this rotate in clock wise for[1 0] and in anti clock wise for [0 1]

Working of the project:

   We connect 2 pins of the micro controller with some connectors and place the other end of the connectors in the over head water tank in 2 different positions that is one at the extreme top till where we want to fill the tank and one at the bottom i.e the position of the water in the tank at which we want the motor to turn on

then we connect connectors to the ground voltage and then place this connection at the extreme bottom of the over head tank such that this will touch the bottom of the tank

let us name the pin of uc which is at the bottom of the micro controller as low and at the top as high.
now as the initial condition let us consider the water level in the tank to be at the half, so the ground and low pin are shorted and the logic level 0 is supplied to this pin1 of ic and as the high is not in contact with ground this will give us logic 1 to the ic and at this level we dont want the motor to be turned on, so now we have pin 2 as high and pin 1 as low and now we give either [1 1] or [0 0] to the h-bridge ic such that the motor is off

  Now if the water level is reduced such that the water dosent even touch the low pin then the low pin also supply logic high and high pin also supply logic high and now we need the motor to turn on so now we give either [1 0] or[0 1] to the micro controller as we dont consider the direction of rotation of the motor.

As the motor is turned on the water level in the tank increases gradually, when the water level increases to the pin high then both the pins both give logic zero since they are shorted with the ground, now we have to turn down the motor so we give [1 1] or [0 0]. In this way the water level is monitored itself and the motor is automated.

Circuit diagram:

Power supply:

 Unlike other projects we need here both 5v dc supply along with 12v dc supply to drive the motor so here we use 2 voltage regulators and a basic 15v transformer to convert the 220v dc to the required voltage rating

HOME AUTOMATION USING BLUETOOTH AND PIR SENSOR ::


         This Project aims to implement controlling of the appliances around us in our presence using Bluetooth and getting the work done with the less effort by us. 

     Automation helps us to control the devices in home, office or some other place, what could you believe that you can switch on a tv, turn on an ac from the place you are present using a device in your hand...!!!


     Use of PIR(passive infra red sensor) senses our presence illuminates the room and activate the bluetooth device and by which the appliances can be controlled. PIR is used here to save the power by making the bluetooth receiver in sleep mode when ever it is not used.

Block Diagram:

                 

Working of devices ::

Passive Infra Red:: PIR is a device which recognizes the active human presence. Then pir sensor give the logic high to the micro controller indicating the presence of a human
The 3 pins to the PIR are one for giving the power supply, one for the ground and other is the output pin connected to any one pin of the ports of micro controller which indicates the presence of a person. As long as there is no person detected then the sensor give logic 0 to the micro controller, when there is a active human presence then the logic high is sent to the micro controller indicating that a person has entered the room.

Bluetooth receiver::
     As any one know the application of bluetooth is to exchange the data, similarly here we use the bluetooth receiver module to receive the data which we have sent to the automation device in order to indicate the micro controller what operation has to be done. 
      For this purpose the bluetooth module is connected serially to the micro controller using serial communication channel and the out of serial communication is connected to any pone pins of the ports of the micro controller, the logic of which device to turn on and which device to turn off is written in the programming part, and the bluetooth device becomes active only when the PIR sensor detects a person(in our project), till the person is not detected the receiver is in power down mode, once the sensor senses a person the device turn on and will be waiting for the input from the user.

Relay Switch: 
Relay switch is used to connect the appliances to the micro controller output pins as the home appliances work on 220v ac power supply. As we cannot connect 220v power supply directly to the micro controller we use a relay switch. 
    The function of the relay switch is that when ever the output from the micro controller is high then the connection of the 220v is given to the appliances and when the out of the MC is logic low then the switch is connected to the ground. This avoids the problem of connecting the high voltage working devices to the micro controller.

Working of the project ::
    Intially all the pins of the micro controller will be in logic high position, once we connect peripherals to the MC then all the pins are made logic low to implement the logic.  Initially the output of the PIR pin is logic low when there is no presence of the person, once the person is detected the bulb of the room turn on at the same time activating the bluetooth receiver. once the bluetooth is turned on then it waits for the command from the user from his electronic device containing bluetooth controller app.  From that app when a particular button is pressed then it is sensed and is detected by the bluetooth device and based on the logic written on the micro controller the device is turned on and can be turned off. 

Circuit: 


POWER SUPPLY::
Supply to the micro controller is given via transformer which gives 15v ac output with 500mA current, then the output of the transformer is connected to the bridge rectifier which give constant 5v dc output which is given to the micro controller.
logic implementation ::  (using keil uvision software)
#include
sbit pir= P^1.0;
sbit bluetooth = P2^5;
sbit device1= P0^1;//device 1 to pin 0.1
sbit device2= P0^2;//device 2 to pin 0.2
sbit device3=P0^3;//device 3 to pin 0.3
void main()
{
int i;
wihle(1)
if(pir==1)//person detected
{
device1=1;//light on
tcon=0x20;
scon=0x50;
device1=0;
device2=0;
device3=0;
if(RI==0);
{
i=sbuf;
if(i==1)
device1=0;
elseif(i==2)
device2=1;
elseif(i==3)
device2=0;
elseif(i==4)
device3=1;
elseif(i==5)
device3=0;
}
else
{
device1=0;
device2=0;
device3=0;
}
}
}