# Need help with a xor gate switching Instead of relay

#### shrikanthkp

Joined Aug 30, 2013
13
Can i use or gate for switching instead of relay? Because relay consumes more battery power than gate?.
Here i used 1 Input of XOR gate (high or low signal) given from microcontroller 2nd input pin kept dummy.If microcontroller output high ,XOR gate output also high.then can i use this voltage to drive another circuit(5volt ) insted of using relay?.Beccause relay consumes more power from battery.So we can avoide fast discharging of battery?.Please help me.
Thanking you,
Regards
Shrikanth KP

Joined Aug 17, 2013
858
I guess it would depend on how much current you would need to drive the other circuit.

#### shrikanthkp

Joined Aug 30, 2013
13

Joined Aug 17, 2013
858
Then if your gate supports that current I don't see why not. But why don't you just use a transistor?

#### shrikanthkp

Joined Aug 30, 2013
13
if we use transistor circuit gets small leakage But there was no leakage in gate?accuracy is more than transistor.

Joined Aug 17, 2013
858
But you would also need to supply the gate anyway, whether it's high or low.

#### ScottWang

Joined Aug 23, 2012
6,926
XOR gate : If the inputs are the same and then the output will be low.
So if you want to using XOR gate as a buffer(input high and then output high, input low and then output low) then you have to connected any one of inputs to GND.

Why you want to used that XOR gate?
In your case that the XOR gate function didn't used as the normal XOR gate function, it just as buffer and isolation functions, even if you using a wire to shorted and replace the XOR gate, it still can be working.

#### shrikanthkp

Joined Aug 30, 2013
13
for me XOR gate/OR gate anything is ok.my application just switching & driving the circuit.if PIC input high can i use output of gate voltage to my circuit?.it was just eliminating relay,to avoide quick battery discharge from relay.

Joined Aug 17, 2013
858
I thought that you could also use an optocoupler, and have both circuits isolated (as I suppose it was intended with the relay) while lowering the consumption.

If you are using the gate to pass the output current to the other circuit, then why not just pass the current directly; why would you even need the gate?... just asking.

#### shrikanthkp

Joined Aug 30, 2013
13
Yes really good idea !!!!
Thank you
Shrikanth KP

#### ScottWang

Joined Aug 23, 2012
6,926
If you want to get the appropriate application then you have to show your circuit, sometimes we have to find the better match.