Teensy 4.1 and 2 x MAX31855 thermocouples SPI problem

Status
Not open for further replies.
Sorry I am a CS type not an EE type. Hopefully an EE type can give more of an answer.

I believe these batteries are more or less rechargeable AAA like size batteries? I don't know things like how much amperage can they deliver, some talk about MAH...

So again wondering about how do you have these batteries connected to each other? Are you using some holder?
Something like: https://www.amazon.com/yueton-Battery-Storage-Holder-Button/dp/B013DUOJV4/ ?

I think I have seen in past that others have had issues with some battery holders, especially with the wires and the like, but not sure. As for Wire size I don't know.

If it were me, I would try something heavier duty and see if it helps. But again I am not EE..
 
The pullups connected to a 3.3V supply external to the Teensy are unlikely to be a problem especially if the 5V and 3.3V are always present at the same time.

You have a lot of vias connecting the 3.3V regulator output to the internal plane so that isn't likely to be a problem. But that 9V @ 0.5A concerns me. That means that the 5V regulator has to dissipate 2W. This is hard work for a SOT-223 package. I can see a mess of vias on the plane around it but darned if I can see if they are connected to anything on another plane. Which means that the junction to ambient is going to be closer to 86C/W than 40 C/W. Which would cause its thermal protection circuits to start limiting output current.
 
You have a lot of vias connecting the 3.3V regulator output to the internal plane so that isn't likely to be a problem. But that 9V @ 0.5A concerns me. That means that the 5V regulator has to dissipate 2W. This is hard work for a SOT-223 package. I can see a mess of vias on the plane around it but darned if I can see if they are connected to anything on another plane. Which means that the junction to ambient is going to be closer to 86C/W than 40 C/W. Which would cause its thermal protection circuits to start limiting output current.

The vias were supposed to connect on the bottom layer with a solid region the sizes/shape with the one on the top layer. But I made a mistake and did not include it in the gerber sent to the PCB manufacturer. (I am working now on a revision of the PCB that corects this among some other small adjustments and possibly the cause of the problem in this thread - if I find it :) ) So this could be a problem.
I lowered the input voltage in order to stop the LDO from getting hot. @11.1V input it is getting quite hot. Could this be a problem? (On the next revision of the PCB I will use this LDO with a max voltage input of 30V which will probably help with the heating.:confused:)

I will try today to connect the lab bench power source (5V output) to the output of the 5V LDO (to have 5V on the PCB without passing through the LDO) and see if this changes anything.
 
Yes. Basically it is the exact holder in the link, with the exact wires, just for 3 batteries.
If the batteries/connections to the PCB were the problem, wouldn't it be solved if I connect the PCB to the lab bench power source? (I am just trying to eliminate possible causes.)

Thank you all very much fr trying to help me. :D
We try :D

Again for battery gauge. When I use batteries with these, it is usually with a robot or rover or the like, and usually something like a 3S Lipo ... And I think most of these cables I have used are in the range of 12 or 14 gauge. I believe 6A cables have between Gauge 16-20, which may work fine? Again No expert, but probably it is just as big as USB?

As for Lab Bench... Sorry again I don't have one, but have seen all different levels of ones. Again like what amperage it can output at 5v or if fed into your LDO, some voltage high enough. I know some 5v VR don't work with 6v battery... I think these want 6.5v for the 5v VR and

Again for my own boards, which I dabble in, and most never get fully completed... I typically want to power other things so I use a different type of device (DC to DC...) to convert from something like a 3S lipo to 5v. Maybe use one of these to then convert 5v to 3.3v...

Right now, most of my newer ones use one of Pololu converters: https://www.pololu.com/category/131/step-down-voltage-regulators But could easily be overkill
for yours.

EDIT: Earlier I used some of same DC DC Converters that Trossen Robotics used on their boards. Such as:
https://www.digikey.com/product-det...nc/OKI-78SR-5-1-5-W36-C/811-2196-5-ND/2259781

Again hope you find the problem.
 
