# How To Make A Switch Close When Another Switch Close? [closed]

I want to use a rotary switch to switch between filters which I believe will give me different frequencies. But the problem is when I connect the positive feedback to the other filters too, naturally, the circuit changes. So to prevent this, I want to use the rotary switch to switch between filters and when I switch, I need another switch to connect the switched filter to the positive feedback. Below there is a manual, inefficient try. I painted the focus point with yellow.

How to improve and add frequency adjustment function to my DIY wave generator?

same description below

# Introduction

I want to build a wave generator. I chose wien bridge oscillator(WBO) as my oscillator and I obtain other waveforms by filtering the sine wave I get from WBO. I managed to get a fairly decent wave forms when the switch is at position 1 but nothing near that other combinations. I am looking for ways to improve my design and make it work since it doesnt work as intended.

• Adjustable frequency (15 or MHz to 15 Hz)
• Can be powered with 220V AC city electricity (by transforming to -15/0/15 or -12/0/12 volt outputs)
• Preferably should use WOS as oscillator

# Design and Circuitry Explanation

I power all the opAmps with 15/-15 volts

I used:

• TL071 OpAmp
• 2 x 1nF capacitors
• 3 x 100k resistors
• 1 x 210k resistor
• 2 x back to back diodes

To build the oscillator. I get a nice sine wave with this setup, which is actually one of the reasons I chose WOS. Even though the signal was clear, the magnitude of output was pretty low (around 750mV) and I wanted to amplify it.

I used:

• UA741 OpAmp
• 1 x 100k resistor
• 1 x 10k resistor

To build an amplifying component with gain 10. Now my sine wave was nice and around acceptable magnitudes. Then I wanted to filter and amplify it again by using an integrator OpAmp to gain a square wave.

I used:

• TL071
• 1 x 1k resistor
• 1 x 1nF capacitor

I preffered TL071 here again to get rid of the slope of the square wave. TL071 has a higher slew rate around 10V/us as I remember. As you will see the square wave is pretty neat too.

To acquire the triangle wave I used the same circuitry I used to filter the sine wave. At first I tried to use an UA741 but it just gave me the same square wave, I dont know why. Later I just used a low pass filter

using

• 1m resistor
• 1nF capacitor

which gave me a rough triangle wave it had peak voltage near to none. So I used TL071 instead of UA741 to apply the same filter I used on sine wave, to the square wave. This gave me a decent triangle wave with a little plateau.

outputs with oscillator having 1nF capacitors and 100k ohm resistors

In the end, I had a nice sine wave (around 6.5/-6.5 peak voltage), a nice square wave (around 12.5/-12.5 peak voltage) and an acceptable triangle wave (around 12.5/-12.5 peak voltage). To implement the adjustable output peak voltage I thought about using a potentiometer to change the gain of first OpAmp which amplifies the sine wave. To implement the adjustable frequency I thought about putting some capacitors with trimmers. Since for the sake of oscillation C2 should be equal to C1 and I couldnt find a way to change both capacitance exactly the same (like a ganged up potentiometer) while adjusting the frequency, so I abandoned this idea.

I thought maybe using a rotary switch I can switch between frequency mods, which turned out to be a huge dissapointment. In the schematic above you can see the final implementation. when switch is at first position everything is fine. As I switch problem begins.

You can see the switch time exactly. Plot of before and after the switch

Close up

There were even times that I get 0 output from every wave form. I need suggestions to:

• Implement adjustable voltage and frequency
• Fix the plateau at triangle wave
• Any opportunity for improvement you see

Thank you.

• We don't have any clue what kind of switches you have and how they work. Based on your question, we could simply ask you to glue them together. To get better responses, please give out as much info you possibly can. – Justme Apr 24 at 19:40
• Perhaps you could use a relay for one of the switches. But please clarify your problem with as much detail as possible. – Math Keeps Me Busy Apr 24 at 19:43
• In many types of switch there are switches that have multiple poles. For just opening and closing two switches simultaneously you need an double-pole ( or 2-pole), single throw switch. – Charles Cowie Apr 24 at 19:52
• The reason you are not getting responses is because your questions are so poor. There is no useful information in your question. Is the circuit AC or DC? Is this for low power signals or high-power devices? Is this school work? – AnalogKid Apr 24 at 20:24
• Sharing links is fine but on this site there should be enough information in the question so that we can answer it without following links. You can paste the other information in here using the edit link. – Transistor Apr 24 at 20:28

You should use a 2 pole rotary switch, also known as a ganged switch.

RV1 should also be a ganged type.

http://www.audiomaintenance.com/acatalog/EL-03-014_extended_info.html

• I think im gonna go with it, thank you again Mattman. Your circuit is actually different from mine, with no negative feedback but I think its because you just wanted to show me the ganged rotary and ganged pot configuration is it correct? Also is ganged up pot for fine tunement or increasing the output? Because as far as I know back to back diodes really clamp the output voltage so increasing gain is not working. Thats why ı used another opAmp to amplify the sine wave. I thought I can use a pot on its gain resistor to tune the voltage, what do you think? – Tombeki Apr 25 at 6:29
• I didn't draw the negative feedback, if the oscillator is working, don't change it. Adjusting the voltage output amplitude by changing the feedback circuit is not a good idea. This is a finicky circuit, get it to oscillate reliably, add gain in another stage. Yes, the ganged pot is for fine frequency adjustment. – Mattman944 Apr 25 at 6:39

simulate this circuit – Schematic created using CircuitLab

Not clear if this is too a trivial answer.

A) If your 2 switches are two relays, the you can wire their coils "together", that means either in series (e.g. 12V dc coils fed by a 24V dc) or in parallel (the same two 12V coils connected in parallel to a 12V source). The switches on the lower side of the coils (SW1 and SW2) can be a simple switch or a transistor, or MOS...)

B) An even more trivial solution is if your switches and B are the contacts of a two-way relay, so you control the coil and you move two contacts at a time, switching them on and off at the same time.

As you see it is very simple. Could you clarify if this does not address you problem?

• Although very well-intended, this answer rewards an OP who made no effort whatsoever. It could be homework and this is handing the answer to them on a plate. The OP makes no effort and learns nothing. The site values guiding and encouraging OPs instead, however tempting it is to answer an easy question. Please have a read of the comments on the question. Thanks. – TonyM Apr 24 at 20:52
• It is a simple yet elegant suggestion, thank you! IWhat I want is much more like the first one. Do relays work with DC currents? I believe they dont. – Tombeki Apr 24 at 21:03
• @Tombeki, relays are used in cars which use DC electrics. Why do you think they might not work? – Transistor Apr 24 at 23:15
• @Transistor For a moment I thought an inductor needs AC current to generale a magnetic field but Im wrong, AC is for the changing field you are right. – Tombeki Apr 25 at 6:21

As I dont know details about requirements of power rating, voltage levels, if it is going about AC or DC, this is one of the solution. Voltage on B_load is 0.7v less than on A_load (0.4v if use a schottky, but remember on leakage I_reverse) when you supply B_load from A_switch.

• Although very well-intended, this answer rewards an OP who made no effort whatsoever. It could be homework and this is handing the answer to them on a plate. The OP makes no effort and learns nothing. The site values guiding and encouraging OPs instead, however tempting it is to answer an easy question. Please have a read of the comments on the question. Thanks. – TonyM Apr 24 at 20:52
• Im sorry Im having difficulties following the answer. How does the switches close? – Tombeki Apr 24 at 21:05