2018-12-30 01:42 PM
Using nucleo h743zi; project created in CubeMX; Multichannel ADC + DMA,.
I've connected 9 pressure sensitive resistors to ADC1 inputs (IN2-IN10), and the results after AD conversion are quite inconsistent. And by inconsistence I mean that the results on certain inputs are just lower quite a bit in compare to the others.
For example on pins PC4(IN4), PA7(IN7), PC5(IN8) im getting ~3k while on others ~15-21k while testing with reference pressure given by same weight.
Initialy I thought that there's a problem in my circuit, but after swapping the inputs the problem still exists on given pins.
Also when checking the resistance on non-working setup it is slightly lower on mentioned inputs.
Is it possible to get comparable results over all ADC inputs?
*attached main.c if anyone wants to check the configuration
2018-12-30 02:44 PM
As in most MCU, the ADC expects to receive low impedence analog voltage signal.
The ADC, during sampling time, is equivalent to a RC filter (R ~ 2kOhm, C = few pF, check in the product databsset), My guess is the resistor coming from the analog switch, the cap being the sample and hold capacitor. Use an oscilloscope and change the samplng time to see some voltage droop to confirm this guess. Increase the sampling time and maybe put a cap to ground at the ADC input pin. The ideal HW being the follower op-amp.
2018-12-30 03:13 PM
I wrote "resistors" to simplify it, but these are actually DIY Velostat pads, so there's no possibility to hold any charge as far as I know.
Also, I am still not sure if the problem is in circuit itself, as the malfunction occures only on few mentioned pins - changing the pads("resistors") between inputs doesn't changing outcome.
But thanks for the hints.
2018-12-31 12:32 AM
Haven;t checked H7 ADC, does it have a differential input support? It might bring an alternate way to sense small voltage variations. Check also that on these strange pins, the GPIO register is programmed properly (no EXTI interrupt, no pull-up/down).
2018-12-31 03:52 AM
Pins configuration: checked (no interrupts/no pulls);
Tried also:
nothing affect results from that pin.
H7 supports differential inputs, but my part of project does not (as it requires 2 pins per input), so won't be looking at it right now.
Think I am just going to use other inputs for now, as can't find any informations besides KIC's answers.
--Update;
Just tried out the ADC3, and as it's sharing only one input (IN11) with ADC1&2, giving consistent results over all input pins.