Hi everybody.
I have been using Ubuntu 12.04 just Console and I set /sys/devices/ocp.2/helper.14/AIN1 den I got AIN1 inside the line as the mV measurement. I use 3.3V and Analog ground with PTC (positively change the resistor heat with respect) but sometimes I got max measurement such 1760 mV. So is there something wrong with Ubuntu or what I did. What I did for init.d folder I added as a bash contains:
if [ ! -d /sys/devices/ocp.2/helper.14 ]; then echo cape-bone-iio > /sys/devices/bone_capemgr.9/slots; fi
so it works… But I got miss conversion SOMETIMES (1 miss per 10 samples). I used for AIN1 (P9-40) connected a PTC with parallel 480 ohm resistor and P9-03 3.3V and P9_34 AGND. I did not used VADC P9-32 as reference. Is there anybody knows what I did wrong?
Oh oh… The absolute maximum allowed input on ANIx is 2.1 V per the AM335x datasheet. You may have damaged your CPU by connecting to 3.3V.
The PTC should be used to form a resistor divider between VADC (P9-32) and GND_ADC (P9-34). The voltage out of the divider will change as the value of the PTC resistor changes. See the crude schematic below.
VADC
Fixed Resistor
/
AIN1
PTC
/
GND_ADC
AINx will always be less than VADC and greater than GND_ADC.
HTH
Dennis Cote