Jump to content

Recommended Posts

Posted
Okay, we have an Arduino reading four EGT probes via a four channel MAX31855 board. The temperature on each probe is being displayed as expected but when the probes are immersed in a saucepan of hot water, all four readings drop to zero but of any one probe is in the water it reads as expected (proving the water is not shorting out the probe). If the probe cables are touching those probes read zero. So, are YOU familiar with this and how did you fix the problem. I have a few ideas but would like YOURS first.

062_book.gif.f66253742d25e17391c5980536af74da.gif what happens if you touch { join electricly } all four or pairs .....not in water ??? 033_scratching_head.gif.b541836ec2811b6655a8e435f4c1b53a.gif

 

 

Posted

here's the code....

 

/*

 

EGT-monitor-v4

 

Version 4.0

 

This version extends version 3.0 by using all

 

the theromcouple lines and no serial port.

 

WORK IN PROGRESS!!!

 

Kevin Thomas, 24 Jan 2016

 

*/

 

#include <SPI.h>

 

#include "Adafruit_MAX31855.h"

 

#include <LiquidCrystal.h>

 

// defines what pins on the MAX31855 board connect to what pins

 

// on the Arduino board.

 

int MAX_SO = 6;

 

int MAX_CLK = 7;

 

int MAX_CS0 = 8;

 

int MAX_CS1 = 9;

 

int MAX_CS2 = 10;

 

int MAX_CS3 = 13;

 

// create four instances of the MAX31855 board, one for each

 

// thermocouple.

 

Adafruit_MAX31855 maxboard0(MAX_CLK, MAX_CS0, MAX_SO); // on pin 8

 

Adafruit_MAX31855 maxboard1(MAX_CLK, MAX_CS1, MAX_SO); // on pin 9

 

Adafruit_MAX31855 maxboard2(MAX_CLK, MAX_CS2, MAX_SO); // on pin 10

 

Adafruit_MAX31855 maxboard3(MAX_CLK, MAX_CS3, MAX_SO); // on pin 13

 

// create an instance of the LCD display.

 

LiquidCrystal lcd(12,11,5,4,3,2);

 

void setup()

 

{

 

lcd.begin(16, 2);

 

lcd.clear();

 

lcd.print(" EGT-monitor-v4");

 

delay(5000);

 

lcd.clear();

 

}

 

void loop()

 

{

 

int T1 = maxboard0.readCelsius();

 

int T2 = maxboard1.readCelsius();

 

int T3 = maxboard2.readCelsius();

 

int T4 = maxboard3.readCelsius();

 

// the lcd. (col/row format)

 

lcd.setCursor(0, 0);

 

lcd.print("T1= ");

 

lcd.setCursor(3, 0);

 

lcd.print(T1);

 

lcd.setCursor(9, 0);

 

lcd.print("T2= ");

 

lcd.setCursor(12,0);

 

lcd.print(T2);

 

lcd.setCursor(0, 1);

 

lcd.print("T3= ");

 

lcd.setCursor(3, 1);

 

lcd.print(T3);

 

lcd.setCursor(9, 1);

 

lcd.print("T4= ");

 

lcd.setCursor(12, 1);

 

lcd.print(T4);

 

delay(1000);

 

}

 

I don't have the hardware with me as I wrote the code for a fellow aviator.

 

 

Posted
are you using a 5v or a 3.3v 4ch max board?

I think the board they're using is solder selectable. {3/5v} 034_puzzled.gif.ea6a44583f14fcd2dd8b8f63a724e3de.gif

 

 

Posted

I think this code will be better for you. It goes to the serial monitor just add your lcd mods instead

 

Attached is the library for the interface pcb

 

* This file configures then runs a program on an Arduino Uno to read a

 

* MAX31855 quad channel thermocouple breakout board and print results to

 

* a serial port.

 

* - Configure Arduino Uno

 

* - Read temperatures from MAX31855 IC (internal temp, thermocouple temp)

 

* - read status information from sensor

 

* - Write formatted information to serial port

 

*

 

* Circuit:

 

* Arduino Uno --> SEN-30002

 

* MISO: pin 12 --> SDO (must not be changed for hardware SPI)

 

* SCK: pin 13 --> SCLK (must not be changed for hardware SPI)

 

* CS3: pin 7 --> CS3

 

* CS2: pin 8 --> CS2

 

* CS1: pin 9 --> CS1

 

* CS0: pin 10 --> CS0

 

***************************************************************************/

 

// the sensor communicates using SPI, so include the hardware SPI library:

 

#include "SPI.h"

 

// include Playing With Fusion MAX31855 libraries

 

#include "PlayingWithFusion_MAX31855_1CH.h"

 

#include "PlayingWithFusion_MAX31855_STRUCT.h"

 

