SMD CMOS switch project

Started by odronn, February 16, 2014, 06:38:16 AM

Previous topic - Next topic

odronn

Hello!
First post here, though I've been watching this forum for ages :) Now I think I have something to contribute.

A while ago a 3pdt broke in my stompbox, and i decided, that's it, no more unreliable mechanical outdated solutions in my DIY pedals. And to add, I hate offboard wiring, takes ages to wire a stompbox. I'd rather spend 1h more playing than wiring stompboxes :) so I decided to go PCB mount and CMOS + momentary footswitch route.
This project is based on RG's documents on CMOS switching and PNP power switching, and on Tonegod's Wicked Switch article (thanks, folks)
I used 0805 SMD resistors. PCB is dimensioned so that it can fit into 1590BB. Unfortunately, this is a double layer project, not really suitable for DIY PCB production. I will provide gerber files when I verify that i haven't messed anything up.
Here's the schematic:

and the intended form factor:

Please check if I've missed something, before I send the gerbers to production.

Ice-9

Very nice odronn, and great first post :)
www.stanleyfx.co.uk

Sanity: doing the same thing over and over again and expecting the same result. Mick Taylor

Please at least have 1 forum post before sending me a PM demanding something.

kingswayguitar

i'm no expert, just wondering....
does this circuit account for switch bounce?

odronn

Quote from: Ice-9 on February 16, 2014, 06:42:03 AM
Very nice odronn, and great first post :)
Thanks, Ice-9! your stuff is impressive ;)

Quote from: kingswayguitar on February 16, 2014, 09:01:03 AM
i'm no expert, just wondering....
does this circuit account for switch bounce?
Yes, C4 does that.
When you short the momentary switch to GND, voltage on the capacitor will not go to GND immediatelly, since the cap has to discharge. Any mechanical ON-OFF cycles should be smoothed by this cap

duck_arse

missing dc blocking caps at  fx in and fx out. I think your 1k bias resistors are waaayyy too low value.

nice first post, though, and welcome.
" I will say no more "

Seljer

You can use another transistor on the base of the pnp transistor to run use to switching lug of the jack to switch the power, which lets you plug in stereo cables and still have it function properly. You just slap a npn or n-mosfet beneath R2, then add a high value (a couple of megaohms for low battery drain) resistor from the base/gate to the positive supply rail and connect the NC sleeve lug of the jack to it as well. When a jack is plugged in, the connection is open, the resistor turns the transistor and then your pedal on. When nothing is plugged in the NC lug shorts to ground and closes the transistor and the only current draw left is through the pullup resistor.


R.G.

You already use a CD4049, but have four unused sections. From the CMOS Cookbook, there is a circuit using just two sections of a CMOS inverter (4049 qualifies) to get a near-perfectly debounced toggle flipflop from a momentary switch. You could eliminate the 4013 dual flipflop. I tend to like the CD4053 for making bypass switches, as the layout is a bit cleaner than the 4016/4066 stuff.

See http://www.geofex.com/article_folders/cd4053/cd4053.htm and the last illustration in particular for the inverter-latching-T-flop.

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.

bool


mth5044

Very nice looking layout. I dig the cutouts for the wire placement.

merlinb

#9
You need output coupling capacitors, and R3-6 need to be *much*larger, unless I've missed something.

With an extra R and C you could arrange for the 4013 to power up always in the same condition, rather than randomly. You can also buy a version of the 4013 that has a schmitt trigger input, so you could eliminate the 4049 altogether. Or do what RG suggested.

odronn

wow guys thanks for the comments!

Yes, now that I think about it, bias resistors are definitely too small. I'll increase them to 470k. I'll also add caps for FX dc blocking. I didn't add them because I was counting on FX input and output caps, but what the hell, I'll slap 100n there

Quote from: Seljer on February 16, 2014, 02:43:00 PM
You can use another transistor on the base of the pnp transistor to run use to switching lug of the jack to switch the power, which lets you plug in stereo cables and still have it function properly. You just slap a npn or n-mosfet beneath R2, then add a high value (a couple of megaohms for low battery drain) resistor from the base/gate to the positive supply rail and connect the NC sleeve lug of the jack to it as well. When a jack is plugged in, the connection is open, the resistor turns the transistor and then your pedal on. When nothing is plugged in the NC lug shorts to ground and closes the transistor and the only current draw left is through the pullup resistor.

