There are 7 analog inputs on the BeagleBone. ADC properties: - 12 bits (Output values in the range 0-4095) - 125ns sample time - 0-1.8V range (do not exceed!) - 2 uA current flows into the ADC pin in this range - If using a voltage divider, the lower leg (the one connected to ground) should be <= 1k Ohm - Since we are measuring millivolts, resistors with 0.1% error tolerance should be used in a voltage divider. - There is a 1.8V reference voltage VDD_ADC at Port 9 Pin 32. - There is a GNDA_ADC that should be grounded on Port9 Pin 34.
The ADC values can be read very easily:
Original BeagleBone, later builds: beaglebone:~# cat /sys/devices/platform/omap/tsc/ain1 1807 Original BeagleBone, older builds: beaglebone:~# cat /sys/devices/platform/tsc/ain1 1807 (Note that the path "ain1" maps to the pin "AIN0", the path "ain2" maps to the pin "AIN1", etc.) BeagleBone black: FIrst enable the ADC ports, then find out where they are and finall read them:
(Note that the path AIN0 maps directly to the pin AIN0) |
Using the BeagleBone >