Backspin
DC Motor Safe Reversal Exercise
Task
A conveyor in a parcel depot moves parcels forward all day. When one jams, the operator presses REVERSE to back the belt up and free it.
Run the motor forward at the duty the depot sets. Once its speed holds steady, print it. On REVERSE, run the motor backward at the same duty and print its speed again: SPEED 12000 RPM SPEED -12000 RPM The motor's registers are in the Circuit figure.
Circuit
Pass condition
Each SPEED line, forward then backward, shows the speed the shaft holds, within 800 ms of reset. The motor never latches a fault.
Notes
The depot sets the duty as your code starts, from 300 to 550. Duty is how hard the motor is driven, in thousandths of full power. The operator presses REVERSE on PA0 once, after the belt has reached its forward speed. The load on the belt changes from run to run. A fault is the motor tripping its protection. FAULT in the Circuit figure records it.