MAX31855 problem - reads zero
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- paddygoat
- Posts: 52
- Joined: Thu Jun 27, 2013 11:50 am
Re: MAX31855 problem - reads zero
Lastly (hopefully) there are two very strange symbols on the LCD screen after the Int. Temp numbers. I'm getting 2 numbers then the decimal point then 2 more numbers and then 2 strange characters. Please advise!
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: MAX31855 problem - reads zero
Are they the same characters always? Can you post a photo?
- paddygoat
- Posts: 52
- Joined: Thu Jun 27, 2013 11:50 am
Re: MAX31855 problem - reads zero
PS. They dont ever seem to change.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: MAX31855 problem - reads zero
Strange. Could be uninitialized garbage in the display buffer. Try calling lcd.clear() at the end of your setup() routine.
- paddygoat
- Posts: 52
- Joined: Thu Jun 27, 2013 11:50 am
Re: MAX31855 problem - reads zero
Tried it, as below, but no better.
Code: Select all
void loop() {
// basic readout test, just print the current temp
Serial.print("Internal Temp = ");
Serial.println(thermocouple.readInternal());
double c = thermocouple.readCelsius();
if (isnan(c)) {
Serial.println("Something wrong with thermocouple!");
} else {
Serial.print("C = ");
Serial.println(c);
}
//Serial.print("F = ");
//Serial.println(thermocouple.readFarenheit());
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Int. Temp = ");
lcd.println(thermocouple.readInternal());
lcd.print(" ");
lcd.setCursor(0, 1);
lcd.print("C = ");
lcd.print(c);
lcd.print(" ");
delay(1000);
}
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: MAX31855 problem - reads zero
The problem is here:
println adds a CR/LF to the end of the string. Use lcd.setcursor() to move to the next line instead.
Code: Select all
lcd.println(thermocouple.readInternal());
- paddygoat
- Posts: 52
- Joined: Thu Jun 27, 2013 11:50 am
Re: MAX31855 problem - reads zero
OK thanks, so what exactly is the whole block of LCD code please? Thank you.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: MAX31855 problem - reads zero
Looks like you already have the setCursor() calls in place. So just change that one println() to a print() and you should be fine.
- paddygoat
- Posts: 52
- Joined: Thu Jun 27, 2013 11:50 am
Re: MAX31855 problem - reads zero
Great - that all works! Thank you very much PS. There is probably still a lurking problem with accessing the AVR folder which I solved through random library adding.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: MAX31855 problem - reads zero
You have to be careful about that. The Arduino IDE is fairly fussy about how you organize the libraries and is easily confused by duplicates. You might want to read through this guide: http://learn.adafruit.com/adafruit-all- ... nstall-use...which I solved through random library adding.
- paddygoat
- Posts: 52
- Joined: Thu Jun 27, 2013 11:50 am
Re: MAX31855 problem - reads zero
Yes, seems like I got it too work by confusing it!
- paddygoat
- Posts: 52
- Joined: Thu Jun 27, 2013 11:50 am
Re: MAX31855 problem - reads zero
I've got my thermocouple break out board https://www.adafruit.com/blog/2012/11/2 ... rade-v2-0/working nicely on my uno but now have a problem getting it to work with my own boards:
I spent hours checking the connections over and over again and have concluded that there is something missing, a component perhaps, on my PCB. I was thinking maybe it is something to do with the 16Mhz resonator I am using - is this compatible with the MAX31855? Any help much appreciated.
PS. the LCD reads 0.00 degrees C on both the internal and the probe lines.
PPS. My boards work fine in every other respect.
I spent hours checking the connections over and over again and have concluded that there is something missing, a component perhaps, on my PCB. I was thinking maybe it is something to do with the 16Mhz resonator I am using - is this compatible with the MAX31855? Any help much appreciated.
PS. the LCD reads 0.00 degrees C on both the internal and the probe lines.
PPS. My boards work fine in every other respect.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: MAX31855 problem - reads zero
Nice looking board!
I don't think the use of a resonator is the issue. The Uno also uses a 16MHz resonator to clock the 328P.
http://learn.adafruit.com/arduino-tips- ... no-uno-faq
I don't think the use of a resonator is the issue. The Uno also uses a 16MHz resonator to clock the 328P.
http://learn.adafruit.com/arduino-tips- ... no-uno-faq
- paddygoat
- Posts: 52
- Joined: Thu Jun 27, 2013 11:50 am
Re: MAX31855 problem - reads zero
Thanks for the reply, Bill. Glad you like the board. I cant think what the fault is, but I'm going to trawl through some rocket scream schematics to see if I can spot something I've missed.
Please be positive and constructive with your questions and comments.