USB Device for Additional GPIOs

Greetings All,

I have a question on GPIO pins and non-sound USB devices. Here’s the short version. I’m upgrading a repeater I have here at my home to use solely the ASL software, versus its existing repeater controller. The PC running this is a small form factor HP rather than an RPI as it is running a few other nodes plus some background applications. For radio interfaces I primarily use the RIM-Lite devices from Scott Zimmerman. Here is my issue though.

I want to add additional GPIO inputs/outputs for monitoring and controlling hardware in my home. Things like alarm system status, garage door, etc. Obviously I could do this with the additional GPIO pins on a full-scale RIM or URI device, but my concern is I may in the long run need more pins than a device like that can supply. And obviously I don’t want to spend $100 on something when all I need is the GPIO function. With and RPI I’d have the GPIO header but that’s not the case here.

So, with that explained, what I’m trying to figure out is how to use another type of USB GPIO device strictly for its GPIO functions with the ASL software.

I think something like the following link would give me the needed hardware: nRF52840 Micro Dev Kit USB Dongle https://www.amazon.com/dp/B07MJ12XLG/ref=cm_sw_r_cp_api_glc_fabc_GK8.Fb5C2D5QS

I’m just not sure how to integrate it from a script programming standpoint.

Does anyone have any wisdom they can share with me on this?

That’s an interesting little dongle. Huh. I’ll have to look into it.

I would normally recommend just using an Arduino compatible chip, like an ESP8266 or ESP32 because they’re

  1. Super cheap ($5 a piece, cheaper if you want to wait)
  2. Have plenty of usable GPIO
  3. Have WiFi
  4. Can be dispersed throughout the house easily
  5. Well written firmwares for doing all sorts of IoT goodness, like sensors, relays, and switches (Tasmota firmware, Espurna Firmware)

I’m biased because this is what I’ve done for my garage door, contact sensors, and PIRs for about 4 years now. :slight_smile:

There’s software out there (Domoticz, MQTT, Node Red) that handles this really nicely and would absolutely run alongside ASL on the same system (PC or RPI). And once again, biased because this is what I do :slight_smile:

Lmk if I can be of any help!

Cheers,
Rob

Since you are using a PC, there is a data sheet for using Parallel port for I/O in the wiki.
A newer PC is not likely to have one, but can be added as a pci slot card.
You can address up to 3 parallel port cards if you have the slots for it. But I would suggest against that because often the plug and play system will give you issues with hardware addressing.
That provides 8 outputs and 5 inputs per card. You will need to buffer the in/out with a transistor or opto-coupled transistor for isolation…

Programming for those can be done directly inside of ASL.
So you might read through that in the wiki first.

As KK9ROB says those ESP8266’s are a option that is cheap and effective and there are some how2’s out there on the web. I might suggest you get one of those devices just to play with no matter what you do. It’s a good learning experience.

A RasPi Zero W also has a set of GPIO, cheap, small, low power with enough space to run asterisk/asl

There are also network data i/o cards out there, easily activated from anywhere on your network from any pc/pi etc. A simple script to change or read the value of a address in a batch file is all that is really needed for any of this stuff.
The advantage of some of these network or USB cards is the number of data lines to be switched or read, But do cost a bit more.

You probably need to study just what it is you want to accomplish and see what works best because of direct wiring needs vs wifi or some combo of both. And the number of things you need to check/control will play a part in that decision.

There is no one size fits all.
Create a ‘MAP’ on paper and go from there.

Indeed an advantage! You can also expand your GPIO by using an inexpensive shift register:

https://www.arduino.cc/en/Tutorial/Foundations/ShiftOut

I’ve used these before to drive 7 segment displays without using up a bunch of pins.