Skip to content
Nemo157 edited this page Oct 16, 2011 · 3 revisions

##Differences from other boards

  • The brake board contained a voltage divider that reduced the voltage output for the potentiometer. This was attached to ADC7
  • A motor driver board attached to the top of it for use with the brake actuator

##Function

This board controlled the brake actuator. The position of the actuator was given by a pot hocked up to ADC7

##Code implemented on the board

###Interrupts The adc processing the value from the pot was setup to run continuously and output its value to the variable pot_current_value

The over temperature and other warnings and errors from the motor drive also caused the system to enter this error state.

###Control The Control of the brake position was set by an interrupt changing the variable 'distance' when a new number was received on the CAN bus. This loctaion was in milimeters from fully retracted. It was converted to the ADCs units and a proportional controller was then used to set the PWM wave that was output to drive the motor.

The code for this board can be found in the Brake main file