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

Overview

Schematic

Transmitter

Components:

Optional

⚙️ Configuration/Parameters

  • 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

The default control mode is VOLTAGE mode, for freewheeling, change it in config.h to TORQUE MODE (TRQ_MODE)

🎛️ Calibration:

Proceed with calibration for better control.
With this variant, the auto-calibration is expecting 2 normal pots, and will reject the calibration if an input is missing or is of incorrect type (e.g. mid-resting pot).
You can change the type of input1(brake) to 0 to disable it if you have a mechanical brake and don't need this input. But you won't be able to use it to reverse anymore.

🚀 Features:

Feature Mode How to use it
Reverse All Double-pressing brake at standstill will activate reverse
Switch Control Mode All Pressing the left optical sensor on the sideboard will switch the control mode (Voltage, Speed, Torque)
Field Weakening All Pressing the right optical sensor on the sideboard turns Field Weakening ON/OFF
Cruise Control All If CRUISE_CONTROL_SUPPORT parameter is enabled, pressing the right optical sensor on the sideboard will turn Cruise Control ON/OFF instead of field weakening
If you are not using the sideboard, and SUPPORT_BUTTONS and SUPPORT_BUTTONS_LEFT parameters are enabled, pressing a button connected between GND and blue wire on the left sensor board cable will turn Cruise Control ON/OFF
When turning Cruise Control ON, firmware will hold current measured speed. Using Cruise Control at at standstill(0 speed) will lock the wheels.Braking will disable Cruise Control
Standstill hold VOLTAGE
TORQUE
If STANDSTILL_HOLD_ENABLE parameter is enabled, motors will hold the position when standtill is reached
Electric Brake TORQUE If ELECTRIC_BRAKE_ENABLE parameter is enabled, it will replace "freewheel" with a constant braking when the input torque(throttle) request is 0.It only makes sense in Torque mode
Parameter ELECTRIC_BRAKE_MAX can be used to set the Maximum electric brake to be applied when input torque request is 0 (pedal fully released)
Parameter ELECTRIC_BRAKE_THRES is the threshold below at which the electric brake starts engaging

🧰 Troubleshooting:

  • The wheels oscillate when braking: this is normal behavior when there is no load, it won't happen with the wheels on the ground.
    video
  • If when pressing the brake wheels accelerate, your board probably as a different mapping for hall sensors, firmware measures a speed with opposite sign
  • If wheels are not spinning or you get 2 beeps, make sure you have done proper calibration.
  • One or both wheels are not stopping after you release the throttle : this won't happen with wheels on the ground/with load
⚠️ **GitHub.com Fallback** ⚠️