PDA

View Full Version : Thermometer with MAX6675 and thermocouple



SKOLS1
- 3rd March 2012, 11:59
Hi to all,
I made a thermometer with PIC16F876A @ 4 MHz ,with MAX6675 sensor for thermocouple of K-type.I used a code from this forum to "read" the sensor with SPI comunication.But I have problems with the temperature.The temperature is so jumping,isn't showing the write temperature,but in home ambient room temperature(22 degrees celzius).The result is from 0-5 degrees.It shows a wrong temperature,I said,the difference is +5 degrees.
Here are some picures of my thermometer with thermostat that I made:
http://pic.mk/images/svbKM.jpg
http://pic.mk/images/Xq53R.jpg
http://pic.mk/images/v1wsX.jpg

SKOLS1
- 3rd March 2012, 12:05
'Alias pins - MAX6675 temp sensor MXSCLK var PORTD.0 'MAX6675 Clock MXCS var PORTD.2 'MAX6675 Chip Select MXSO Var PORTD.3 'MAX6675 Serial Data '--Variables----------------------- kTemp var word 'raw data from MAX6675 tempC var word 'temperature in degrees C tempF var word 'temp C converted to degrees F '-----------Read and display temperature from MAX6675----------- main: LOW MXCS 'chip select low shiftin MXSO, MXSCLK, 0, [kTemp\16] 'shift in the data HIGH MXCS 'chip select high tempC = kTemp >> 5 'side shift to ditch the stuff to the right of the decimal point and just show whole degrees) tempF = ((tempC * 18)/10) + 32 'convert C to F lcdout $fe,1,dec tempC," degrees C ",$fe,$c0,dec tempF," degrees F " 'display the data on LCD pause 500 goto main end



I used this code for MAX6675 from Byte_Butcher.