I’m a .net software developer and quite new to .net gadgeteer etc. I want to connect a Adafruit MAX31855 board to my Fez Spider to take temp measurements from a K-Type thermocouple which would then be output to a screen, but don’t know where to begin ? How do I go about connecting it to the extender board ? and what code do I need to retrieve values from the board? This all must sound very lame, but I truly don’t know where to start.
Any help would be much appreciated
Hi, welcome. Adafruit have a tutorial for their board [here], which includes wiring diagrams and Arduino code, in the Gadgeteer world the most convenient way to connect to external non-Gadgeteer boards like this is to solder a row of ten breakaway pin headers to the holes in the Extender board, the Adafruit board’s come with some too, then you can stick both in a breadboard and connect up the relevant pins using jumper leads. In this case, connect GND on the Adafruit board to GND on the Extender, VCC on the Adafruit board to 5V on the extender, and the three remaining pins (DO, CS, CLK) to three digital IO pins on the extender, e.g. pins 3,4,5. Lady Ada’s tutorial includes some Arduino code, which you’re going to have to adapt for Gadgeteer - in this code you can see that the interface to the board is essentially SPI, a form of serial communication, so the extender board will go in an S socket on the Spider. There’s some tutorial code on the wiki about SPI [here] which you might be able to make use of in adapting the Adafruit Arduino code into NETMF.
Thank you so very much, your quick response is much appreciated. I see that the Adafruit MAX31855 board has a Vin and 3VO connection, which one would be the VCC connection you are referring to for the 5V connection to the extender board ? Please see the attached pic as reference.
Ah, I’d seen the picture of the earlier board (MAX6675) on the tutorial instead, different pins. For this one, I think connect the 3.3V on the extender to Vin not the 5V, and there’s a datasheet [here].
It looks like the 3Vo should be connected to the 3-5V connection of the extender board, but what is the VIN connection for ? I wonder ?
It seems to me that the 3Vo is “3V, out”. So you can use it in one of two ways - connect the 5v to the Vin line, or supply your own 3v to the 3Vo line and it feeds straight into the MAX chip and bypasses the onboard voltage regulator. I can’t see a circuit design to confirm, but that looks the way it’s set up to me! Edit: although it also looks like the setup might be boost-capable, as on the image of the back, the silkscreen says 3vo = 3.3v output @ 100mA, and vin=3v to 5v DC input
SO: Here’s what I would do. Wire 3v3 on Gadgeteer extender to vin; Gnd to Gnd; Wire up your data lines as needed. And G.O. for it !
Aaaah Got it , Vin = “Volts in” and 3Vo = “Volts out” ? 3.3v from extender to “Vin” in thermocouple board. Makes sense, Thank you very much
I see on the schematic that the Power-Supply Voltage VCC is Min 3.0V - Std 3.3V - Max 3.6V, so it would be safe to presume that the 3.3V from the extender be connected to the Vin as power supply to the board. Thanks guys for all the feedback and support. This forum is truly very helpful and will make learning this new endeavor a blast.
Glad to see someone new and so enthusiastic too
The Schematic? Was that just in the part’s datasheet? If so, then that would be directly powering the part, not thru Adafruit’s breakout board that has a regulator on it. I purely went from the silkscreen on the back of the board - well the picture of it on the web anyway… did you turn yours over yet?
@ jtheyse - Looking at the specs for an S socket [here], the one marked ‘CLK’ goes to pin 9 on the extender, the one marked ‘DO’ goes to pin 8, the one marked ‘CS’ goes to pin 6.
After studying the specification on the socket types for the gadgeteer module I came across the following : S type socket will be used for it’s SPI-Serial interface.
On socket S for the Gadgeteer board the pins are as follows :
Pin 6 = Chip-select (CS) line
Pin 7 = Master out/slave in (MOSI) line
Pin 8 = Master-in/slave out (MISO) line
Pin 9 = Clock (CLK) line
Pin 3 = General purpose input/output - Supports interrupt capabilities
Pin 4 = General purpose input/output
Pin 5 = General purpose input/output
Thus is it safe to assume the following connections between the extender board and the MAX31855 breakout board:
Extender Board Pin 6 (CS) -> CS on MAX31855
Pin 9 (CLK) -> CLK
GND -> GND
3V3 -> Vin
??? -> DO
Which Pin from the extender board should I use to connect to the DO pin on the Max board, PIN 7 (MOSI) or PIN 8 (MISO), which pin is used to read data from the DO pin on the max board or the PIN3 as suggested ?
Or should I follow the Pin 3 -> DO
Pin 4 -> CS
Pin 5 -> CLK as suggested in the previous post ?
@ RorschachUK thank you for confirming the connections, learnt a lot today, thanks !
@ Brett - Very exited about the possibilities that tech could hold the link to the schematics were kindly posted by RorschachUK, check the earlier post by RorschachUK.
DO = Data Out. The MAX isn’t “quite” true SPI, but if you think about it, it means Data Out of the MAX; MISO/MOSI stand for Master In Slave Out and Master Out Slave In, so you want DO to be connected to MISO.
Jtheyse - Were you able to get everything working? Can you share any other info about your experience?
I have one of these units on order and look forward to getting it working.
@ jtheyse - be sure to mark RorschachUK as the answer to your question. It’s a long way to the top if ya wanna rock and roll
@ DanielT - Welcome to the forum!
@ DanieIT - Hi Guys, I got it to work, but am getting very funny and way out readings. Sometimes ot seems to give the correct readings and other instances it’s way out. Could be a faulty thermocouple. I will post the total solution soon
more likely grounding issue rather than dodgy thermocouples. Remember the voltage differential here is extremely small, so the MAX is amplifying a small signal to read it; any noise on the line, with poor grounding for instance, will give you readings fluctuating wildly. Like all “analog” readings you will need to smooth multiple readings together to really get a handle on the true value. Attached is a sample where you can see the difference in accuracy - the second reading is a TC that is metal shielded but without that being grounded back to my board - wildly oscillating. The top line however is an unshielded TC and not reporting much deviation.
I saw the same thing with the analog readings from my Sharp IR sensor. Not only do I average results, I throw out readings that are more than one standard deviation away from the raw average. This technique is seen in the Codeshare driver for the sensor, I cannot claim credit.