Having looked through the ESP32 code for the motor driver, attenuation is set:
adc1_config_channel_atten(pinToADC1Channel(pin),ADC_ATTEN_11db);
in DCCTimerESP.cpp
but then it is not taken into account when calculating the current.
ESP32 documentation shows:
Vout = Dout * Vmax / Dmax (1)
`where:
Vout
Digital output result, standing for the voltage.
Dout
ADC raw digital reading result.
Vmax
Maximum measurable input analog voltage, see ADC Attenuation.
Dmax
Maximum of the output ADC raw digital reading result, which is 4095 under Single Read mode, 4095 under Continuous Read mode.
`
Having looked through the ESP32 code for the motor driver, attenuation is set:
adc1_config_channel_atten(pinToADC1Channel(pin),ADC_ATTEN_11db);in DCCTimerESP.cpp
but then it is not taken into account when calculating the current.
ESP32 documentation shows:
Vout = Dout * Vmax / Dmax (1)`where:
Vout
Digital output result, standing for the voltage.
Dout
ADC raw digital reading result.
Vmax
Maximum measurable input analog voltage, see ADC Attenuation.
Dmax
Maximum of the output ADC raw digital reading result, which is 4095 under Single Read mode, 4095 under Continuous Read mode.
`