Pinado
Posts: 16
Joined: Mon Jul 15, 2019 8:51 pm
Location: Colorado, USA

Temperature Sensors

Fri Jul 26, 2019 3:27 pm

Hello all! I have a RPi 3 B+. I recently got a couple of DAQ HAT(Data Acquisition Hardware attached on Top) sensors from Measurement computing corporation and I would like to set them up to record the temperature continuously, but I am not a very good programmer. I found some code here: https://github.com/mccdaq/daqhats/blob/ ... /mcc118.py but I do not know if it is what I am looking for. Any help would be appreciated!

Or if there is a better spot to put this, please let me know as well

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Temperature Sensors

Sat Jul 27, 2019 4:15 pm

Can you post the temperature sensor model number so we can get a better idea what the interface requirements might be?

Pinado
Posts: 16
Joined: Mon Jul 15, 2019 8:51 pm
Location: Colorado, USA

Re: Temperature Sensors

Mon Jul 29, 2019 3:38 pm

John_Spikowski wrote:
Sat Jul 27, 2019 4:15 pm
Can you post the temperature sensor model number so we can get a better idea what the interface requirements might be?
The temperature sensor number is MCC-118. Also, here is the installation manual I found if it helps: https://mccdaq.github.io/daqhats/hardware.html

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Temperature Sensors

Sun Aug 18, 2019 2:09 am

It looks from the help reference you posted it is an interrupt driven interface. I haven't tried interfacing with this type of interface yet so hopefully someone that has will chime in.

User avatar
bensimmo
Posts: 4988
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Temperature Sensors

Sun Aug 18, 2019 9:06 am

You are probably better of asking the makers of the board. They don't seem to give your the Python API they have set up.
Just how to install, the import and an example.
They leave you to study the python module itself.
If you don't know python, that makes it much harder.

I would suggest asking here for example programs and better documentation.
https://www.mccdaq.com/support/support_form.aspx

The is while/if someone works out how they are doing it.

User avatar
bensimmo
Posts: 4988
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Temperature Sensors

Sun Aug 18, 2019 9:18 am

Is this the HAT
https://www.mccdaq.com/DAQ-HAT/MCC-118.aspx
It looks like it a full blown "Data logging" hat.
You need to attach sensors to it that return their voltage.

So my guess is you attach your thermocouple/thermistor.
Write a program, maybe using the example.they give

Code: Select all

#!/usr/bin/env python
#
# MCC 118 example program
# Read and display analog input values
#
import sys
from daqhats import hat_list, HatIDs, mcc118

# get hat list of MCC daqhat boards
board_list = hat_list(filter_by_id = HatIDs.ANY)
if not board_list:
    print("No boards found")
    sys.exit()

# Read and display every channel
for entry in board_list: 
    if entry.id == HatIDs.MCC_118:
        print("Board {}: MCC 118".format(entry.address))
        board = mcc118(entry.address)
        for channel in range(board.info().NUM_AI_CHANNELS):
            value = board.a_in_read(channel)
            print("Ch {0}: {1:.3f}".format(channel, value))	
And I've found the API now it at the bottom.of the docs.
It looks like the MC134 is the one designed for temperature/thermocouples.

Return to “General programming discussion”