Add analog or digital pins to Boron

Hi, we’re planning to use a Boron LTE (not the SoM) in a deployed environment where it will need to communicate with approximately 2 dozen sensors and switches (about half analog, half digital). The obvious problem I need to solve is how to add more pins - is there a recommended best practice/solution here?

I would use an I2C or SPI IO Expander.

  • For 8 GPIO using I2C: MCP23008 with this library. There’s also an SPI version of this chip, but the library does not currently support it. You can add up to 8 chips for more GPIO. This tutorial is for the Tracker, but it’s easily adapted for the Boron.
  • Or use the MCP23017 for 16 GPIO on one chip, but you can add fewer of them.
  • For analog, I like the ADS1015, but there are many I2C and SPI ADCs available. This tutorial is for the Tracker, but it’s easily adapted and actually has both a ADS1015 and a MCP23008 on the board. The ADS1015 supports 4 single-ended or 2 differential ADCs and you can add 4 on a single I2C port (along with the digital IO expanders).
5 Likes

Hi Sam,
on top of the options mentioned by Rick above, I’d like to add that if you need something ready to go, or even as a prototype, you can take advantage of boards like this one:

image

Cheers

2 Likes

Thanks Gustavo and Rick. This might be a dumb question Gustavo, but the link on that board says: “this is a nodeLynk device, it will require a nodeLynk Master Adapter for proper operation.” Does that mean I need something else to make this work? Is there a good resource for quickly getting up to speed on how all this works? I am new to a lot of this, thanks.

Hi, the way to use this board is to connect it to the Particle device via the I2C port.
They provide a library for it, with examples for Particle, here:

Once setup and initialized properly, reading the inputs can be “as simple” as (there’s always complications in hardware and software, that’s the reason for the quotes):

int inputStatus = relayController.readAllInputs();

You can read more about I2C here:

You may have some reading to do.
If you get lost, just keep asking questions. You can do this.
Gustavo.

1 Like