Thank you KurtE for the information.

The lab power source can provide up to 20A of current.
Those converters are indeed a bit overkill for my project.

Doing some more testing today, I soldered the output of the lab power source directly to the output of the 5V and then of the 3.3V LDO. It did not solve the problem. In fact, when I connected it to the 3.3V plane, the SPI bus did not start or it started and got locked after a few seconds.
However, I noticed something today. When I measure resistance between 3.3V plane and GND I only get about 206 Ohm (0.2 kOhm)! Isn't the resistance supposed to be higher? I am thinking that it should be as high as possible, correct? Between the 5V pins and GND I get infinite resistance. Could this be the problem?
 
The measured resistance between the 3.3V net and ground would be infinite it there was noting connected between them. But everything is connected between them. The only thing on the 5V net is a couple of voltage regulators.

Consider this. The absolute maximum junction temperature of the 5V (and 3.3V) regulators is 125C. Assuming a 25C ambient that leaves a 100C rise. So you must do better than 50C/W. Preferably a lot better so you have some design margin for higher input voltage are ambient temperatures. Also keeping in mind that the hotter the device is the faster it dies.

Rather than soldering the bench supply directly to the 5V bus I would have simply reduced its output voltage. 7V would cut dissipation in the 5V regulator in half and it is an LDO type so should be happy. Even if this isn't the cause of the SPI problem you should really think some more about the thermal demands on that 5V regulator. SOT-223 is not as good a package as say a TO220.
 
Consider this. The absolute maximum junction temperature of the 5V (and 3.3V) regulators is 125C. Assuming a 25C ambient that leaves a 100C rise. So you must do better than 50C/W. Preferably a lot better so you have some design margin for higher input voltage are ambient temperatures. Also keeping in mind that the hotter the device is the faster it dies.
...
Even if this isn't the cause of the SPI problem you should really think some more about the thermal demands on that 5V regulator. SOT-223 is not as good a package as say a TO220.

Thank you very much for this information. I really haven't thought about he thermal considerations until now. I will try to change the PCB design to incorporate the TO220 package in the next revision. Will the TO220 package be ok without any radiators?
 
The TO220 was just an example. You will have to do the analysis because I have no clue what your design requirements are.
 
If anyone comes to this thread troubleshooting the MAX31855 thermocouple and Teensy, the problem is solved by using a different library. The SparkFun library works. I got sidetracked because the module worked when just one IC was connected so I thought that is was a hardware problem. But it was just software. Thank you all for your input.
 
After further investigation it turns out that the problem is still present. Even with other libraries the modules do not work together without commenting out the lines below.
If I comment out the following two lines of code from the Audio portion, the SPI bus works well.

Code:
AudioInputI2S            i2s1;
Code:
AudioOutputI2S           i2s2;

With the sparkfun library the Teensy does not freeze like with the Adafruit library. But the temperature is still not read correctly from the MAX31855 ICs.
Also, this happens even when the hardware is disconnected (only the Teensy and the MAX31855 ICs are connected together). So I am thinking that it is still a software problem and not a matter of implementing a 3-state buffer for the SPI bus.

Here are 2 images of the serial monitor output with the above lines of code commented out and without the above lines of code commented out (the readings are taken every second):


Correct: Correct.jpg........ Incorrect: Incorrect.jpg

Here is a picture of the setup:
Setup.jpg

And here is a very simplified version of the code that yields the same incorrect temperature readings.
Code:
#include <SparkFunMAX31855k.h> // Using the max31855k driver
#include <SPI.h>  // Included here too due Arduino IDE; Used in above header
#include <Audio.h>

AudioInputI2S            i2s1;          
AudioOutputI2S           i2s2;           
AudioConnection          patchCord1(i2s1, 0, i2s2, 0);

SparkFunMAX31855k probe(17);

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println(probe.readTempC());
  delay(1000);
}

If anyone has any idea how to resolve this, I would really appreciate it.
Thanks.
 
Last edited:
Status
Not open for further replies.
Back
Top