Teensy and the ADS1256
From Matt Bilsky
I have been doing a lot of work with the ADS1256 as a low-cost, high-sensitivity 24-Bit analog to digital converter for my experimental setups. My goal with this tutorial is to introduce the board and its capabilities.
The Arduino/Teensy code is available here (updated): GitHub Code
Also see Wozzy's post on the PJRC forum here: Teensy Forum
There are 4 primary functions:
initADS() sets up the pins and interrupts for the system. It is also where the buffer can be enabled/disabled, the mux registered to the default pin, the PGA is set, and the data rate. Enabling the buffer will thrown an error over the serial monitor because the first four bits are read only and chip specific. Feel free to ignore that. Enabling the buffer seems to give more accurate voltage readings when using a power supply or signal generator. The buffer seems to mess with strain gauge differential readings so I disabled it for my setups.
read_Value() returns a single value from the pins set to the mux register in the initADS() command. It enables high speed reading (up to 30 KSPS)
read_two_values() updates the variables val1 and val2 with the differential readings from pins 0,1 and 2,3.
read_three_values() updates the variables val1, val2, and val3 with the differential readings from pins 0,1 , 2,3 , and 4,5.
To use the libary, open the file ads_1256_custom_library using Arduino/Teensyduino. The other two files containing the register definitions and functions will then be imported to the sketch (after you put them in the same folder). If you are interested in helping to convert this into a conventional library with objects, etc. please let me know!
The Excel used to compute the timings that was discussed in the Errata video is available here: ADS1256 timing calculation sheet
The board I have been using is currently out of stock on Amazon: WINGONEER ADS1256 breakout board on Amazon (Affiliate link, but it is the same price for you if they get it back in stock)
BE CAREFUL buy this one: AliExpress board that doesn't work
Here is the circuit diagram used in the demonstration video:
The Fritzing part is available here: ADS1256 Breakout Board Fritzing. I haven't implemented the schematic or pcb sections of the part yet but if you are interested in helping, please let me know.
Updates and Errata Video