0

Adafruit Thermocouple Amplifier SPI Communication
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit Thermocouple Amplifier SPI Communication

by thisisbenmanley on Tue Apr 10, 2018 5:18 pm

Hello,

I'm working with an Adafruit MAX31856 Thermocouple Amplifier. I have a thermocouple plugged in, and all of the SPI wires going to the BeagleBoard-X15 that we need the data on. I had a few questions about the usage of this device:

1. What kind of data is supposed to come back? I'm currently using the Python spidev driver to read and write data to SPI devices, so all I can do is read a certain number of bytes from the device. Do those bytes signify a voltage across the thermocouple? Or a temperature? Or something else? And, whichever it is, how many bytes would equate to a message?
2. Am I supposed to write any data to the thermocouple/amplifier over SPI before I can receive data? Like do I have to ask it for data? Or, if it is powered and has a thermocouple plugged in, should it constantly be sending data?
3. I'm having trouble with getting the SPI driver to work on the board anyway, so if you have any expertise in that please let me know.

Thank you!

thisisbenmanley
 
Posts: 2
Joined: Tue Apr 10, 2018 4:52 pm

Re: Adafruit Thermocouple Amplifier SPI Communication

by adafruit_support_bill on Wed Apr 11, 2018 6:02 am

1) The contents of the data registers are defined in the datasheet beginning on page 18: https://datasheets.maximintegrated.com/ ... X31856.pdf
All registers are 8 bits wide. To read the full 19 bits of the linearized temperature, you need to read 3 registers as shown in table 8.

2)The first two registers are configuration registers (CR0, CR1). If the default configuration is not what you want, then you will need to write to these.

3) Moving this thread to the BeagleBone forum so that the Beagle experts can see it.

adafruit_support_bill
 
Posts: 81292
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit Thermocouple Amplifier SPI Communication

by drewfustini on Wed Apr 11, 2018 12:44 pm

Regarding SPI on BeagleBone, I would like to better understand the system software installed on the BeagleBone.

Please paste the output of:
Code: Select all | TOGGLE FULL SIZE
sudo /opt/scripts/tools/version.sh

cat /boot/uEnv.txt

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: Adafruit Thermocouple Amplifier SPI Communication

by thisisbenmanley on Thu Apr 12, 2018 1:12 am

The output of /opt/scripts/tools/version.sh:

eeprom:[BBRDX15_C.001731PX150248]
dogtag:[Beagleboard.org Debian Image 2017-07-02]
kernel:[4.9.35-ti-r44]
nodejs:[v6.12.3]
device-tree-override:[dtb=am57xx-beagle-x15-revc-ben.dtb]

^^^ That is the device tree file that I edited to add in SPI functionality.

I'm no longer with the board, so I can't give you /boot/uEnv.txt right now - sorry about that.

thisisbenmanley
 
Posts: 2
Joined: Tue Apr 10, 2018 4:52 pm

Re: Adafruit Thermocouple Amplifier SPI Communication

by drewfustini on Thu Apr 12, 2018 11:50 am

If possible, I would recommend that you a more recent BeagleBoard.org Debian image such as Stretch IoT (without graphical desktop). Here is direct download link: Debian 9.3 2018-03-05 4GB SD IoT

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Please be positive and constructive with your questions and comments.