MAX31855 serial works, error with LCD

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
bluefirepony
 
Posts: 17
Joined: Mon Mar 25, 2013 10:34 pm

MAX31855 serial works, error with LCD

Post by bluefirepony »

I'm getting good readings just using the amp sending data over serial using the example code (readCelsius and readFahrenheit both return data within reason for tested temps and readError returns 0) but when I use the LCD sample code I am getting an error (readCelsius and readFahrenheit both return NaN and readError returns 7).
Same issue on two different amps. Thought it might be a power supply issue so I've tried supplying the Arduino (Uno) with power from different supplies and same result.
Little puzzled why the sensor+amp+library work with serial but sending to LCD fails?

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: MAX31855 serial works, error with LCD

Post by adafruit_support_bill »

What LCD are you using? How do you have everything hooked up? Possibly a pin-conflict between the LCD and the thermocouple amp?

User avatar
bluefirepony
 
Posts: 17
Joined: Mon Mar 25, 2013 10:34 pm

Re: MAX31855 serial works, error with LCD

Post by bluefirepony »

I'm using the 16x2 negative backlight (product 399). I have the green backlight powered directly - red/blue are not connected. The LCD is using pins 7-12, and the amp is wired D0 (#3), CS (#4), Clk (#5).

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: MAX31855 serial works, error with LCD

Post by adafruit_support_bill »

That is very strange. I have used these in conjunction with the 16x2 displays before - although I probably used the i2c backpack instead of direct wiring.

Error code 7 indicates that ALL the error bits are set.
D2 SCV Fault This bit is a 1 when the thermocouple is short-circuited to VCC. Default value is 0.
D1 SCG Fault This bit is a 1 when the thermocouple is short-circuited to GND. Default value is 0.
D0 OC Fault This bit is a 1 when the thermocouple is open (no connections). Default value is 0.
All I can think of is some sort of interference. Are you PWMing the backlight?
Can you try re-locating the thermocouple connections to A0-A2 to see if that makes a difference?

User avatar
bluefirepony
 
Posts: 17
Joined: Mon Mar 25, 2013 10:34 pm

Re: MAX31855 serial works, error with LCD

Post by bluefirepony »

Thanks for that! Great idea! That got me off zero (or NaN in this case) ;)
Changed the amp to use the analog pins and getting data just fine.

Code: Select all

//Adafruit_MAX31855 thermocouple(thermoCLK, thermoCS, thermoDO);
Adafruit_MAX31855 thermocouple(A2, A1, A0);

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: MAX31855 serial works, error with LCD

Post by adafruit_support_bill »

Great. :D Glad that works for you. Must have been some interference from the LCD. Thermocouples operate in the microvolt range, so it doesn't take much to swamp the amplifier with noise.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”