Raspberry Pi I/O Developer's Pack

Widgetlords Electronics has bundled together their popular PI-SPI series of I/O modules into one package. All you need to add is your Raspberry Pi, download the new Widgetlords libraries from GitHub, and you have instant access to analog inputs, analog outputs, digital inputs and relay outputs.

The ribbon cables are included, as well as the interconnecting fleld power wires. Each module can be used individually, or all modules can be used together.

Each modules gets is logic (Local Power) from the RPi via the GPIO ribbon cables. The field circuitry (analog outputs, input transmitters, relays and digital inputs) are powered externally (Field Power) with a 24 VDC power supply.

Communication form the RPi to each module is using the SPI bus and multiple chip selects all handled by the "libwidgetlords" library.

Here is a simple Python Code Example that operates all modules together in one program:

 

from time import sleep
from widgetlords.pi_spi import *

init()

dig_inputs = Mod8DI()
relays = Mod8KO()
analog_input = Mod8AI()
analog_output = Mod2AO()

while True:
    # Read digital inputs
    di = (dig_inputs.read())       
    ko = di
    
    # Write relays
    relays.write(ko)
    print(ko)
          
    # Analog Output 1  counts = Analog Input 1 Counts
    an1 = analog_input.read_single(0)
    print(an1)  
    analog_output.write_single(0,an1)
    
    # Analog Output 2  counts = Analog Input 2 Counts
    an2 = analog_input.read_single(1)
    print(an2)
    analog_output.write_single(1,an2)
    
    print("")
    sleep(0.5)
 

 

 

 The Pi-SPI Developers Pack

 The PI-SPI-8AI comes in various analog input configurations:

  • 4-20 mA input
  • 0 to 5 VDC Input
  • 0 to 10 VDC Input
  • Thermistor Input (the library supports the Steinhart-Hart equation)

The Pi-SPI-2AO has 2 channels of 4-20 mA outputs and 2 channels of 0 to10 VDC outputs that mirror the mA outputs.

The PI-SPI-8DI has 8 channels if digital inputs that can be isolated by removing jumpers. This module also has 4 jumper selectable address allowing 32 inputs to be monitored with one chip select.

The PI-SPI-8KO has 2 relays with 10 Amp SPDT contacts and 6 logic level outputs.

  Node-Red support is now available.

 


Leave a comment

Please note, comments must be approved before they are published