Transistors instead of relays...

I’ve got four wires from a remote. If I connect two wires together, it activates the ON feature of the remote. If I connect the other two wires together, it activates the OFF feature of the remote. I’ve had success using one transistor, but when I add a second transistor, because they (the transistors) both use the same ground, I’m having troubles isolating the ON and OFF wires. In short, it doesn’t work cause I need to keep the four wires isolated.

I understand that I could have each transistor drive a small relay, but I was hoping to just use transistors.

Or, is there code to connect two pins together for a second.

My goal is to turn a pump on (via the remote), and after a minute, turn the pump off.

I’ve attached a fritz pic.

Here’s the code:

int On = 8;
int Off = 9;

void setup() {
// initialize the digital pin as an output:
pinMode(On, OUTPUT);
digitalWrite(On, LOW);
pinMode(Off, OUTPUT);
digitalWrite(Off, LOW);

void loop()

digitalWrite(On, HIGH);
digitalWrite(On, LOW);
digitalWrite(Off, HIGH);
digitalWrite(Off, LOW);


With the power off, what resistance do you get:
A to C =
A to D =
B to C =
B to D =

7-17-2013 11-39-39 PM.jpg

It all depends on how your remote is wired up as to if you can common two lines. If you can not the you could use two opto isolators to keep the grounds sepreate.

Couple diodes might work.

Appreciate the responses. I'm out of town, so I can't get resistances between A, B, C, and D until I return but am curious to see how this will effect things. I'll get them as soon as I can. As for other suggestions, yes, I tried the diode idea with not avail. Also, I thought of the optocouplers, but this isn't much different from using a reed relay which is what I might end up doing.

With “power off,” I get

AC: 6.61M,
AD: 50,

Also, sorry about post location. I saw “input and outputs” and thought that this might be the place to put such a post.

So take a crack at wiring A and D together and connecting it to the Arduino ground. Having removed the grounds as you have them at the moment. Remember it matters what you connect the collector and emitter to. Basically you want to connect B and C to the collectors and the other two to ground.

This is why you need grounds:-

very interesting. I am having some success with your suggestion, and I'm getting somewhat independent connections between A and B, and C and D. So although connecting B and C to the Collector has solved some of the common ground problem, it still appears that connecting A to D and then to the Arduino ground isn't making my remote happy. The missing info you need is contained in the remote, and without an exact understanding/schematic of that, I think we are grasping at straws.

I'm embarrassed to say that I have discovered a 2 channel relay module for $5 which is going to destroy my learning curve. Thanks for the help!

Thanks for the help!

No problem.

You see there are two ways any switch can be wired up. The first is a simple connection to ground or +ve on the input. You can cope with that with simple transistors. The second is as part of a scanning matrix, here one wire is an output and the other is an input. Here you need to connect one to the other and there is no common ground. If that is the case, and it looks likely here, then you either need relays or opto isolates with FET drive outputs. You can't do it with a system with a common ground because there isn't one.

then you either need relays or opto isolates with FET drive outputs

A device I have used in a similar situation:

The easiest approach is probably to use two reed relays. These are low-current relays, which can generally be driven direct from Arduino outputs, and are smaller and more reliable than traditional relays. Here are a couple of examples: and

The photofet suggested by LarryD also looks to me to be a good solution.