MAX31855 problem - reads zero

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
samhm17
 
Posts: 7
Joined: Sun Dec 06, 2015 8:35 am

Re: MAX31855 problem - reads zero

Post by samhm17 »

PicoReflow can read temperatures from temp1, temp3, and temp4... Opening the box back up to check out my temp2 connections.

User avatar
samhm17
 
Posts: 7
Joined: Sun Dec 06, 2015 8:35 am

Re: MAX31855 problem - reads zero

Post by samhm17 »

I think my wiring for temp2 is all good, so I'm guessing it could be the MAX31855. I ordered some spares just in case.
I switched my code over to the adafruit driver and it actually works now.
temp 2 still reads zero.

Do you need to use the screw terminals with the MAX31855s or could I solder my thermocouples directly to the amplifiers?

Code: Select all

#
#

from sys import argv
import RPi.GPIO as GPIO
import datetime
import time
from time import sleep
#import max31855
import Adafruit_MAX31855.MAX31855 as max31855

now = datetime.datetime.now()
date = now.strftime('%d-%m-%Y')

CLK1 = 22
CLK2 = 12
CLK3 = 24
CLK4 = 9

CS1 = 27
CS2 = 19
CS3 = 20
CS4 = 23

DO1 = 17
DO2 = 16
DO3 = 14
DO4 = 15

temp1 = max31855.MAX31855(CLK1, CS1, DO1)
temp2 = max31855.MAX31855(CLK2, CS2, DO2)
temp3 = max31855.MAX31855(CLK3, CS3, DO3)
temp4 = max31855.MAX31855(CLK4, CS4, DO4)

#print(temp1.get())
print(temp1.readTempC())
#print(temp2.get())
print(temp2.readTempC())
#print(temp3.get())
print(temp3.readTempC())
#print(temp4.get())
print(temp4.readTempC())

print '\n'
print date
print "press ctrl-C to kill"
print "What would you like to call your data file?"
prompt = ">  "
file_prompt = raw_input(prompt)

file_name = file_prompt+".dat"
file = open(file_name,"w",0)
#file.write(date)
timestep = 1
time = 0
start = datetime.datetime.now()
while True:
	now = datetime.datetime.now()
	runtime = now - start
	
	#t1 = temp1.get()
	t1 = temp1.readTempC()
	#t2 = temp2.get()
	t2 = temp2.readTempC()
	#t3 = temp3.get()
	t3 = temp3.readTempC()
	#t4 = temp4.get()
	t4 = temp4.readTempC()

	data_string =str(time)+" "+str(t1)+" "+str(t2)+" "+str(t3)+" "+str(t4)+"\n"
	print data_string
	file.write(data_string)
	time = time+timestep
	sleep(timestep)

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

Re: MAX31855 problem - reads zero

Post by adafruit_support_bill »

Thermocouple wire does not solder easily with standard soldering equipment. I won't say it is impossible, because I have seen it done. But the screw terminals are the easier way to go.

User avatar
panosrc
 
Posts: 8
Joined: Fri May 13, 2016 3:20 pm

Re: MAX31855 problem - reads zero

Post by panosrc »

Hi. I also have a max31855. I connect it with a K-type thermocouple and while it works good then it appears T/c problem then it shows the temperature again and it shows t/c again etc.. The code I use is the one in your site. All connections are ok. Does anyone have an idea?

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

Re: MAX31855 problem - reads zero

Post by adafruit_support_bill »

Make sure that your thermocouple probe is not touching a grounded surface. Also check the tip of the probe to make sure the weld is intact.

User avatar
panosrc
 
Posts: 8
Joined: Fri May 13, 2016 3:20 pm

Re: MAX31855 problem - reads zero

Post by panosrc »

Hi. Probe you mean the plug? If yes I checked that an its ok. The problem.is that it was working fine for 2 minutes and after it started the problem. Would it be a part of the problematic chips?

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

Re: MAX31855 problem - reads zero

Post by adafruit_support_bill »

Probe you mean the plug?
No. I mean the probe. Make sure that the thermocouple is not contacting a grounded surface.

If you post photos showing your soldering and connections we will take a look.

User avatar
panosrc
 
Posts: 8
Joined: Fri May 13, 2016 3:20 pm

Re: MAX31855 problem - reads zero

Post by panosrc »

I will have a photo for you later today. My thermocouple is an engine gas temperature k-type thermocouple so this is bolt on the exhaust pipe. As a result the body of the sensor is grounded to the car!

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

Re: MAX31855 problem - reads zero

Post by adafruit_support_bill »

The MAX31855 does not work with grounded sensors. https://cdn-shop.adafruit.com/datasheets/MAX31855.pdf
If you call the readError() function in the library, it will return a value indicating the type of error.

Bit 0 is an open circuit.
Bit 1 is a short to ground
Bit 2 is a short to VCC

User avatar
panosrc
 
Posts: 8
Joined: Fri May 13, 2016 3:20 pm

Re: MAX31855 problem - reads zero

Post by panosrc »

I will do that! So what can I use for an exhaust temp k-type sensor bolted to the grounded exhaust pipe?

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

Re: MAX31855 problem - reads zero

Post by adafruit_support_bill »

There are sensors that are designed to be bolted, but are insulated internally. You can also find mica insulating washers that provide electrical insulation, but good thermal conductivity.

User avatar
panosrc
 
Posts: 8
Joined: Fri May 13, 2016 3:20 pm

Re: MAX31855 problem - reads zero

Post by panosrc »

My sensor is that!Image that is designed to me bolted on.
My question is why the first time it was working well and after it started the problem eventualy and now it doesnt work on "T/c problem".

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

Re: MAX31855 problem - reads zero

Post by adafruit_support_bill »

What does the readError() function report?
http://forums.adafruit.com/viewtopic.ph ... 45#p483669

User avatar
panosrc
 
Posts: 8
Joined: Fri May 13, 2016 3:20 pm

Re: MAX31855 problem - reads zero

Post by panosrc »

Hi again and thank you very much for your help! How do I run that function? Do I run the code that I am running now and just add that library ?

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

Re: MAX31855 problem - reads zero

Post by adafruit_support_bill »

It is a function in the library you are using. Just call it and print out the result.

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

Return to “Other Products from Adafruit”