Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


LJTick-InAmp and Python on OS X

  • Please log in to reply
3 replies to this topic

#1 VHD

  • Members
  • 34 posts

Posted 21 March 2013 - 07:21 AM

Hello all: I have a U3 with the RB12 relay board running either OS X Raspberry Pi. I would like to be able to measure TC values and log them. I do understand that a LJTick-InAmp will be needed when using the U3, with the wiring diagram provided in the Thermocouple section of the LJTick-InAmp user manual. I would like the logging to be done in Python, is there any example code to do so? Thank you. VHD

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 21 March 2013 - 03:12 PM

We do not have an example for this, but you can figure this out with the pseudocode in the LJTick-InAmp Appendix C, http://labjack.com/s...heet/appendix-c , and the ktype Python example, https://github.com/l...ktypeExample.py . Modifying the ktype example it should be something like this in the main (note that this is untested and change the U6 import and open to U3):

# The cold junction temperature
		# Important: Must be in Celsius
		CJTEMPinC = d.getTemperature() - 273.15
		# The thermocouple's analog voltage
		valueAIN = d.getAIN(0)
		offsetVoltage = 0.4 # This value should be measured and set by the user.
						# LJTick-InAmp Appendix C talks about this

		# To get the thermocouple voltage we subtract the offset from the AIN
		# voltage and divide by the LJTIA gain.
		gain = 51 # This depends on the LJTick-InAmp switch settings
		TCVolts = (valueAIN - offsetVoltage)/gain

		# Important: Must be in millivolts
		TCmVolts = TCVolts * 1000
		print "Cold Junction Temp:", CJTEMPinC
		print "Voltage (in millivolts):", TCmVolts
		totalMVolts = TCmVolts + tempCToMVolts(CJTEMPinC)
		print "Temperature:", mVoltsToTempC(totalMVolts)

#3 VHD

  • Members
  • 34 posts

Posted 21 March 2013 - 03:28 PM

Great, thank you I'll give it a shot and post the results. I had another question, would if be possible to add an amplifier such as this one, https://www.adafruit.com/products/269, using the same connection scheme as the LJTick-InAmp?



#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 21 March 2013 - 04:59 PM

That is a breakout for the MAX31855. You can use the MAX31855, but it provides SPI not analog, so you would have to use the serial SPI features of the U3 to read the data from the chip. Also, looks like the chip needs a 3.0-3.6V power supply, so you would have to use a digital output or analog output to power it rather than VS.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users