ZyTemp Infrared Thermometer Driver

Warning message

The Propeller Object Exchange system is decommissioned and replaced with a GitHub repository to house the same existing and future Propeller objects. As of 12/5/2019, this site is read-only. You can continue to browse and download objects from here for a limited time; however, please begin using the Parallax Propeller repository for future reference.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Request group membership
By: created: 2013-04-17 | updated: 2013-04-17


This demonstrates reading object and ambient temperatures with a ZyTemp (http://www.zytemp.com/) infraredthermometer. Embedded modules can be purchased, or they are commonly found as rebranded low cost handhelddevices. This has been tested with TN105i2 (1:1 distance to spot) and TN203 (6:1 distance to spot, plus laser).These were rebranded as CEN-TECH #93983 and #93984 respectively, from Harbor Freight.

These modules communicate using an SPI-like protocol. The thermometer must be the Master though, so I modifiedthe SPI engine to support Slave operation (and included it with this demo). The pins are accessible by openingthe case of either thermometer. There's a 0.1" header at the bottom of both PCBs with labels.

The pins are labeled:

  • A: Action
  • G: Ground
  • C: Clock 
  • D: Data
  • V: Vdd

This demo connects Clock to P0, Data to P1, Action to P2, and of course Ground to Vss.

To take readings, the Action pin is grounded by pressing the button. This demo watches that pin to determinewhen to read temperatures. This can also be pulled down at the pin if you'd like Propeller control. You mustbe careful though... the button does short this to ground, so I recommend putting in a series resistor (1k or so)to prevent shorting the output from the Propeller in case you press the button while connected. On the TN203,the laser seems to be grounded through this pin as well, so there's ~10mA sunk when grounded. If you have theseries resistor, you'll still get readings, but the laser won't light. This demo displays the object and ambienttemperatures to the debug RS232 port.

While I haven't tried it, I believe you can power the thermometer through the Vdd pin. I've always left theinternal battery installed and left Vdd disconnected though. I believe the laser on the TN203 is poweredseperately though. You should remove the battery if powering from Vdd.

The modules have an EEPROM to store emissivity values, which can be changed, though this demo doesn't use thatfunctionality. More information on the protocol, messages, and features can be found by downloading the manualson the ZyTemp website.

This code was based on Beau Schwabe's SPI Spin Demo.

See forum post for more info/pics: http://forums.parallax.com/forums/default.aspx?f=25&m=453982 .


Original File Upload
Package icon ZyTemp_Demo_-_Archive__Date_2010.05.18__Time_03.10.zip11.69 KB