Sunday, 11 June 2017

Automatic Railway Gate Controller (Using 8051)

In general, Railway gates are opened or closed manually by a gate keeper. The information about arrival of train for opening or closing of door is received from nearby station. But some railway crossings are totally unmanned and many railway accidents occur at these unmanned level crossings.
To avoid the human intervention at level crossings completely, we need to automate the process of railway gate control.
This project deals with an interesting manner of automating the railway gate control where the gate is automatically opened or closed by detecting the arrival or leaving of the train.

Principle of operation

The principle of operation behind the working of this project lies in the functioning of IR Sensor. A Reflective type IR Sensor is used in this project.
In Reflective Type IR Sensor, the IR transmitter and receiver are placed side by side. When there is no obstacle in front of the sensor, the IR rays transmitted by the IR Transmitter will travel undetected as there are no rays falling on the IR Receiver.
If there is an obstacle in front of the IR Transmitter and Receiver pair, the IR Rays gets reflected off from the surface of the obstacle and are incident on the IR Receiver.
This setup can be configured to detect an object like a Train and in turn can be used to switch ON or OFF the loads like motors with the help of microcontroller.

Circuit Diagram


Project Components

Microcontroller Section
  • AT89C52 MCU
  • 11.0592 MHz Quartz Crystal
  • 2 x 22pF Ceramic Capacitor
  • 10uF / 16V Electrolytic Capacitor
  • 10K Resistors-2
  • AT89C52 Programmer Board
Sensor and Load Section
  • 2 x Reflective Type IR Sensor
  • 2 x 1K Resistor
  • L293D Motor Driver IC
  • Motor

Component Description

IR Sensor
  • An IR sensor is used in this project to sense the arrival and departure of the train.
  • An IR Sensor generally comprises of two components: an IR Transmitter and an IR Receiver. An IR Transmitter is a device that emits IR Rays.
  • Similarly, an IR Receiver is a device that detects the IR Rays. Photo Diodes are the most commonly used IR Receivers.
L293D Motor Driver
L293D is a motor driver IC used in this project to control the gate motor. L293D Motor Drive IC is a dual H-bridge type motor driver and is available in 16-pin Dual in-line Package.
With the help of this motor driver IC, we can control two motors at a time with both forward and reverse direction control for individual motors.
Motor drivers are generally used to drive high current drawing devices like DC Motors, stepper motors, high intensity lights, etc. They act as simple current amplifiers as their input is a low current signal usually from a microcontroller and their output is a high current signal to drive the loads.

Circuit Design

Major components of our project are 8051 microcontroller (AT89C52), Reflective Type IR Sensor, L293D Motor Driver IC and a Motor.
The mandatory connections for 8051 MCU include oscillator circuit, reset switch and EA Pin.
A crystal oscillator of up to 20MHz can be used as a source of external clock. In this project, an 11.0592 MHz quartz crystal oscillator is used. To complete the external oscillator circuit, two 22pF capacitors are used. Finally, the EA pin is pulled high using a resistor.
Now, let us see the actual connections required to implement the project. In that, first is the L293D Motor drive. The inputs (IN1 and IN2) to the motor driver (Pins 1 and 2) are given from Port 0 of the microcontroller.
But before connecting them, two 1K resistors are used to pull the Port 0 pins high. Now, connect the motor driver input pins i.e. IN1 and IN2 to first two pins of Port 0 i.e. P0.0 and P0.1.
A motor is connected to OUT pins of the motor driver.
Finally connect two IR sensors to the microcontroller: one for detecting the arrival of the train and one for detecting the departure of the train.
So, connect the data outputs of the IR sensors to the pins P3.6 and P3.7 of the microcontroller.

Working

The working of the project is very simple and is explained here.
  • Practically, the two IR sensors are placed at left and right side of the railway gate. The distance between the two IR sensors is dependent on the length of the train. In general we have to consider the longest train in that route.
  • Now we’ll see how this circuit actually works in real time. In this image, we can see the real time representation of this project.
  • If the sensor 1 detects the arrival of the train, microcontroller starts the motor with the help of motor driver in order to close the gate.
  • The gate remains closed as the train passes the crossing.
  • When the train crosses the gate and reaches second sensor, it detects the train and the microcontroller will open the gate.

Advantages and Applications

  • An Automatic Railway Gate Control is implemented with very simple hardware and easy control.
  • Human intervention at level crossings can be removed with the help of this project and many railway level crossing accidents can be prevented.

