EE192: Mechatronics Design LabCheckpoint 5While we're all waiting to get boards back from the fab house, we can continue prototyping hardware that isn't part of the boards and work on the relevant software. This week's checkoff is benchtop velocity control. The standard way to do this checkoff is to assemble your encoder boards and mount them to the car (if the car didn't come with one), hook them up to the microcontroller, and add a feedback control loop. Simple proportional control is fine, where the motor drive strength is proportional to the difference between the measured speed and the setpoint (the “error”). The proportionality gain is a tuning constant which should be set high enough to be effective but not too high to be unstable (which at the extreme, goes into bang-bang mode oscillating between full-on and full-off). Since the wheel will be unloaded (there's no car attached to it doing mechanical intertial “filtering”), this simple control scheme is likely to be either instable or inaccurate. That's fine - the main goal of this checkoff is to demonstrate that you can read a sensor and feed it back into an actuator. Checkoff ProcedureLike checkpoint 3, power (for all systems) can come from either the benchtop supply or the battery. However, all signals (especially the motor driver PWM) must be generated from the microcontroller running your code. Your hardware should not be damaged during any of these tests.
|