// setup CS pins used for the connection with the sensor

 

// other connections are controlled by the SPI library)

 

int8_t CS3_PIN = 7;

 

int8_t CS2_PIN = 8;

 

int8_t CS1_PIN = 9;

 

int8_t CS0_PIN = 10;

 

PWFusion_MAX31855_TC thermocouple0(CS0_PIN);

 

PWFusion_MAX31855_TC thermocouple1(CS1_PIN);

 

PWFusion_MAX31855_TC thermocouple2(CS2_PIN);

 

PWFusion_MAX31855_TC thermocouple3(CS3_PIN);

 

void setup()

 

{

 

Serial.begin(9600);

 

// setup for the the SPI library:

 

SPI.begin(); // begin SPI

 

SPI.setDataMode(SPI_MODE1); // MAX31865 is a Mode 1 device

 

// --> clock starts low, read on rising edge

 

// initalize the chip select pins

 

pinMode(CS0_PIN, OUTPUT);

 

pinMode(CS1_PIN, OUTPUT);

 

pinMode(CS2_PIN, OUTPUT);

 

pinMode(CS3_PIN, OUTPUT);

 

Serial.println("Playing With Fusion: MAX31855-4CH, SEN-30002");

 

}

 

void loop()

 

{

 

delay(500); // 500ms delay... can be much faster

 

static struct var_max31855 TC_CH0;

 

static struct var_max31855 TC_CH1;

 

static struct var_max31855 TC_CH2;

 

static struct var_max31855 TC_CH3;

 

double tmp;

 

// update TC0

 

struct var_max31855 *tc_ptr;

 

tc_ptr = &TC_CH0;

 

thermocouple0.MAX31855_update(tc_ptr); // Update MAX31855 readings

 

// update TC1

 

tc_ptr = &TC_CH1;

 

thermocouple1.MAX31855_update(tc_ptr); // Update MAX31855 readings

 

// update TC2

 

tc_ptr = &TC_CH2;

 

thermocouple2.MAX31855_update(tc_ptr); // Update MAX31855 readings

 

// update TC3

 

tc_ptr = &TC_CH3;

 

thermocouple3.MAX31855_update(tc_ptr); // Update MAX31855 readings

 

// Print information to serial port

 

// TC0

 

Serial.println("Thermocouple 0:"); // Print TC0 header

 

// MAX31855 Internal Temp

 

tmp = (double)TC_CH0.ref_jcn_temp * 0.0625; // convert fixed pt # to double

 

Serial.print("Tint = "); // print internal temp heading

 

if((-100 > tmp) || (150 < tmp)){Serial.println("unknown fault");}

 

else{Serial.println(tmp);}

 

// MAX31855 External (thermocouple) Temp

 

tmp = (double)TC_CH0.value * 0.25; // convert fixed pt # to double

 

Serial.print("TC Temp = "); // print TC temp heading

 

if(0x00 == TC_CH0.status){Serial.println(tmp);}

 

else if(0x01 == TC_CH0.status){Serial.println("OPEN");}

 

else if(0x02 == TC_CH0.status){Serial.println("SHORT TO GND");}

 

else if(0x04 == TC_CH0.status){Serial.println("SHORT TO Vcc");}

 

else{Serial.println("unknown fault");}

 

// TC1

 

Serial.println("Thermocouple 1:"); // Print TC0 header

 

// MAX31855 Internal Temp

 

tmp = (double)TC_CH1.ref_jcn_temp * 0.0625; // convert fixed pt # to double

 

Serial.print("Tint = "); // print internal temp heading

 

if((-100 > tmp) || (150 < tmp)){Serial.println("unknown fault");}

 

else{Serial.println(tmp);}

 

// MAX31855 External (thermocouple) Temp

 

tmp = (double)TC_CH1.value * 0.25; // convert fixed pt # to double

 

Serial.print("TC Temp = "); // print TC temp heading

 

if(0x00 == TC_CH1.status){Serial.println(tmp);}

 

else if(0x01 == TC_CH1.status){Serial.println("OPEN");}

 

else if(0x02 == TC_CH1.status){Serial.println("SHORT TO GND");}

 

else if(0x04 == TC_CH1.status){Serial.println("SHORT TO Vcc");}

 

else{Serial.println("unknown fault");}

 

// TC2

 

Serial.println("Thermocouple 2:"); // Print TC0 header

 

// MAX31855 Internal Temp

 

tmp = (double)TC_CH2.ref_jcn_temp * 0.0625; // convert fixed pt # to double

 

Serial.print("Tint = "); // print internal temp heading

 

if((-100 > tmp) || (150 < tmp)){Serial.println("unknown fault");}

 

else{Serial.println(tmp);}

 

// MAX31855 External (thermocouple) Temp

 

tmp = (double)TC_CH2.value * 0.25; // convert fixed pt # to double

 

Serial.print("TC Temp = "); // print TC temp heading

 

if(0x00 == TC_CH2.status){Serial.println(tmp);}

 

else if(0x01 == TC_CH2.status){Serial.println("OPEN");}

 

else if(0x02 == TC_CH2.status){Serial.println("SHORT TO GND");}

 

else if(0x04 == TC_CH2.status){Serial.println("SHORT TO Vcc");}

 

else{Serial.println("unknown fault");}

 

// TC3

 

Serial.println("Thermocouple 3:"); // Print TC0 header

 

// MAX31855 Internal Temp

 

tmp = (double)TC_CH3.ref_jcn_temp * 0.0625; // convert fixed pt # to double

 

Serial.print("Tint = "); // print internal temp heading

 

if((-100 > tmp) || (150 < tmp)){Serial.println("unknown fault");}

 

else{Serial.println(tmp);}

 

// MAX31855 External (thermocouple) Temp

 

tmp = (double)TC_CH3.value * 0.25; // convert fixed pt # to double

 

Serial.print("TC Temp = "); // print TC temp heading

 

if(0x00 == TC_CH3.status){Serial.println(tmp);}

 

else if(0x01 == TC_CH3.status){Serial.println("OPEN");}

 

else if(0x02 == TC_CH3.status){Serial.println("SHORT TO GND");}

 

else if(0x04 == TC_CH3.status){Serial.println("SHORT TO Vcc");}

 

else{Serial.println("unknown fault");}

 

}

 

