VIM 3 ADC support on a project

Which Khadas SBC do you use?

Khadas VIM3

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu 20.04

Which version of system do you use? Khadas official images, self built images, or others?

Khadas official

Please describe your issue below:

Hi @numbqq and

I am using the ADC pins 10 and 12 to read temperature using a type-k thermocouple with a thermocouple amplifier circuit. The thermocouple amplifier circuit used is AD8495, type k, 0-50 degrees Celsius. The link to datasheet of the amplifier circuit:

The software is able to read the ADC values from the amplifier circuit,
sample readings obtained were: 2340 and 2285 ADC value.

May I please know how I could convert the ADC value to temperature in degree Celsius. Can you please help me with this.

What is the resolution/number of bits of the ADC on the VIM3 board?

Thank you

Is the reference voltage of the system = 1.8V?

Hello @Balaji

Yes, the voltage is 1.8V. You can convert the voltage like this:

Voltage = (value / 4096) * 1.8V
1 Like

Thank you for the response. I really appreciate it. May I please know what the cmd is to read the ADC value from PIN 10 and Pin 12.

Hi @Balaji
Hardware Information
pin10 → ADC_CH0
pin12 → ADC_CH3

Device Node
pin10 → /sys/bus/iio/devices/iio:device0/in_voltage0_raw
pin12 → /sys/bus/iio/devices/iio:device0/in_voltage3_raw

Get Raw ADC Value

cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw
cat /sys/bus/iio/devices/iio:device0/in_voltage3_raw