CMOS switch module Q (esp. 4 RG)

Started by RaceDriver205, August 14, 2006, 07:49:52 AM

Previous topic - Next topic

RaceDriver205

Here is the circuit for a CMOS switch module I designed, which can be set or reset by external electronics, as well as being able to be toggled on/off.
I will be repeating the module 100 times on a PCB using SMD parts, which will be cut up to give 100 individual modules.
I.e. I don't want to get it wrong!

Can anyone (esp RG!) see any problems with this? Thanks heaps.



davebungo

Your switch can set or reset the lower 4013 but it will only clock the upper 4013 when it goes into a set state.  Therefore I assume that your switch is momentary - is that the case?

Are your analogue inputs already biased to ensure that they stay within the supply range?  Does your external electronics take care of this?

** More important than anything above ** You should breadboard this and try it out before you start making a hundred of them.  No-one, especially the experts would in their right mind commit to making a large "production" job lot of something which wasn't tested and proven.  I am sure that the more experienced of engineers here would stress this even more.




RaceDriver205

QuoteTherefore I assume that your switch is momentary - is that the case?
Yep, used one half of the 4013 as a switch debouncer.
QuoteAre your analogue inputs already biased to ensure that they stay within the supply range?
How does this work? I dont know anything about needing to bias the switch inputs.

Oh yes, I certainly will test it! As much as I hate breadboards. :icon_biggrin:

bioroids

You should test the circuit on the breadboard as said, but you should also build a prototype of the final pcb, to make sure you dont have mistakes there. Believe me, you don't want to have to fix 100 SMD boards because of some missing track...

Miguel
Eramos tan pobres!

davebungo

Quote from: RaceDriver205 on August 14, 2006, 08:15:08 AM
How does this work? I dont know anything about needing to bias the switch inputs.

If you look at the spec for the 4066 you will find that the Absolute Maximum rating for the anlogue inputs is basically 0.5V either side of the supply range.  Therefore if you feed in a signal at 0V DC level and it has a 1V pk-pk signal level then you are in danger of causing damage to the device.  Additionally, it probably wouldn't do much for the distortion performance to have the DC level too close to 0V or VDD.  You may get away with it. 

What you could try is to bias the inputs at VDD/2 using a potential divider i.e. R to VDD and R to gnd with the junction fed to the input of the analogue switch.  The input signal would be AC coupled (i.e. using a capacitor) to this point.

One problem this may cause though is loading of the input signal by the potential divider so you will have to experiment with suitable values.  You could start with say 2 470K resistors which won't load too much.

Another potential problem arises due to any noise on VDD being coupled into the input.

It's not quite as simple as you might imagine, but start with what you have and test it.






R.G.

First - what you have won't work. The R and S inputs on the 4013 are high active, meaning that they are active when the input is above the upper logic threshold. On the second 4013 section, you have them unterminated. They need to be pulled down, either tied to ground or tied to ground through a resistor. On the first 4013 you have them both tied high, then pulled down with a switch. That means for the few milliseconds while the switch is moving, both S and R will be high, so both outputs will be high. I think this will cause you some switching problems by turning all the paths on.

So tie R and S in the first flipflop down through resistors and pull them up with the switch. I would tie them down through a 1K and a 100 K to ground each, and then pull up the junction of the 1K and 100K with my switch. That leaves me a 1K resistor in series with the input to the chip from the switch off board at all times, and gives a bit more static electricity immunity.

Second - how come you used both flipflops? you get both Q and -Q from the first flipflop. Why not use that directly on your 4066 element? As you have it now, you get one change of the audio path each time you activate the mechanical switch twice, because the second flip flop divides by two (assuming that you fix that problem with R and S being open).

Third - you really should bias the switch chip to half the total power supply. Set yourself up a 7.5VDC source by using two 10K resistors from +15 to ground, and a 10uF cap from the junction of the two resistors to ground. Then take 100K resistors from that 7.5V source to each I/O or O/I pin on the 4066, and capacitor couple with a 0.1 to 1.0uF cap at each pin. This keeps the 4066 in the range where its internal control signals cancel best.

Fourth - While what you have with the LED being fed through the fourth section of the 4066 will work, I worry about how much current the 4066 will have to carry and what the noise effect of that current will be on the other sections of the chip which are carrying my signal. I would tie the LED/resistor directly to the switch that is telling my flipflop what to do. That keeps the LED current away from the signal carrying path.

