diff --git a/Input-Calibration.md b/Input-Calibration.md index 45ee57c..d77b7d0 100644 --- a/Input-Calibration.md +++ b/Input-Calibration.md @@ -32,6 +32,23 @@ The [Nunchuk](https://github.com/EFeru/hoverboard-firmware-hack-FOC/wiki/Variant This type of input will be automatically be identified when you proceed with the [auto-calibration](https://github.com/EFeru/hoverboard-firmware-hack-FOC/wiki/Input-Calibration#auto-calibration).
The [ADC](https://github.com/EFeru/hoverboard-firmware-hack-FOC/wiki/Variant-ADC) variant is using such input types. +# ADC Protection +ADC Protection helps identify if wires are disconnected when using ADC control(ADC and HOVERCAR variants).
+It identifies when the measured ADC value is below MIN - ADC_PROTECT_THRESH or above MAX + ADC_PROTECT_THRESH.
+If detected, the board will enter the ADC timeout state and generate 2 beeps(low pitch).
+ +Prerequisites are: +* using pull down resistors so the input is pulled to ground/0V when the wire is disconnected +* your input should have enough gap between 0 and MIN + +0ADC/0V<--->MIN<---MID--->MAX<--->4095ADC/3.3V
+The auto-calibration will let you know with a high pitch beep if the inputs can be protected, you can also see it in the debug output.
+This is usually not the case with potentiometer that use the full 0-3.3v range. + +Those are the parameters to adjust the ADC protection: +* 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 + # Manual Calibration: Manual Calibration has to be done in [config.h](https://github.com/EFeru/hoverboard-firmware-hack-FOC/blob/master/Inc/config.h) in the section related to the variant you have selected.