Need some advice


I am exploring the idea of using touch screen and controller to operate a number of input relays. The process will be regularly powered down so I am considering DTDP bistable relays, therefore I will need two output pins per relay; i.e. one pin to switch and another to reset each relay. Assuming I use this type of relay I would need a minimum of 4 relays (8 switching pins) with future developments potentially needing 18 (or ultimately 32) pins. I have seen people switching 16 relays but without a screen connected. Is my kind of application possible with an Arduino, is there a better solution?

At this stage I have two problems, the first being that I have no experience to draw from and am thinking I need to get a board to experiment with (possibly a mega 2560). Unfortunately this brings me to the second problem, being which model should I get? The board selection issue is simply that I don’t know how many pins are available once a touch screen is connected. I have seen some “intelligent” screens that can connect via 4 wires (+5V, TX, RX, GND) e.g. Then there are the normal style of board to screen connectors that appear to use a significant number of a boards IO pins.

I know I am not the first to think about using an Arduino as a switching controller, and I doubt I am the first to want to use the board with a large number of output/switching pins in conjunction with a touch screen, but I don’t know the limits and am unsure how to attempt/investigate this. Any thoughts and/or ideas are appreciated and questions are welcome.



Can you give a link to these latching relays?

If the coil current is not too high, you could use tpic6b595 chips to drive them. These chips are like 74hc595 shift registers except that their outputs can directly drive a delay coil. Each chip has 8 outputs so could drive 4 latching relays. The chips would connect to the SPI pins of your Arduino and can be daisy-chained, so 4 Arduino pins needed for as many relays as you want.

As for the type of Arduino, almost any type would be fine.

A suggestion for you: instead of the touch screen, use your smartphone to control the relays over the internet from anywhere. To do this, I suggest using an esp8266 based board. I like Wemos D1 mini. You can use the Blynk app on your phone to control and monitor the relays.

the relay will be either one coil or two.

the one coil uses an H-Bridge and runs positive voltage in on one pin to set the relay
then it will put positive voltage in on the other pin and bring the first pin to ground to re-set the relay.

The two coil has both coils with power and you just bring one coil to ground to set, or bring the other coil to ground to re-set.

As PaulRB offered, the TPIC6B595 will make wiring and control easier.
Using the two coil version is easier when using the TPIC6b595.
as a note, the TPIC6b595 comes in different packages and each has the pins at a different pin

The beautiful part is that you can connect one, it uses the SPI bus.
you can connect one that that bus, then a second one to the first. and still only use the same 4 pins.


Thanks for the replys.

PaulRB The smartphone suggestion: My plan is to have a system that can be operated independently and I thought a touch screen would be a good solution... However, that being said, I am now thinking about the potential value of having both, and of course adding an audio Bluetooth board might be useful, and so the process goes... i.e. have an idea then spend lots of time adding and subtracting features while trying to figure out how each feature will actually work... and then, oh yeah this was supposed to be a system, how to integrate it all.

The relays: I don’t have a specific relay in mind, I am still thinking about how I can achieve this idea. My thinking was that DTDP latching relays would be good because each relay could switch one devices stereo L&R signal. The latching aspect appealed because the coil would only need to be energised for a short period when the relay is switched.

The TPIC6b595 idea: Is the TIPC6B595 chip basically a 74HC595 - ULN2803 combo in one chip, and the ULN2803 chip is essentially a more useable version of something like this

Just for something to fiddle/experiment with I have grabbed one of those 8 channel eBay relays, I figured that @ €4.5 it wouldn’t be a problem. They are surprisingly big, having 4-5 of those would use up a lot of space.

I would appreciate input from anyone who knows of a suitable relay.