Introduction to Arduino Labs
Danger: Read This First!
Before proceeding any further through this documentation or making any of the circuits discussed within, you must read the
Before Starting the Exercises
Before starting the laboratory exercises, you should review the contents of the Mechatronics Kit Information document, located in the "Practicals Lans in the 1st Semester" area of the Mechatronics course Blackboard site.
Note: Open this website on the computer you are programming your Arduino on
It is recommended that you open this website on the computer that you are doing your coding on, because there are several code examples that you can cut and paste directly from these documents into your working code.
Learning Outcomes
By the end of these exercises you should be able to:
- Use of basic hand tools to construct the mechanical and electrical systems of a simple mobile robot.
- Program an Arduino to interface sensors and actuators and achieve a specified goal.
- Integrate programs and concepts with sensors and actuators to create an operational mechatronic system.
Introduction
During this activity you will have three laboratory sessions to complete a number of laboratory exercises, based around a simple mobile robotic system, as shown in
Website Layout
The Website is laid out in the following sections:
- This Introduction: A quick overview of this section of the course, providing aims and objectives, structure of laboratory sessions, and a suggested timeline a subset of the assessed exercises.
Laptop Disclaimer: You MUST read this disclaimer before continuing!Building the Robot Chassis Document: This section describes the construction of the robot chassis and the recommended layout of the electronic circuit.Introductory and Supplementary Material: There are two pages in this section:Supplementary Signposting Document: This document is aimed as a point of reference for students that are not confident with C or Arduino programming. The document provides reference links to external websites and the specific parts of the Arduino Language Reference pages, relating to elements of the Introductory exercises.Introductory Exercises: This document provides you with two non-assessed exercises aimed at getting you started with installing and setting up the Arduino IDE, ready for use with these laboratory activities, and programming with simple I/O.
Basic Exercises: This section provides five basic, assessed exercises aimed at reading sensors and driving actuators. These exercises are aimed at providing you with the scaffolding to for the more advanced integration exercises.Advanced Exercises: This section contains 3 advanced, assessed exercises, which require you to integrate the sensors and actuators learning from the basic exercises into simple mechatronics systems. During these exercises, we will introduce the programming of a PI controller and use a simple finite state machine.Assessment Section: This section provides more details relating to the assessment and marking for all the exercises.
Note
You must have completed and have marked off all the basic exercises before you can receive credit for any of the advanced exercises.
Aims and Objectives
The aims of these laboratory exercises are:
- To familiarize yourself with the Arduino Development Environment, IDE, and gain experience of uploading user programs to the embedded target
- Provide you with hands-on experience of reading analogue sensor voltages into the Arduino device and convert these into meaningful measurement variables.
- To drive different type of actuators using a PWM output from an Arduino device,
- Integrate sensors and actuators into a mechatronic system.
To achieve these aims, the laboratory exercises are split into several assessed exercises, some are classed as basic and some as advanced. A suggested timeline for achieving the
To achieve the
A list of the assessed exercises, with hyperlinks is provided:
- Basic:
LED Pattern - Basic:
IR Sensor Measurement + Graph - Basic:
Externally Powered Servo - Basic:
DC Motor - Basic:
Encoders + Motor - Advanced:
PI Control – IR Sensor Distance - Advanced:
PI Control – Encoder Position - Advanced:
PI Control – IR with Sequence
Each of these exercises will be assessed during the laboratory session, using the assessment structure outlined in the
Warning
DO NOT leave all your exercises until the end of the 3rd laboratory session to get marked. This may result in you running out of time to get your work marked within the allotted time, and you will lose marks. Instead, you should get your work marked as you complete each assessed exercise – see note below:
Structure of Laboratory Sessions
The hardware kits that you will be using during these exercises are loaned to you for the duration of the Mechatronics module and you will take them home between laboratory and project sessions.
Note
We will provide 3 supported laboratory sessions for you to work in, but you are also expected to do some work at home to ensure that you have completed all the exercises AND have them marked before the end of the 3rd laboratory session. 15 minutes before the end of the 3rd Introduction to Arduino laboratory session, we will stop marking work, with the remainder of the time being available for tidying your work area and exiting the laboratory.
You can have any of the assessed exercises marked at any point during the three laboratory sessions, as long as there is someone free to mark your work.
Warning
Any exercises not marked before this deadline, (regardless of whether they have been completed or not), will be forfeit and you will lose these marks. Please ensure that you get your work marked incrementally as you proceed through the exercises, and not leave them until the final moments, to avoid disappointment.
Suggested Timeline for completing the Basic Exercises, only.
There is no rigid structure for your progress through these exercises, but the following time plan should be sufficient to ensure that you have time to complete all the
By the end of the 1st lab session
By the end of the 1st lab session, it is recommended that you have had the following exercises completed and marked:
Before the start of the 2nd lab session
Before the start of the 2nd lab session, it is recommended that you have:
- Completed and checked the wiring for the following 2 exercises:
- Basic:
IR Sensor Measurement + Graph - Basic:
Externally Powered Servo
- Basic:
You should also ensure that you have read the exercise document, linked above. Ensure you have understood all the procedures.
By the end of the 2nd lab session
By the end of the 2nd laboratory session, it is recommended that you have the following exercises completed and marked:
- Basic:
IR Sensor Measurement + Graph - Basic:
Externally Powered Servo
Before the start of the 3rd lab session
Before the start of the 3rd lab session, it is recommended that you have a working circuit capable of performing:
- Completed and checked the wiring for the following 2 exercises:
- Basic:
DC Motor - Basic:
Encoders + Motor
- Basic:
You should also ensure that you have read the exercise document, linked above. Ensure you have understood all the procedures.
By the end of the 3rd laboratory session
By the end of the 3rd laboratory session, ensure that you have all exercises completed and marked, including:
- Basic:
DC Motor - Basic:
Encoders + Motor
Note
To acheive the