• Scam Alert. Members are reminded to NOT send money to buy anything. Don't buy things remote and have it shipped - go get it yourself, pay in person, and take your equipment with you. Scammers have burned people on this forum. Urgency, secrecy, excuses, selling for friend, newish members, FUD, are RED FLAGS. A video conference call is not adequate assurance. Face to face interactions are required. Please report suspicions to the forum admins. Stay Safe - anyone can get scammed.

JCDammeyer's 42 projects

So after trying various resistors for pull ups and thicker wires for grounds etc nothing worked other than putting the scope probe on the Chip Select pin.

Then as I was looking at the 4th channel trace noticing that it wasn't lined up with the #4 along the edge of the screen I wondered if the probe was a bit out of calibration. Seems it is but not sure how to adjust that. But that wasn't the clue. It was the probe capacitance on the scope side connector that lit the proverbial light bulb (LED in my case ;)).

So I soldered in an 0603 18pF cap (C3 in this diagram) and now it runs great. Some sort of noise must have been fooling the MAX31855 chip and preventing it from knowing when to start the transfer. The little board has level conversion on it as the device is 3.3V but all the other logic is 5V. I suspect the length of the wire for the /CS signal and the level conversion all caused the issue.


1720318032546.png


The way the circuit works is the inputs are pulled high to 3.3V. When 5V is applied to /CS or SPI_CLK the diode blocks this leaving the other side of the diode at 3.3V. When the signal is pulled low current from the VCC3 supply flows through the diode and the pin drops to about 0.5 volts which is called the diode voltage drop. The chip sees anything below 0.8V as a logic low and so it makes for inexpensive level conversion.

But something makes it a bit flaky with my wiring while a a few short wires to an Arduino UNO R4 worked fine. So I knew the module worked.

MAX31855_Modified.jpg
 
Last edited:
Black fscking magic.
Yeah and still fscking black. Mounted it all on the compressor and connected the inlet side probe and now it reports 47.5C. Put the test thermocouple on and it reports 47.5C. Put my finger on the SPI pins and the temperature drops down to match the thermister on the outlet side. Lift fingers off and the next reading is back up. So some noise is modifying the data stream.

I'll bet if I bring it back into the lab it will work perfectly. I have another idea I want to try but not tonight. Way to pissed off.
 
The chip sees anything below 0.8V as a logic low and so it makes for inexpensive level conversion.

I used to find that low logic levels around 0.5 to 0.7 were not always reliable. A simple pair of low resistance voltage divider resistors pulling that down to 0.2 to 0.3 was often enough to push things into a more stable signal range.
 
0.3V is a really small noise margin. What about a 3V3 Arduino?
I did try out the boards with 3" of wires from the UNO R4 to the MAX31855 module and it worked.
@Susquatch The thing is, whether it's a 3.3V or 5V the way the input circuit works it handles both logic levels because it only needs to be pulled low. A different divider or none would be needed between 3.3V or 5V systems. The idea of the module is that it is drive voltage tolerant.

In my case it's some sort of noise issue so I'm going to use some of the existing buffers and two spare ones on the display board instead of the processor output pins that are more than a foot away. I'll use the decoder for SPI device selection rather than just one of the Select lines.

1720369870902.webp
 
The thing is, whether it's a 3.3V or 5V the way the input circuit works it handles both logic levels because it only needs to be pulled low. A different divider or none would be needed between 3.3V or 5V systems. The idea of the module is that it is drive voltage tolerant.

You said earlier:

When the signal is pulled low current from the VCC3 supply flows through the diode and the pin drops to about 0.5 volts which is called the diode voltage drop. The chip sees anything below 0.8V as a logic low and so it makes for inexpensive level conversion.

I am suggesting that the post diode voltage of 0.5V is not low enough to be reliably sensed as logic low. By putting a low resistance pulldown resistor divider on that 0.5V, you can drag it down to 0.2 or 0.3. Which is now low enough to be reliably detected as logic low.

I'm really just saying that the manufacturers claim 0.8 is low enough to be sensed as logic low, but my experience is that this is only true in a perfect environment. A resistive divider on the circuit will work with any system voltage.

It does need to be a relatively low resistance divider because you need to make it fast enough to kill the noise. But it can't be so low that it also kills a logic high voltage or that it overloads the circuit. 2 to 10 K total is usually a good place to start.
 
