Lucas Murray ME 305 Portfolio
|
The motor and driver files listed below work together to instantiate two motors and a driver and link them with taskUser from lab 0x02 so that they can be used from the user interface. This lab added considerable functionality to the user interface created in lab 0x02, allowing for the interaction and testing of the motors on our board.
Here is an example of the encoder position plotted as a function of time gathered by the g or G function in taskUser. This plot is similar to the one found in lab 0x02, but it is now updated to show the position in radians.
Here is an example of the results found from testing the encoder velocities at different duty cycles using the t or T function in taskUser. It is plotted along with the theoretical velocities that we would expect at those same duty cycles for a motor that can run at 1800RPM, validating our data.
The motor file instantiates a motor object inside the MCU. This motor object is able to control either motor on the board, changing the duty cycles.
Please see https://lmurray03.bitbucket.io/motor_8py.html for details.
The driver file instantiates a driver object on the MCU. The driver object can instantiate two motors and control each of them individually, as well as allowing for the checking of faults. It also allows for the enabling and disabling of the motors.
Please see https://lmurray03.bitbucket.io/driver_8py.html for details.
The motor task performs the necessary manipulation of an instantiated driver with two motors needed to change the duty cycle of each motor independently and to reset faults by reenabling the motors.
Please see https://lmurray03.bitbucket.io/task_motor_8py.html for details.
While creating the new lab 0x03 files, we added to and edited the following files from lab 0x02, changing the code and remaking the state-transition and task diagrams:
-taskUser
-main
Please check Lab 0x02 at https://lmurray03.bitbucket.io/_page2.html for the file details.