Вы находитесь на странице: 1из 10

Title for the analysis

There is a steady increase in the number of vehicle ownership due to increase in population and economic prosperity. Places like shopping malls and stadiums attract large crowds during peak periods and most customers travel with their own vehicles. It is a common sight that the car parks are always full during this period. Research has indicated that a full car park does not deter customers from queuing at the car park for significant periods of time. Thus, we are designing and constructing a PIC microcontroller-based system with PC interface for a sensory car park with indicators to guarantee parking space on arrival. Furthermore, we also provide valuable information to customers to save their precious time on looking for an empty parking space. Last but not least, we also enhance the security in a car park.

1.1

Build of Material (BOM) List No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 Description Microcontroller PIC16F877 40 pins IC socket 20MHz crystal 5V voltage regulator LM7805 Heat sink Diode 1N4001 Tact button LED 5mm (3 red, 1 green) Mini buzzer Transistor 2N2222 LCD 16 x 2 Resistor ( 16 x 1k, 2 x 10k) Capacitor (2 x 33pF, 4 x 10nF, 15 x 0.1uF) Capacitor polarized (4 x 10uF) LDR Copper board FR4 10 way PIC socket 2 way power Molex 3 way Molex 2 way Molex 1 x 40 Header pin 1 x 40 Header socket MAX232 H-Bridge motor driver IC L293D 16 pins IC socket DB9 female pin DC motor No. of Units 1 1 1 2 2 2 4 4 1 1 1 18 21 4 8 2 1 10 16 3 2 1 1 1 2 1 1 Total: Price (RM) 21.00 1.00 2.00 2.40 2.00 0.60 2.00 0.80 1.50 0.40 18.00 1.80 4.20 1.20 8.00 32.00 0.50 10.00 11.20 1.80 1.60 2.00 4.00 7.50 1.20 3.00 55.00 196.7

Theory

RS-232 Inputs Sensors Microcontroller PIC16F877

Outputs LCD LEDs

Push Buttons

Motor
Buzzer

Power Syste AC Adapter

+5V Voltage Regulator

Figure 1 Overall Block Diagram of System

The parking lot consists of one entrance and 6 parking spaces. The entrance consists of a gate and a display showing the precise number of available parking lots and suggested empty parking lots. The sensory car park system with indicator will provide real-time parking availability information to customers with the use of a counter and LCD. The LCD will display the number of parking lots available and suggest empty parking lots to customers. LDR sensors are used to detect vehicles entering the car park and vehicle occupancy at each parking lot. The control barrier is used to regulate access to the car park. The car park plan and occupancy information will be demonstrated on the PC using GUI. A panic button is used to alert security personnel in case of emergency.

Operation of the Circuits Main Board The microcontroller used in this system is PIC16F877. It has 40 pins of which 32 are I/O pins. A voltage regulator is used to provide regulated 5V to the microcontroller. To provide an external clock signal input to the microcontroller, a 20MHz crystal is connected to OSC1 and OSC2 of the microcontroller. The inputs to our system are the push buttons and the LDR sensors. There are a total of 4 buttons and 8 sensors in the mainboard. One button functions as a RESET button to reboot the system while another three buttons function as switches to trigger the DC motor and the buzzer. The LDR sensors are used to detect the presence of vehicles. They are connected to the analog input pins (AN0 to AN7) of the microcontroller which have the built-in Analog to Digital Converter (ADC) function. Three-way Molex connectors (5V; Ground; Signal) are used on the main circuit board to connect to sensor boards located at each parking lot on the demo parking lot. The outputs of our system are the LCD, LEDs, DC motor and the buzzer. The LCD is a 2x16 display with 4 bits interface. There are 2 LEDs to indicate the situation of the car park: red to indicate that the car park is full and green to indicate that parking lots are still available. The DC motor is placed at the entrance gateway to allow the bar to open when the driver enters the car park, and close after the driver has entered. Lastly, the buzzer is used as an emergency alert.

Mainboard Schematic and PCB

RS-232

RS-232 Circuit and PCB

The serial communication between the microcontroller and PC takes place via the RS232. The transmitter and the receiver pins from the microcontroller (pin 25 & 26) are connected to T1IN and R1OUT of the MAX 232 IC, while T1OUT and R1IN are connected to the DB9 terminal block. Besides that, a USB to DB9 cable is used to connect the microcontroller with PC in order to transmit and receive data.

Light Dependent Resistor (LDR)

LDR Circuit and PCB

LDR or photo resistor is a resistor whose resistance varies according to incident light intensity. When the light intensity is high, the LDR resistance will be lower. Voltage measured at R1 (1k) is a reference voltage and the signal pin will obtain the voltage value after the LDR. According to the voltage divider rule, when the LDR is blocked, the resistance of the LDR increases, hence the voltage dropped substantially after the LDR. Through the built-in ADC function of analog inputs, the voltage value is converted from analog to digital, so the microcontroller can read and process the values.

DC Motor and Driver

DC Motor and Driver Circuit and PCB

We provided an extra power source for the DC motor as the main circuit board cannot provide enough current for the DC motor. The DC motor drains a large amount of current. We used the L293D motor driver IC which can trigger up to 2 DC motors. The DC motor is connected to pin 3 & 6 of the L293D, and it is controlled by the signal pin (pin 2 & 7) which is connected to the PWM pins (pin 16 & 17) of the microcontroller. The PWM pins can control the speed of the motor as well.

Вам также может понравиться