electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software
Switch de-bouncing comparison (on paper)
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [11 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Liquids



Joined: Jun 06, 2011
Posts: 23
Location: CT, USA

PostPosted: Tue May 29, 2012 9:25 am    Post subject: Switch de-bouncing comparison (on paper) Reply with quote  Mark this post and the followings unread

so, debouncing a switch...

I've always used mechanical switches for bypass.

But I'm building a multi-circuit unit that I want to be able to bypass each circuit independently, and possibly even the whole unit as well (master switch)...the unit will be in a massive box and it just makes more sense logistically to have all the switching done remotely via cable out to switches in a separate enclosure (can explain further why if it's helpful).

This is a unit that will serve as a VCO, VCA, VCF and a few other things for a guitar, of note...so it's somewhere between true synth (voltage controlled VCO) and guitar pedal/effect, as it's controlled by guitar. Think EHX microsynth with a REAL VCO (not even a 4046 PLL), on steroids! Very Happy

Anyhow, I've already ordered momentary SPST switches, so there's no turning back there. I might have gone a dfferent route for the switch, knowing what I now know about de-bouncing and electronic switching, but at the time, I was under the impression that momentary switches were the best means of electronic-based.

The switches to be controlled will be DG445s, though they've yet to arrive. I have 4066s and 4016s but from some wise council, the DG445s will be easier to switch circuits with +/-12v bipolar power but references to ground with block DC caps at their ins and outs.

The remote switching unit will have multi conductor wire running between it and the actual circuit unit. Using one conductor per momentary switch is preferable since it means I'll be able to get away with using a single 8 condutor cable and 7-pin DIN connectors which I can get the goods cheap and assemble, believe it or not.

But if 2 conductors per switch is more ideal, I'll do it, I'll just double up and use two cables between the circuit-housing unit and the switching enclosure....

That was where I was headed...but then I saw this:

Posted Image, might have been reduced in size. Click Image to view fullscreen.

Is this debouncer indeed superior to this (ignore the 4066):

Posted Image, might have been reduced in size. Click Image to view fullscreen.

aka tech.thetonegod.com/switches/Wicked_Switch_Momen_Invert.gif

It was previously suggested to me that the latter methodology is the best given a SPST momentary (apart from knowledge of the latter schematic that seems exactly the approach suggested to me). Just looking for confirmation that I should expect superior switching results if I use the latter as a basis for switching rather than the gannsle page schematic, which would save me one conductor per switch...and it touted as "working in all cases," albeit without component values.

Anyone with experience here?

Also, I was previously going to implement 4013, but I want a minimum of chips per 'switch' control...the DG445 (instead of the CD4066) is one chip, but it seems a 40106 is mandatory for debounce, so adding a 4013 is just a third chip...may as well use the 40106 in whole to control the switch, one for each momentary, IMO...keeps it at two chips per corresponding mechanical switch.

The one comment I have came from Harry Bissell...he said of the ganssle approach:
"I''d make the resistor to positive supply small (to allow fast recharge times and to give a fair amount of current through the switch to prevent it from oxidizing), then make the resistor from the cap to the switch large enough to be sure the current is limited from the cap discharge. Should work fine, but this is a 'taste-test' operation... its a combination of 'how bad is the switch' (longer debounce times) and 'how long am I willing to wait for a debounced operation' (am i bored before the operation takes place ?)"

Any additional experiences/opinions/comments will be greatly appreciated! Very Happy

Edit: If the second schematic/wicked switch/the tone god stuff is not showing for you....

Image should be at:tech.thetonegod.com/switches/Wicked_Switch_Momen_Invert_FF.gif

Otherwise, Main page about switches is: tech.thetonegod.com/switches/switches.htm

or

-go to the webpage tech.thetonegod.com

- Under the heading 'Effects Articles' click on the article titled "Wicked Switches - Electronic Switching"

- Scroll to the bottom and the left image titled "Wicked Switch: Momentary w/ Flip-Flip Inverter"