But that's just me.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

RaceDriver205

QuoteThe R and S inputs on the 4013 are high active, meaning that they are active when the input is above the upper logic threshold. On the second 4013 section, you have them unterminated.
Its OK coz all the "resets" and "sets" are being wired to offboard decoder ICs.

QuoteOn the first 4013 you have them both tied high, then pulled down with a switch. That means for the few milliseconds while the switch is moving, both S and R will be high, so both outputs will be high.
Thatll be OK, coz im not using the Qbar output for anything.

QuoteAs you have it now, you get one change of the audio path each time you activate the mechanical switch twice
Ive drawn it in as a switch, but really its a pushbutton. Thats why I used the other half - as a switch debouncer.

QuoteThird - you really should bias the switch chip to half the total power supply.
How about if I use +7.5V and -7.5V rails for the 4066 instead? That will put the inputs smack in the middle of the V-range right?

QuoteWhile what you have with the LED being fed through the fourth section of the 4066 will work, I worry about how much current the 4066 will have to carry and what the noise effect of that current will be on the other sections of the chip which are carrying my signal
Hmm, ill have to check that two. I was going to apply the LED directly to the 4013 ouput, but I wasn't sure it could supply the current I wanted. Ill have a look at that.

Thanks for your help all!

R.G.

Quote
QuoteThe R and S inputs on the 4013 are high active, meaning that they are active when the input is above the upper logic threshold. On the second 4013 section, you have them unterminated.
Its OK coz all the "resets" and "sets" are being wired to offboard decoder ICs.
OK.

Quote
QuoteOn the first 4013 you have them both tied high, then pulled down with a switch. That means for the few milliseconds while the switch is moving, both S and R will be high, so both outputs will be high.
Thatll be OK, coz im not using the Qbar output for anything.
OK. But they may also be indeterminate depending on what the switch does for a few microseconds. They may feed a random number of pulses to the second flip flop. Or it may work perfectly with those specific chips. It's just bad practice to ever activate direct set and direct reset at the same time. But you can try if you want. It may work.

Quote
QuoteAs you have it now, you get one change of the audio path each time you activate the mechanical switch twice
Ive drawn it in as a switch, but really its a pushbutton. Thats why I used the other half - as a switch debouncer.
OK, so you push a momentary pushbutton once to make it flip. That's OK.
Quote
QuoteThird - you really should bias the switch chip to half the total power supply.
How about if I use +7.5V and -7.5V rails for the 4066 instead? That will put the inputs smack in the middle of the V-range right?
That's fine. Just hook them to ground with high value resistors then.

Quote
QuoteWhile what you have with the LED being fed through the fourth section of the 4066 will work, I worry about how much current the 4066 will have to carry and what the noise effect of that current will be on the other sections of the chip which are carrying my signal
Hmm, ill have to check that two. I was going to apply the LED directly to the 4013 ouput, but I wasn't sure it could supply the current I wanted. Ill have a look at that.
If your switch is a momentary, what I suggested won't work, and you will have to use the output of the second flip flop. It may be easiest to run a 10K resistor to the base of an NPN transistor to power the LED. The 4013 has a lowish current output , so buffering it through an outboard idea would be good conservative practice.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

RaceDriver205


RaceDriver205

The problem I am now left with is having a control circuit at +5V Hi and 0V Lo, with switch modules at +7.5V Hi and -7.5V Lo.
In the control circuit, I narrowed it down to 8 lines which need to be converted from 5/0 to 7.5/-7.5.
I don't suppose there is an IC which does this that I don't know about?
Cheers

bioroids

I know the CD4049 and CD4050 can be used to convert between logic levels, but I don't know what are the levels they convert to and from :icon_rolleyes: I'm sure the datasheet has that info

Miguel
Eramos tan pobres!

RaceDriver205

I reckon Ill use optoisolators, such as the 4N series.
This sound the way to go? RG?

R.G.

If you use the CD405x series of switches, they are designed to work from +/- power supplies while being driven from a single supply logic voltage. In this case, you bias them to ground in the middle of the supplies. The "Vee" supply on the 405x switches is for the negative supply.

You can also use a single transistor to convert from logic to high voltage by inverting the signal. You can use two transistors to invert/invert to get to high voltage without inverting.

The 4049 and 4050 are designed to connect between lower and higher voltages.

Optos work too. If the control signals are in a physically separate box, the optos might be a good idea.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.