Pages

Sunday, November 28, 2010

Goal Achieved


We finally achieved Automatic Railway Gate Control and Track Switching using Magnetic Sensors and a simple switch as an backup. 

Modules and Results

 Module 1: Gate closing


When foreside sensor gets activated, interrupt is sent to the microcontroller the microcontroller then instructs the gate motor to be turned on in clockwise direction and the gate is closed, the motor is stopped by limiting switch and stays closed until the train crosses. When the foreside sensor is interrupted the same time the buzzer and traffic signal for the road users sets on.
Result
: buzzer starts ringing and red light will glow in traffic signal to control traffic.


Module 2: Gate opening
 


 After the train passes through the gate and reaches aft side sensors. The aft side sensor gets activated and sends signal to MC which indicates the motor to turn in anti-clockwise direction and gate opens and motor stops.
After the aft-side sensor is activated the MC stops the buzzer and turns the traffic signal light to green.

 Result: buzzer stops and green light will glow in traffic signal.

 Discussion for Module 1 & 2The idea of using magnetic sensors was caught when we happened to see a project on Automatic Weigh bridge, in which one of their module was to detect a non-vehicle object (ex:cow) so they had used magnetic sensors to distinguish the vehicles from non-vehicular objects. So modified the concept and used it in our module.

 Module 3
Track Switching Part 1



 
Using the same principle as that for gate control, we have developed a concept of automatic track switching. Considering a situation where in an express train and a local train are traveling in opposite directions on the same track; the express train is allowed to travel on the same track and the local train has to switch on to the other track. Indicator lights have been provided to avoid collisions .Here the switching operation is performed using a DC motor. In practical purposes this can be achieved using electromagnets.
                            Consider a situation where in an express train and a local train are traveling in opposite directions on the same track; the express train is allowed to travel on the same track and the local train has to switch on to the other track. Two sensors are placed at the either sides of the junction where the track switches. If there’s a train approaching from the other side, then another sensor placed along that direction gets activated and will send an interrupt to the controller. The interrupt service routine switches the track. Signal light for train 2 is turned red. Here the switching operation is performed using a DC motor.

Result: red light will switch on at the train signal to stop train 2 and track switching will take place.

Module 4: Track Switching Part 2


 After the Train1 passes on to the switched track the Train1 is detected by a sensor on the switched track. The DC motor rotates in anti-clockwise direction and the track switches back to normal and the train signal turns green. The train passes on the other track.
Result: green light will switch on at the train signal post and track switches back to its normal state and both the trains do not collide and move in separate tracks.




Discussion for Module 3 and Module 4In these modules we faced difficulty of making the track switch to the appropriate amount by the motor, we thought of using a higher powered motor but then we happened to notice one of our partners playing with the rubber band which reminded us of its elasticity property. So, we used the band to make out track switch to the precise amount,

Other Minor Changes


 Using PVC instead of Card Board.
Using Manual Switch instead of Sound Sensors, these switches can be placed beneath the tracks so due to the pressure of the train the train is detected and the respective modules work accordingly



Soldering is done with copper Wire without the sheath. so its easy to debug the circuit..

Switching to Magnetic Sensors instead of IR

Switching from IR sensors to Magnetic Sensors  due to the following reason
-IR sensors are not reliable
-They stop working suddenly(Replace the IR sensor)
-It's difficult to debug which sensor is burnt out or stopped Working
-IR sensor senses daylight sometimes and provides wrong input to the MC
 
 

New Train Model

This is our new train model, with IR sensors.
Chosen this model cause of its small size and the track switching mechanism.

Sunday, November 14, 2010

Resolving the Software Issues

-Isolating the MC prevents the program on the MC from going corrupt/erased.

-Better coding techniques are implemented using the inbuilt header files interrupt.h delay.h

Resolving the Hardware Issues

1) Replacing IR sensors with Magnetic Sensors, they are far reliable.
2) Isolating the MC to prevent the program from erasing
3)Smaller track model.
4)Track switching is easier than the first one
5)DC motor with limit switches are used to cut the cost.
6)Soldering with copper wire without the outer covering/sheath
7)Using PLYWood as a base instead of card board.

Coding the Software

Coded using Keil Micro Vision and burnt the pgm on the chip using a universal burner.

-Simple C program

Click here 2 view C code


Problems Faced:
1)Some declaration faults
2)Syntax Errors
3)Code may change after its implemented on the hardware
4)Code may get erased due to spikes


Building the Hardware

IR SENSORS

AT89S52

Back

The Track Model



                                                                           The Train

                                                                       Track Switching


Problems Faced:

1) IR sensors are not reliable
-They stop working suddenly(Replace the IR sensor)
-It's difficult to debug which sensor is burnt out or stopped Working
-IR sensor senses daylight sometimes and provides wrong input to the MC

2)Railway Track is too large (portability is tough)
-Track Switching is difficult in the selected model

3)Keeping the model on the Card Board makes the model shaky 
-No firm Grip/ support for the model
-Wires keep getting disconnected cause of this

4)Soldering Problem
-Due to lot of connections to be made using wires to make the connections and solder them 
causes a lot of confusion and makes it difficult to debug.

5)Sound Sensor Problem
-Sound sensor keeps detecting unwanted sounds
-Defining it to work on a particular frequency is not reliable

Design

Agenda:

• High level Diagram of Model 1
• Low level Diagram of Model 1
• High level Diagram of Model 2
• Low level Diagram of Model 2
• Justification
• Modules
• Test cases
• Algorithms


Click here 2 view the design Document

Introduction

AGENDA :
• Problem Statement
 Purpose and Scope
 Over all Description
 Design and implementation constraints
 Product Features
 H/W and S/W requirements
• References


Click here 2 view the Introduction Document

Goal

To automate gate control and track switching 
using IR sensors and sound sensors  at railway 
crossings & track switching for better efficiency and safety.