You said earlier:



I am suggesting that the post diode voltage of 0.5V is not low enough to be reliably sensed as logic low. By putting a low resistance pulldown resistor divider on that 0.5V, you can drag it down to 0.2 or 0.3. Which is now low enough to be reliably detected as logic low.

I'm really just saying that the manufacturers claim 0.8 is low enough to be sensed as logic low, but my experience is that this is only true in a perfect environment. A resistive divider on the circuit will work with any system voltage.

It does need to be a relatively low resistance divider because you need to make it fast enough to kill the noise. But it can't be so low that it also kills a logic high voltage or that it overloads the circuit. 2 to 10 K total is usually a good place to start.
Still that requires modifying the board even more. Since this module would only be used in this 5V system just trashing the diode and changing to a resistive divider is all that is needed but in this case there isn't the room or access to traces to easily do that.

I suspect the diode is actually a Schottkey diode which can be as low as 150mV drop and as high a 0.45V. I tried changing the series resistance from 10K to 4.7K which sometimes helps but no luck. Putting drivers on the processor side before the long wires would also likely help. I used a short 6" piece of stranded ribbon cable to connect from the display board to the MAX31855 board. Again I think the ground wire is too thin and coupling the clock switching noise onto the select line which is why the device never sends out data or sends out garbage. The backs of the connectors are all now epoxied so it's a bit of a chore to make a new cable.

At the moment it's a 50-50 deal where when I walk into the shop 50% of the readings are wrong and then suddenly they are right. So the 18pF capacitor helped to reduce the noise. Maybe a larger one would be better.
 
Still that requires modifying the board even more. Since this module would only be used in this 5V system just trashing the diode and changing to a resistive divider is all that is needed but in this case there isn't the room or access to traces to easily do that.

I suspect the diode is actually a Schottkey diode which can be as low as 150mV drop and as high a 0.45V. I tried changing the series resistance from 10K to 4.7K which sometimes helps but no luck. Putting drivers on the processor side before the long wires would also likely help. I used a short 6" piece of stranded ribbon cable to connect from the display board to the MAX31855 board. Again I think the ground wire is too thin and coupling the clock switching noise onto the select line which is why the device never sends out data or sends out garbage. The backs of the connectors are all now epoxied so it's a bit of a chore to make a new cable.

At the moment it's a 50-50 deal where when I walk into the shop 50% of the readings are wrong and then suddenly they are right. So the 18pF capacitor helped to reduce the noise. Maybe a larger one would be better.
I love listening to you guys speak Greek, I don't understand it, but I am trying. ( Or at least that's how my wife describes me):rolleyes:
 
@Susquatch BTW, I just ran a standard recharge cycle. ie. where the pressure in the tank drops to 90PSI and the compressor comes on. The heat exchanger outlet air temp climbed to 130C before the compressor shut off. The air bled out of the primary charge side and over the next 10 minutes or so the inlet sensor returned to 23.5 degrees.

So other than the flaky sensing at times it's working well and doing what I expected. Still need to plumb in the pressure sensor, fix up wiring, fix that random temperature issue and look into how to control the compressor power so when the room is dark it won't cycle the tank.

I have two high side 12V relay drive outputs so I can switch an AC contactor to manage that and perhaps still a drain valve to pulse ON at the end of the compressor cycle which means I really should also sense when it's running. I have an input available for that too.
 
I love listening to you guys speak Greek, I don't understand it, but I am trying. ( Or at least that's how my wife describes me):rolleyes:
Just ask. I'm normally saying the minimum that an electronics guy would understand. But I can expand on anything that sounds interesting with a more educational approach.

Like a diode for example. If you connect a battery to anode end of the diode the battery current comes out the Cathode.
1720378720368.webp

If you were to connect the battery to the Cathode end, nothing comes out the Anode. It blocks.

However nothing is free. When pushing current through the diode from Anode to Cathode there is a voltage drop. Normally about 0.6V. So if you had a 3.3V circuit but only a 5V USB charger dongle then 5.0V-3.3V=1.7V so if you connected 3 diodes in series (0.6V * 3 = 1.8V) at the 3rd Cathode you'd have about 3.2V with 5V into the first Anode.

Diodes don't pass that current right away. There's a 'Turn on Time' and that may be an issue when you want to pass a signal quickly.

