EN0719 Advanced Embedded System and Technologies Assignment Help

EN0719 Advanced Embedded System and Technologies Assignment Help - Hire Skilled UK Tutors And Get Best EN0719 Advanced Embedded System and Technologies Assignment Help Service..!!
Previous << >> Next


EN0719 Advanced Embedded System and Technologies Assignment - Northumbria University Newcastle, UK

Title - Embedded System Project

Learning Outcomes assessed in this assessment -

A. Knowledge & Understanding

i. Critically analyse design specification requirements, for an embedded microcontroller application and choose appropriate microcontrollers and appropriate development tools in order to implement a specification.

ii. Develop suitable hardware for interfacing to microcontroller based systems and the co-requisite application software to satisfy system specifications

B. Intellectual/Professional skills & abilities

i. Ability to design embedded software, interfacing hardware and select appropriate development tools to achieve a particular specification.

ii. Demonstrate a knowledge and awareness of the need to develop microelectronic systems, not only to satisfying specifications, but also the commercial and legal requirements of potential products.

C. Personal Values Attributes

i. Ability to use CAD to design embedded systems satisfying both engineering and legal obligations.

Details - An individual, word processed project report based on the embedded system project specified in this assessment specification needs to be completed.

Instructions - This is an individual assignment. You are expected to follow the requirements in the assessment specification and must complete the codes development and project report. You will record your results and show the results in your report. You are also expected to take photos of the system you build up and the results of your tests, draw flowchart diagrams to explain the workflow and execution procedure of your program, draw diagrams to show the data collected in your test and results analysis, insert these photos/diagrams into the report to demonstrate your program and results.

You are required to produce a single report of not more than 40 pages. Referencing Style: IEEE numbered referencing.


A. Introduction

This course work examines the student's knowledge and skills of developing embedded programs for a ARM microprocessor by using the embedded C language, the concept of finite state machine (FSM), flowchart and the MBed tool chain. The skills of reading electronic schematics and using the schematics to achieve in-depth understanding of the hardware boards.

Your hardware platform is the NXP (also known as Freescale) KL25Z development board and the multi-function board (also known as shield).

The coursework involves two kinds of work:

(i) Project work (about 40 hours)

This is for hardware development, software development, build and test. The students are required to develop programs to read input values from switches, a touch pad, and take command strings from a PC via the UART and to display sequences on LEDs. The students are also required to develop a turnstile controller and integrate all these functions it into a single project.

(ii) Project report (about 10 hours)

An individual, word processed project report based on the embedded system project specified in this assessment specification needs to be completed and submitted.

B. Content of the coursework and format guidelines

The report should contain an abstract, table of contents and at least the following chapters, namely (1). Introduction, (2) Overall System Design, (3) RGB LED control via UART, (4) Touch pad and travelling LEDs, (5) falling LED balls, (6) Turnstile gate controller, (7) Conclusion, related to these four functions.

Flowcharts and state machine charts should be used extensively, clearly representing and describing the overall software design and the main loop in the source file 'main.cpp'.

Chapter (2) should contain clear explanation of the overall main function that integrates the four functions, along with clear flowcharts and program listings.

