EN.530.
421 Mechatronics Spring 2025
PreLab 4: Autonomous Navigation using IMU + ArUco + Zigbee
Assigned: February 24, 2025
Due: Submit on Canvas before lecture
Objectives
In this prelab assignment you will develop a notional concept to build an autonomous mobile
robot that can navigate a labyrinth using the various sensors we have played around with in lab,
along with incorporating an IMU to understand how PID can work for successfully tuning. Note:
This assignment can be treated as a continuation of Lab 3 – you would need to incorporate
the IMU for PID control in your design.
Proportional–Integral–Derivative (PID) Control
PID control stands for Proportional-Integral-Derivative control. Conceptually, the controller
calculates an error value as the difference between a desired setpoint and a measured process
variable. It then applies a correction based on proportional, integral, and derivative terms, hence
the name PID.
• Proportional (P): This term produces an output that is proportional to the current error
value. The proportional response can be adjusted by multiplying the error by a constant
called the proportional gain, Kp. This term helps to reduce the size of the error quickly.
• Integral (I): This term integrates the error over time, resulting in the cumulative sum of
errors. It is then multiplied by the integral gain, Ki. This action aims to eliminate the
residual steady-state error that occurs with a pure proportional controller, by adding a
correction based on the historical cumulative value of the error.
• Derivative (D): This term produces an output that is proportional to the rate of change of
the error, effectively predicting the future trend of the error. It is then multiplied by the
derivative gain, Kd. This term helps to dampen the system response and can reduce the
overshoot and settling time.
By tuning the gains for these three elements, the PID controller can provide a control action
designed for specific process requirements. The combined effect of these three controllers
provides a more stable and accurate control system.
This video demonstrates an excellent example of the principles of PID control at play.
https://youtu.be/fusr9eTceEo?si=r8SJ6DSSh6EdXypL
Robot Details
You will be given two DC motors (with wheels and brackets), an Arduino MEGA, a solderless
breadboard, a 14870 motor controller, a 9-DoF IMU sensor, and a 8.4V battery. However, your
team will be responsible for designing and manufacturing the robot robot’s chassis (you will be
given a 12x12” sheet of acrylic as before). In addition, you will be given a 9V power supply for
prototyping. You will also be able to use any of the other sensors that we have used in class up to
this point (however, they will likely be useless in this lab) .
Your robot should have the following characteristics:
● The robot must be self-contained (cannot be tethered)
● Should be fully autonomous and use a PID controller for control
● Be no wider than 25cm
● Be no taller than 20cm
Skills Required Before Lab 4
IMU
In addition to design and manufacturing skills, you will need to become familiar with the
BNO055 IMU. Please visit the following link and read through all the material on this particular
IMU, including the pinout and Arduino Code: https://learn.adafruit.com/adafruit-bno055-
absolute-orientation-sensor/overview
Robot Tracking - ArUco Tags, Computer Vision
Each robot is assigned a unique ArUco tag and a corresponding alphabetical ID (A, B, C, D,
etc.). These tags are tracked using a Computer Vision (CV) algorithm which captures the X and
Y coordinates of the robot in centimeters. The tracking system runs on a JeVois Smart Machine
Vision Camera connected to a Raspberry Pi.
The unique IDs are specific to each ArUco tag and XBee module; therefore, you must keep them
paired together.
You can learn more about ArUco tags and tracking algorithms at
https://docs.opencv.org/4.x/d5/dae/tutorial_aruco_detection.html
Communications - ZigBee Protocol
The coordinates found by the CV algorithm are relayed to your robot using ZigBee.
What is ZigBee?
ZigBee is a high-level communication protocol used to create personal area networks with small,
low-power digital radios. It is particularly suited for applications where power consumption is a
critical factor, such as in wireless sensor networks and home automation devices. ZigBee
operates on the IEEE 802.15.4 specification and is designed to provide secure and reliable
wireless data transmission at low data rates.
You can check out this resource for a more detailed overview of ZigBee:
https://www.geeksforgeeks.org/introduction-of-zigbee/
Basic Network Architecture
ZigBee modules (called XBees) can mesh together to form a network where each node can
transmit and relay data to other nodes. This meshing capability allows for extended range and
redundancy, as data can find multiple paths to reach its destination. The dynamic nature of
ZigBee mesh networks ensures that if one node fails, data can be rerouted through other nodes,
enhancing network reliability.
Lab 4 Teams
You will be grouped into teams of 3-4 that leverage the various skill sets needed to complete the
lab. Team assignment will be done by the course instructors at the beginning of lab.
Task
Brainstorm and come up with one possible design along with the components needed to meet the
requirements. Be prepared to discuss and defend this design with your teammates during lab.
Deliverables
One write up that covers the following:
1) Summary of design requirements
2) Design sketch (hand-drawn)
3) Components list
4) Design justification
Remember that this is just a summary to help you get started with your team on Lab 4 so make
sure you include all your thoughts and possible approaches so that you can come back to them
whenever your design needs some modifications to achieve the requirements of the lab.
Save your work as a pdf using the following naming format:
“LastNameFirstName_LabSection_PreLab4”