Invert channel with one switch

Status
Not open for further replies.

cupoftea

Advanced Member level 5
Joined
Jun 13, 2021
Messages
2,705
Helped
54
Reputation
108
Reaction score
116
Trophy points
63
Activity points
14,296
Hi,
We have a square wave oscillator....sometimes we want to pass through the signal itself, and sometimes we want to pass through the inverted signal. We want to change between the two with a single manual switch.
Can you think of any easier ways than the attached. I guess an analog changeover switch is good but they are often nil stocked....if i put one on the test pcb, its bound to go nil stocked.
Any other ways?

LTspice and pdf attached of the "bad" way
 

Attachments

  • INVERT CHANNEL WITH ONE SWITCH.pdf
    158.6 KB · Views: 59
  • INVERT CHANNEL WITH ONE SWITCH.zip
    1.5 KB · Views: 53

thanks i tried xor, but to no avail, as attached (LTspice)
 

Attachments

  • INVERT CHANNEL LWITH ONE SWITCH XOR.zip
    850 bytes · Views: 60

Rather complicated - you could just use a TTL or CMOS XOR logic gate. Connect your signal to one input and switch the other between logic 0 and 1. The output will invert according to the logic level you apply. Only one gate is needed and no buffering is needed.

Brian.
 
thanks youre right, but xor needs 5 NAND minimum, and we only have 4 to play with
--- Updated ---

Even De Morgan's laws arent working today...this five nand xor doesnt work (LTspice)


--- Updated ---

oh right, LTspice doesnt "see" the GND symbol as a logic low input, even though its supposed to be 0V, and i declared the Ref as 1.5V.
So the xor does work after all. I should have believed De Morgan over LTspice
 
Last edited:

Here's the XOR circuit using four 2-input NAND gates (it shows Schmidt-trigger NANDs but standard NAND gates can be used):
Note the change in output phase (red trace) relative to the input signal (green trace) when the phase control line (yellow trace) changes state.

 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…