How to stop an XOR gate from 'pulsing' on power-up

Thread Starter

O1134

Joined Apr 29, 2021
7
Hi,

I recently finished building a circuit from an earlier post (https://forum.allaboutcircuits.com/...itch-and-xor-gate-for-a-control-panel.178688/) that was intended to replace several SPST toggle switches to operate as momentary switches by using an XOR gate. The circuit is based on this original one posted by Crutschow:
https://forum.allaboutcircuits.com/attachments/138954/

In my new travel trailer there is a main switch control panel which has a mixture of momentary and spst switches for various lights and equipment. The spst switches all illuminate and the momentary ones obviously do not. Interestingly all 4 of the momentary switches control lights outside of the unit that I cannot see and have to go out at night to tell if they are on or off. I tried replacing the momentary switches with the spst, but discovered that the trailer has something like a latching relay setup so you would have to click the spst twice to get the lights to switch on, switch off (it is not an option to replace this latching setup as it is internal to the master control box of the unit)

I am using 3 of the XOR gates available in the CD4070B and tying the inputs on the 4th gate to ground as it is unused. When testing this setup. I noticed that when power is first applied, all of the outputs from the 3 XOR gates pulse HI, triggering the transistor and in turn energizing the relays. This has the effect that all the lights attached to the relays turn on which is not a desirable behavior. When storing the trailer for any length of time, the battery is disconnected so when I go to pick it up and reconnect the battery, all of the lights turn on.

The desired behavior is that the relay will only energize when a switch is activated and not when the circuit is initially energized.

I have tried researching articles related to suppressing pulses from logic gates on power-up but nothing looks like it will work. I am open to suggestions.

Thanks,

01134
 

Delta Prime

Joined Nov 15, 2019
1,149
Hello there! :) one terminal of the ex-or gate should be connected to a high input(5V). the other terminal is used as the input terminal,a not gate has only one input.when we give a high to this input, now the inputs of exor gate are 1 & 1.output is 0. A Not gate or inverter. When dealing with logic gates always use the truth table they are your friend!
;)
 

eetech00

Joined Jun 8, 2013
2,576
You can try this (the output shouldn't bounce on power up since not using inverters).
U1A is used to debounce/buffer the button. U1B is the pulse generator.
D1 is for reverse voltage protection. C2/R3 adjusts the pulse width.
It wasn't clear what this circuit is driving, but if driving a relay, then one or two small mosfets connected to the output can be used.

1623739498870.png
 
Last edited:

andrewmm

Joined Feb 25, 2011
1,757
Hi,

I recently finished building a circuit from an earlier post (https://forum.allaboutcircuits.com/...itch-and-xor-gate-for-a-control-panel.178688/) that was intended to replace several SPST toggle switches to operate as momentary switches by using an XOR gate. The circuit is based on this original one posted by Crutschow:
https://forum.allaboutcircuits.com/attachments/138954/

In my new travel trailer there is a main switch control panel which has a mixture of momentary and spst switches for various lights and equipment. The spst switches all illuminate and the momentary ones obviously do not. Interestingly all 4 of the momentary switches control lights outside of the unit that I cannot see and have to go out at night to tell if they are on or off. I tried replacing the momentary switches with the spst, but discovered that the trailer has something like a latching relay setup so you would have to click the spst twice to get the lights to switch on, switch off (it is not an option to replace this latching setup as it is internal to the master control box of the unit)

I am using 3 of the XOR gates available in the CD4070B and tying the inputs on the 4th gate to ground as it is unused. When testing this setup. I noticed that when power is first applied, all of the outputs from the 3 XOR gates pulse HI, triggering the transistor and in turn energizing the relays. This has the effect that all the lights attached to the relays turn on which is not a desirable behavior. When storing the trailer for any length of time, the battery is disconnected so when I go to pick it up and reconnect the battery, all of the lights turn on.

The desired behavior is that the relay will only energize when a switch is activated and not when the circuit is initially energized.

I have tried researching articles related to suppressing pulses from logic gates on power-up but nothing looks like it will work. I am open to suggestions.

Thanks,

01134
Could I suggets ,

That the behaviour you are experiencing is as expected from a bit of logic,

At power up, the inputs are undefined, and the output is thus un defined, so it could be '1' or '0'.
its only once the inputs are stable that the output is stable,

The "answer" is as @eetech00 is alluding to is a "power on reset" circuit,

a suggested, put an and gate on the output ,
one side from your circuit, the other from a Power on reset chip,
whos output is low till the power is stable, and enough time for the inputs to stabilise,
then goes high,

Thus with the and gate, the ouput is always low till power and inputs are stabilized, then the output of the and gate follows the xor gate.


Alternative, what your driving,
can it take in a power on reset input , that is used to delay it switching till the same conditions are stable,
 
Top