1

I'm looking to connect an 8-relay board to an Arduino Uno. A board like this one. However, I don't really want to use up 8 digital outputs if I don't have to. Is there some intermediate circuitry I can either buy or build that would do this?

For example, can I connect something to the serial so that sending '3' would result in binary 00000011 and thus turn on relay's 1 and 2?

Alternately, and probably more lazy, is there an extension board that would just give me a pile more digital pins?

RickMeasham
  • 345
  • 3
  • 13

3 Answers3

1

A likely solution is to use the Arduino SPI interface and the Arduino SPI library to control a SPI relay board. Here is a 6 year old thread talking about such a board. And another more recent relay thread where SPI is brought up.

st2000
  • 7,513
  • 2
  • 13
  • 19
0

There are ICs that provide additional I/O ports through either the SPI or I2C busses, such as MCP23017 or MCP23018 or their 8 port equivalents. There are many different makes, search Google for "Arduino addition IO Pins"

Code Gorilla
  • 5,652
  • 1
  • 17
  • 31
-1

You can use a MUX/DEMUX. Check out the link. Basically, you can select the output pin by a series of commands that you can do with the Arduino. The relay inputs will be hooked up to the IC's outputs

https://www.sparkfun.com/datasheets/IC/cd74hc4067.pdf

ginL
  • 21
  • 2