aiken cmos switch

Started by njkmonty, July 13, 2014, 04:14:42 AM

Previous topic - Next topic

njkmonty

still learning with these chips, just wanting to know if the following schematic can be implemented with 2 different logic and latch switches?
ie is there a hex or octal one that can simply be swapped over etc?
ie to achieve the same results etc but with 6 or 8 momentary switches? with going pic etc?

i also can see that some of the parts on each chip are not used, if there are no other chips available, can the above schematic be changed to 4 momentary switch incorporating the unused  sections? if so any suggestions of implementation??? :P

duck_arse

it's hard to read that circuit, but the 4043/4 are quad tri-state latches. don't know why he chose tri-state, but there you go. if you wanted the fourth channel, it will be the same config as the other three.

there is a hex d-type f/f the 40174/74HC174, which would be a good opportunity to practice some logic-ing. the reset logic part could be any number of different logic gate packages, as long as you get the logic right.
don't make me draw another line.

R.G.

I believe that this is a three-channel verion of a radio-button switch. That is, press one switch, that "channel" goes active and all the others are released to inactive.

And yes, it can be extended to larger numbers of channels. One way is the one I posted at Geofex back in 2000:

This implements the same switching logic, but using MML (Mickey Mouse Logic) instead of official gates and chips and such.

The operation is that each momentary switch sets its value in its latch, and at the same time resets all the other latches except its own. The three-channel version uses two-input gates to do the reset for the other channels. This network gets out of hand with more channels unless you cheat, as each channel needs the number of channels minus one inputs to do the proper resets.
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.

greaser_au

#3
Tri-state logic is an integral part of logic design for computing - high, low, or open (i.e.  let someone else control the bussline) - in this case the outputs are always driven high or low (because the enable pin is pulled high).

To extend this to use the remaining sections is a non-trivial exercise as the AND gates are used (as NOR gates: see DeMorgan)  to inhibit the other SR flipflops.  I reckon we'd need 4x 3-input gates, and thus another package (74HC11 - leaving 2 unused gates). We could easily use 12 diodes in this case  instead of the AND chips, but it's quickly becoming a job for more complex glue-logic packages (consider Marshall's use of the CA3046 in the 2205/2210 as an expedient measure*). All that said,  we'd need a use for the channel select output (see the scratchpads at the bottom of the drawing).

david

* yes it IS a low-cost measure (at the time).  the CA3046 can easily be replaced with a few BC549/2n2222 (or any other high-gain NPN with a reasonable Vceo) devices if the chip is unavailable.

##Bugga...    R.G. beat me to it!    ("more complex glue-logic")

J0K3RX

Doesn't matter what you did to get it... If it sounds good, then it is good!

J0K3RX

Has anybody looked at the MAXIM 6816-6818 debounce IC's? I am asking because I don't know, but, they look like they would work well..?

Doesn't matter what you did to get it... If it sounds good, then it is good!

armdnrdy

#6
Quote from: J0K3RX on July 13, 2014, 04:57:03 PM
Has anybody looked at the MAXIM 6816-6818 debounce IC's?

The question should be, "Has anybody looked at the MAXIM 6816-6818 debounce IC prices?  :icon_eek:
http://www.mouser.com/Search/Refine.aspx?Keyword=MAX6818

Digikey is not any better:
http://www.digikey.com/product-search/en?v=175&lang=en&site=us&KeyWords=MAX6816+%7C+MAX6817+%7C+MAX6818
I just designed a new fuzz circuit! It almost sounds a little different than the last fifty fuzz circuits I designed! ;)

Mbas974

What is ISL88P ?
I tried to find the datasheet but just few info in a german forum....

R.G.

I know people get tired of hearing this, but the really, truly best way to do this is with a microcontroller. I know full well that the next thing that hits people's minds after they read that is "But I can't program microcontrollers, I'll find another way. And I wish they'd quit telling me this over and over again."

It's sad but true that a minimal level of programming experience is becoming as necessary as learning to solder, read a schematic, or look up datasheets.. A uC is often **cheaper** than the clot of logic needed to do the same job, and may be able to do things you can't do with hard logic as a practical matter.

