Mechatronics Portfolio
Logan Williamson's Mechatronics Portfolio and Documentation Repository
Ball-Balancing Platform Project

Introduction

This portfolio page serves to organize and present my ball-balancing platform project completed from January-March 2022 in
ME 305 - Intro to Mechatronics at California Polytechnic State University San Luis Obispo, CA. This project was completed by
myself and my partner, Brianna Roberts. The source code was written in Python and tested on an STM32L476RG Nucleo development
board. The hardware used in this project was designed, assembled, and provided to us courtesy of our instructor, Charlie Refvem.
Source code documentation for the laboratory assignment deliverables comprising each portion of this project can be
found under the 'Files' tab above.

The final project report and demonstration videos can be found here: Term Project - Ball Balancing Platform

Project Laboratories

Given the introductory nature of ME 305 - Intro to Mechatronics at Cal Poly, this project was segmented by our instructor into
several graded laboratory assignments. This was done to help students organize our approach and build towards the final project
deliverable in a structured manner. Each of the lab report pages linked below serve to present a key portion of the final project.
These web pages also served as the laboratory deliverables for our work throughout the course, requiring us to develop our
documentation portfolio website in tandem with the balancing platform project code. The purpose of this requirement was to
ensure mechatronics students at Cal Poly learn to use a git management tool for version control of their project within each team.

Lab0x01 - Getting Started with Hardware

Lab0x02 - Quadrature Encoders

Lab0x03 - Permanent Magnet DC Motors

Lab0x04 - Closed Loop Motor Control

Lab0x05 - Inertial Measurement Units

Background Calculations

To properly control the system including the balancing platform and the ball it must balance, the system dynamics had to be
investigated first. This was done manually to ensure proper familiarity with the system and the background analysis techniques
required to characterize the system. With the hand calculations establishing familiarity and acting as a benchmark for verification,
a parallel analysis was then conducted in MATLAB leveraging the system Jacobian to describe the kinematics of the platform.
These analyses can be found at the links below.

Balancing Platform Analysis

Balancing Platform MATLAB Simulation

Motor Driver

A driver for creating and manipulating motor objects for control of PMDC motors.
Please see motor.Motor for details.

Encoder Driver

A driver that creates encoder object for reading position data from physical encoder.
Please see encoder.Encoder for details.

Inertial Measurement Unit Driver

A driver for reading data from the Adafruit BNO055 inertial measurement unit. This driver includes
methods for calibrating and collecting data from a physical IMU.
Please see BNO055.BNO055 for details.

Resistive Touchpanel Driver

A driver for reading data from a four-wire resistive touchpanel. This driver uses the STM32 Nucleo
ADC to read the outputs from a resistive touchpanel and retrieve voltage data corresponding to locations
on the phyiscal panel.
Please see touchpanel.touchpanel for details.

Closed-Loop Controller Class

A driver for instantiating closed loop Proportional-Derivative controller objects.
Please see closedLoop.ClosedLoop for details.

Author
Logan Williamson
Date
March 18, 2022