Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Invert channel with one switch

Status
Not open for further replies.

cupoftea

Advanced Member level 5
Joined
Jun 13, 2021
Messages
2,668
Helped
54
Reputation
108
Reaction score
116
Trophy points
63
Activity points
14,027
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: 57
  • INVERT CHANNEL WITH ONE SWITCH.zip
    1.5 KB · Views: 52

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

Attachments

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

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)


Code:
Version 4
SHEET 1 7004 1720
WIRE -2560 -832 -2960 -832
WIRE -2560 -800 -2688 -800
WIRE -2416 -800 -2496 -800
WIRE -2544 -752 -2544 -784
WIRE -3552 -736 -3552 -784
WIRE -2864 -672 -2896 -672
WIRE -3120 -656 -3120 -704
WIRE -2960 -656 -2960 -832
WIRE -2960 -656 -3120 -656
WIRE -2896 -656 -2896 -672
WIRE -2896 -656 -2960 -656
WIRE -2896 -640 -2896 -656
WIRE -2864 -640 -2896 -640
WIRE -2656 -640 -2800 -640
WIRE -2416 -640 -2416 -800
WIRE -2304 -640 -2416 -640
WIRE -3552 -624 -3552 -656
WIRE -2304 -608 -2416 -608
WIRE -2096 -608 -2240 -608
WIRE -2848 -592 -2848 -624
WIRE -2288 -560 -2288 -592
WIRE -2864 -528 -2896 -528
WIRE -2960 -512 -3120 -512
WIRE -2896 -512 -2896 -528
WIRE -2896 -512 -2960 -512
WIRE -2896 -496 -2896 -512
WIRE -2864 -496 -2896 -496
WIRE -2688 -496 -2688 -800
WIRE -2688 -496 -2800 -496
WIRE -3216 -480 -3376 -480
WIRE -2848 -448 -2848 -480
WIRE -3312 -432 -3312 -576
WIRE -2656 -432 -2656 -640
WIRE -2560 -432 -2656 -432
WIRE -3376 -416 -3376 -480
WIRE -3344 -416 -3376 -416
WIRE -3216 -400 -3216 -480
WIRE -3216 -400 -3280 -400
WIRE -3120 -400 -3120 -512
WIRE -3120 -400 -3216 -400
WIRE -2960 -400 -2960 -512
WIRE -2560 -400 -2960 -400
WIRE -2416 -400 -2416 -608
WIRE -2416 -400 -2496 -400
WIRE -3344 -384 -3776 -384
WIRE -2544 -352 -2544 -384
WIRE -3776 -336 -3776 -384
WIRE -3776 -192 -3776 -256
WIRE -3312 -192 -3312 -368
WIRE -3312 -192 -3776 -192
WIRE -3312 -144 -3312 -192
FLAG -3312 -144 0
FLAG -3552 -624 0
FLAG -3552 -784 5V
FLAG -3312 -576 5V
FLAG -2848 -592 0
FLAG -2544 -752 0
FLAG -2544 -352 0
FLAG -2288 -560 0
FLAG -2848 -448 0
FLAG -3120 -704 5V
SYMBOL Opamps\\LT1006 -3312 -464 R0
SYMATTR InstName U25
SYMBOL voltage -3552 -752 R0
WINDOW 123 0 0 Left 0
WINDOW 39 24 44 Left 2
SYMATTR SpiceLine Rser=0.1
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL voltage -3776 -352 R0
WINDOW 123 0 0 Left 0
WINDOW 39 24 44 Left 2
SYMATTR SpiceLine Rser=0.1
SYMATTR InstName V2
SYMATTR Value PULSE(0 5 0 50n 50n 10m 20m)
SYMBOL Digital\\and -2832 -720 R0
WINDOW 3 16 52 Left 0
SYMATTR Value Ref=1.5
SYMATTR InstName A1
SYMATTR Value2 Vhigh=5  Vlow=0
SYMATTR SpiceLine Td=2n Trise=10n Tfall=10n
SYMATTR SpiceLine2 tripdt=5n
SYMBOL Digital\\and -2528 -880 R0
WINDOW 3 16 52 Left 0
SYMATTR Value Ref=1.5
SYMATTR InstName A2
SYMATTR Value2 Vhigh=5  Vlow=0
SYMATTR SpiceLine Td=2n Trise=10n Tfall=10n
SYMATTR SpiceLine2 tripdt=5n
SYMBOL Digital\\and -2528 -480 R0
WINDOW 3 16 52 Left 0
SYMATTR Value Ref=1.5
SYMATTR InstName A3
SYMATTR Value2 Vhigh=5  Vlow=0
SYMATTR SpiceLine Td=2n Trise=10n Tfall=10n
SYMATTR SpiceLine2 tripdt=5n
SYMBOL Digital\\and -2272 -688 R0
WINDOW 3 16 52 Left 0
SYMATTR Value Ref=1.5
SYMATTR InstName A4
SYMATTR Value2 Vhigh=5  Vlow=0
SYMATTR SpiceLine Td=2n Trise=10n Tfall=10n
SYMATTR SpiceLine2 tripdt=5n
SYMBOL Digital\\and -2832 -576 R0
WINDOW 3 16 52 Left 0
SYMATTR Value Ref=1.5
SYMATTR InstName A5
SYMATTR Value2 Vhigh=5  Vlow=0
SYMATTR SpiceLine Td=2n Trise=10n Tfall=10n
SYMATTR SpiceLine2 tripdt=5n
TEXT -4136 -480 Left 6 ;Square wave 0-5V
TEXT -3656 -144 Left 2 !.tran 0 100m 0 startup
--- 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:

thanks i tried xor, but to no avail, as attached (LTspice)
The control input is a sign changer, so should be a freq << signal input
in order to see the sign of output change.

1630594292127.png


Regards, Dana.
 
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.

1630862317461.png
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top