0% found this document useful (0 votes)
139 views9 pages

Csse3010 Project

This document provides details for a CSSE3010 project involving the autonomous remote control of a sorting machine. It outlines 6 design tasks worth 50% of the marks, which involve developing various components of an Autonomous Sorting Controller system including the system itself, a radio transmitter, radio packets, display, and keypad. It also describes coding practices worth 10% of marks, involving code quality, folder structure, and use of FreeRTOS. The project is to be demonstrated individually in Week 13 and marks will be deducted for errors or missing requirements.

Uploaded by

Akash Iyer
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)
139 views9 pages

Csse3010 Project

This document provides details for a CSSE3010 project involving the autonomous remote control of a sorting machine. It outlines 6 design tasks worth 50% of the marks, which involve developing various components of an Autonomous Sorting Controller system including the system itself, a radio transmitter, radio packets, display, and keypad. It also describes coding practices worth 10% of marks, involving code quality, folder structure, and use of FreeRTOS. The project is to be demonstrated individually in Week 13 and marks will be deducted for errors or missing requirements.

Uploaded by

Akash Iyer
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/ 9

CSSE3010 2023 Project

CSSE3010 Project
Autonomous Remote Control of a Sorting Machine
(30% – 60 Marks)
Git and BlackBoard: Monday, 4pm in week 13, 2023
Final Demo: Your session in week 13, 2023
Last Updated: April 26, 2023
ECP Hurdle: Not required to be submitted.
(Closed Shoes MUST BE Worn in the labs)

1 Learning Aims
• Apply your knowledge and skills developed in Stages 1–4 into a new combined design.

• Establish a radio communication link using the NRF24l01plus module.

• Control a physical system.

• Use FreeRTOS to implement your system.

2 Resources
• Nucleo-F429ZI platform

• SSD1306 OLED Display

• Keypad

• nrf24l01+ Radio Module

3 Academic Integrity
All assessment is individual. You should feel free to discuss aspects of C programming and
assessment specifications with fellow students, and discuss the related APIs in general terms.
You should not actively help (or seek help from) other students with the actual coding of your
assessment. It is cheating to look at another student’s code and it is cheating to allow your
code to be seen or shared in printed or electronic form. You should note that all submitted
code will be subject to automated checks for plagiarism and collusion. If we detect plagiarism.
or collusion (outside of the base code given to everyone), formal misconduct proceedings will
be initiated against you. If you’re having trouble, seek help from a member of the teaching
staff. Don’t be tempted to copy another student’s code. You should read and understand the
statements on student misconduct in the course profile and on the school web-site: https:
//www.itee.uq.edu.au/itee-student-misconduct-including-plagiarism

Page 1 of 9
CSSE3010 2023 Project

Contents
1 Learning Aims 1

2 Resources 1

3 Academic Integrity 1

4 Introduction 3

5 Project Overview 3

6 Design Tasks – 50 marks 4


6.1 Design Task 1: ASC System – 10 marks . . . . . . . . . . . . . . . . . . . . . . 4
System Status Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Mylib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
6.2 Design Task 2: ASC Radio Transmitter – 5 marks . . . . . . . . . . . . . . . . . 4
Mylib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
6.3 Design Task 3: ASC Radio Packet – 10 marks . . . . . . . . . . . . . . . . . . . 5
Protocol Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Hamming Packet Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
6.4 Design Task 4: ASC Display – 10 marks . . . . . . . . . . . . . . . . . . . . . . 6
6.5 MyLib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
6.6 Design Task 5: ASC Keypad – 10 marks . . . . . . . . . . . . . . . . . . . . . . 6
MyLib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
6.7 Design Task 6: ASC Extended System Control – 5 marks . . . . . . . . . . . . . 7
Mylib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

7 Coding Practices – 10 marks 8


7.1 Code Quality – 2 marks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7.2 Folders Code Structure – 8 marks . . . . . . . . . . . . . . . . . . . . . . . . . . 8
main.c Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
FreeRTOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Interrupt Service Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

8 Demonstration & Marking 9


8.1 Deductions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Page 2 of 9
CSSE3010 2023 Project

