” CE860语言程序 写作、C/C++编程代Advanced Embedded Systems Design CE323/860 Ali Hoshiar Spring 2021CE323/CE860 Advanced Embedded Systems Design Assignment 2The assignment is worth 25% of the total mark for this module. This assignment is to design a homealarm system based on the mbed NXP LPC1768 and its virtual board (2 LEDs, 2Switches, 1 LCD, 1 virtualkeypad, 1 alarm-LED) or based on the Arduino and virtual board on tinkercad. The home alarm systemspecification is given below. The Sensors mentioned below will be replaced with the switches in thevirtual extension board and the alarm is replaced with a LED in your design. Based on the specification,you need to develop a formal specification using a graphical representation (preferably UnifiedModeling Language (UML)). The UML specification should include structure diagrams (class diagramsand/or object diagrams), and behaviour diagrams (state machine diagram, sequence diagram). Theformal specification should be written in a report. Then you must write a C/C++ program to implementthe design of the home alarm system. You also need to make a demonstration in the lab.The report:The report should be in PDF and must include a cover page with the module name, student name andID. The source code should be included in the report. The maximum length of the report is of 5 pagesfor CE323 Students and 10 pages for CE860 students (without appendix).An important note for CE860 Students:The program and functionality are similar. However, higher level of technical explanations is expectedfrom CE860 students. Therefore, the length of the report is considered to be 10 pages.The report should include:1. Requirement form2. UML graphical representation of the system class diagrams state machine diagrams sequence diagramsWhen necessary, you should provide explanation.3. Source codeThe parts of code you are developing in the labs can be used in your program. You must complete theprogram and deliver required functionalities. You can also use the program developed in theAssignment 1 (virtual extension board). Full source code should be provided in the report as anappendix.*Online versionConsidering the limited access to the labs due to the COVID-19 pandemic. Mbed online simulator ortinkercad online simulator is used for evaluating the code.Advanced Embedded Systems Design CE323/860 Ali Hoshiar Spring 2021Submission:The report should be submitted through the online coursework submission system (FASER). Youshould submit a single pdf file called CE323 Assignment 2 (your name) for CE323 students andCE860 Assignment 2 (your Name) for CE860 students and.Assessment criteria: Following the rules mentioned in this document for the submission and preparation of theassignment 10% Class diagram 10% State machine diagram 10% Sequence diagram 10% Correctness of program 40% Quality of program 10% Clarity of program and comments briefly 10%Late submission and plagiarismThis assignment is to be done individually, i.e. whatever you submit must be your own individual work.Any software or any other materials that you use in this assignment, whether previously published ornot, must be referred to and properly acknowledged. Please be aware that the module supervisor mayask students for an interview to explain their submitted work. Please refer to the UndergraduateStudents Handbook for details of the School policyregarding late submission and University regulations regarding plagiarism: https://www.essex.ac.uk/ldev/resources/plagiarism/default.aspx https://www.essex.ac.uk/about/governance/policies/academic-offences.aspxAdvanced Embedded Systems Design CE323/860 Ali Hoshiar Spring 2021Home Alarm System1. Introduction to alarm systemsA home alarm system is constructed from various separate parts, which all connect to a central controlunit (in this link you can find a DIY example of a home alarm system). Your task is to implement a basiccontrol unit and the functionality behind its user interface. To complete this task you must firstunderstand the specification of The external parts provided and the required behaviour of the overallsystem.A conventional alarm system normally contains: Central control unit Keypad entry point / user interface Sounder unit Sensors such as: magnetic contacts (reed switches), pressure mats, movement sensors likepassive infrared sensors (PIRs).In the case of the sensors, they all contain switches that are closed circuit under normalcircumstances. This type of switch is known as a Normally Closed (NC) switch, the converse is knownas Normally Open (NO). Magnetic contacts are used to detect when doors and windows are opened.When a door is opened a magnet is moved away from the reed switch which causes the switchcontacts to open. Likewise, when a movement sensor is triggered or a pressure mat depressed thecircuit is broken (the switch is opened), see Figure 1. The opening of a contact can be detected byusing one of the microcontrollers Parallel port inputs, connected to the top of the switch whose lowerend is connected to GND. The top of the switch is also connected through a resistor to 3.3v (V+). Whenthe switch is closed the port, input is connected to 0v (GND), and it will be pulled-up to 3.3v (V+) bythe resistor when the sensors switch opens. Therefore, the microcontroller input is logic low (0v)when a door is closed / there is no movement, and logic high (3.3v) when the sensor is activated. Thealarm controller must detect these events and respond as specified later in this document. In thisassignment the sensors are emulated using normally closed push to break switches.Figure 1: Alarm sensorsNormal home alarm systems include multiple sensors located in various locations, each location canhave its own circuit which allows identification of the triggered switch, i.e. it lets the user know wherethe break-in occurred. Each sensor circuit is known as a zone, and zones can have different behaviour.Advanced Embedded Systems Design CE323/860 Ali Hoshiar Spring 20212. Functional Specification – Zone BehaviourThe virtual extension board (3 LEDs, 2 Switches, 1 LCD, 1 virtual keypad), will be used fordemonstration. This alarm has SIX States of operation set, unset, entry, exit, alarm, and report. Initiallyit is in the unset state. Unset state: In the unset state, activation of any of the sensors should not cause the alarm-LED toblink. Entry of the correct four-digit code in the user interface (described later) followed byB should cause the system to change to the exit state. If the user enters an invalid code three times, the alarm should change to the alarmstate. Exit state: When in the exit state, the user has a time interval called the exit period (you canchoose any time e. g. 1 minutes) in which to evacuate their home. In the exit state, activation of any sensors in a full set zone should cause the alarm toenter the alarm state. Whilst in the exit state the alarm-LED should blink. If the user enters their four-digit code followed by B within the period, the exit stateshould change to the unset state. If an invalid code is entered three times, the exit state should change to the alarmstate. If all the zones are inactive when the exit period (e. g. 1 minutes) expires, the exitstate should enter the set state. Set state: In the set state, activation of any sensors in the set state zone should cause thesystem to enter the alarm state. Activation of the entry / exit zone Should change the state to entry state. Entry state: The purpose of the entry state is to allow the user a period of time to gain access totheir home so that they can unset the alarm, this duration is known as the entryperiod (e. g. 2 minutes). Whilst in the entry state, the alarm-LED should sound blink. If the user enters their four-digit code followed by B within the period, the stateshould change to the unset state. If the user fails to enter their correct code within the entry period, the state shouldchange to the alarm state. In the entry state, activation of any sensors in a full set zone should cause the stateto enter the alarm state. Alarm state When in the alarm state, the alarm-LED should be on all the time. After 2 minutes, the alarm-LED unit should be disabled. If the user enters the correct code followed by B, the alarm should change to thereport state, otherwise stay in the alarm state.Advanced Embedded Systems Design CE323/860 Ali Hoshiar Spring 2021 Report state When in the report state, the LCD should show the zone numbers or code errorinformation in the first line (e. g. code error 1). In the second line it should show Ckey to clear. When an C is entered, the alarm should change to the unset state.3. Functional Specification – User InterfaceThe user interface consists of: a 4×4 virtual keypad a 16 character by 2-line LCD display 1 LEDs for entrance door (replaced with 1 switch connected to a LED) 1 LEDs for alarm. 1 sensor for 1 zone (Replaced with 1 switch connected to a LED)Fig. 2 Mbed online simulator for home alarm systemAdvanced Embedded Systems Design CE323/860 Ali Hoshiar Spring 2021Fig. 3 TinkerCAD online simulator for the home alarm systemWhen a sensor in a zone is active (circuit broken), the corresponding LED should be illuminated. Whenthe system leaves the alarm state, the alarm-LED should be off.The LCD should display the state of the system on the first line of the LCD display. When the user enters the first digit of their code in the unset state, the second line of thedisplay should additionally show left aligned Code: * _ _ _ with the _ characters beingreplaced with each successive digit entered. If the user presses the C key, then the last entered character should be deleted and replacedwith _ unless there are no characters left, in which case the display should only display thestate, i.e. be the same as when none of the code had been entered. When all four digits of the code have been entered, the second line of the display shoulddisplay Press B to set. Any other key should Cause the code entry procedure to abort without checking the usercode.Advanced Embedded Systems Design CE323/860 Ali Hoshiar Spring 2021Alternative Design Assignment 2For the students with Experience/Interest in embedded system programming a complementaryassignment task is available. If you feel you are interested in doing more than tasks in the currentassignment you can volunteer for this extra task. This extra work is on the design and development ofan embedded system for the microrobotics system we are currently developing in the University ofEssex (Fig. 4).Fig. 4 Magnetic actuation system for Microrobotics studiesThe following system is controlled by Mega Arduino. We have developed a MATLAB connection andwe want to monitor the system in real time using cameras. The system controls a 3D magnetic field.Please kindly note that the Requirement and the quality of the work is high for this design and youshould discuss during the lab 6 with the module supervisor.请加QQ:99515681 或邮箱:99515681@qq.com WX:codehelp
“
添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导。