IR Temperature Sensor


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: IR Temperature Sensor

    any chance the pic u are using as eeprom

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: IR Temperature Sensor

    Is this the Melexis sensor?

    My code runs at 8mhz on 16f886 or 18F2620 IIRC

    Code:
    I2CClock	var PORTC.3	'I2CClock Line
    I2CData		var PORTC.4	'I2CData Line
    
    I2CAddr   var BYTE	'I2C Device Address
    I2CReg	  var BYTE	'I2C Device Register 
    
    
    
    Cal26:							'Melexis IR Temp Sensor Routine MLX90614 IR sensor 
    
    'The temperature in degrees Kelvin is then calculated as TempK = 0.02 * MelTemp Or TempC = 2 * MelTemp - 27315. 
    
    	'I2CReg = $06					'Ram register for Ambient Temp
        	'I2CReg = $07					'Ram register for Object 1
    	'I2CReg = $08					'Ram register for Object 2
    
    	I2Caddr = 0
    	I2CRead I2CData, I2CClock, I2CAddr, I2CReg, [Result.lowbyte, Result.highbyte]
     	Result = ((Result * 2) - 27315) / 100		'Convert to Centigrade
     	LCDOUT #Result,32	'Display 
    	Return						'Return to main program

  3. #3
    Join Date
    Aug 2009
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Re: IR Temperature Sensor

    Thanks for the reply. I am using the Melexis MLX90614 sensor and the PIC16F886 micro. I see in your sample code that you don't swap the low and high bytes in the result to get the 16 bit result in the standard format. Perhaps I will try not swaping my MSB & LSB. I have also discovered that I do not have a couple of the Special Function Registers setup properly. I will make those changes and post the results.

    TravisM

  4. #4
    Join Date
    Oct 2007
    Location
    The Netherlands
    Posts
    45


    Did you find this post helpful? Yes | No

    Default Re: IR Temperature Sensor

    here's a thread about the melexis sensor: http://www.picbasic.co.uk/forum/arch...p/t-11782.html

Similar Threads

  1. Replies: 7
    Last Post: - 23rd November 2011, 16:22
  2. Sensor temperature MCP9800-1-2-3
    By steneor in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 16th June 2008, 01:01
  3. Precise temperature sensor
    By Christopher4187 in forum Off Topic
    Replies: 0
    Last Post: - 7th June 2006, 18:39
  4. adc temperature sensor
    By rastan in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 8th May 2006, 12:21
  5. more-than-8 bit temperature sensor I2C
    By picster in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th March 2006, 20:29

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts