vcu
vcu copied to clipboard
feat(drs): set up timer control for DRS servo
Description
- The DRS servo moves one of the parts of the rear wing to change its aerodynamic properties.
- The servo we have is the MG996R.
- The servo is controlled by a pulse of between 1-2ms at a frequency of 50Hz (see datasheet).
- The length of the pulse controls the servo angle.
- For DRS, we want the ability to have the servo in one of two possible (ideally configurable) positions.
Tasks
- [ ] Modify VCU.ioc to set up a pin-connected hardware timer for PWM and re-generate code.
- [ ] Add a new software module for DRS and write some code to allow the servo position to be controlled.
- [ ] Write some kind of testbench.
- [ ] Test pulse width using oscilloscope.
- [ ] Test control of actual servo on rear wing.
Additional Notes
- When re-generating code, delete the
Makefilewhich gets generated insrc- we have our ownMakefilein the project root. If it doesn't build, check what was added to the generatedMakefileand add it to our one.