Digital switching question

Started by therecordingart, April 27, 2012, 10:56:57 AM

Previous topic - Next topic

therecordingart

I can do this very easily with a mechanical rotary switch, but for the sake of learning something...

I want to control two switches SW1 and SW2 in three possible states...SW1 open/SW2 open, SW1 closed/SW2 open, SW1 open/SW2 closed. I'd like to have an LED indicator for each of these three states. I want to hit a button and be able to cycle through the three states. The memory can be volatile...I don't care if the pedal assumes a particular state on power up. In my head I can come up with a partial answer to this, but haven't studied enough to hash it out.

Can you point me to some articles that can lead me to the right answer? Google isn't being friendly.

therecordingart

So after doing some thinking I can come up with a few ways fairly easily to do toggle between SW1open/SW2closed and SW1closed/SW2open. It's that third state of both switches open that is getting me. 

digi2t

Do you want to stay strictly mechanical, or can you go MIDI? You can do it with a Highly Liquid relay board. Also, instead of cycling, you can send a command choosing which condition you want. I built my first MIDI A/B/C/Y selector with one. It's great kit.
  • SUPPORTER
Dead End FX
http://www.deadendfx.com/

Asian Icemen rise again...
http://www.soundclick.com/bands/default.cfm?bandID=903467

"My ears don't distinguish good from great.  It's a blessing, really." EBK

slacker

You could use CD4017 connect the 4th output to the reset. Connect your switch to clock input. The pattern on the 2nd and 3rd outputs will be 00, press switch and it will change to 10, press again and it's 01, press again back to the start. That gives you the control signals you want that you can drive CD4066 electronic switches or relays or whatever with, add a couple of LEDs for indication. Will need other stuff, switch debouncing and stuff. Or you could use a PIC or some other micro to do the same thing, very easily, depends what you want to do or learn.
As usual R.G. has loads of good stuff about this stuff at geo, as does the tone god.

therecordingart

Sweet! Exactly the info I was looking for.

magdrop

#5
Or, you can use a dual JK FF to make a divide-by-three counter.




The first Q output is high for two counts and then off for one, the second Q output is high for one count and then off for two.

66% and 33% duty cycle