There are **free** basic and C language compilers for programming them. There are things like the Basic Stamp, which is ready to program and run in Basic, and the Arduino, which I am not terribly familiar with but I gather is even a lower common denominator.

The programming is really kind of trivial. I'm surprised that no one has shown up here with preprogrammed PICs and the equivalent, and/or an offer to do programming jobs. Yeah, I know, you're thinking "why won't you do it, R.G.?" Actually I'd love to if my feet were not being held to so very many fires already. Molten Voltage seems to be doing this as a commercial venture, making some of the obvious uCs to sell, but there's a niche for someone to do a few-off instead of starting their own Three Initial Corporation.

Sigh. Sorry. But it's reality.
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.

J0K3RX

#9
Quote from: R.G. on July 13, 2014, 05:19:38 PM
I know people get tired of hearing this, but the really, truly best way to do this is with a microcontroller. I know full well that the next thing that hits people's minds after they read that is "But I can't program microcontrollers, I'll find another way. And I wish they'd quit telling me this over and over again."

It's sad but true that a minimal level of programming experience is becoming as necessary as learning to solder, read a schematic, or look up datasheets.. A uC is often **cheaper** than the clot of logic needed to do the same job, and may be able to do things you can't do with hard logic as a practical matter.

There are **free** basic and C language compilers for programming them. There are things like the Basic Stamp, which is ready to program and run in Basic, and the Arduino, which I am not terribly familiar with but I gather is even a lower common denominator.

The programming is really kind of trivial. I'm surprised that no one has shown up here with preprogrammed PICs and the equivalent, and/or an offer to do programming jobs. Yeah, I know, you're thinking "why won't you do it, R.G.?" Actually I'd love to if my feet were not being held to so very many fires already. Molten Voltage seems to be doing this as a commercial venture, making some of the obvious uCs to sell, but there's a niche for someone to do a few-off instead of starting their own Three Initial Corporation.

Sigh. Sorry. But it's reality.

Totally agree...! I post the other stuff because I figure nobody will go the microcontroller route and the few that will already have and are making these kinds of things already. I already have a PIC12F683 switch and a couple ATtiny switches, looper, midi etc.. but, I am still mildly fascinated with other alternatives and perhaps combinations of the two.

I think a lot of people don't understand "why and how" and how it relates etc, and just don't bother..?

Anyway, there are quite a few things out that are making it far more simple like "Graphical Programming Environments" so it takes A LOT of the learning curve out of it! You just click, drag and drop programming blocks and see what you can come up with... It tells you if you can't do something and what you can do to correct, lets you vue the underlying source code that goes with each piece of the puzzle you put down. You can use this stuff without even owning a Auduino device but eventually you will have to get something if you want to program a real ATtiny chip or whatever... Of course you can use the Arduino Software or MPLAB, MicroC or whatever you like for PIC.

Here's a few to look at if you are interested... some you will have to do a google search for, cause I'm lazy  :icon_wink:  Tip: - A lot of good "open source" free stuff on Sourceforge, github, code.google.com, Gitorious, GitLab, Assembla.....


SimulIDE

PicoFlowAlpha

PicsimLab

Real Pic Simulator

Flowcode 6 <-- probably the best for PIC microcontroller but not free..
http://www.matrixtsl.com/

gpsim

miniBloq <-- very cool! free

LabVIEW Interface for chipKIT

Ardublock

Fritzing - Has some cool stuff for Arduino, haven't tried it, yet..
https://www.youtube.com/watch?v=Hxhd4HKrWpg#t=31

http://byob.berkeley.edu/ <-- It's called "Snap!" which is browser based and you have to download the Arduino package if you want to use the Arduino features... free

http://www.123dapp.com/circuits <-- Nice browser based sim

http://www.evilmadscientist.com/  <-- just a cool place, has a lot of stuff..

http://www.modkit.com/  <-- Probably one of the best for Arduino!
http://vimeo.com/42436411 <-- demo
Doesn't matter what you did to get it... If it sounds good, then it is good!

J0K3RX

Doesn't matter what you did to get it... If it sounds good, then it is good!

greaser_au

