ISO-SENSOR-KIT IO Card Setup

Board Pin out

J5 (0x6a Left ADC)

1    CH3+ (IN)
2    CH3- (OUT)
3    CH4+ (IN)
4    CH4- (OUT)
5    CH1+ (IN)
6    CH1- (OUT)
7    CH2+ (IN)
8    CH2- (OUT)

J5 (0x6e Right ADC)

1    CH3+ (IN)
2    CH3- (OUT)
3    CH4+ (IN)
4    CH4- (OUT)
5    CH1+ (IN)
6    CH1- (OUT)
7    CH2+ (IN)
8    CH2- (OUT)


Main Board 8Way IO Connector

1    +5V 1-Wire Power (150mA Max)
2    0V  1-Wire
3    1-Wire Data
4    Not Connected
5    RS485 A
6    RS485 B
7    0V
8    Not Connected


I2C MAP 

root@raspberrypi:~# i2cdetect -y 1

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- 6a -- -- -- 6e --
70: -- -- -- -- -- -- -- --

18 = 1Wire Bridge Device
68 = System RTC
6a = ADC 1 (Left hand side ADC)
6e = ADC 2 (Right hand side ADC)

run the script below to configure the OS for direct access

#!/bin/bash
### BEGIN INIT INFO
# Provides:          mypi-sensorkit-config
# Required-Start:
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: mypi-sensorkit-config
# Description:       mypi-sensorkit-config
### END INIT INFO

. /lib/lsb/init-functions

log_action_msg "Configuring MyPi ISO-SENSORKIT Card";

############ 1 WIRE #############
modprobe ds2482
modprobe w1_therm
### Uncomment the next line for 1Wire 4-20mA ADC IO Card support
#modprobe w1_ds2438
echo ds2482 0x18 > /sys/bus/i2c/devices/i2c-1/new_device
############ 1 WIRE #############

############ ADC #############
modprobe mcp3422
echo "mcp3424 0x6a" >/sys/bus/i2c/devices/i2c-1/new_device
echo "mcp3424 0x6e" >/sys/bus/i2c/devices/i2c-1/new_device
############ ADC #############

log_action_msg "Creating ADC /dev shortcuts";

ln -s /sys/bus/i2c/devices/1-006a/iio:device0/ /dev/i2cadc1
ln -s /sys/bus/i2c/devices/1-006e/iio:device1/ /dev/i2cadc2


exit 0

This can be made permanent and executed during the init startup sequence via the below command sequence :

# chmod +x ./mypi-sensorkit-config.sh
# mv ./mypi-sensorkit-config.sh /etc/init.d
# systemctl enable mypi-sensorkit-config.sh
# reboot

 

1-Wire


Either read the value directly (in this instance using a temperature sensor :

root@raspberrypi:~# cat /sys/bus/w1/devices/28-0416930e8aff/w1_slave
58 01 4b 46 1f ff 1f 10 eb : crc=eb YES
58 01 4b 46 1f ff 1f 10 eb t=21500


Or we can install a python program to help:

root@raspberrypi:~# apt-get update && apt-get install python3-w1thermsensor python3-setuptools

root@raspberrypi:~# w1thermsensor

	Usage: w1thermsensor [OPTIONS] COMMAND [ARGS]...
	
	  Get the temperature from your connected w1 therm sensors	

	  Available sensors types are:

	    - DS18S20
	    - DS1822
	    - DS18B20
	    - DS28EA00
	    - DS1825/MAX31850K

	Options:

	  --help  Show this message and exit.	

	Commands:

	  all        Get temperatures of all available sensors
	  get        Get temperature of a specific sensor
	  ls         List all available sensors
	  precision  Change the precision for the sensor and...

root@raspberrypi:~# w1thermsensor all

 Got temperatures of 1 sensors:

  Sensor 1 (0416930e8aff) measured temperature: 21.5 celsius

	  

A lower precision rating gives a faster reading, so let’s set the devices to 9bit accuracy

root@raspberrypi:~# w1thermsensor precision 9 1
root@raspberrypi:~# w1thermsensor all

 Got temperatures of 1 sensors:

  Sensor 1 (0416930e8aff) measured temperature: 21.5 celsius

ADC

Once the setup script has run the ADCs can be read directly

	  /dev/i2cadc1
	  /dev/i2cadc2

See ISO-ADC documentation for more information    

This card is fixed in 4-20mA current sense mode using 100R 0.1% precision resistors

To connect up the current loop sensor use one of the two below wiring schemes, if in doubt use the low side method.

 

 

 

The current drawn by the sensor can be then calculated via basic Ohms law    I = V/R   Where V = the voltage read by the ADC and R = 100

 

RS485

This operates the same as the ISO-RS485 card

       

 

Contact us now to discuss your project

Ready to order, contact us today for pricing or samples

Contact Us