Limitations

  • The system can be implemented more efficiently by incorporating more efficient sensor network.
  • A combination manual wireless control and sensors based control can be used for better operation.

Automatic Door Bell With Object Detection

We all have a doorbell at our homes. When a visitor comes to our house, he searches for the doorbell switch and then rings it to let us know his presence. If the who came to our house cannot find the doorbell or else if the person is so short that he cannot reach the doorbell, what can be done? How will it be if we use an automatic doorbell which rings as soon as a person arrives at our place? There are no more hassles. The person who comes to our house need not search for the doorbell and press it any more. If we install this automatic doorbell using object detection circuit, the circuit will automatically sense the presence of the person and it rings the doorbell.

Circuit Diagram of Automatic Door Bell Using Object Detection:


This circuit operates using a pair of ultrasonic transmitter and receiver modules which are used to detect the person and then if the person is detected, the door bell is automatically turned ON when the person is in-front of the door.
The ultrasonic transmitter operates at a frequency of about 40 Kilo-Hertz. That means it continuously transmits the ultrasonic waves of about 40KHz. The power supply should be moderate such that the range of the transmitter is only about one or two meters. If the transmitting power is less than one meter, then there is a chance that the person who is one meter away is not detected. Also, if the range is set to be very large, then it may lead to false triggering, meaning that, the objects far away from our door are considered as the visitors and the alarm rings. This can be a nuisance for us if the alarm rings for every object or person far away. So, to avoid both the problems, the transmitting power is kept to an optimum level.
The ultrasonic receiver module receives the power at the frequency same as that of the transmitter’s so that noise will be eliminated and we get less false triggering. The sensitivity of the receiver can be tuned by using the 500K-ohm variable resistor arranged as a pot in the circuit. By tuning this properly, we can achieve the desired results. The output of our circuit is given to a buzzer circuit which acts as a doorbell in our case. The receiver in this circuit uses IC LM324 which is internally has four op-amps. Out of the four op-amps, we are using only four of them and leaving the other one unused as it is not much required in our case. The three op-amps are used in cascaded arrangement to provide high gain as well as noise free output.
An opto coupler is used at the output to avoid any interaction between our circuit and the door bell.
Assemble the circuit on a PCB as compactly as possible and then attach it to your main door. Thats it! You may provide a power supply using a 9V DC adapter with filtered and regulated output. If the 9V adapter with regulated output is not available, then we recommend you to use a 12V unregulated DC adapter with 7809 voltage regulator.

Solar Tracking System

Generally, solar panels are stationary and do not follow the movement of the sun. Here is a solar tracker system that tracks the sun’s movement across the sky and tries to maintain the solar panel perpendicular to the sun’s rays, ensuring that the maximum amount of sunlight is incident on the panel throughout the day. The solar tracker starts following the sun right from dawn, throughout the day till evening, and starts all over again from the dawn next day. 




Fig. 1 shows the circuit of the solar tracking system. The solar tracker comprises comparator IC
LM339, H-bridge motor driver IC L293D (IC2) and a few discrete components. Light-dependent
resistors LDR1 through LDR4 are used as sensors to detect the panel’s position relative to the
sun. These provide the signal to motor driver IC2 to move the solar panel in the sun’s direction.
LDR1 and LDR2 are fixed at the edges of the solar panel along the X axis, and connected to
comparators A1 and A2, respectively. Presets VR1 and VR2 are set to get low comparator output
at pins 2 and 1 of comparators A1 and A2, respectively, so as to stop motor M1 when the sun’s
rays are perpendicular to the solar panel.
When LDR2 receives more light than LDR1, it offers lower resistance than LDR1, providing a
high input to comparators A1 and A2 at pins 4 and 7, respectively. As a result, output pin 1 of
comparator A2 goes high to rotate motor M1 in one direction (say, anti-clockwise) and turn the
solar panel.
When LDR1 receives more light than LDR2, it offers lower resistance than LDR2, giving a low
input to comparators A1 and A2 at pins 4 and 7, respectively. As the voltage at pin 5 of
comparator A1 is now higher than the voltage at its pin 4, its output pin 2 goes high. As a result,
motor M1 rotates in the opposite direction (say, clock-wise) and the solar panel turns.
Similarly,

Similarly, LDR3 and LDR4 track the sun along Y axis. Fig. 2 shows the proposed assembly for
the solar tracking system.
For more detail visit…
http://electronicsforu.com/electronicsforu/circuitarchives/view_article.asp?sno=745&article_type
=1&id=674&tt=unhot&b_type=new