pwfusion_max31855 (1).zip

 

pwfusion_max31855 (1).zip

 

pwfusion_max31855 (1).zip

Posted
Let's not digress; unless you think the 3 or 5 volt thing is causing the problem.

Who is digressing...............I think we would care to know if there is a mismatch in the hardware side from the MAX breakout and the Arduino.

You wanted the help .....NO ??

 

 

Posted

This has the correct library for the interface pcb..just add the libraries to you arduino library as per normal. You can get rid of the fault alerts and just print to the lcd for each port in the positions you have already specified.

 

But you have to be careful with the voltage interfacing to the arduino. There is a level converter available or you can make one if your board is only 3.3V

 

Mark

 

 

Posted

The 3 volts versus the 5 volts is a big thing, okay, please explain how it relates to the problem I posted. If I have it wrong, how come all works as well as it does? What is there in the code posted by Kyle that may fix the problem? I'm the learner here, not the teacher. If my posts offend, throw money on my roof, I hate that....

 

 

Posted

Here's an idea (for those still listening). I could use four solid state relays to switch the input to each probe in turn and only need one of the MAX31855 channels. We know switching works because we did it with a ordinary hand cranked rotary switch.

 

 

Posted
Here's an idea (for those still listening). I could use four solid state relays to switch the input to each probe in turn and only need one of the MAX31855 channels. We know switching works because we did it with a ordinary hand cranked rotary switch.

yes it will work but you introduce an error in the cold junction circuit and the possible variable of oxidation of the rotary switch.

 

not sure about using SSR's as they are not a physical connector.

 

The question about 3.3/5 volt ........the Arduino board is a 5v device...the 4 channel breakout board is a 3.3 v device .....there is on the board the possibility

 

of making it 5v with a solder bridging circuit which must be configured { soldered } to make them compatible.

 

The sketch you provided compiles OK and as you've said works ...........no problem therefore ; its more likely a hardware issue , rather than a coding one.

 

Debugging the circuit is a lot easier if you have serial monitor routine to show up any fault conditions as the libraries provide.

 

I suggest you get Bruce to check the supply condition {3.3/5v} on the breakout board , and again as previously noted try bridging either or all of the TC 's

 

together without the water test .

 

 

Posted