For stereo version of this project, I could do that :) in this case, it only adds another transistor and a resistor

Quote from: R.G. on February 16, 2014, 02:57:42 PM
You already use a CD4049, but have four unused sections. From the CMOS Cookbook, there is a circuit using just two sections of a CMOS inverter (4049 qualifies) to get a near-perfectly debounced toggle flipflop from a momentary switch. You could eliminate the 4013 dual flipflop. I tend to like the CD4053 for making bypass switches, as the layout is a bit cleaner than the 4016/4066 stuff.

See http://www.geofex.com/article_folders/cd4053/cd4053.htm and the last illustration in particular for the inverter-latching-T-flop.



Nice! One flip flop IC less it is :) I will go the inverter-based flipflop route. I will also check out the 4053

Quote from: merlinb on February 17, 2014, 04:37:22 AM
With an extra R and C you could arrange for the 4013 to power up always in the same condition, rather than randomly. You can also buy a version of the 4013 that has a schmitt trigger input, so you could eliminate the 4049 altogether. Or do what RG suggested.

Unfortunatelly, I can't elliminate 4049 because I need to drive the LED. 4013 can't source enough current for that. I would need a transistor to drive the LED.
I'll kick out the 4013







ggedamed

#11
Actually, according to the datasheet, CD4013 can source 1.4mA for a 10V voltage supply, which is more than enough for a modern high-efficiency LED.
I made a 3 channel switcher with a CD4042. Beside its switching job, it drives the LEDs quite fine, although it is slightly less able to drive LEDs than CD4013 (the differrence is really small, though). If you're curious, here's the link on FSB.

LATER EDIT: haha, looks like FSB is censored here. Just replace ph with f in the link. Scrap that, I used a link shortener.
Minds are like parachutes. They only function when they are open. (Sir James Dewar, Scientist, 1877-1925)

odronn

Nice project! i like the TLE2426, looks interesting. Does this method of biasing have lower noise than resistor divider based rail splitting?
Hmm you use 1MEG for the bias resistor... I'm tempted to put that instead of 470K

I wanted to drive a standard run-off-the-mill LED, like this one:
https://www.futurlec.com/LED/LED5R.shtml
It's rated at 20mA. Also, I wanted to drive those gorgeous 10mm LEDs

Anyway, the schematic now looks like this:


Switching section is now practically the same as in the RG's article.
Other changes to the previous schem:

  • added a protection diode to DC input jack, to protect the PNP from voltage reversal
  • changed pullup resistor values to 470k

  • added FX dc blocking caps

ggedamed

Quote from: odronn on February 18, 2014, 05:34:45 PM
Nice project! i like the TLE2426, looks interesting. Does this method of biasing have lower noise than resistor divider based rail splitting?

Thanks!
The noise of the resistor divider based voltage reference comes from the power supply itself, the resistor noise and maybe from layout problems. It can be made as quiet as you please by using a bigger capacitor. What's better with TLE2426 is that it makes a very small voltage divider (physically) with only 3 holes and it may waste less power in some circuits. I used it just because it was in my drawer (samples from Texas Instruments).
Minds are like parachutes. They only function when they are open. (Sir James Dewar, Scientist, 1877-1925)

odronn

Ok, here's the latest revision of the PCB:





I'll send it to the PCB factory tomorrow and then the wait begins :(

odronn

I finally found some time to build, test and debug this thing. There were some small errors related to component footprints, but fundamentally, everything works great.
Switching was unreliable with 100k on R9 position (there was some skipping), but with 470k this problem is gone. Here's a quick and short youtube video:

J0K3RX

That is EXCELLENT!! Awesome layout also! I am very interested in this! 
Doesn't matter what you did to get it... If it sounds good, then it is good!

add4

This is really interesting. I'm curious is it still considered true bypass ? Are there actually real small spsts on the 4049?

Also. What is the purpose of the power section of the circuit with the transistor?

PRR

> Are there actually real small spsts on the 4049?

No; but the 4053 is three double-throw poles (only two used here).
  • SUPPORTER

add4

Yeah i meant 4053 my mistake :) thanks