Last edited by Liquids on Thu May 31, 2012 7:23 pm; edited 5 times in total
Back to top
View user's profile Send private message
Liquids



Joined: Jun 06, 2011
Posts: 23
Location: CT, USA

PostPosted: Thu May 31, 2012 9:28 am    Post subject: Reply with quote  Mark this post and the followings unread

Additional info - I've received the soft touch momentary, normally open (NO) switches from smallbear, the ones I plan to make use of now.

I have not tried anything in a circuit (due to time, and also due to my DG445s not being in hand yet...), but I measured resistance across one of the switches. It's open of course when not depressed. It does not click in it's travel, so I'll have to learn when the switch has actuated or pay attention early on while I get used to using them under foot.

That said, with my hand actuating the switch and my DMM measuring resistance, if I hold the switch down, it stays at low to no resistance so long as I don't let up. Is this unique or normal for a momentary?

I was imagining momentary and talk of 'bouncing' meaning that actuation initiated a mechanism where a mechanical contact swung (might be simultaneous to a 'click'), made(NO)/broke(NC) contact for a general period of time, bounced while doing so, and returned to it's normal state, no matter how long one held the switch depressed.

I have no clue if this is normal, nor if this is preferable or less desirable even, just intrigued and curious about it, and inquiring of those who know, especially if it has an impact upon the 'better' choice for how the switch is implemented within the 2 switch debouncing circuitry options.
Back to top
View user's profile Send private message
frijitz



Joined: May 04, 2007
Posts: 1710
Location: NM USA
Audio files: 54

PostPosted: Thu May 31, 2012 9:45 am    Post subject: Reply with quote  Mark this post and the followings unread

Liquids wrote:
That said, with my hand actuating the switch and my DMM measuring resistance, if I hold the switch down, it stays at low to no resistance so long as I don't let up. Is this unique or normal for a momentary?

Yes, by definition that's how they work. (It's a bit of a confusing nomenclature.)

BTW, I'm not seing the second schematic.

Ian
Back to top
View user's profile Send private message
Liquids



Joined: Jun 06, 2011
Posts: 23
Location: CT, USA

PostPosted: Thu May 31, 2012 11:43 am    Post subject: Reply with quote  Mark this post and the followings unread

Just noticed the second schem wasn't showing...tried to re-do it and also provided a hyperlink which should work as a backup just in case...
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1219
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Thu May 31, 2012 3:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

I get a 403 - Forbidden error on the link to the second schematic.
_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
marvkaye



Joined: Mar 14, 2011
Posts: 225
Location: Fla

PostPosted: Thu May 31, 2012 5:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

JovianPyx wrote:
I get a 403 - Forbidden error on the link to the second schematic.


Yeah, me too.... I found if I cut the link down to http://tech.thetonegod.com and then followed his Wicked Switches link it would take me to this page where the image that was being pointed to is located. Minor PITA.

<marv>
Back to top
View user's profile Send private message
Liquids



Joined: Jun 06, 2011
Posts: 23
Location: CT, USA

PostPosted: Thu May 31, 2012 7:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

Sorry about the link and image issues. No clue as towhy it's working sometimes and sometimes not (even for me). Not trying to make this any more difficult than it should be...

If the second schematic/wicked switch/the tone god stuff is not showing for you....

Image should be at: tech.thetonegod.com/switches/Wicked_Switch_Momen_Invert_FF.gif

Otherwise, Main page about switches is: tech.thetonegod.com/switches/switches.htm

or

-go to the webpage tech.thetonegod.com

- Under the heading 'Effects Articles' click on the article titled "Wicked Switches - Electronic Switching"

- Scroll to the bottom and the left image titled "Wicked Switch: Momentary w/ Flip-Flip Inverter"

edited the original post accordingly...
Back to top
View user's profile Send private message
Tim Servo



Joined: Jul 16, 2006
Posts: 924
Location: Silicon Valley
Audio files: 11

PostPosted: Thu May 31, 2012 8:09 pm    Post subject: Switch de-bouncing comparison (on paper) Reply with quote  Mark this post and the followings unread

