Table of Contents

Edge-2L ADC

Introduction

This document explains how to use the Analog-to-Digital Converter (ADC) on the Edge-2L IO board.

To use the ADC functionality on the Edge-2L, you must attach the Edge-2L IO board.

Hardware information

The Edge-2L IO board includes a 12-bit Successive Approximation Register (SAR) ADC.

Pin Voltage Device Node
9 0~1.8V /sys/bus/iio/devices/iio:device0/in_voltage4_raw

Reading the raw ADC value

Read the raw digital value from the ADC:

$ cat /sys/bus/iio/devices/iio:device0/in_voltage4_raw 

Example output:

4082                                                 

Convert the raw 12-bit ADC reading to a voltage using the formula: Voltage = (value / 4096) * 1.8V