Chapters (3), (4), (5) and (6) should contain explanations of all software developed, with flowcharts and program listings. Results of tests should also be summarized and analysed in depth, including evidence of testing, waveforms, results of testing, by using photos, screenshot, figures, diagrams as well as detailed explanation in text. The user interface (UART communication protocols, format of commands and returned information, definitions of each switch's function) should also be illustrated and explained in related chapters.


C. Overview of the project

The requirement of the project is for the individual student to develop C programs on the NXP (also known as Freescale) KL25Z hardware board and MBED software platform. The function of the programs will be to receive user command strings from a PC via UART, read user inputs from the switches, touch pad and onboard accelerometer and control LEDs.

The student is to develop an embedded program that implements the following functions:

1. Function 1 (RGB LED control via UART): to turn the onboard RGB tricolor LED on and off by typing a command string at a PC's terminal windows.

2. Function 2 (Touch pad and travelling LEDs): to turn one of the 4 LEDs on the Multi-function shield on and make the illuminated LED travel along the LED board when a finger moves along the touch pad on the KL25Z board.

3. Function 3 (a falling LED ball: a gravity accelerometer game): to turn on one of the 4 LEDs located on the EB004 LED board, and make the illuminated LED always move towards the earth (simulating the force of gravity) when tilting the KL25Z board.

4. Function 4 (Turnstile gate controller): to control a (simulated) turnstile and with good user interface for better user experiences.

D. Board connection and system configuration:

In this assessment, a Multi-function shield is needed and connected to the KL25Z development board. Fig. 3 below shows what it looks like when they are connected, where the Multi-function shield sits on the top of the KL25z board.

The multi-function shield is powered from the KL25z board via the J9 connector (5V pin and GND pin) of the KL25Z. The KL25Z board is powered from the OpenSDA USB port through a USB cable connected to a PC.

Detailed requirements for the overall program and each function are given as follows:

E. Function Requirements

1. A single program integrates all these four functions.

A main program should be designed and developed such that all four functions are integrated into a single program. The user can select which function to be executed by pressing an associated switch, as shown in Fig. 5 below, where the definitions of these switches' functions are given. The first switch S1 (Previous Function -) and 2 nd switch S2 (Next Function +) are for user to select which function (1, 2, 3 and 4) to run and the 3rd switch S3 is for use to decided pause the selected program or resume the paused program.

By default, when the system is powered up, your program gets into function 1 (RGB LED control via UART) and wait for commands from the PC to turn LED on or off. Then, for example, if the 2nd switch S2 is pressed down and released once, the program enters next function which is Function 2 (Touch pad and travelling LEDs). Then the user can touch the touch pad and use fingers to move the lighted LED. The user may press the 3rd switch S3 to pause the program (so that the LED will not move and not response to the finger's movement at the touch pad). The user may press the 3 rd switch S3 again to resume the program,

The user may press S2 to select next function (e.g. Function 3, Function 4 and so on). The user may press S1 to select previous function (e.g, Function 3, Function 2, Function 1, etc).

Please note that, for better user experience, the user may press any one of other switches at any time to switch to the associated functions. For example, no matter which functions 1, 2, 3 or 4 the program is in now, once the S1 is pressed, the program should immediately switch to previous function 2 and start immediately.


2. User-friendly interface design for better user experience.

Your program should have a friendly user interface by making use of the UART and LEDs. You need to design a friendly and easy-use user interaction interface. For example, use the UART or LEDs to prompt the user what to do next or report the status of your program whenever it is necessary and helpful for an improved user experience. Your program should also be able to cope with possible situations in which the user may press the wrong switches by mistake. For example, user may press two or three switches at the same time.

Think about how you can use the start and stop switches, or SW4/SW5, to allow the user to control these four functions easily and smoothly.

How additional features (e.g. + and - keys for configuring the values of the parameters of your data processing algorithms) can be added to your program by making use of these keys?

3. Specification of Function 1 (RGB LED control via UART):

In Function 1, the tricolor RGB LEDs on the KL25Z board are controlled by a PC through a serial communication interface. The serial communication interface is set to a 115200 baud, 8 bits, 1 stop-bit and no parity.

The FRDM KL25L board should be able to receive and determine the following commands and take appropriate actions to control the LED accordingly:

Command string

Actions to be done

g on\r\n

Turn on the green LED

g off\r\n

Turn off the green LED

r on\r\n

Turn on the red LED

r off\r\n

Turn off the red LED

b on\r\n

Turn on the blue LED

b off\r\n

Turn off the blue LED

a on\r\n

Turn on the LED with amber colour

a off\r\n

Turn off the LED with amber colour

Please note the backslash ( \ ) character is used to escape characters that otherwise have a special meaning, such as \n means newline, \r is for carriage return. On "old" printers, \r sent the print head back to the start of the line, and \n advanced the paper by one line. Both were therefore necessary to start printing on the next line. Microsoft Windows tends to use \r\n as a line separator. Pressing the key "Enter" will produce the sequence of two backslash characters \r\n.


4. Specification of Function 2 (Touch pad and travelling LEDs)

Function 2 incorporates the integrated touch pad on the KL25Z board to produce the following sequence on LEDs (travelling LED). Depending on the location where the user's finger is on the touch pad, the corresponding LED is turned on and other LEDs are off. When the user's finger moves along the touch pad, the illuminated LED moves accordingly. For example, swiping a finger from left to right will make the lighted LED travel from left to right, and vice versa. Fast swiping makes the LED travel fast and slow swiping makes the LED travel slowly.

Please note, the LED D1 is connected to the PTA2 of the KL25z processor. And D1 (PTA2) is also used as the UART0_TX pin for serial communication with the computer when the KL25z is connected via the USB to the computer. As a result, you may see the D1 may be turn on automatically caused by the UART0.

5. Specification of Function 3 (a falling LED ball: a gravity accelerometer game):

Function 3 is similar to function 2, but now the lighted LED is controlled by the tilt angle of the KL25Z board, so that the illuminated LED moves along the LED board like a falling ball dragged by the gravity and always moves towards the earth.

The program of function 3 should read the onboard MMA8451Q 3-Axis digital accelerometer, get the x, y and z-axis acceleration measurements and processing them to determine the tilt angle of the KL25Z board. Then the lighted LED is controlled by the tilt angle.

For a user-friendly interface, every 5 seconds, the x, y and z-axis measurements and the calculated angle should be sent to a PC via the UART and displayed clearly on the PC's screen.

Advanced data processing algorithm should be designed, for example, removing orientation dependency and the earth's gravitational acceleration, identifying and counting the cycles of the signal.

Meanwhile, for user-friendly interface and easy debugging, the x, y and z-axis measurement, the data processing results and number of steps should be sent to a PC via the UART and displayed clearly on the PC's screen.

6. Requirement for Function 4 (Turnstile gate controller)

Turnstiles are common gates used to to control access to subways, car parks, amusement park rides, etc. A typical example of turnstile is a gate with a coin receiver and rotating arms at waist height, one across the entryway. Initially the arms are locked and will not rotate to allow a passenger to pass through. Depositing a token or a coin in the slot of coin receiver unlocks the arms, allowing a single person to push through. After the person passes through, the arms are locked again until another token or coins is inserted.

Please note that, in this Function 4, the definition of each switch on the multi-function shield is redefined.

A finite state machine (FSM) with at least two states (LOCKED, UNLOCKED) should be designed and implemented for controlling the turnstile. The state of the turnstile and its behaviour are defined in the table below. Your program should use the tri-colour RGB LED and 4 LEDs (D1, D2, D3 and D4) to indicate the states of your FSM as well, which is defined in the last column of the table below.




LED Indicator



The turnstile is locked. Pushing on the arm has no effect. No matter how many times the passenger push it, the turnstile stays in the locked state.

(1) the onboard RED LED is on

(2) All 4 LEDs on the LED board are on



The turnstile is unlocked. In this state, a passenger pushing through the arms shifts the state back to LOCKED. However, putting additional coins in has no effect. That is, giving additional coin does not change the state.

(1) the onboard GREEN LED is on

(2) All 4 LEDs on the LED board are off



If either a hardware or software failure (e.g. a dead-loop) is detected, the turnstile should be in the state of FAULTY. In the lab exam, the state of faulty is an optional state.

(1) the onboard BLUE LED flashes

(2) The 4 LEDs flashes at a specific pattern (e.g. 101010, or a travelling LED).


There are three types of events (inputs) to the turnstile, which is shown in the table below

Event (inputs)

Description and corresponding actions


A coin is inserted into the slot of coin receiver.

This event is simulated by pressing down the button of switch S1. Pressing S1 once means insertion of one coin.

  • In the locked state, inserting a coin shifts the state to unlocked.
  • However, in unlocked state, inserting a coin does not change the state.
  • A passenger may insert more than one coins by mistake or insert a coin even when the turnstile is unlocked. (For instance, the passenger does not check the status of the turnstile before inserting coins and not realise the turnstile has already been unlocked).


A passenger pushes the turnstile's arm.

This event is simulated by pressing down S2 once.

Alternatively, you may use the touch pad to simulate the push event. This additional requirement is optional.


After a coin is inserted, the turnstile will be kept unlocked for a specific period for the passenger to push the arm. If no passenger pushes the arm within this period, the turnstile will become locked automatically. In the lab exam, for the purpose of demonstration, the maxim waiting time is set to 10 seconds. If no push event is detected within 10 seconds after a coin is inserted, a timeout event occurs and the turnstile should change back to locked state.

In your flowchart design and code development, in particular, in detecting S1 and S2 for the coin and push events, please pay attention to the issues of switch bounce, which may affect the performance and results of your program.

In the coursework you should

Part A. Draw a diagram showing the interface hardware circuits necessary between the microcontroller KL25Z and peripheral devices (the switch board, the LED board, the inertial sensor, and the touch pad). Textual explanation about the diagram is needed with the I/O pin assignment.

Part B. Develop the State Diagram and Flow Chart for the design according to the specification.

Part C. Develop the C program by following the state diagram and flow chart to meet the specification.


Want to Excel in Course? Hire Trusted Writers for Help! —> https://miracleskills.com/

Lists of comments

Leave a comment