pairing output pins

starting to compile research for a new project, not finding many useful returns, so figured i ask here...
I am trying to pair 2 pins to do different things at more or less the same time, basically i have one pin controlling a solenoid and one pin controlling an LED, but i will ultimately have 16 solenoids and 16 LEDs i would like to maintain control of the LEDs but pair each LED to a solenoid so they will ultimately work together.

any thoughts are greatly appreciated.

Google "Arduino port expander".
Many choices, e.g. the MCP23017

Control 16 solenoid drivers and 16 LEDs with two pins of the Arduino.
There are other ways, depending on the size of the solenoid.
e.g. the TPIC6x595 can drive eight small solenoids directly.
How big are the solenoids.
Leo..

Hi,

Welcome to the forum.
When you turn a solenoid ON.

digitalWrite(sol1,HIGH);
digitalWrite(LED1,HIGH);

When you turn the solenoid OFF.

digitalWrite(sol1,LOW);
digitalWrite(LED1,LOW);

Okay... Tom... :slight_smile:

Why do you think you need 2 pins each? The signal that activates the solenoid driver can light a LED at the same time. You also can put the LED in parallel to the solenoid, so that it indicates what really happens, not only what should happen.

For many outputs you can use port extenders, like the TPIC already mentioned.

the reasoning for 2 pins is to separate the lighting effect from the solenoid but still be able to have them work as one. I have a feeling that i will have to adjust the timing from when the solenoids' circuit is closed to when the LEDs are closed, so the more control I have the better the effect. in the end there will also be a random timing effect so being able to pair 2 circuits seems like the a logical path to explore.

as t the size of the solenoids they are not very big...? probably going to go with 12v and try to keep them under an amp each, I'm in the process of testing a few products.