We just purchased a group of BeagleBone Black Rev. C boards. We’re trying to get the
ADC working properly. We use a Adafruit BeagleBone Proto cape. We
have a pressure sensor connected to pin P9_39 (AIN0). The pressure sensor
produces millivoltage readings. We only sample the reading hourly in
production so we’re not using continuous buffered input. This setup
worked accurately with the previous BBB Rec C boards
using Debian 7. I
can’t seem to get an accurate reading under Debian 8 though. I assume I’m not
configuring the AIN overlay correctly. I get readings but they are not
correct. The values are more than double what I’m reading by using a
digital multimeter on P9_39 (202mv digital multimeter 464mv AIN0). If I move the cape from the new Debian 8 BBB
Rev C to an earlier Debian 7 BBB Rev C the readings are correct: same cape,
same sensor, same power supply.
I've tried 3 new BBB Rev C and get the same result
I’ve tried both these two tutorials to build ADC into the overlay. Both tutorial produce working overlays with identical, incorrect readings on AIN0.
https://www.teachmemicro.com/beaglebone-black-adc/ <- specific to Ubuntu 16 but I gave it a whirl
https://gist.github.com/matthewmcneely/bf44655c74096ff96475
I tried loading a number of distribution provided dtb's, disabling HDMI and Audio. In addition, I downloaded Robert Nelsons dtb-rebuilder and compiled new dtbo's using the stanza's suggested in the tutorials above : https://github.com/RobertCNelson/dtb-rebuilder
I’ve tried building overlays using
the stock out of the box kernel and after running apt dist-upgrade. In each case I can see the overlay loaded but the values I read are always the same and incorrect.
/boot/uEnv.txt
#dtb=am335x-boneblack.dtb
dtb=am335x-boneblack-overlay.dtb
cape_disable=bone_capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
#cape_enable=bone_capemgr.enable_partno=
cmdline=coherent_pool=1M quiet cape_universal=enable
cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,univ-emmc
5: P-O-L- 1 Override Board Name,00A0,Override Manuf,BB-ADC
uname -a : Linux beaglebone 4.1.15-ti-rt-r43 #1 SMP PREEMPT RT Thu Jan 21 20:13:58 UTC 2016 armv7l GNU/Linux
<Palm to forehead> Yes that is a raw value.