There are also diodes that turn on much much faster with a different internal architecture called Schottkey Didoes. A side effect of that faster turn on time is also a much lower voltage drop now between 0.15V and 0.45V typically. But they are way more expensive and don't come in really high current rating.

Hope that makes sense.
 
And just to continue on with this thread for a moment.

Memorize E=I x R.
E is Electromotive Force (Voltage)
I is Current Intensity (Amps)
R is Resistance (Ohms)

Also handy is P = I x E where P is power.

If you remember middle school math can substitute terms to get for example P = I^2 x R because E = (I x R) and P = I x (I x R)

So if we have two resistors, one at 100,000 Ohms (AKA 100K) and another at 10,000 Ohms (10k) then their series resistance value is 110K

If you put 3.3V across that you get

3.3V
----- = 0.000030A or better written as 30uA
110K

The voltage across the 100K resistor is I x R or 0.00003A x 100,000 Ohms = 3V.

I'll post a sketch in a bit with some more details.
 
Here's an example:

Seems appropriate to use the back of an envelope here. The 5V is applied to the Anode and it blocks current flow so the voltage at the Cathode stays at 3.0V.

But bring the Anode to the 0V point and now current flows through the diode dropping 0.3V in this example since that's the forward voltage drop of that diode. Now the voltage at that intersection of the 10K and 100K drops to 0.3V and current increases to 300uA. That's because now there's 3V across the 10K resistor and using Ohms law we calculate 300uA.

We could apply 24V on the diode Anode to represent a logic High or Power ON indication. Still only 3V into the device on the left because the diode blocks. But switch that voltage on the Anode to 0V and current flows through the diode and we only see the voltage drop across the diode. Now we have a logic LOW or Power OFF indication.


1720380968794.webp
 
You lost me at "back of the envelope" :D
I thought it was funny. Typical Dad Joke that goes over everyone's head.
Meant to signify a quick sketch showing what I said in the previous posting. But back of the envelope sketches are usually done sequentially and with lots of explanations as they are drawn.
 
I thought it was funny. Typical Dad Joke that goes over everyone's head.
Meant to signify a quick sketch showing what I said in the previous posting. But back of the envelope sketches are usually done sequentially and with lots of explanations as they are drawn.
It was funny.
I definitely want to learn more about electronics and such.
 
I love listening to you guys speak Greek, I don't understand it, but I am trying. ( Or at least that's how my wife describes me):rolleyes:
I know Greek, spanakopita, calamari, oozo, guacomole. Definitely not Greek. My guess is AI, impressive sounding but hard to disprove gobbledygook.
 
JC,

Nano board $3 on aliexpress (Mega328P will happily run on 3.3V), so direct connect no need for voltage translation. Might be as simple as changing the regulator on the Nano?

I'm not sure what else your doing with the Uno?

I avoid kludge translator circuits, might work on the bench but not so well in the field.

I have on occasion used FET based translators https://www.digikey.com/en/blog/logic-level-shifting-basics
 
JC,

Nano board $3 on aliexpress (Mega328P will happily run on 3.3V), so direct connect no need for voltage translation. Might be as simple as changing the regulator on the Nano?

I'm not sure what else your doing with the Uno?

I avoid kludge translator circuits, might work on the bench but not so well in the field.

I have on occasion used FET based translators https://www.digikey.com/en/blog/logic-level-shifting-basics
Recall this post: https://canadianhobbymetalworkers.com/threads/jcdammeyers-42-projects.9677/post-158171
Box on left has dsPIC30F5011 c/w CAN bus (CANOpen Protocol), RS485 ModBus, Dual relay drivers, PWM out for FAN speed, DHT-22 RH+Temperature sensor, Thermister reference voltage and sensing, Pressure transducer sensing, Light Dependent Resistor Sensing, SPI bus select and signals for interfacing to Dual 4.5 digit LED display and now also MAX31855 K Type Thermocouple.

I only brought the Arduino UNO R4 out to test that there wasn't a problem with the MAX31855. But switching this project to an Arduino of any sort is a major undertaking. Adafruit designed this board for both 3V and 5V systems.

Oh and from that site here's the schematic.
https://cdn-learn.adafruit.com/assets/assets/000/035/637/original/temperature_schem.png?1473452098
 
Last edited:
Back
Top