C++-ENG 1101

Assignment
ELEC ENG 1101 Digital Electronics
November 1, 2020
Introduction
This assignment is an opportunity to bring together many of learning outcomes from this course and to demonstrate
them in a useful realistic context. The assignment is in three parts. After establishing a charter for your team, you
will will simulate some Arduino circuits and modify their code. In the major part of the project you will reverse
engineer an existing open-source Arduino project.
The principle course learning objectives addressed are:
analyse and synthesise combinational logic circuits
program a microprocessor to control a simple physical system and to perform simple digital transformations
to an analog signal
select, justify and use appropriate input and output devices and controllers for simple digital systems
demonstrate practical skills in the programming and testing of digital systems on FPGA and microcontroller
development boards
The assignment consists of three main parts.
1. Group Formation and Project Charter: as this assignment is completed in groups of two it is worth
spending time to establish shared expectations. Your first task will be to meet with your group mate, plan
the assignment and prepare your own project charter.
2. Simulate and Modify Arduino Projects: a goal of this section is to introduce you to Arduino devices and
programming. You will be given a small set of problems that involve modifying code for an Arduino UNO
board. The circuits are implemented and tested using the online Arduino simulator, Autodesk Tinkercad,
which is freely accessible at https://tinkercad.com. There are very informative tutorials on how to use
the simulator at https://www.youtube.com/user/Tinkercad.
A template report is provided in which you should record your working and explain your solutions in your
own words.
3. Reverse Engineer an Existing Arduino Project: this is the major part of the assignment. You will
examine an existing Arduino project and report on aspects of the design including the Arduino board
configuration, electronic peripherals interfaced with the board, and the code that has been provided for the
Arduino microcontroller.
Instructions and Assessment Information
1. Any time before Friday 17.00 in Week 9, find a partner to form a group of two. Use the People link on the
course MyUni page to join one of the Assignment groups. Make sure you join one of the existing groups
such as “Assignment Group 4”. Don’t create one of your own because the marking will not work right.
Page 1 of 6
Assignment November 1, 2020
If you cannot find a group mate then please mail braden.phillips@adelaide.edu.au before the group formation
deadline above.
2. By Monday 17.00 in Week 10, you will receive a notification of an existing project to work on.
3. With your groupmate, complete the instructions below and document your working and results in your
assignment report. Use the Word template provided on MyUni.
4. Submit your report for on MyUni before 17.00 on the Sunday at the end of Week 13 (before Monday Week
14).
Please also note:
Your report must be a single file in PDF format. Submissions that are not in PDF will not be marked.
Include your names and student IDs in the text of the report. Use the Word template.
Reports will be submitted to plagiarism detection software. A link will be available on MyUni that will help
you check your report before you submit it.
You may resubmit any number of times before the deadline. Only the last of the submissions will be marked.
Your marks for this assignment will contribute 20% towards your final grade.
A mark scheme is included in the report template.
As per the Modified Arrangements for Assessment Policy, extensions can be granted in some circumstances
provided an appliction is made before the due date of the assignment.
Assignments must be submitted before the specified deadline, after which the assignment mark will be
reduced by 20% of the final assignment mark per day (24 hours) or part thereof.
All members of a group will receive the same mark except in exceptional circumstances as determined by
the course coordinator.
1. Group Formation and Project Charter
There are many benefits to working in groups. There are also risks. Many of these risks can be mitigated if team
members share a common understanding of their roles, responsibilities and goals.
For this part of the assignment you should:
Prepare by reading through these instructions on your own. It is also recommended you read this guide to
working in groups .
Contact your team mate and arrange a time for a meeting. This might be on campus or you might use a
Zoom or some other collaboration tool.
At the meeting you should get to know one another and also plan the assignment including:
– group member contact details
– time frame for the assignment (include deadlines for milestones along the way)
– plan and schedule for any meetings
– goals
– agreed task allocation (remember to include how the final report will be brought together and reviewed)
Page 2 of 6
Assignment November 1, 2020
Figure 1: The Arduino IDE (https://learn.sparkfun.com/tutorials/what-is-an-arduino/all)
Record all of this, and any other decisions you have made, in a short and informal Project Charter. This is
for your own benefit and you do not need to submit it. You may, however, choose to have everyone sign
the charter and distribute copies of it. This may be helpful if things go badly wrong.
If things do go wrong with the group during the assignment, you should first try to resolve the issues. This
guide to resolving group work issues may help. If all else fails, email braden.phillips@adelaide.edu.au before the
assignment deadline.
2. Simulate and Modify Arduino Projects
Background: The Arduino UNO Rev3
An Arduino is an affordable and easy to use open-source microcontroller development board microcontroller,
designed by Arduino Corporation. Various Arduinos are available suitable for a wide range of electronics projects.
Arduino hardware is supported by a user-friendly Integrated Development Environment (IDE) that runs on Win-
dows, MacOS and Linux. A designer can use the IDE to develop the program code in a simplified version of C++
and upload it to an Arduino.
Different models of Arduino come with different types of microcontroller, I/O width, analogue I/O and available
memory, as listed in https://www.arduino.cc/en/main/products.
The most robust and widely used and documented board in the Arduino family is the Arduino UNO Rev3 as
shown in Figure 2. This board’s technical specifications are summarised listed in Table 1.
Instructions
2.0 [0 marks] To get started, go to this design in Tinkercad. Sign up if you don’t already have an account, and
then copy the Keypad and LCD design into your account.
Page 3 of 6
Assignment November 1, 2020
Figure 2: Arduino UNO Rev3 (https://store.arduino.cc/usa/arduino-uno-rev3)
Table 1: Arduino UNO Rev3 Technical Specifications
Parameter Value
Microcontroller ATmega328P
Operating Voltage 5 V
Input Voltage (recommended) 7-12 V
Input Voltage (limit) 6-20 V
Digital I/O Pins 14 (of which 6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328P) of which 0.5 KB used by bootloader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
Length 68.6 mm
Width 53.4 mm
Weight 25 g
(a) Simulate the design and make sure it works. When you click a key on the keypad, its value should
be shown on the LCD display. Note that the # key returns the character E and the key returns the
character F.
(b) Show the code while running the simulation. From the code window, also display the Serial Monitor.
Confirm that messages are being written to the serial monitor as the program runs.
(c) Take a look at the code and make sure it makes sense to you. To write the code I began with the
LCD Arduino starter circuit in Tinkercad and added the keypad. To do that I needed to refer to the
Keypad library documentation at https://www.arduino.cc.
2.1 [2 marks1] Modify the code from the Keypad and LCD circuit so that it reads a 1-digit hexadecimal number
from the keypad and displays its equivalent in decimal on the LCD and then repeats this process. For
example if you enter E (hexadecimal) the circuit should display 14 (decimal). In your report, explain how
your solution works.
2.2 [4 marks] Make a copy of the previous circuit and modify it so that it now reads a 2-digit hexadecimal
number from the keypad, converts it to decimal, displays this on the LCD and then repeats this process.
1Refer to the rubric at the end of this document.
Page 4 of 6
Assignment November 1, 2020
For example if you enter 1F (hexadecimal) the circuit should display 31 (decimal). In your report, explain
how your solution works.
2.3 [6 marks] Make a copy of this circuit. This contains the keypad as before, but the LCD display has been
replaced by a 3×2 array of LEDs. The code is incomplete and does not drive the LEDs. To control the LEDs
you can use the pinMode and digitalWrite Arduino functions2. You may need to refer to the Arduino
documentation for more information about these functions. Complete the code for this circuit so that it
reads a 2-digit hexadecimal number from the keypad and displays the corresponding Braille ASCII code on
the LEDs. If a hexadecimal number less than 0x20 or greater than 0x5F is entered then the display should
not change. In your report, explain how your solution works.
3. Reverse Engineer an Existing Arduino Project
This is the major part of the assignment. Your group will be assigned an existing open-source Arduino project
from the internet. Your job is to investigate the design and write up what you discover in your project report. To
do this you will need to:
study any documentation published by the project’s designer
refer to datasheets and documentation for the Arduino and external devices
examine the code for the Arduino and any other programmable devices in the project
For all of the following tasks you should write clearly in professional engineering language and in your own words.
You should support your answers with pictures, circuit diagrams, code segments, algorithms (flowcharts and/or
pseudo-code segments), and mathematical expressions wherever required.
A professional electronic engineer should be able to understand your report on its own without referring to the
original design or other information.
3.1 Project Purpose: [4 marks] explain, at a high level, what the project actually does. (Support your argument
with pictures and diagrams.)
3.2 Major Elements: [4 marks] identify the major elements in the project and explain what these are. Include
the Arduino and any external boards and I/O devices.
3.3 System Function: [4 marks] explain, in broad terms, how the system works. Include the function of each
of the major elements and how they interact to accomplish the overall function.
3.4 I/O Interfaces: [8 marks] identify the significant communication interfaces between the elements in the
project. For each interface:
(a) Describe the communication protocol.
(b) Identify the Arduino code used to initialise the interface and explain how this works.
(c) Summarise the Arduino pins used for the interface, their functions, and whether they are used as
inputs, outputs or bidirectional pins.
(d) Identify the Arduino code used to send and receive data on the interface and explain how this works.
Support your answer with a high-level timing diagram where appropriate.
3.5 Data Processing and Control: [4 marks] what processing does the Arduino perform on any input data
How is the input data manipulated to generating the output information or control signals.
3.6 Algorithm: [4 marks] express the function of the system as an algorithm e.g. with a flow chart or pseudo-
code program.
2It may also be possible to write a very succinct solution by writing to PORTD
Page 5 of 6
Assignment November 1, 2020
Marking Rubric
The assignment is out of 40 marks. The marks allocated to each section are shown in the instructions above.
These marks are awarded approximately according to the allocation in the table below. For example, where a
section is worth 4 marks, 1 mark (25%) is awarded for the logical structure of the answer.
Attribute Weight
Complete and correct 25%
Logically structured 25%
Appropriate language 25%
Supported by diagrams, code, examples etc… 25%