I have a question conserning some strange values I get when sampling a rotary potentiometer using an STM32F103CB MCU.
The circuit is as follows: Potentiometer(powered @+5V from a custom PCB) -> Voltage divider(0-5V to 0-3V3) -> OpAmp(OPA4344) -> MCU. On the MCU side the ADC is run in DMA and the result is sent to another device using CAN BUS. When observing the readings on the second board is where the strange behaviour is noticed. The potentiometer is placed inside a steering column so I know that there are equal degrees around the center, but if lets say at 0 degrees the pot reads 1750mV, the two equal distances read 10mV and 4995mV instead of 10mV and ~3500mV as someone might expect.
Any ideas what may cause this behaviour ?
Note: I checked with a multimeter the potentiometer and I observe the same readings I mentioned +/-60mV.
Note 2: In the second board, prior to displaying the data, I multiply by 4995/4095 to scale the readings from the 12-bit ADC values to mV.
Edit: The potentiometer is a B10K rotary potentiometer and its power and ground come from the PCB.