I am new to beagle bone black industrial .
while I reading ADC values by providing below command in my putty terminal
“cat /sys/bus/iio/devices/iio:device0/cat in_voltage0_raw”
it shows a higher ADC values without giving any analog input. this is not only for in_voltage0_raw, all ADC from in_voltage0_raw to in_voltage6_raw shows higher reading?
Same time when I provide any analog voltage to any of the above ADC0 to ADC6 pin, I got the actuall values corresponding to analog input voltage.
Why I got this error? How to solve this default high ADC value?
Same issues are faced in beagle bone black too?
I am using
Debian Buster IoT Image 2020-04-06
OS : Debian GNU/Linux 10 (buster)
kernel : 4.19.94-ti-r42
This isn’t an error nor is it even related to the ADC.
An electrical line does not have a default voltage(**). If it’s left “floating”, meaning nothing is trying to drive it to a particular voltage, then its voltage will be essentially random since it will depend on miniscule amounts of charge that manage to leak onto it as well as random noise it will pick up from the environment.
The net result is that ADC inputs that have nothing connected to them will read an undefined value, this is normal behaviour. If you’d want them to read 0V by default you could add pull-downs to them (e.g. 100 kΩ resistor to ground) but the presence of such pull-downs may degrade the analog measurement in some use-cases and therefore are not present on the BBB.
The digital I/O lines on the beaglebone do have a pull-down or pull-up to ensure they have a well-defined default level (since digital inputs should never be left floating). This default level varies per pin but is reconfigurable by software, except for P8.31-46 which have external pull-up/down resistors on the PCB.
(**) Addendum: just a reminder that the voltage at some point is not actually a measurable value, voltage can only be measured as the difference between two points. When we talk about the voltage “of” a line that’s just casual shorthand for the voltage difference between that line and the GND of the board.