4 Introduction
This project will build on your knowledge from stages 1-4. You will be working individually
for all core tasks. The project is designed to have you demonstrate your knowledge of practical
content and ability to integrate new functionality into your program for the Autonomous Sorting
Controller (ASC). The sorter is used to select and move different objects (differentiated by
colour). The sorter is a computer numerical controller machine that can move in 3 dimensions.
The sorter has a suction head that can be used to hold an object. The sorter’s suction head
can also rotate and change the orientation of the object.

5 Project Overview
The Autonomous Sorting Controller (ASC) consists of the following sections:

• ASC System: Control the Sorter with the keypad and radio transmitter.

• ASC Radio Transmitter: Control the Sorter using the radio control link.

• ASC Display: Display the X, Y, Z and rotation of the Sorter’s head.

• ASC Keypad: Process the keypad keys to control Sorter.

• ASC Extended System Control: Add extra task control of the ASC system

Page 3 of 9
CSSE3010 2023 Project

6 Design Tasks – 50 marks


6.1 Design Task 1: ASC System – 10 marks
The ASC system is used to control the Sorter’s head by moving it and controlling the vacuum
pump. The ASC system must process the keypad inputs, control the radio transmitter and
OLED display. The ASC system must be implemented as a finite state machine controller.

System Status Indicators


You must implement the following System Status Indicators (Table 1) using the on board LEDs.

Table 1: System Status Indicators

On-board LED Function


Green LED Alive LED that toggles every second
Blue LED Toggle when a radio packet is sent
Red LED Toggle value when a keypad key is pressed.

Mylib
The ASC system Mylib Task and register files (sxxxxxx ascsys.c, sxxxxxx ascsys.h) must
be placed in the mylib folder.

6.2 Design Task 2: ASC Radio Transmitter – 5 marks


Implement the ASC radio transmitter using the NRF24l01plus radio module (See datasheet on
BlackBoard). The ASC radio transmitter is used to broadcast packets to the Sorter. These
packets are used to control the Sorter. The ASC radio transmitter must be implemented as an
FSM. The following are radio transmitter configuration parameters that you must use. These
parameters must be present in a myconfig.h in your mylib folder.

Table 2: Parameters in myconfig.h

Parameter value Description


#define MYRADIOCHAN radio channel radio channel used for transmitting to a Sorter.
byte See BlackBoard for a Sorter’s address to use.
uint myradiotxaddr[] <array of 5 Address used for transmitting - e.g.
bytes> 0x12, 0x34, 0x56, 0x78, 0x90. See Black-
Board for a Sorter’s address to use.

Mylib
The radio transmitter Mylib Task and register files (sxxxxxx txradio.c, sxxxxxx txradio.h,
myconfig.h) must be placed in the mylib folder. The radio task and register Mylib files must
only control the radio and not do any Sorter operations. There should be a radio TX queue to
transmit packets via the radio interface.

Page 4 of 9
CSSE3010 2023 Project

6.3 Design Task 3: ASC Radio Packet – 10 marks


Four Sorter control radio packets are used: JOIN, XYZ, ROT and VAC. Each packet uses the
same format show in Table 3. The Sender Address must be your student ID, where each
digit represents a 4-bit hex digit - e.g. 45678910 becomes address: 0x45678910 or 0x45, 0x67,
0x89, 0x10

Table 3: Packet Format - Little Endian (LSB first)

Type Sender Address Payload String


Index (bytes) 0 1 5
Size (bytes) 1 4 11 bytes (must be zero padded)

The payload string for each packet is shown in Table 4.

Table 4: Sorter Radio Type and Payload Packet Format

Packet Payload String Description


Type
0x20 JOIN Must be sent before
XYZ Packet
0x22 XYZ<3 digit X><3 digit Y><2 digit Z> Moves Sorterhead
to X,Y,Z coordi-
nates, in mm. Co-
ordinates are speci-
fied as ASCII char-
acter 3 digits for
X/Y and ASCII
character 2 digits
for Z.
0x23 ROT<3 digit Angle> Rotate the
Sorter head an
absolute angle (in
degrees). Min-
imum value is

0 and Maximum
value is 180◦ .
0x24 VON or VOFF Turns vacuum
pump on or off