The rotary switch was only to test a theory. If the error is small (millivolts or even several volts, who cares considering we will be looking at maybe 600°C and the error would be the same on all four probes. Thanks for your comments...

 

 

Posted

Millivolts is what the thermocouples produce thats the problem. Interfacing units together that are not the same voltage can produce some very wierd results not withstanding blowing up the inputs and or outputs of the micro or the interface.... The interface board uses a SPI interface so that is all done for you anyway the micro just needs to read them. The code I posted ealier its all there to make it work. I have compiled it here and with the correct libraries installed works fine. Just print to the LCD where it is printine to the serial monitor and direct each channel to a different lcd position on screen. You can rem out most of the failure/ short code that is in that sketch and all the SPI work and readings are done for you. BUT you do need to make sure of the interface voltages ...it doesnt matter what they are so long as both are the same but the arduino is pretty much 5V so the interface must be the same

 

 

Posted
........... If the error is small (millivolts or even several volts, who cares considering we will be looking at maybe 600°C and the error would be the same on all four probes.

{.........................................036_faint.gif.544c913aae3989c0f13fd9d3b82e4e2c.gif.....................................................................}

 

 

Posted

Okay, after a short break to do other things, I completed the prototype EGT monitor. Because the thermocouples are fed into differential amps, they cannot be electrically connected together as they would be when all attached to the aircraft engine. (We have the wrong type of thermocouple interface board?). The solution was to switch a thermocouple in, do a read, then move onto the next thermocouple using relays. This works well, each thermocouple sensing the temperature as expected (100°C in boiling water). There is a further problem, I wonder who can guess what it is. I shall work on that shortly...

 

EGT-monitor-v6.JPG.c05b2adec8fb2f299969787f01ef816c.JPG

 

 

Posted

Nope I can't guess 7252. Did it make your beer go flat?

 

In other news, there is a good explanation of the differently-earthed probes on the Phidgets website, and the manufacturer of that thermocouple amplifier board in the US is impressed by your idea of using a capacitor as a temporary power supply for the readout.

 

 

Posted

Never heard of Phidgets before but it looks good. The 'further problem' is the need to isolate the circuit when doing a read, but you know about that. I haven't tried it yet. Went for a blast this morning (Sunday) before the gliders got active, quite nice. My beer never lasts long enough to go flat!

 

 

  • 1 month later...
Posted

Well you will be reading the analog inputs of the Arduino you will need a op-amp to amplify the probes then of course the op-amps will put out the corresponding voltage and the arduino just reads it off at the bitrate you set.

 

Quite easy to do there are plenty of sketches on how to do it.

 

 

Posted

Hi Etta and welcome to this site. You are right about op-amps, but there is a board ( 31855) which has op-amps and a diode to read the ambient temperature to correct for the cold-junction.

 

The only problem is this device is expensive and doubles the price of the system from $100 to $200.

 

We ( my expert Jab 7252 and me ) started off thinking op-amps too. My other expert ( Kyle Communications) suggested the 31855. Here's what I've found out... it is all harder than I thought and the 31855 saves a lot of work. But getting the whole system working is still hard. Mine is not going yet and I think there are going to be instability issues to deal with when the engine starts running.

 

 

  • 3 weeks later...
Posted

Latest news... The gauge works just great. Jab 7252 worked out how to get around the earthed senders problem by just turning on one at a time with a relay setup. In practice this makes no difference at all, there is still a continuous readout of the 4 temperatures. There is an interference issue to work out, probably by putting it in a metal box , but the instrument is quite usable as it is .

 

Would I recommend this pathway to others? The answer is you would probably be better off with an MGL setup.

 

The setup I have cost about $380 including the probes and it was a lot harder to implement than I thought. Without a lot of help, it wouldn't ever have worked. Thanks guys.

 

On the first flight I found a problem with my EGT spread which I'll post in engines and props.

 

 

  • 3 weeks later...
Posted

Here's the EGT display sitting on the passenger seat of my plane. It is working just great. In the picture, it is showing the ambient temperature today .

 

The hardware thermocouple driver was advised by Kyle Communications ( thanks Mark) and the software plus the relay system to overcome the probe problem was from jab 7252 ( thanks Kevin).

 

The probe problem was my own devising, I bought a set of 4 Dynon probes from Jabiru without seeking advice. It turns out that Dynon probes are earthed to the engine and therefore to each other. This makes an entangled mess of the electronics and nothing worked at first.

 

Well it is working so well now that it has shown that there is a problem with the EGT of cylinder no4. Actually, I suspected there was a problem but without an accurate EGT measuring system I was in the dark.

 

IMG_0994.JPG.00cdaeb57913cd76ba879eb954d8238c.JPG

 

 

Posted

Glad you got it working. I dont do this stuff anymore (much) but instrumentation and elec engineering is what I have done for the best part of my life, its secretly pleasing when I see this stuff working given I know how complicated it is!

 

 

  • Like 1
  • 2 months later...
Posted

First flight with it all finished...IMG_1082.JPG.7c2a4aec99a68062a1fe54dbb0446a81.JPG

 

It can be switched from CHT to EGT. The CHT shows the hottest is no4 at 141 and the coolest is no1 at 125.

 

The EGT shows the hottest is n04 at 757 and the coolest is no2 at 624.

 

The flight was on a real cold day here at Gawler.

 

IMG_1086.JPG.b73a488f1db48bb1323c6af6447cddd8.JPG

 

IMG_1085.JPG.f8ee4a7de6b81e787d8ea1fe491ed75f.JPG

 

 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...