Created VARIANT_ADC Doc - How to configure the software to use potentiometers ? (markdown)

Olamm
2023-02-28 16:49:30 +01:00
parent 843e847a32
commit a8f0e7c648

@@ -0,0 +1,64 @@
# VARIANT_ADC Doc - How to configure the software to use potentiometers ?
Anything written here comes from the videos, other docs or from the comment of the code file. This doc is made for the ones who are not very familiar with code (like me).
Watch video 2 and 3b to use a potentiometer, very good explanations by this guy
2 : https://www.youtube.com/watch?v=E6JbFnRiQ5g&t=506s
3B : https://www.youtube.com/watch?v=q451WdEPkjo
# Section : Variant Selection
Uncomment VARIANT_ADC in the
# Section : Motor Control
Motors can be enabled or disabled if only 1 is needed for example.
Just comment the one that needs to be removed :
* #define MOTOR_LEFT_ENA
* #define MOTOR_RIGHT_ENA
## Control Selection
FOC (Field Oriented Control) with the following 4 control modes:
* OPEN MODE : Just keeps freewheel ???
* VOLTAGE MODE: in this mode the controller applies a constant Voltage to the motors.
* SPEED MODE: in this mode a closed-loop controller realizes the input speed target by rejecting any of the disturbance (resistive load) applied to the motor.
* TORQUE MODE: in this mode the input torque target is realized. This mode enables motor "freewheeling" when the torque target is 0.
Note: SPD_MODE and TRQ_MODE are only available for CTRL_FOC !
## Limitations
Keep the current limit, I can't tell if you can. Speed limit can be defined by this parameter :
* #define N_MOT_MAX 1000
# Section : Default Settings
To modify the beeping when going backwards, enable = 1, to disable = 0 :
* #define BEEPS_BACKWARD
ADC_PROTECT (better explained than text in video 3B : 3:20 - 5:14) is an important feature in case of something happening with your potentiometer (wires cut/disconnected).
# Section : Input Format
* TYPE: 0 : Disabled, 1 : Normal Pot, 2 : Middle Resting Pot, 3 : Auto-detect
* MIN: min ADC1-value while poti at minimum-position (0 - 4095)
* MID: mid ADC1-value while poti at mid-position (INPUT_MIN - INPUT_MAX)
* MAX: max ADC2-value while poti at maximum-position (0 - 4095)
* DEADBAND: how much of the center position is considered 'center' (100 = values -100 to 100 are considered 0)
*
* Dual-inputs
* PRI_INPUT: Primary Input. These limits will be used for the input with priority 0
* AUX_INPUT: Auxiliary Input. These limits will be used for the input with priority 1
# Section : Debug
I don't know anything about it... Sorry...
***
Everything before was about basic parameters. Then, in the code, comes every variant. The 1st one is VARIANT_ADC that will be used.
# Section : Variant ADC
* #define CONTROL_ADC 0 // use ADC as input. Number indicates priority for dual-input.
* // #define DUAL_INPUTS // ADC*(Primary) + UART(Auxiliary). Uncomment this to use Dual-inputs
* #define PRI_INPUT1 3, 0, 0, 4095, 0 // TYPE, MIN, MID, MAX, DEADBAND. See INPUT FORMAT section
* #define PRI_INPUT2 3, 0, 0, 4095, 0 // TYPE, MIN, MID, MAX, DEADBAND. See INPUT FORMAT section