Code
We used the Red Suite 5 development environment to develop the code for this project. A zip file containing all of the code can be downloaded here. Each module can also be downloaded individually using the links below.
alignmentsystemproject.zip | |
File Size: | 66 kb |
File Type: | zip |
Source Files
|
Header Files
|
State Machines
The top level state machine that controls the progression through coarse alignment, fine alignment, and charging. The run functions for the lower level state machines for coarse alignment and fine alignment are called in the magic smoke state machine.
|
|
The embedded state machine for fine alignment of the primary coil platform. The URF sensor finds the corners of the car and computes an approximate solution for the position of the secondary coil.
|
|
The embedded state machine for fine alignment of the primary coil platform. The platform is rotated and RFID tags on the underside of the car are used to measure the misalignment between the coils.
|
|
Utilities
A module which computes an approximate car location from the corners.
|
|
A module which computes an approximate car location from the angles at which the tags were found/lost.
|
|
Peripherals
A module which controls communication with the RFID reader, a FEIG MR102A.
|
|
A module which controls the URF servo.
|
|
A module which controls communication with the URF.
|
|
A module containing helper functions for controlling the platforms stepper motors.
|
|