-
Notifications
You must be signed in to change notification settings - Fork 974
Variants
Variants are a set of parameters to configure FOC firmware for a specific use.
- Platformio - Remove the semicolon in front of the desired Variant in platformio.ini file
- Others - Uncomment the desired Variant by removing the leading // in Variant selection section of config.h file
- VARIANT_ADC: The motors are controlled by two potentiometers connected to the Left sensor cable (long wired)
- VARIANT_USART: The motors are controlled via serial protocol (e.g. on USART3 right sensor cable, the short wired cable). The commands can be sent from an Arduino. Check out the hoverserial.ino as an example sketch.
- VARIANT_NUNCHUK: Wii Nunchuk offers one hand control for throttle, braking and steering. This was one of the first input device used for electric armchairs or bottle crates.
- VARIANT_PPM: RC remote control with PPM Sum signal.
- VARIANT_PWM: RC remote control with PWM signal.
- VARIANT_IBUS: RC remote control with Flysky iBUS protocol connected to the Left sensor cable.
- VARIANT_HOVERCAR: The motors are controlled by two pedals brake and throttle. Reverse is engaged by double tapping on the brake pedal at standstill.
- VARIANT_TRANSPOTTER: This is for transpotter build, which is a hoverboard based transportation system. For more details on how to build it check here and here.
- VARIANT_SKATEBOARD: This is for skateboard build, controlled using an RC remote with PWM signal connected to the right sensor cable.
- VARIANT_HOVERBOARD: The mainboard reads the two sideboards data. The sideboards need to be flashed with the hacked version. The balancing controller is not yet implemented.
Of course the firmware can be further customized for other needs or projects.
VARIANTS | ADC | USART | NUNCHUK | PPM | PWM | IBUS | HOVERCAR | TRANSPOTTER | SKATEBOARD | HOVERBOARD |
---|---|---|---|---|---|---|---|---|---|---|
CONTROL | ADC | USART | I2C | PPM | PWM | USART | ADC | ADC | PWM | USART |
DEFAULT CABLE |
LEFT | RIGHT | RIGHT | RIGHT | RIGHT | RIGHT | LEFT | LEFT | RIGHT | BOTH |
CONTROL MODE | VOLTAGE | VOLTAGE | VOLTAGE | VOLTAGE | VOLTAGE | VOLTAGE | TORQUE | TORQUE | TORQUE | VOLTAGE |
INPUT CMD1 CMD2 |
POT POT |
MID POT MID POT |
MID POT MID POT |
MID POT MID POT |
MID POT MID POT |
POT POT |
POT MID POT |
N/A MID POT |
SIDEBOARD SIDEBOARD |
|
MIXER CMD1 CMD2 |
STEER SPEED |
STEER SPEED |
STEER SPEED |
STEER SPEED |
STEER SPEED |
STEER SPEED |
BRAKE THROTTLE |
DISTANCE STEER |
N/A THROTTLE/BRAKE |
ANGLE LEFT ANGLE RIGHT |
AUTO CALIBRATION |
YES | YES | YES | YES | YES | YES | YES | NO | YES | NO |
CURRENT MAX SPEED LIMIT |
YES | YES | YES | YES | YES | YES | YES | NO | YES | NO |
For the configuration/customizing of the variants, please check each variant's wiki page.
The firmware supports the input to be provided from two different sources connected to the Left and Right cable, respectively. To enable dual-inputs functionality uncomment #define DUAL_INPUTS
in config.h for the respective variant. Various dual-inputs combinations can be realized as illustrated in the following table:
Left | Right | Availability |
---|---|---|
ADC(0) | UART(1) | VARIANT_ADC |
ADC(0) | {PPM,PWM,iBUS}(1) | VARIANT_{PPM,PWM,IBUS} |
ADC(0) | Sideboard(1*) | VARIANT_HOVERCAR |
UART(0) | Sideboard(1*) | VARIANT_UART |
UART(1) | Nunchuk(0) | VARIANT_NUNCHUK |
(0) Primary input: this input is used when the Auxilliary input is not available or not connected.
(1) Auxilliary input: this inputs is used when connected or enabled by a switch(*). If the Auxilliary input is disconnected, the firmware will automatically switch to the Primary input. Timeout is reported only on the Primary input.
With slight modifications in config.h, other dual-inputs combinations can be realized as:
Left | Right | Possibility |
---|---|---|
Sideboard(1*) | UART(0) | VARIANT_UART |
UART(0) | {PPM,PWM,iBUS}(1) | VARIANT_{PPM,PWM,IBUS} |
{PPM,PWM,iBUS}(1) | Nunchuk(0) | VARIANT_{PPM,PWM,IBUS} |