Quote from: R.G. on July 13, 2014, 05:19:38 PM
I know people get tired of hearing this, but the really, truly best way to do this is with a microcontroller. I know full well that the next thing that hits people's minds after they read that is "But I can't program microcontrollers, I'll find another way. And I wish they'd quit telling me this over and over again."

I see it that the resistance is because we're all at different developmental stages.

In most cases the new DIYer just sees all of this as a bunch of inscrutable black boxes. Any knowledge of what happens inside the black boxes requires some leap of understanding (of the modelling anyway) - often hard-won. Moving to another technology is another set of leaps that require the investment of more time (and in many cases some 'formal' study to teach enough of the basics to get the user going).  Added to this is that all some want is a "monkey-see, monkey do" approach (thus the proliferation of the many layout-only projects) and want or need someone else to do the 'hard' yards - I started with these sort of things when I was a kid, I mourn the demise of  Tandy/RadioShack's  'Science Fair P-Box' kit range!  http://my.core.com/~sparktron/pbox.html

If we can figure out how to do something in either asynchronous or edge-triggered glue-logic, then programming this in a uC is not a very big leap (once we have leapt the hurdle of learning to program) - either way we still have to solve the real-world issues like switch bounce (a capacitor and schmitt-trigger vs a 20ms settling delay loop/interrupt), and setting turn-on output states. 

Another side of this is that the 'flow of the signal' in the uC is not obvious to the tyro - even fairly complex glue-logic can be worked through input-to-output once you've spent some time with Mr Boole.

...And if you liked microcontrollers...   watch out for the Next Big Thing:  field programmable gate arrays - *emulate* your favourite CPU/microcontroller!  :)

david

merlinb

Quote from: J0K3RX on July 14, 2014, 04:54:47 AM
I still would like to get one of these to mess around with!!
http://www.jameco.com/1/1/26469-pdn2008-p-ede2008-p-push-button-debouncer.html
But it's just a debouncer, not a decoder. It doesn't really do anything you can't acheive with a few RC filters.

R.G.

Quote from: greaser_au on July 14, 2014, 06:06:41 AM
I see it that the resistance is because we're all at different developmental stages.
Yep, that's right. However, we need to be setting the expectations of our newbies that one day they'll have to do it, just like one day if they stay with it, they'll have to read schematics. Some newbies never get to schematics, but none of them are surprised or resistant that they should be expected to if they want to advance to some higher level.

And we need to kill off the expectation that programming on some level is a higher form of learning that ony a few can do. That perception was OK at one time, but just like driving a car was once a special, perhaps inscrutable task for all but a few, it gets to being a modest task for today's world. Sure there are greater and lesser practitioners, but we're talking about baby steps programming, not time warp engineering.
Quote
In most cases the new DIYer just sees all of this as a bunch of inscrutable black boxes. Any knowledge of what happens inside the black boxes requires some leap of understanding (of the modelling anyway) - often hard-won. Moving to another technology is another set of leaps that require the investment of more time (and in many cases some 'formal' study to teach enough of the basics to get the user going).  Added to this is that all some want is a "monkey-see, monkey do" approach (thus the proliferation of the many layout-only projects) and want or need someone else to do the 'hard' yards - I started with these sort of things when I was a kid, I mourn the demise of  Tandy/RadioShack's  'Science Fair P-Box' kit range!  http://my.core.com/~sparktron/pbox.html

If we can figure out how to do something in either asynchronous or edge-triggered glue-logic, then programming this in a uC is not a very big leap (once we have leapt the hurdle of learning to program) - either way we still have to solve the real-world issues like switch bounce (a capacitor and schmitt-trigger vs a 20ms settling delay loop/interrupt), and setting turn-on output states. 

Another side of this is that the 'flow of the signal' in the uC is not obvious to the tyro - even fairly complex glue-logic can be worked through input-to-output once you've spent some time with Mr Boole.
All true - what I'm trying to change is the *expectation* that programming is only for the few and the proud. Really, good progamming starts with writing up something much like a step by step "how to" for building a pedal. The more clarity you have in writing this out, the better and faster the task gets done.

