Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

Thermocouple measurement on Rasperry PI (USB-TC01?)

Hi All,

 

I'm trying to monitor the temperature of a device that has an embedded thermocouple in it on a raspberry pi... I have a thermocouple input daqhat from MCC (MCC134) but it has no labview drivers, so that's not a quick win I dont think (unless I can somehow read from that with a different language and get some degree of on-pi communication between that and my LabVIEW app... but that's still not a quick win in my eyes!

 

Next, I have got a couple of NI USB-TC01 USB thermocouple readers knocking around... But they run on DAQmx typically. I've seen a little bit on a DAQ driver from NI for raspberry pi, but I'm not sure whether that's for LabVIEW on the PI or if it needs installing separately (and if so how?!) or if it even supports this device (I've only seen it talked about in terms of the USB6008 and 6009 devices... and then not through the linx kit...

 

Has anyone ever done anything like this before? Anyone got any bright ideas on how to easily get temperature measurements from a thermocouple into code running on a PI?!

 

thanks!!

 

Paul

0 Kudos
Message 1 of 10
(448 Views)

I have recently used MAX6675 modules with Raspberry by implementing SPI code on its IOs. the videos are in portuguese, but if you are not able to follow with auto generated subs, you can ask in comment section that i will answer you.
https://youtu.be/xdyIq6XXzOI
https://www.youtube.com/watch?v=d2maC57lmXs
I also used raspberry pi with LabVIEW to read data from USB (i was using an arduino) but if the USB-TC01 serial is well docummented, i believe you can also do that using VISA.
https://www.youtube.com/watch?v=yHBRsvxrtSo

 

i noted that MCC134 is SPI. you may connect using datasheet and SPI functions

Jorge Augusto Pessatto Mondadori, PhD
Sistema Fiep
CLAD, CLD
0 Kudos
Message 2 of 10
(445 Views)

Thanks for the replies.

 

The MAX6675 is a K-type thermocouple, I need to be able to interface a T type... 

 

I've been able to use USB to serial on the PI (I'm reading from a set of process controllers that have an RS485 modbus channel), but as far as I can see the NI USB-TC01 is a DAQmx device and therefore can only be run with a DAQmx driver... but I dont think we can install DAQmx on the pi - unless I'm missing something somewhere?

 

As to the MCC134, I think it would be "possible" to go through their C-libraries and figure out how to query temperature from the SPI, but its no quick win! It would take far more time and effort than I have available (especially as my "C" experience is from 20+ years ago during undergrad physics degree!

 

It looks like I might end up using a spare process controller and plugging the thermocouple into that... the only downsides then are that I need to put it in an enclosure to make it safe to use... but at least I already have the code to make that work!

 

Thanks!

 

Paul

0 Kudos
Message 3 of 10
(393 Views)

Probably you wont be able to install DAQmx. 

i would still give a try to test reading from SPI since you can use ADT310 datasheet directly. 
https://www.analog.com/media/en/technical-documentation/data-sheets/adt7310.pdf


but no quick win anyway...

Jorge Augusto Pessatto Mondadori, PhD
Sistema Fiep
CLAD, CLD
0 Kudos
Message 4 of 10
(388 Views)

Good thinking to get the data sheet of the chip on the MCC134... I didnt think of that, I only went as far as looking at the datasheet and manual of the MCC itself, and they of course only really talk about using their driver with it... I guess I could try installing the MCC tools onto the LabVIEW Chroot on the pi and try call library function node as another alternative? But I'm not sure that would work either, as I dont know what dependencies and things are needed and whether they would exist in the right places!

 

Hey ho, I'll take a look through that data sheet and see if I can get anywhere at all...

 

Thanks!

 

Paul

0 Kudos
Message 5 of 10
(383 Views)

Building the MCC driver on the chroot environment works, but you can’t just install a prebuilt driver as the one for the Raspian OS is not binary compatible.Calling it from the Call Library Node works as well.

But it’s all some work and definitely not a quick win. And the work I’ve done I can not share like that!

Rolf Kalbermatter
My Blog
Message 6 of 10
(376 Views)

just as curiosity, rolfk;

 

You meant accessing .dll in linux, for example?

Jorge Augusto Pessatto Mondadori, PhD
Sistema Fiep
CLAD, CLD
0 Kudos
Message 7 of 10
(372 Views)

Interesting, so it sounds like you have done that before with this specific device?

 

So (I'm already a fair way out of my depth here and thinking of just using the process controller as I mentioned above - this is after-all a strictly in house project that just needs to work!), I assume I would have to do something similar to what you described in the SQLite post the other day about building the packages etc in the chroot?

 

This "small logging" project has certainly been a learning experience! So far, I've brushed up on some very old and very basic linux skills, I've done a bit of modbus coding, I've started to learn SQLite, and used G-Web development and now... I'm also learning the limits of using the pi (at least when combined with my own limits!) for certain tasks! 

 

Just another day in the life!

 

Thanks for your input! If you do have any way of sharing steps or tips for building and installing the driver I'd be interested, but dont go out of your way as I have a workable workaround that doesnt use that device!

 

Thanks again!

0 Kudos
Message 8 of 10
(364 Views)

Well you download the sources, and of course make sure to have the build-essentials installed through opkg. Then you can pretty much do a gcc command of the sources which creates an .so file which is the Linux equivalent of the Windows DLL. The Call Library Node interfaces under Linux to these .so files.

And yes I did it for two different MCC boards, but not sure if one was the TC one.

I even started an alternative driver based on Linx, but Linx has to many restrictions at this time. I then started on improving the Linx shared library for Raspberry but that project got stalled as it is a lot of effort and it is pretty much impossible to get any information from NI about their plans with it. They are not willing to commit to spending time on it but neither want to say that there are no plans to invest anything into it.

 

I’m currently on ski vacation with no access to my computer so everything is from memory, almost 3 years ago.

Rolf Kalbermatter
My Blog
0 Kudos
Message 9 of 10
(346 Views)

Haha! 

 

Thanks for the info, sounds horribly frustrating and not something you should be thinking about whilst skiing!

 

Enjoy the rest of the trip! I'll not bug you for more info!

 

Paul

0 Kudos
Message 10 of 10
(341 Views)