Other analogue-to-digital converters (ADCs)

SEP seismometer

While these instructions utilise an ADC from Adafruit, there are many other options available, this page documents how to change the programs for these.

Mindsets

The first alternative is one from Mindsets.

The programs must be changed slightly, but quite simply. In all the programs we can first comment out importing the adafruit libraries, and declaring the ADC, so the lines become:

#from Adafruit_ADS1x15 import ADS1x15
#adc = ADS1x15(ic=0x01) #create class identifying model used

Declaration of 'sps' can be left, as the last program does use this value for saving, although you should change it to the value chosen for the ADC. Instead we now must do the same, but for the new ADC as below:

import serial
port_name='/dev/ttyACM0'
port=serial.Serial(port_name,9600,timeout=1)

Note 'port_name' must be changed to the correct port. To find it, once you have plugged it in and restarted, type the command 'ls /dev/'. And look for anything with ttyACM0, but 0 may be different. Then change the program to this.

The other line changed is the one for reading the data, so the previous one can be commented out to:

#sample = adc.readADCDifferential23(256, sps)*1000

and a new line for reading can be put in:

sample=int(port.readline().strip())

Then it should work.