0% found this document useful (0 votes)
80 views

Assignment 3: Arduino Programming

The document describes an assignment to create a binary clock system using an Arduino microcontroller. Students must build the clock in Tinkercad using C/C++ code to display the time in binary format LEDs. The clock must be able to be calibrated through potentiometers and switches to set the hour and minute values. Students are required to submit a report documenting the system specifications, code, testing procedures, and screenshots/video demonstrating the clock's operation in simulation and using real hardware.

Uploaded by

tanzeel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views

Assignment 3: Arduino Programming

The document describes an assignment to create a binary clock system using an Arduino microcontroller. Students must build the clock in Tinkercad using C/C++ code to display the time in binary format LEDs. The clock must be able to be calibrated through potentiometers and switches to set the hour and minute values. Students are required to submit a report documenting the system specifications, code, testing procedures, and screenshots/video demonstrating the clock's operation in simulation and using real hardware.

Uploaded by

tanzeel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

ELE1301 – Computer Engineering

Assignment 3

Arduino Programming

Date Due: 11:55 pm, Thursday 21st May 2020


Penalty for Late Submission: 20% per working day late

Task:

Your task is to create the system and accompanying documentation,


both of which are described in this document.

You are to build the system in Tinkercad and fully code (in C/C++)
and test the operation.

After proving the operation here you are to build and test the system
using real hardware.

You can begin your project by using the provided base file, which is
linked to from StudyDesk.

The System

The system is a binary clock. It displays an hour value between 1 and


12 using Red LEDs, a minute value between 0 and 59 using Green
LEDs, and whether it is morning or afternoon using a single Blue LED.
Further details of how these are connected are included in the input
and output details that follow.

The clock is able to be set to any time using the calibration switches
and potentiometer dials. To set the hour value, the calibrate hour
switch is activated and the relevant calibration potentiometer
adjusted. The LEDs will change to show the current time. The minute
calibration procedure is the same, using a separate switch and
potentiometer.
ELE1301 – Computer Engineering

Input and Output Connections

Arduino Digital Pins:

0 Unused
1 Unused
2 Unused
3 Output, Displays Minutes (Green LED) Least Significant Bit
4 Output, Displays Minutes (Green LED)
5 Output, Displays Minutes (Green LED)
6 Output, Displays Minutes (Green LED)
7 Output, Displays Minutes (Green LED)
8 Output, Displays Minutes (Green LED) Most Significant Bit
9 Output, Displays Hours (Red LED) Least Significant Bit
10 Output, Displays Hours (Red LED)
11 Output, Displays Hours (Red LED)
12 Output, Displays Hours (Red LED) Most Significant Bit
13 Output, Displays AM/PM (Blue) – Off for AM and On for PM

Arduino Analogue Pins:

A0: Input, Calibration Value for Hours (10 k Potentiometer, 0 – 5V)


A1: Input, Calibration Value for Minutes (10 k Potentiometer, 0 – 5V)
A2: Unused
A3: Unused
A4: Input, Used as Digital Input - Switch for Calibrating Hours
A5: Input, Used as Digital Input - Switch for Calibrating Minutes

Note 1: In the Tinkercad file your inputs must be slide switches to


allow you to activate the switch and adjust the potentiometer at the
same time. When you build the circuit, you will need to change this
to use the pushbuttons in your kit.

Note 2: We are using two of the analogue pins as digital inputs. This
is a useful capability of the Arduino. We simply use the command
digitalRead(A4) to read pin A4’s value in digital format.
ELE1301 – Computer Engineering

Operation:

The binary clock is to provide an accurate representation of the time.


That is, the minute value should increment accurately every 60
seconds. The hour value should increment every 60 minutes.

The relevant LEDs will indicate the current time in a simple binary
representation of the decimal value of the time. For instance, the
value of 13 minutes would be represented on the 6 green LEDs as:

Pin 3: ON
Pin 4: OFF
Pin 5: ON
Pin 6: ON
Pin 7: OFF
Pin 8: OFF

If the time requires calibration, it can be achieved by adjusting either


the hours or minutes value.
The relevant calibration switch is operated, and the value under
calibration changes depending on the position of the calibrating
potentiometer. The scaling of the calibration values must use the
entire range of the input. That is, when fully adjusted in the anti-
clockwise direction, the value should be the minimum possible value
(for minutes this would be 0) and when fully adjusted to the other
extreme, the calibration value should be the maximum possible value
(for minutes this would be 59).
The hour calibration input must incorporate the ability to change
between AM and PM values.
ELE1301 – Computer Engineering

Report:

You must submit a report that meets the following minimum


objectives:

 An application specification for the binary clock system described


in the assignment.
 Documentation of any assumptions or clarifications around the
task, if necessary.
 A clear detailed description, of no more one page, of how your
program works (that is, the code – not the system).
 Flow charts showing the operation of the program, including any
subroutines.
 A full listing of the program code, including all function
documentation and comments. This may be included as text or as
an image in the report, but must also be submitted as a separate
file for testing purposes.
 Evidence that a testing procedure has been devised and
implemented, including all outcomes.
 Screenshots of the Tinkercad simulation showing the following
situations:
o The time is 7:39 AM
o The time is 11:04 PM
o The minutes value is being calibrated to 17
o The hours value is being calibrated to 10 AM
 A video of the physical implementation using a real Arduino
microcontroller board, demonstrating its operation in the following
conditions:
o The time can start at any value.
o The minutes value is then calibrated to 12
o The hours value is being calibrated to 6 PM

Note that this video file must be less than 100 MB in size to allow
it to be uploaded.
ELE1301 – Computer Engineering

Notes:

 Refer to the study material, the tutorial activities and the learning
