Overview

This page provides the User's Guide for the Pi-Plates CURRENTplate. The CURRENTplate is compatible with all of our other products (except the TINKERplate). And as many as eight CURRENTplates can be stacked together to provide a maximum of 64 isolated, two-wire 4-20mA inputs.

Board Layout

Getting Started

If you haven't already done so, visit the Getting Started page to set up the interfaces on your Raspberry Pi and to install the Python modules.

Address Selection

View the address selection header from the top of the board as shown in the picture above

Then move the jumpers as shown below to select the desired address for your board. If you only have a single CURRENTplate, there is no need to change the address from the default value of 0.

Functions

Definitions

addr: the CURRENTplate has a set of jumpers on the board that allow its address to be set to a value between 0 and 7.
channel: each CURRENTplate has eight individually addressable input channels numbered 1 through 8.

Reading Loop Currents

The eight inputs on the CURRENTplate are arranged as shown in the image below:

A typical connection for one of the above inputs with a PT100 temperature sensor might look like:
The functions for reading current are:
getI(addr,channel) - returns the value of loop current (in milliamps) measured on the specified channel. The output range is 0 to 23mA. Note that returned values below 4mA will not be accurate.
getIall(addr) - returns a list of the loop current values (in milliamps) for all eight channels. The output range of each measurement is 0 to 23. Again, returned values below 4mA will not be accurate.
In the first example, we read a single channel 1000 times, save the data to a list, calculate the average, and measure the average time between readings:

The output from the above script is:

pi@raspberrypi:~ $ python getIsingle.py
Pi-Plate CURRENTplate
1000 Samples of Input 1, Average Current: 15.1476 mA, Average Measurement Time: 0.000675

Note that with an RPi 4 model B, the average measured time between readings was 675μsec this is equivalent to a max sample rate of about 1,481 samples per second which is actually 48% faster than the specified max of 1Ksps.

Next example: perform ten getIall readings:

The output from the above script is:

pi@raspberrypi:~ $ python getIall.py
Pi-Plate CURRENTplate
[15.1443, 0.0652, 0.0861, 0.0311, 0.0297, 0.0, 0.0, 0.0319]
[15.145, 0.0656, 0.0861, 0.0311, 0.0293, 0.0, 0.0, 0.0315]
[15.149, 0.0652, 0.0864, 0.0315, 0.03, 0.0, 0.0, 0.0315]
[15.1483, 0.0652, 0.0861, 0.0315, 0.0293, 0.0, 0.0, 0.0315]
[15.1465, 0.0648, 0.0861, 0.0311, 0.0293, 0.0, 0.0, 0.0308]
[15.1465, 0.0652, 0.0861, 0.0322, 0.0289, 0.0, 0.0, 0.0326]
[15.1479, 0.0648, 0.0868, 0.0311, 0.0289, 0.0, 0.0, 0.0315]
[15.1479, 0.0648, 0.0857, 0.0322, 0.0289, 0.0, 0.0, 0.0326]
[15.1465, 0.0656, 0.0861, 0.0308, 0.0293, 0.0, 0.0, 0.0311]
[15.1461, 0.0656, 0.0861, 0.0311, 0.0289, 0.0, 0.0, 0.0315]
10 Measurements, Average Measurement Time: 0.004022

Our test setup only had a single connected signal on Channel 1. All the other channels were disconnected and, in some cases, showing some strange values. It has to be remembered that currents below 4mA are out of range and can produce inaccurate readings - even if the input is not connected.

Note that it takes, on the average, just over 4msec to execute the getIall function.

LED Control

The green LED on the CURRENTplate board can be controlled with the following functions:

setLED(addr) - turn on the LED
clrLED(addr) - turn off the LED
toggleLED(addr) - if LED is on, turn off. If LED is off, turn on.

System Functions

The CURRENTplate supports the following common functions

help() - returns a concise list of the CURRENTplate functions along with explanations
getID(addr) - return Pi-Plate descriptor string, "Pi-Plate CURRENTplate"

getFWrev(addr) - return FW revision in decimal format
getHWrev(addr) - return HW revision in decimal format
getVersion() - returns revision of python module
getADDR(addr) - returns address of pi-plate. Used for polling available boards at power up.
RESET(addr) - set CURRENTplate to power on state.