Nothing Special   »   [go: up one dir, main page]

Lab Assignment Fall 2009

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Embedded Systems Design (EE3203)

(Session 2007) / (Section A&B)


Lab Assignment


Occupant Counting System

Occupant counting system has wide range of applications; with slight modifications in
the design, it can be used for keeping track of the number of people visiting/entering a
hall/theater, counting the parts being manufactured/packed/shipped on an assembly line,
regulating the number of people boarding an airline/bus, and many other such applications. It is
most commonly used as an automated parking lot access control system.

We are to use such a system for controlling the access to the parking lot of a shopping
mall. You are required to design and implement such a system using two PIC18F4520 micro-
controller boards, and a daughter board (you may use PCB or veroboard for this) hosting sensors,
and motor drive relay(s).

While designing this system, it is assumed that there is only one gate for the parking area,
which is used for Entrance as well as Exit. We shall assume that the parking lot can
accommodate a maximum of 15 cars only. We will also assume that at any one time, only one
car will be approaching the gate, whether for entry or exit; in addition, unless one car has crossed
the gate and the gate closed again, another car will not approach the gate.

The gate remains normally closed, and opens up only when either a car approaches for
exit or a car approaches for entry while there is space available in the parking lot. If the lot is
already full, i.e. there are 15 cars inside the parking lot, the word FULL should be displayed on
the serial window. If a new car now approaches for entry, the gate will not open and will remain
closed. Of-course with parking lot full, if a car approaches the gate from inside for exit, the gate
will open and once the car is out of the parking area, the FULL sign will turn off and the display
will once again show the total number of cars in the parking lot. Whenever the parking lot is not
full, i.e. there is room for additional cars; the display would show the actual number of cars
inside the lot on the serial window.

In order to implement this system, there are going to be 2 opto-sensors installed one on
either side of the gate. When a car comes within the range of one of these sensors, the system
will know that a car has approached the gate, either for entry or exit, depending upon which
sensor gave the signal. The system may use this signal to open the gate. The system must take
into account that the car may not proceed further from this point, i.e. for example a car
approaching for entry may turn back and not enter the parking area after the gate opens. In such a
case, the display count should not be incremented and once the car has moved out of the sensor
range, the gate should be closed. On the other hand, if the car moves forward and crosses the
gate (it is assumed that the two sensors are place in such a way, that when the car is crossing the
gate, it would be in the range of both the sensors for some time and hence both sensors would be
generating their signals at that time) it would proceed all the way, i.e. would not reverse at that
time thus the display count should be appropriately increment or decremented only at this
stage. The signals from these two sensors are to be timed up with the two external interrupt pins
of the micro-controller. These interrupts will be used to indicate an approaching car.
Page 1 of 2

There would also be two additional sensors, either opto or proximity type, one to indicate
the FULLY OPEN position and the other for indicating FULLY CLOSED positions of the
parking lot gate. This information is to be used to stop driving the motor on reaching either of
these two extreme positions in order to avoid damage to the motor.

All the sensors and relays are derived from a single microcontroller but you are required
to transfer status of the parking lot to another microcontroller using SPI protocol. In addition, the
system will use second controllers serial port to display the status of parking lot on a computers
serial console window. Parking lot status, i.e. either the number of cars inside the lot or the word
FULL in case of 15 cars, would be sent to the PC console whenever any car approaches the lot
either from inside or outside the lot. The same micro-controller setup will also function as a
Time-of-Day clock, displaying seconds and minutes and hours. The serial window should display
the following information:


Clock: Hours: Minutes: Seconds
Status of parking lot: Full or Empty
No of cars inside:1-15


To summarize, the overall system will have 2 opto-sensors for detecting the approaching
car, one DPDT (double-pole double-throw) relay for driving the motor in one direction for
opening the gate and in the other direction for closing the gate, another SPDT (single-pole
double-throw) relay to cut the motor power once the gate in fully open or closed, two
opto/proximity-sensors for detecting the gate being fully closed and fully open.


The submission deadline for Section A is Monday, Dec. 21, 2009
The submission deadline for Section B is Monday, Dec. 21, 2009




CAUTION
Copying of someone elses design, C code or using someone elses hardware or getting
hardware made from someone, e.g. from College Road or other acquaintances would be
treated as CHEATING and will be dealt with accordingly.

Page 2 of 2

You might also like