school of engineering beng hons electrical and electronic engineering
Search for question
Question
SCHOOL OF ENGINEERING
BEng (Hons) Electrical and Electronic Engineering
Sensor-based Entry System
Learning Outcomes
This assignment achieves the following learning outcomes:
LO2: Effectively apply relevant practical and laboratory skills to advanced embedded
system problems (EP3p)
LO3: Critically evaluate relevant technical literature and other information sources
(EP4p)
LO4: Critically apply quantitative and computational methods in order to solve
embedded systems problems and to implement appropriate actions (EA3p)
Weighting
This assignment will form 40% of the total module mark.
NOTE:
The assignment is to be undertaken individually. Any instance of plagiarism (i.e.
attempting to pass off the work of others as one's own), from whatever source: books,
internet, other students etc. will be zero rated. For further information related to
Academic Misconduct, please refer to Section 13 of the module guide.
1 1 Introduction
1.1 Coursework Task
The aim of this coursework assignment is to:
•
•
Design a preliminary hardware design for a specified microprocessor-based
system.
Develop and implement the hardware and software of the designed system.
The developed system is a sensor-based entry system, which consists of a PIR sensor,
buzzer, buttons, LCD display, LEDs, one motor and numeric keypad. The system is
activated or deactivated through a system button and a five digit activate/deactivate
code. When the system is activated, the LCD display will show the word "ACTIVATED"
for 5 seconds and then proceed to the system's default state, with LED1 on to show that
it is powered and working.
The PIR sensor will then correctly sense the presence of a person and simulate entry of
a person through a gate by displaying “OPEN” on the LCD display for 10 second, LED2
is ON and rotate the motor by 90 degrees to show the gate barriers are in OPEN STATE
implying that the person is allowed entry. After 10 seconds when the barriers are in
OPEN STATE and if the PIR Sensor does not sense human presence, the LCD display
will show "CLOSE", the buzzer playing a warning sound and the motor rotating back to
the original position (that is CLOSE STATE) to simulate the gate closing. LED2 is then
OFF when the gate is closed. In the event of emergency, whereby an emergency button
is pressed, the LCD should display "99: GATE OPEN". A warning alarm is sounded in
intervals of 5 seconds, LED2 is continuously blinking in intervals of 5 seconds. The servo
motor will be in OPEN STATE to simulate the barrier gate is open. The text displayed on
the LCD, warning alarm and LED2 blinking should repeat continuously until the system
is reset.
To reset the system to normal default mode, the user will need to press the reset button
for 8 seconds and key in the reset code of four digit numbers. The default mode is where
the LCD display shows "GATE CLOSED", LED1 is ON, LED2 is OFF, buzzer is OFF and
the motor is at the CLOSE STATE position to simulate the barrier gate is closed.
The system can be deactivated by pressing the system button and keying in the four
digit activate/deactivate code. When the system is deactivated, both LEDs will be
permanently ON and the servo motor will be in CLOSE STATE, to show the barrier gates
are closed for no entry. The LCD display will show the word "DEACTIVATED"
permanently until the system is activated again.
1.2 System Hardware
The system hardware consists of the following components, as listed in Table 1. You will
need to design a system prototype on Proteus and also construct a hardware basic target
board with the components listed in Table 1, but pin connectors will need to be used to
connect and disconnect the PIR Sensor, LCD Display, buzzer, motor and numeric
keypad components. You will also need to consider adding connectors to allow the target
board to be connected to MPLAB X using the PICKit debugger.
2 Component
System Button
Reset Button
Emergency Button
PIR Sensor
Buzzer
LED1
LED2
LCD Display
Servo Motor
Numeric Keypad
Description
A button used to activate and deactivate the
system.
A button used to trigger the system to reset to the
default state.
A button to trigger an emergency event.
To detect human movement near the gate and
barrier gate to be open.
A buzzer to be enable when activating a sound or
alarm.
An LED showing the system is powered and
operational.
An LED for showing gate barrier OPEN and when
emergency status is triggered, LED2 is required to
blink in intervals of three seconds continuously.
Displaying Message stated in Section 1.1.
For simulating gate barrier is OPEN or CLOSE.
For keying in code during reset of system.
Table 1: System Hardware List
Each student will have to refer to Table 2 to determine the allocated port for the Reset
button, emergency button and PIR Sensor components that you will have to integrate
into the assignment.
Student No.
RESET Button
Emergency Button PIR Sensor
2240518/2
RD5
RD6
RD7
2013839/1
RD3
RD2
RD1
2016223/2
RDO
RD1
RD2
2011950/1
RD6
RD5
RD4
0702367/1
RC3
RD1
RDO
2007269/1
RD2
RD1
RD3
2240517/2
RD7
RD5
RDO
2011806/1
RD6
RD7
RC3
Table 2: Electronic Component Allocated Ports Connection
1.3 System Specification
The completed system will be required to demonstrate the following supported
functionalities:
1) The system will be activated and deactivated when the user presses the system
button once for at least 3 seconds and inputting a four digit activate/deactivate
code.
2) When the system is deactivated, both LEDs will be ON to show that barrier gates
are closed and there is no entry. The servo motor will be in a default state, which
is in the CLOSE STATE, to show the barrier gates are closed for no entry.
3 3) In the system deactivated state, even if human presence is detected by the PIR
sensor, the barriers will remain closed.
•
During this deactivated state, the LCD display will show the word
"DEACTIVATED".
• Servo motor will be in CLOSE STATE.
4) When the system is activated, the LCD display will show the word "ACTIVATED"
for 5 seconds and then proceed to the system's default state. LED1 will be ON to
show that the system is powered and functioning. Moreover, in default mode, the
LCD display shows "GATE CLOSED", LED1 is ON, LED2 is OFF, buzzer is OFF
and the motor is at the CLOSE STATE to simulate the barrier gate is closed.
5) When the system is activated and the PIR sensor detects the presence of human
within a range, the barrier gate will open for 10 seconds; before closing the barrier
again. The following should be shown for this scenario:
• When the barrier is open, the servo motor will move to a 90 degree angle to
illustrate the barriers opening, LED2 will be ON for 10 seconds to show the
gate is open.
• The LCD display will show the word "OPEN" for 10 seconds and then "CLOSE"
to show that the barrier gates are now closing, if the PIR Sensor does not
sense any further human presence.
• When the barrier gate is moving into the CLOSE STATE, the buzzer will play
a warning sound and the servo motor will move back to the CLOSE STATE to
illustrate the barrier gate has closed. LED2 will then be OFF to show that the
gate is closed.
6) When the Emergency (ER) button is pressed, the system at any point in time will
then display on the LCD screen “99: GATE OPEN”. A warning alarm is sounded
in intervals of 5 seconds, LED2 is continuously blinking in intervals of 5 seconds.
The servo motor will be in OPEN STATE to simulate the barrier gate is open. The
text displayed on the LCD, warning alarm and LED2 blinking should repeat
continuously until the system is reset.
• If system is in deactivated state and ER button is pressed, then a message on
LCD should display “No ER: Deactive”.
7) To reset the system to normal default mode, the user will need to press the Reset
button for 8 seconds and key in the reset code of four digit numbers. The default
mode is where the LCD display shows "GATE CLOSED", LED1 is ON, LED2 is
OFF, buzzer is OFF and the motor is at the CLOSE STATE position to simulate
the barrier gate is closed.
You will have to complete the development, programming and all testing of the
assignment in MPLAB X, Proteus and on a constructed target board, prior to
demonstrating a working completed simulated and physical product during the
demonstration session.
Some supporting materials will be made available on the module contents on Moodle to
help you with this activity. However, it is expected that you will need to perform further
independent research in and out of the scheduled learning and teaching session to
4 complete this assignment. In addition, the final code will be marked on both functionality,
quality of commenting and structure.
Each student is required to keep an electronic logbook (see logbook guidance notes and
example on Moodle) of the problems they encountered and how these problems are
resolved. The following information should also be available in the logbook:
Knowledge and Understanding
Details of Entry Records, Implementation, Debugging and Testing Procedures
Illustrations, Figures, Tables, Schematics, Diagrams and References
Reflections and Observations
Time, Date, Day, Statement of objectives, Session summary and Suggestion
for next session.
The logbook should consist of approximately 2000 words ± 10% (excluding references
and appendices) and also state how you have ensured to practice hardware and/or
software sustainability, maintenance and disposable techniques for this assignment. A
draft logbook template has been made available on Moodle. The logbook entries should
document the development progress of the hardware and software tasks that you have
performed throughout the semester for this assignment. The final MPLAB X codes and
files; and the Proteus simulated files includes the .hex file shown in the
demonstration will need to be submitted to the assignment box links on Moodle
by the 29 April 2024, refer to Section 2.4 of the deadlines. The submission links
will be available on Moodle prior to the demonstration session. You are required
to observe best professional practice at all times.
2 Assessment Deliverables
2.1 Hardware
You will be required to construct the hardware outlined in Section 1 for this assignment.
This will include the following:
•
•
•
An overall block diagram illustrating your system design.
A schematic diagram (pin diagram) illustrating the chosen microcontroller and
showing the pin connections and circuit connectivity of the system components.
If PCB is constructed, you will also need to include the PCB layout diagram.
If Veroboard is used, you will need to include the Veroboard layout planning sheet.
For students that are considering developing a PCB board, you will need to email your
PCB layout file to Mr Erik Kis-Varga (e.kis-varga@bolton.ac.uk) by the 22 March 2024
(Friday), 5.00pm, to ensure your PCB board will be ready in time for demonstration.
5