Powering the MAX31855K from a Redboard

Hello, thanks for taking the time to read my post.

I’m using a Sparkfun RedBoard to interface with the Sparkfun MAX31855K thermocouple breakout. My question is on powering the breakout. In all of the examples and chip documentation I’ve read, the MAX requires ~3.3V to function. The RedBoard digital ports will put out 5V when using the Sparkfun MAX31855K software constructor (sets OUTPUT HIGH). I initially used the example code provided on github, but I changed the output to an analog value

analogWrite(VCC, 166)

which gives 3.3V on the pin (confirmed with multimeter). When I connect the MAX and look at the Serial Monitor the device returns “0” for all data using probe.readTempX.

I was playing around with changing things and found that if I did not configure the VCC pin at all, then the Serial Monitor outputs the correct temperature readings consistently. During that time, I can measure 4V on the RedBoard digital pin that the MAX VCC is connected to.

So, this method works, but it doesn’t feel correct. Shouldn’t I be powering the MAX via the VCC pin? I read that all digital pins on Redboards default to inputs. Curiously, on the Hookup guide on SF website, the following is stated for VCC: “Digital pin set to 3.3V in”. What does “in” mean here?

Useful Links

https://www.sparkfun.com/products/13266

https://github.com/sparkfun/SparkFun_MA … eakout.ino

https://cdn.sparkfun.com/datasheets/Sen … 31855K.pdf

The guide recommends using a 3.3V Arduino Pro Mini [https://www.sparkfun.com/products/11114]. I think you may want to try and use a 3.3v based controller in this case for the best results. https://www.sparkfun.com/products/18158 has a switch that can change the GPIO voltage from 3.3v to 5v which would be a good choice for your application.

The analogWrite() isn’t supported on the VCC pin of the Redboard(referring to (VCC, 166). That function outputs a PWM signal from a digital pin. which averages to an analog voltage, but it doesn’t output an actual analog voltage. That is likely the cause of your issue, if it isn’t the logic level of the SPI pins.

I hope this helps. Let me know how else I can be of assistance.