Hey Guys and Gals,

Can I ask what the switches will be connected to? I'm a little unclear from the original post (although maybe I just haven't read it carefully enough). The reason I ask is, is it possible the switches don't need debouncing? Typically, you'll need to debounce a switch if it is going to a microprocessor or other high speed logic. The 'bounce' usually occurs over a few milliseconds, and if you have a circuit that is counting or monitoring the switch, the bouncing can be misinterpreted as more than one switch closure. If you're using the switches to control an analog switch as a bypass, then you'll probably need a SPST switch (and not a momentary), but I would think this would work just fine without debouncing. If you're using a momentary switch to control a flip-flop, THEN you would need a debounce circuit. Am I missing something (which is entirely possible)?

Tim (debouncing debate) Servo
Back to top
View user's profile Send private message
Liquids



Joined: Jun 06, 2011
Posts: 23
Location: CT, USA

PostPosted: Thu May 31, 2012 9:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

The plan is for the momentary to control bypass of circuits remotely...I really only want two chips per momentary...one of which will always be be a DG445 (4x SPSTs) per circuit doing the actual make/break switching.

I'm leaning toward using most or all of a CD40106 for the 'other' chip per momentary to control each DG445 - that one chip could do debounce, simultanous output of high/low logic for the corresponding DG445 switches, and while I'm at it, a corresponding LED (the tone god's circuit is probably close or exact in that regard).

The only potential variant is that, since there will be multiple circuits and SPST momentary switching boards housed together in one big enclosure, I may still entertain use of just one CD40106, one channel per momentary for debounce, feeding 1/2 a 4013 flip flop per circuit to control a DG445 similarly...

That too could average out to "2 chips per momentary switch" or less with 3 or more momentary switches in that configuration (3 DG445s, 2 CD4013s, one Cd40106 = 6 chips)....that is, if I could wisely arrange it all on the same board Very Happy

Of course it's always a balancing act between efficiency of space, wiring, ease, crosstalk potential, and flexibility...

Not that I as of yet have any idea just how big my audio circuit PCBs will end up being...but the enclosure is 12"x10", at least Very Happy
Back to top
View user's profile Send private message
Liquids



Joined: Jun 06, 2011
Posts: 23
Location: CT, USA

PostPosted: Wed Jun 13, 2012 1:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just a note of follow up - I more or less followed the 40106 tone god schematic for a momentary switch, in essence - that is, not exactly, but the core of it.

It worked 80% of the time, but sometimes I'd get inversion of switching on switch depress and then reversion when I let go....likewise, when I went a bit 'QA testing' on it all, and held down the switch for a while....80% of the time or so, depress would invert the state, but the eventual letting go would revert the state, sightly more often than under a standard depress.

After referencing some books (CMOS Cookbook), googling, and asking around (and being referenced to book, and so on), advisable that the feedback resistor between 40106 stage #2's output and 40106 stage #1's input should be smaller than the resistor between the two stages and connected to the cap, unlike the schematic where they are equal in value.

That change seemed to help the switching work 'flawlessly,' albeit only under a brief period of testing it out.

I still lack clarity on if this is the better method or the other...have yet to try the other. Nor do I know what the ideal ratio between the two resistors should be for the above method. CMOS cookbook shows some cap (don't remember) a 220k resistor and a 4.7k as feedback resistance if I recall, for example? I don't recall, actually...but could check for the curious who don't have access to that book.
Back to top
View user's profile Send private message
dshay



Joined: May 04, 2009
Posts: 11
Location: Minnesota

PostPosted: Sat Aug 25, 2012 6:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

Debounce can be done a couple ways.

If you put a cap on your switch output it'll avoid 'ripple', smoothing out quick transients and feed this into a schmitt trigger.

Another trick to do this is to feed it into a criss-crossed nand gate.

There are dozens of methods of doing this, if you google "one shot circuit" or "debounce circuit" you'll get more schematics you can deal with, including the two examples I described.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [11 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use