...
QuoteAnd if you liked microcontrollers...   watch out for the Next Big Thing:  field programmable gate arrays - *emulate* your favourite CPU/microcontroller!  :)
I don't know about "next", but FPGAs are fun. We were using Xilinx FPGAs for special purpose memory controllers back in the early 90s. I expect that the're better, bigger, and faster now. As for emulating a processor with the... ACK! now you have hit something I see as a big task. That is a task that is so long that you probably would never get there doing it on a gate-by-gate, or gates-and-latches approach, so you're forced as a practical matter to go into one of the logic synthesis languages. These languages do require some special background in logic design and computer architecture to turn out useful work; or they did the last time I touched them, back in the 90s.

Maybe it's easier today, and I need to just accept that I'm going to have to learn to use a logic design language...    :icon_biggrin:
david
[/quote]
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.

R.G.

#14
I speculated over my coffee a bit.

A one-of-eight selector with 500ma drivers can be implemented with two chips: a 16F1507 ($1.54, Mouser) and a uLN2803 ($0.73, Mouser)  plus some resistors. With some care in programming, this can be made to hook directly to another such chip set and make a one-of-sixteen selector. Actually, it could be expanded to any practical number, but more than sixteen is trivial.

Er, not good to think faster than I can type. What I meant to say is that
Actually, it could be expanded to any practical number, but more than sixteen requires some thought, and sixteen is trivial.

Two chips, resistors, about $2.50 in parts. I think I have the debounce and output routines canned somewhere in the programming archives.
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.

greaser_au

#15
Quote from: R.G. on July 14, 2014, 10:13:49 AM
Quote from: greaser_au on July 14, 2014, 06:06:41 AM
I see it that the resistance is because we're all at different developmental stages.
Yep, that's right. However, we need to be setting the expectations of our newbies that one day they'll have to do it, just like one day if they stay with it, they'll have to read schematics. Some newbies never get to schematics, but none of them are surprised or resistant that they should be expected to if they want to advance to some higher level.

And this is EXACTLY how we used to do it at with new techs at work.  You feed them a bit - couple of different ways if necessary - and watch if they learn to feed themselves - if they do not, they 'wither' and move on. The result was a crack team of skilled people able to think on their feet.  If you'd worked for a while with the company your CV used to carry some weight...

Quote
And we need to kill off the expectation that programming on some level is a higher form of learning that ony a few can do. That perception was OK at one time, but just like driving a car was once a special, perhaps inscrutable task for all but a few, it gets to being a modest task for today's world. Sure there are greater and lesser practitioners, but we're talking about baby steps programming, not time warp engineering.

Exactly.  Life was headed that way in the late '80s - and now because of the integrated development environments for the many different platforms that are available,  it is easier than ever.  I think nearly everybody has a tool that gives you the level of visibility into their uC range that SPICE does for the analogue world - and the models are far more precise :)

I can heartily recommend the first few chapters of the "Programming the Z80" book by Rodnay Zaks as a starting point for programming in general, but nothing beats a few well commented examples!!!

david

njkmonty

I have been  been playing around with the above mentioned Aiken switch
Instead of using just 1 relay like in diagram I have been using multiple relays per momentary switch
But when I press one of the 3 momentary switches the 2n7000 gets hotter pending how many relays are activated ( I'm using non latching kind)
I was wondering if this is normal or would it be prudent to upgrade to higher rated component?
And if so any recommendations?


duck_arse

what is the coil resistance of each relay? what current does each relay draw? what is the current limit for a 2n7000?
don't make me draw another line.

njkmonty

#18
im using a  G5V-2 Low Signal Relay

http://www.omron.com/ecb/products/pdf/en-g5v_2.pdf

if im understanding correctly the data sheet

1) coil resistance = 50 ohm
2) relay draw current / power consumption= 500mw
3) rated current = 100 Ma


http://www.futurlec.com.au/transistors/2N7000.jsp

1) im not sure but i think "Continuous Drain Current" is = 200Madc

so if i interpreted the data sheet correctly does that mean 1 x 2n7000 can only continuously run 2 of the relays im using?


do i need an Irf Power mosfet equiv?
ie Irf510?  or am I still wandering down the wrong path?

duck_arse

I think the datasheet also says that at 200mA, it will run STINKING hot. you could use the mosfet to drive a power transistor, on a heatsink.

why is everyone doing relays lately?
don't make me draw another line.