Note all X,Y and Z coordinates are absolute. The rotational angle is also absolute.
An example XYZ packet payload: XYZ10011050

This will move the Sorter head to the following coordinates: X=100mm, Y=110mm and
Z=50mm. (Assume origin is bottom left corner).

Page 5 of 9
CSSE3010 2023 Project

Protocol Operation
The JOIN packet must be sent before the XYZ packet can be sent. The JOIN packet allows
the sender to use the Sorter. If the JOIN packet is not sent first, then the Sorter will reject
all XYZ packets from the sender. The JOIN packet ensures that only one user can exclusively
use the Sorter, at one time. If another user sends a JOIN packet, then control of the Sorter is
passed to that user.

Hamming Packet Encoding


The packet must be hamming encoded, using the details from the examples/getting started/hamming
example. Each packet half-byte must be hamming encoded. The un-encoded packet size must
be 16 bytes. Zero padding must be used to ensure that the un-encoded packet size is 16 byes
long. The Hamming encoded packet size must be 32 bytes.

6.4 Design Task 4: ASC Display – 10 marks


You must display the current position (X and Y) of the Sorter’s head on the SSD1306 OLED
using a 30 by 30 pixel wide grid. The Sorter’s grid space dimensions is 200mm by 200mm. Use
a suitable ratio to ensure that the position of the Sorter’s head is accurate. A bounding box
be drawn around the grid, displayed on the OLED. The grid should be placed on the bottom
left side of the OLED. The origin must be in the bottom left corner. The Sorter’s head should
be shown as a cursor using the ’+’ symbol (with appropriate dimensions).

The Z position of the Sorter’s head should be displayed as a number (in mm) on the top right
side of the OLED. The current rotation angle of the Sorter’s head should be displayed as a
number (in degrees) in the bottom right side of the OLED screen.

6.5 MyLib
All OLED Mylib task and register files must be placed in the mylib folder.

6.6 Design Task 5: ASC Keypad – 10 marks


The keypad is used to move the Sorter to absolute point locations, lower/raise the Sorter’s
head Z coordinate, rotate the Sorter’s head by +10◦ increments and turning the vacuum on/off.
Assume all distance measurements are in mm. The PMOD keypad must be used to move the
Sorter’s head to specific point location. Table 5 shows the function of each key.

MyLib
You must extend your Mylib register driver for the keypad (from previous stages) and add
ttask functionality. Keypad related mylib files must be located in the mylib folder. Each key
should be mapped to an Event Group Bit. When any key is pressed, the onboard red
LED must be toggle.You must use a task to control the keypad. Use elements (e.g. event
bits, queues, semaphores, etc). Note; the keypad mylib must control/interact with the Sorter’s
mylib driver and not directly control the Sorter by transmitting radio packets.

Page 6 of 9
CSSE3010 2023 Project

Table 5: Key Assignment: Points - [X, Y ]. For the new, del and sys keys, see Section 6.7.

1 2 3 A
Point [0,0] Point [75,0] Point [150,0] Lower Z by
10mm
4 5 6 B
Point [0,75] Point [75,75] Point [150,75] Raise Z by
10mm
7 8 9 C
Point [0,150] Point [75,150] Point Rotate +10◦
[150,150]
0 F E D
Toggle Vac- new del sys
uum on/off

Note the following pins must be used for the keypad (Row 2 is different to previous stages)

Board Pin Keypad Signal Pin Direction


D42 Column 4 Output
D41 Column 3 Output
D40 Column 2 Output
D39 Column 1 Output
D38 Row 4 Input
D37 Row 3 Input
D33 Row 2 Input∗ changed
D35 Row 1 Input

6.7 Design Task 6: ASC Extended System Control – 5 marks


Add extra control functionality to the ASC system to view of the task’s memory usage and
status. Add create and delete task commands.

Table 6: Extended System Control Commands

Keypad Key Description


new Create a new radio transmitter mylib task
del Delete the radio transmitter mylib task
sys Display the current tasks with task name, task ID,
task state, task priority and current memory stack
usage, in the console.

