Using the A/D converter lines

Arietta has 4 A/D converter lines with a resolution of 10 bit to read analog signal from 0 to 3.3 volt with a resolution of about 3.2 mV.

The A/D converter lines are available on the following pins:

Signal Description Arietta pin #
AD0 Analog input 0 J4.34
AD1 Analog input 1 J4.36
AD2 Analog input 2 J4.38
AD3 Analog input 3 J4.40
3V3 3.3 volt power line J4.5
GND Ground J4.9

No voltage higher than 3.3 Volt can be applied to the A/D lines. If you need to read higher signals use a schematic like this:

Linux driver

Unfortunately inside the Linux Kernel image distributed with Arietta is not present the Atmel ADC driver so you have to enable it using the menuconfig command and re-compiler the Linux Kernel (see the tutorial page to know how). This is the section to enable:

 
Device Drivers  ---> 
  <*> Industrial I/O support  ---> 
    Analog to digital converters  --->
      <*> Atmel AT91 ADC   

If you are on hurry save this compiled images on the first partition of your microSD:

Enable the A/D lines binding

Before using the A/D lines you have to enable them inside the Device Tree file acme-arietta.dtb. Go to the Arietta G25 pinout page, enable the A/D converter lines,
generate the acme-arietta.dtb file, save it inside the first microSD partition and reboot.

If you are on hurry save this compiled images on the first partition of your microSD:

Using A/D converter input lines from user space

Here is a simple hardware setup to quickly test the A/D lines:

It is a simple linear trimmer (1Kohm but any value is ok) with the central cursor wired to J4.34 (AD0) and the other terminals wired to J4.9 (GND) and J4.5 (3V3).

To read the cursor position in a range o 0 to 1023 type:

root@arietta:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage0_raw
512 

A detailed description of the Atmel AT91 ADC driver used on the Kernel 3.xx is available on this page:

ARIETTA-G25-256
EUR 30.00


ARM9 Linux Embedded Module (256MB)

Arietta G25 is a small and low-cost multi-chip module that integrates:

  • a ARM9 @ 400Mhz CPU Atmel AT91SAM9G25
  • a 256MB of DDR2 RAM
  • up to 3 USB 2.0 host ports
  • 20x2 pads for strip pitch 2.54mm (100mil)

Basic Version with no strips mounted. If you need to have any strip mounted take a look to the Welding services

| Product description |

BB-3545
EUR 3.00


Small breadboard

Small breadboard with 170 tie points. Self-adhesive backing. Measures 45mm x 25mm (1.8"x 1.4").

STRIP-002
EUR 0.80


Female strip 20x2 pin pitch 2.54mm
  • Female strip
  • 20x2 pin
  • Pitch 2.54mm (100mils)