EE192: Mechatronics Design LabCheckpoint 3This checkpoint should largely guarantee a functioning motor drive circuit and steering actuation (does not have to be simultaneous). Motor Driver CircuitIMPORTANT!!! When using a 12V supply (high current benchtop supply or 3 cell LiPo battery) use a max duty cycle of 40% for the brushed DC motor. Otherwise you risk burning out components in your circuit. DebuggingIt is highly recommended to use the oscilloscope and function generator to isolate bugs in your logic level PWM signals (produced by the micro controller) from bugs in your motor driver circuitry. Additionally, when first testing your motor drive circuit you can run the circuit on a lower voltage (8V and up should be enough to drive the Mosfet). CodeYou will have to write code to generate PWM and control its duty cycle on the FRDM K64F. You may find the pwm example in the skeleton code useful. Up to this point you have output data from the K64F to the serial terminal (UART). In this checkoff you will also have to read input from the serial terminal. You need to be able to send commands from your computer to the K64F. The hello world skeleton code example has been updated to demonstrate how to read a character from the serial terminal. Checkoff ProcedureFor this checkpoint, you MUST use the benchtop power supply to power your system. Do not use the thin alligator clip connectors on your high current power supply. These have a high resistance (about 1 Ohm) which may cause your circuit to run inefficiently and burn out. The TA example car is left on the lab bench at the back of the room. Feel free to look at it- pay special attention to the lower gauge wire used for power, motor, and Mosfet connections. Also notice the custom xt60 (yellow) power supply adaptor, which uses thick, low gauge wire (you will want to make something like this for yourself). Finally, some of these high current power supplies say “5A limit” on the front panel. If your station has one of these power supplies make sure to connect the power cables to the terminals at the back of the supply box (see TA example for reference). All control signals must be generated from your microcontroller running your code. You may use the serial terminal to send manual control signals (like setting the motor duty cycle). This checkpoint is divided into two equal parts which may be checked off separately (for example, if you need to deploy different code for the motor driver and steering actuation). Your hardware should not be damaged (i.e. components should not catch fire or smoke) during any of these tests. C3.1: Demonstrate your motor drive circuit works (in any order, instructor's choice):
C3.2: Demonstrate steering control:
|