User's guide 1.0 - SequentMicrosystems/smtc-rpi GitHub Wiki

General Description

image

Compatible with all Raspberry Pi versions from Zero to 5, this card offers a compact and inexpensive solution for reading and storing data from up to 64 thermocouple temperature sensors. Using 24 bit delta-sigma A/D converters with four channels each, the card achieves better than 0.1% accuracy. Field calibration with a precision 100Ω resistor can lead to 0.01% precision.

The card is compatible with all Raspberry Pi versions from Zero to 4. It shares the I2C bus using only two of the Raspberry Pi’s GPIO pins to manage all eight cards. This feature leaves the remaining 24 GPIOs available for the user.

The on-board RS485/MODBUS port permits almost unlimited expandability. The port can be driven in slave mode from Raspberry Pi, or can be used to control the card using the MODBUS protocol from a standard PLC, without the need of a Raspberry Pi.

The on-board hardware watchdog can be programmed to monitor the Raspberry Pi and cut the power to reset it in case of software lockup.

A tactile push button can be programmed to shut down the Raspberry Pi without using a keyboard and monitor.

Features

  • Eight Thermocouples DAQ 8-Layer Stackable HAT for Raspberry Pi
  • Supports Thermocouples type J, K, T, N, E, B, R and S
  • 24 bit delta-sigma A/D converters
  • Ultra-low drift (0.005μV/ºC) low offset (50μV) amplifiers
  • Factory accuracy: 1%
  • Maximum accuracy (through calibration): 0.1%
  • Maximum acquisition speed 40 cps
  • RS485/MODBUS transceiver with in and out ports
  • Programmable threshold LEDs on all inputs
  • Pluggable Connectors 26-16 AWG wires for power and RS
  • On-board hardware watchdog
  • Reverse polarity power supply protection
  • General Purpose Pushbutton
  • On-board resettable fuse
  • Command line
  • Python library
  • Node-RED example
  • Modbus RTU
  • OpenPLC module

What's in Your Kit

  1. Eight Thermocouples DAQ 8-Layer Stackable HAT for Raspberry Pi

image

  1. Mounting hardware
    • Four M2.5x18mm male-female brass standoffs
    • Four M2.5x5mm brass screws
    • Four M2.5 brass nuts

image

  1. Two jumpers

image

You do not need the jumpers when using only one Card. See Stack Level Jumpers section if you plan to use multiple cards.

  1. All the required female mating connectors

image

Quick Start-up Guide

  1. Plug your card on top of your Raspberry Pi and power up the system

  2. Enable I2C communication on Raspberry Pi using raspi-config.

  3. Install the software from github.com:

cd
git clone https://github.com/SequentMicrosystems/smtc-rpi.git
cd smtc-rpi
sudo make install
  1. Run the software:
smtc

The program will respond with a list of available commands.

Board Layout

image

  1. RS485 input port
  2. Ten thermistors increase measurement accuracy
  3. Screw-mount connectors for thermocouples
  4. Blinking power led
  5. Eight threshold programmable input leds
  6. RS485 output port
  7. PCB gaps for temperature isolation
  8. Stack level selection switches
  9. RS485 terminator and selector

Configuration Dip Switch

The right three position of the connector J11 are used to select the stack level of the card:

image

The three rightmost switches select the stack level. The next two switches 485-RX and 485-TX are used to connect the RS485 transceiver directly to the Raspberry Pi. The leftmost switch enables the terminator resistor of the RS485 port. Set this on if the card is the last one in the RS485 chain.

RS-485/modbus Communication

The Eight Thermocouples Card contains a standard RS485 transceiver which can be accessed both by the local processor and by Raspberry Pi. The desired configuration is set from three bypass switches on the configuration DIP switch.

If switches are on, Raspberry Pi can communicate with any device with an RS485 interface. In this configuration the Eight Thermocouples Card is a passive bridge which implements only the hardware levels required by the RS485 protocol. To use this configuration, you need to tell the local processor to release control of the RS485 bus:

smtc 0 wcfgmb 0 0 0 0

If switches are off, the card operates as MODBUS slave and implements the MODBUS RTU protocol. Any MODBUS master can access all the card's inputs, and set all the outputs using standard MODBUS commands. A detailed list of commands implemented can be found on GitHub:

https://github.com/SequentMicrosystems/smtc-rpi/blob/main/MODBUS.md

In both configurations the local processor needs to be programmed to release (jumpers installed) or control (jumpers removed) the RS485 signals. See the command line online help for further information.

Raspberry Pi Header

image

Power Requirements

The Eight Universal Inputs Card requires an external 5VDC/3A regulated power supply. Power is supplied to the board through the dedicated connector in the upper right corner (see BOARD LAYOUT). Reverse polarity protection ensures the card is not damaged if power is applied the wrong way. The card supplies the 5V required by the Raspberry Pi through the watchdog circuit which can cut the power to reset the Raspberry Pi in case of software lockup.

A local 3.3V regulator powers the digital circuits.

POWER CONSUMPTION: 50 mA @ +5V

ON BOARD RESETTABLE FUSE: 3A/8V

Thermocouple Inputs

Thermocouples can measure a wide range of temperatures, based on the metals used. The following table is a brief summary of thermocouple types and temperatures:

image

The board can read thermocouple type J, K, T, N, E, B, R and S, thus covering a very large temperature range. The compensation for the thermocouple type is done in software. Thermocouples of multiple types can be mixed and matched on the same board, providing complete flexibility for the user.

Hardware Watchdog

The Eight Thermocouples Card contains a built-in hardware watchdog which will guarantee that your mission-critical project will continue running even if Raspberry Pi software hangs up. After power up the watchdog is disabled, and becomes active after it receives the first reset.

The default timeout is 120 seconds. Once activated, if it does not receive a reset from Raspberry Pi within 2 minutes, the watchdog cuts the power and restores it after 10 seconds.

Raspberry Pi needs to issue a reset command on the I2C port before the timer on the watchdog expires. The timer period after power up and the active timer period can be set from the command line. The number of resets is stored in flash and can be accessed or cleared from the command line. All the watchdog commands are described by the online help function.

Mechanical Specifications

image

The Eight Universal Inputs card conforms to the Sequent Microsystems Industrial Format HATs for Raspberry Pi. All cards in this class have the same dimensions, the same connectors, 9 LEDs and a pushbutton located in the same position. A 3D model for a modular, stackable enclosure is available for download from our website.

Software Setup

  1. Have your Raspberry Pi ready with the latest OS.

  2. Enable I2C communication:

sudo raspi-config

image

image

image

  1. Install the smtc software from github.com:
cd
git clone https://github.com/SequentMicrosystems/smtc-rpi.git
cd smtc-rpi
sudo make install
  1. Run the software:
smtc

The program will respond with a list of available commands.

  • Run smtc -h for online help.

  • After installing the software, you can update it to the latest version with the commands:

cd ~/smtc-rpi
git pull
sudo make install