This online portfolio documents my work from the lab activities and projects from ME305: Introduction to Mechatronics. SOURCE CODE: https://bitbucket.org/kylehammer118/me305_labs/src/master/
About Lab0x01: The goal of this lab is to familiarize ourselves with the Nucleo L476 development board and PWM cycles. In order to achieve this goal, I created an LED program such that the user can toggle between three LED waveform settings: square wave, sawtooth wave, and sine wave.
Finite State Machine describing Lab0x01:
Youtube video of working code:
About Lab0x02: In this we created an encoder driver and an encoder task to collect data from the encoder. The user is able to input a key command to interact with the encoders in several ways, including printing the position/delta, collecting data in a list, and zeroing the encoder position.
Task Diagram:
Finite State Machine for task_user:
Finite State Machine for task_encoder:
About Lab0x03: The purpose of this lab was to create a motor driver and motor task to adjust the speed of the motor. In addition to setting the duty cycle of the motor, we improved the user interface to allow the user to use both motor/encoder 1 and 2.
Plots displaying encoder data from running the motor at 75% and 100% duty cycle, respectively:
This lab introduced a closed loop feedback control for the output speed of the motor. The user would set a value of Kp and a reference speed to determine the actuation value, L.
Progression of plots showing effect that kp has on the response of the motor speed actuation:
Block Diagram of closed loop control:
Task Diagram of entire program up through Lab 0x04:
Finite State Machine - task_user:
Finite State Machine - task_encoder:
Finite State Machine - task_motor:
Finite State Machine - task_closedloop:
In this lab, we created a driver in order to interact with a BNO055 sensor. With this driver, we use I2C to communicate with the IMU. Our final program design displays the calibration status, collects calibration factors, and displays the Euler angles read by the IMU.
Youtube video displaying functioning Lab0x05 code:
https://www.youtube.com/watch?v=66x1zpec16E