AME 3623: Project 5: Hovercraft Motor Control

For this project, you are expanding what you learned in project 4 to your Hovercraft. Specifically, you will be connecting a total of three H-bridges to your circuit and wiring one to each of the fans that are located between the lower and upper decks.

At the end of this project, you should be able to:

Component 1: Hardware and Circuit

Component 2: Software

  1. Implement the following function:

    void set_motors(float val[3])

    This function sets the magnitude and direction of thrust for each of the three fans. Note that a positive val must correspond to air flow through the "natural" direction of the duct (the fan pushes air over the motor).

    Within this function, declare the following constant:

           const float negative_gain[3] = {1.0, 1.0, 1.0};
    
    If the incoming val is negative, then it should first be multiplied by the corresponding negative_gain before bounding and conversion to an integer. We will use this in the next project to properly balance the efficient and inefficient directions of air flow.

  2. Implement a new finite state machine in fsm_step(). This state machine will:
    1. Wait for the switch to be pressed.

    2. Ramp the left motor up to 25% duty cycle

    3. Ramp the right motor up to 25% duty cycle

    4. Ramp the rear motor up to 25% duty cycle

    5. Ramp all three motors down to -25% duty cycle (together)

    6. Ramp the left motor up to 0% duty cycle

    7. Ramp the right motor up to 0% duty cycle

    8. Ramp the rear motor up to 0% duty cycle

    9. Return to the start state


What to Hand In

All components of the project are due by Tuesday, March 30th at 5pm

Grading

Project lead credit:

For a successful project, we expect:


andrewhfagg -- gmail.com

Last modified: Sat Mar 27 15:29:00 2021