activities for guidance.
 Note that the submission must be coded in C/C++. You may use
the Tinkercad blocks to develop basic C code and then use this
and adjust as required. However, your final solution should not
use Tinkercad blocks.
 This assignment is based on equipment that is available in the
Arduino Starter Kit. Details and links to data sheets may be
located at this link:
https://store.arduino.cc/usa/arduino-starter-kit
 When building the physical circuit using the Arduino hardware,
please ensure that you are familiar with the Safety Guidelines
presented as part of Module 8.

Submission:

You are to submit the following items as separate files, to the


Assignment 3 Submission link on Study Desk:
 Project Documentation (*.pdf format)
 Arduino Code File (*.ino format, exported from Tinkercad or the
Arduino IDE)
 Video of Operation (*.mp4 format)

Please do not submit any of your assignment by email or hardcopy,


unless approved by the examiner.
ELE1301 – Computer Engineering

ELE1301 Assignment 3 Marking Rubric

Marks
Criteria Insufficient Limited Developing Effective Comprehensive
(of Total 200)
Closely outlines the program  Accurately outlines the 
Closely outlines the program 
The application specification  objectives. Includes collation  program objectives. Includes 
objectives. Includes collation 
Application  is inadequate, contains  of most of the data required  collation and analysis of data 
20 Not included. of most of the data required 
Specification incorrect information or is  for the programming. Some  required for the 
for the programming and is 
poorly presented.  details missing or not clearly  programming and is well 
well presented. 
presented. presented. 
The description of the  The description of the 
The description of the 
program operation contains  program operation is 
The program description is  program operation is logically 
Program  most relevant details. It may  reasonably logically 
20 Not included. too brief or does not  structured and well written. It 
Description be too vague or overly  structured and well written. It 
contain relevant details.  contains all relevant details 
specific. It may be  contains most relevant details 
and is of a suitable length. 
inappropriately long. and is of a suitable length. 
The designed structure is 
The designed structure is  The designed structure is  suitable and makes highly 
The designed structure is 
suitable and use of at least  suitable and makes some use  effective use of functions and 
Program Design:  functional but does not use 
20 Not included. one function and C  of functions and C constructs.  C constructs. Functions are 
Structure functions or C constructs to 
constructs, though this could  Functions make use of  well constructed and make 
make it effective. 
be done more effectively. arguments and return values.  use of arguments and return 
values. 
Flowchart closely defines the  Flowchart accurately defines 
Program Design:  Flowchart is mostly  Flowchart contains some 
10 Not included. programming task, including  the programming task, 
Accuracy inaccurate or deficient.    inaccuracies or deficiencies. 
subroutine(s).     including subroutine(s). 

Flowchart structure is  Flowchart structure contains  Flowchart structure showed 


Program Design:  Flowchart structure contains 
10 Not included. mostly incorrect or  some incorrect use of  the correct use of symbols, 
Sufficient Detail minor structural errors.
incomplete. symbols, etc. etc.

Program Design:   Flowchart is untidy and  Flowchart is untidy but  Flowchart is neat but subject  Flowchart is very neat and 


10 Not included.
Neatness difficult to read. readable. to misinterpretation.  professionally presented.

Code file (.ino)  The program operated as 
Program Testing:  Program operated  The program operated as 
20 file is not  The program is incomplete.  specified with some minor 
Operation incorrectly. specified. 
submitted. errors or inconsistencies. 
ELE1301 – Computer Engineering
Marks
Criteria Insufficient Limited Developing Effective Comprehensive
(of Total 200)
The testing process is  The testing process is  The testing process is  The testing process is clearly 
documented but not  documented but not  explained and documented.  explained and well 
Program Testing: 
10 Not included. adequately explained and  adequately explained or  The testing results show  documented. The testing 
Results
there are deficiencies in the  there are deficiencies in the  correct operation at each  results show correct 
testing process or results. testing process or results. stage.  operation at each stage. 
Showing the program  Showing the program running  Showing the program running 
Showing the program running 
Program Testing:  running dynamics (not  dynamics with correct results  dynamics with correct results 
10 Not included. dynamics with correct results 
Screenshots necessarily correct) for at  for one of the required  for two or three of the 
for the four required states.
least one state. states. required states.
Functions and variables 
Program Listing:  Functions and variables have 
have unique names, though  Functions and variables have  Functions and variables have 
Appropriate  10 Not included. unique names that are easily 
these are not necessarily  unique, useful names.  unique, meaningful names. 
Naming distinguished. 
easily distinguished. 
Data types are correctly  Data types are correctly 
There are demonstrable  chosen and used. Some  chosen and used. Thought 
Data types are 
Program Listing:  problems with the data  Data types are generally well  consideration has been  has been consistently given 
10 consistently 
Data Types types used in at least one  chosen and applied.  shown to converting these to  to converting these to 
inappropriate. 
place in the program.  alternate data types where  alternate data types where 
the program requires. the program requires.
Program comments are 
Program comments are 
Program comments are  meaningful and improved the 
Program comments are  meaningful and improved the 
Program Listing:  inappropriate and  program’s readability. The 
10 Not included. inappropriate and limited in  program’s readability. The 
Comments contributed little to the  program and any functions 
application. program and any functions 
program’s readability.  are reasonably well 
are well documented.
documented.
A short video demonstrating 
A short video demonstrating 
At least one still photograph  At least two still photographs  the correct operation of the 
the correct operation of the 
Physical Circuit 40 Not included. showing construction or  showing construction or  circuit across some of the 
circuit under the required 
operation is included. operation are included.  required circumstances is 
circumstances is submitted.
submitted.

Total Marks 200

You might also like