marlinarnz / eVCU

ESP32-based electric vehicle control unit for flexible interplay of analogue and CAN-bus based devices
MIT License
7 stars 2 forks source link

Safe ADC for pedal position read #4

Open marlinarnz opened 1 year ago

marlinarnz commented 1 year ago

The ESP32's ADC peripheral does not guarantee proper voltage detection throughout the voltage range. There have been some discussions about it and ideas how to fix it. I am thinking about another Pedal implementation that uses and ADS1115, hooked up via SPI. Ideas, experiences, or contributions are welcome.

jetpax commented 1 year ago

With the right input circuitry and calibration (see here), I think the on-board ADC is adequate for a vehicle application. Adding an ADS1115 seems like unecessarily high precision for automotive applications. Also it seems that the ESP32-S3, especially with the mini variant which has a cleaner PCB layout, are better performers than the original ESP32.

On my ESP32-S3 dev kit, just by putting my fingers on the pins, with no front end components at all, the Arduino Plotter shows a reasonable result IMO.

image