Mylib
The ASC extended system control Mylib Task files (sxxxxxx ascext.c, sxxxxxx ascext.h)
must be placed in the mylib folder. A controlling task and Event bits should be used.

Page 7 of 9
CSSE3010 2023 Project

7 Coding Practices – 10 marks


7.1 Code Quality – 2 marks
It is imperative that code you write be able to be easily understood and modified/expanded
by your peers and colleagues. As such, your code will be reviewed by a tutor. Aspects of high
code quality include (but are not limited to):
• descriptive, readable naming of variables, functions, parameters, constants, macros, types
• constants and defines used instead of numerical values
• modularity and functional decomposition instead of repeated code
• consistent white space (horizontal and vertical)
• conformation with the CSSE3010 Style Guide (on Blackboard)
• debugging and testing code neatly excluded from release compile for submission
• design justifications where appropriate
• documentation for functions
• comments for global variables, constants, macros, etc where appropriate
Note that you are encouraged to have debug/test code and extra functionality where appropri-
ate. #define and build configurations should be used to enable or disable the debug/test code.
Commented out code is not permitted.

7.2 Folders Code Structure – 8 marks


Your project code must be in your git repository repo/pf folder (with makefile and filelist.mk)
and your mylib library files must be in your repo/mylib git repository folder.

You are required to reuse and expand upon your mylib library in this project. You should
include additional files to your library. You must follow the mylib task, cli and register guide-
lines. Peripherals used should have corresponding task and register files. Register files are to
be used by the task files.

If you do not use your mylib library in this project, you may be penalised across various project
criteria resulting in a substantial loss of marks.

main.c Functions
Functions that do not relate to the initialisation e.g. moving functions, must not be included
in main.c. Functions called in main.c must only be used to initialise the system, not to control
the system. Design task implementations should be done with tasks, using task mylib files.

FreeRTOS
You must demonstrate in your code, that you have used the features provided by FreeRTOS.
Tasks MUST be used to implement various features of the system.

Interrupt Service Routine


Interrupt Service Routines (ISR) must not be used to directly implement the design tasks. ISRs
should control a task with queues, semaphores, events, direct task notifications, etc.

Page 8 of 9
CSSE3010 2023 Project

8 Demonstration & Marking


Marking will occur in YOUR ALLOCATED SESSION in week 13. Students attending
wrong sessions without an official extension request through the school will be marked as 0
during their allocated session. If you are unsure, talk to the course staff.

NOTE: Version Control – You MUST use version control as part of your develop-
ment process. This means that because the project is a bigger task than the stages,
you should have a NUMBER of commits including the FINAL version which is the
one being assessed. If that is not the case, you will not be assessed.

You must show that you have git commits in weeks 11 and 12, or you will not be
assessed. You must be marked off for git commits in week 12, in your lab session.

Each task is allocated a number of marks. Full marks will be awarded to seamless, well inte-
grated tasks with no errors. Part marks may be awarded for partially working solutions. You
must be able to demonstrate functionality to achieve marks.

8.1 Deductions
There are a set of basic expectations for your demonstration. Where demonstrations are par-
ticularly poor and do not meet these expectations, marks will be deducted. This is to ensure
students who have made the effort to meet the expectations are rewarded, and prevent cumber-
some marking demonstrations. Prepare to have your work demonstrated, as might be done in a
performance review or client demonstration. A course staff member will lead the demonstration
and direct you as needed. They will be marking you during and after the demonstration, so it
is wise to ensure that your work is clearly evident to them.

The following situations will result in the allocated deduction. Deductions can only be deducted
a single time. If you have questions, talk to course staff.

Deduction Reason
8 Not building on the work done in stages e.g. not using mylib structure specified
in stages.
4 Excessively unreadable code (no conformity to mylib or general style guide)
4 Significant disregard or no conformity to the mylib or general style guide)
4 Reprogramming the Nucleo at any point throughout the demo
4 Interrupt handling function is long-running.
4 Not being ready to demo when asked, or taking a long time to demo function-
ality when asked.
2 Excessive switching of modes, poor usability, disjoint demonstration
2 Excessive resetting of the Nucleo
2 Commented out code

Page 9 of 9

You might also like