Variant ADC - EFeru/hoverboard-firmware-hack-FOC GitHub Wiki

This variant can be used with analog inputs like potentiometers, joysticks or a throttle handle, even if using hall sensors. Here is a video walking you through how to setup the firmare to use it with a joystick.

For driving with a separate throttle and brake, please use Hovercar variant. Voltage Control Mode is used by default for this variant.

:gear: Configuration/Parameters

Voltage Control Mode is used by default.

  • ADC_ALTERNATE_CONNECT : to swap the inputs, in case you cannot do it physically
  • ADC_PROTECT_THRESH : to adjust the threshold below/above the MIN/MAX ADC values that will trigger ADC protection
  • ADC_PROTECT_TIMEOUT : number of wrong / missing input commands before safety state is taken

Please also check the parameters that are common to all the variants.

:electric_plug: Wiring:

  • Connect the potentiometer/hall sensor VCC to 3.3v from programming port or from a voltage regulator, ⚠️ Red wire from sensor cable delivers 15v !!!
  • Connect the output of the potentiometer/hall sensor to the blue wire (ADC1) for steering and green wire (ADC2) for speed on left sensor board cable
  • Connect the potentiometer/hall sensor to ground, ⚠️ On some boards, the black wire is 15v !!! Check with a multi-meter to make sure 15V and ground are not swapped
  • 100k Pull down resistors connected to ground are recommended to prevent issues when inputs are floating (wire is cut or disconnected) triggering ADC protection
  • If you don’t need steering, set input1_type to 0 in order to disable the input or go through the auto-calibration procedure : #define PRI_INPUT1 0, 0, 0, 4095, 0 // TYPE, MIN, MID, MAX, DEADBAND. See INPUT FORMAT section

:control_knobs: Calibration:

Proceed with calibration to select the right type of inputs, for better control and proper ADC protection.

:toolbox: Troubleshooting:

If wheels are not spinning or you get 2 beeps, make sure you have done proper calibration.