Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Switching problem with 4066

Status
Not open for further replies.

jjjjjj

New Member
I want to momentarily enable one group of 3 chips: 4066 with one switch (for each group) in a foot-pedal. I.e. it's either off or one or the other group is momentarily turned on (to switch that 'Live-Styler' musical software application).
It's the same as pressing 2 piano keys of a Synth (in the lowest octave at the same time) briefly. If (e.g.) the piano key C and A# is pressed (A# the nearest black key to the left from C in the lowest octave, used only for Live-Styler) to switch Live-Styler accompaniment to minor chords).
To switch to a C-7th chord the nearest white key (B) needs to be activated, etc. That can be quite complicated and that's why I chose to do it via a pentasonic (accordion button) accompaniment.
I think the best might be to connect every pin normally and instead 'block' the gates of each group via a foot PB switch.
(This switch has got NO and NC pins; using the latter.)
To find out the minimum current necessary to bias a gate I connect two pots to a gate (one in series; the other to earth) and then use fixed resistors.
Thus, the gate will only receive 5V when the footswitch PB switches to NO (normally off) or the blockage resistor R2 is effectively out of business/ circuit, like pictured here:
**broken link removed**
Unfortunately this works only for one 4066 switch, because each gate (of 24) has to be independant. I made a test using only one 4066 switch with the 100K pulldown resistor and only R1 (47K). Thus, the footswitch was directly on earth, without R2 and it worked perfectly! Sadly, it won't work with all 12 switches (of one group) via one footswitch.
What to do?
Grateful for any advice. Regards from Johannes (65) in Chile :)

Thx for your good will to help,

Going back to basics! This relay driven circuit helps to clarify what I want and last not least, helped me to 'electronically orientate'. **broken link removed**
I had many sleepless nights. Somehow I got caught up in mistaking the gate for input. Crazy! Finally I came to my senses and yesterday I drew this new plan and a wiring chart to it. 'an' (German) means 'on' in English. (I still mixing Ger with Eng, even after 33 years Aussi nationality. :) )
**broken link removed**
I already soldered the 6 IC’s up the wrong way. Now I have to unsolder the lot and rewire it, but I’m used to… Murphy's laws. The 4066B are buffered and can stand torture. i developped my own technique: I glued the IC’s upside down and wrap the pins/ diodes with hair-thin polyurethane isolated copper wire and I solder them. It works every time.
You should see the wired up 6 blocks dbl. rows of diodes, where all the chords are wired up. What a mess, but works! I always create a wiring plan first and dbl. check every move. Good ‘test for oldies’ (like me) to check if they are still in tune with reality ro Alzheimer's!

How to reward you for your good will? It's easy since you like listening to 'good music'. My ingenious spirit helped me to home-build the 'easiest to learn and play MIDI instrument' of them all. Please visit my page in Live-Styler: **broken link removed**
I helped the owner translate his manual from Ger to Eng and he gave me a free copy of his software. (My name is Johannes K. Drinda) On the bottom of that page you 'might' enjoy my Demo. (Not too sure... because you live a different culture.)
Further down that page I offer a PDF on how to build your own Janko keyboard. That's where my 120-button accordion bass will be added. Any other way it's not easy to play together with Janko Kbd. layout.

Dear Eric,
I thank you for your efforts. You are the welcome rescue Angel from Heaven!
My idea to build the easiest to learn & play MIDI instrument is worth a second thought. I gained my experience as musician. One needs to truly know the advantages of both, the Janko keyboard and pentasonic accompaniment layout. It's not just an odd idea. It offers us to learn only one pattern of major & minor scales in order to play all 24 scales (incl. accompaniment) without practicing them for ages... (Just like singers don't care/ know in which scale they sing their songs.) Name one musical instrument, which has got the same advantages...
Yes, my drawing suddenly went yellowish and unreadable. So, I made made another copy. Please click this image:
**broken link removed**
Going back to this basic design using relays, instead 4066, it should be now clear what I’m after.
There isn’t room for additional inverter & gates IC’s, unless I add another box and extra wiring...
Previously, I somehow mixed up the 4066's inputs. Instead of controlling the gates via PB footswitch, wrongly input the 5V from the accordion button switch to Pin1 or 2 of 1/4 of 4066) and then didn't know how to control it. :)
It couldn't have to do with old age, because I made more stupid mistakes earlier on in life. :)
Happy to say, my problem should now be solved, because if I control the gate (Pin 13 of 1/4 of 4066) via the footswitch and I input the 5V from the accordion button switch to Pin1 and output Pin2 via a diode, the chosen other key will be activated... or am I wrong again?

Regarding age, actually I feel like 50 or so (compared to most men in at that age), because I’m feeling ‘fit and fine; going for 99’! (Granulated lecithin and CoQ10 keep brains & heart happy.) Kind Regards, jjj in Chile

Progress ('Regress'?) Report:
I desoldered the old circuit and rebuilt this one:
**broken link removed**
My joy was short-lived... When I press the acordion button C and then the (Minor) footSW), all gates are activated and I get a chorus of all 12 sounds! Does it mean all 6 IC's are 'kaput' or is there leakage?

What to do? Maybe I have to use opto-couplers or reed relays? I'm left with is this basic diagram with relays:
**broken link removed**
All I want is that when I press an accordion button (one at a time) and momentarily the footSW, another, specific accordion button/key will be activated (to activate that Live-Styler software). Maybe there's a much simpler way?

**broken link removed**

Note: The above pic only shown one connection; that of the C key. Each group (Minor & 7th) has 12 different connections adding another key.

Looking at the simplicity of this relay circuit I guess it's less complicated to just use/ build a bank of 12 electro-mechanical, light to operate switches. I have got a quantity of gold/steel alloy, high-tensile contact wire from an old Dr. Boehm electronic organ with little boards. From that I'll have to build a dual 12-pol switch controlled via a push bar, since nobody is able to help me solving this problem electronically. Regards, jjj

Dear Eric,

Any solution is better than non!
The strange thing is, that I was able to make the switches of my Roland Synth's lowest octave work with 24 switches via 6 x 4066. Yet, the moment I connect something in front of it I get weird results. I guess that has something to do with impedance, because the IC's even switch through when I merely touch their pins.
To rid myself of these problems I guess I'm better off using opto-couplers or reeds. Yesterday, I turned 1200 turns of 0.09mm Philips polyurethane insulated wire onto 24 ReedSW glass bodies with a speed-adjustable drill machine and cassette counter (with a magnetic wheel!). I then soldered a 100n cap between the coil outputs to remove transients and a model of it worked perfectly!
Sure, an electronic version of the same would be more elegant, but it's getting beyond the scope... of my electronic horizon.
How to connect opto-couplers in the same circuit? Maybe they would be better than Reeds, because they take less power, are quiter and I don't need to make coils. Thanking you for your offer to help. Kind Regards, Johannes

Yes, you are right there, Eric. >>> The gates didn't have a pulldown resistor! Damn it. That's, why the 4066 footSW created the 'chorus' of floating gates', by leaking currents. :(

Funny that they worked almost perfectly without it, until I connected the footSW in front of it. I only noticed that some sounds took longer to finish after I released the accordion button. Well, I learnt again something! Thx for that, Eric...

Out of desperation I ripped off the lot and thought of using Reed switches... only to discover that their coils need about 400mA at 5V each; i.e. a major bass played together with a 7th chord (10 active switches) would require 4A!! Forget it!

Life isn't easy... but I'm tough like monkey leather! What I lack in knowledge I make up with patience... Its the same when I forget something, while out of house: What I haven't got in my head I have got in my legs! Murphy's law! :)
Now it's back to 4066 switches, but this time with 22K on each gate.
Each key of my Roland Synth (I have the service manual of it) has 2 switches in a diode matrix, like this for the lowest key C:

A / .---->l--- 8
B / .---->l--- 8

This means A and B go via a separate switches and a diode to 8. C#-key is: A & B to 7; D-key is: A & B to 6, etc. That's how I connected the key IC's 4066. I now installed a socket onto my Synth with all vital in-/outputs (attachment). I controlled the 4066's gates via 5V from the accordion button switches and it worked... albeit flawed, for I forgot to insert 22K pull-down resistors between gates and ground/ 0V.
Only with the footSW I need to control the gates via a SW for (each) Minor & 7th.
So, I'll have to give it another go with 4066B switches? I have got plenty of them and since you reminded me of how young I still am... I have plenty of time, too!
Now that have all the info I appreciate your guidance. It's going to benefit Live-Styler musicians, too. With that I want to complement my PDF instructions; regarding my JANKO project: **broken link removed**
I'll make sure to pay homage to your efforts and mention this forum as well. Kind Regards, jjj

Dear Eric,

Here's more info about chords and bass connections to 4066.
If something is still unclear, please let me know. I want you to have an overview of my project's electronics. The hardest task I had to do was to connect all chords to diode blocks of 13 diodes each; i.e. to 13 x 12 diodes! The numbers in the chord table (see attachment) are diode numbers so, that I can retrace/repair their connections later on.
Chords have 3 keys (except 7th-chords have 4).
The accordion's 120 button switches are: 20 buttons for Terz bass// 20 buttons for Major bass// 20 buttons for Major chords// 20 buttons for Minor chords// 20 buttons for 7th chords// and 20 buttons for Diminished chords//
Basically I intent to connect the chords to 4066 switches as I did with the bass buttons. (Beside, cis means c# //dis means d#//fis means f#//gis means g# //and ais means a#// ) Regards, jjj
**broken link removed**
**broken link removed**
Coming to think of it... maybe the footSW require rather AND gates than OR gates as shown in your respectable drawing? Sorry, my fault, because I only now deliver the complete information. **broken link removed**

**broken link removed**
Note: Here I only show the complete connection of accordion button C.
Each gate (ins 5, 6, 12, 13) has a 22K pulldown resistor to ground.
The are 2 groups ( group Minor IC1 to IC3) and group 7th IC4 to IC6)

Pressing accordion button C sends +5V to SW pin 4 of IC1 and when I press Minor foot switch +5V are send to all gates of IC1 to IC3
Result: I get a chorus of all switches on from IC1 to IC3, but I only wanted to have C and a# activated via the accordion button C and Minor foot switch.
What am I doing wrong?
The good thing on this circuit is that only +5V are switched.
There must be a way of doing it with diodes and resistors, instead 4066B? Using the resistors to earth out the signal from either group, because the same accordion C button serves both (Minor & 7th) groups, but shall only serve one group at a time! How to do it?

The problem with 4066B >>> Since I need to control each group via a foot switch; i.e. one foot switch for the Minor group (IC1 to IC3) and one foot switch for the 7th group (IC4 to IC6).
That's why I thought to connect e.g. the 12 gates of the Minor group together to a foot switch to activate the desired gate. Yet, that also allows the other 11 gates to float (away from ground), causing them to wrongly activate their gates...


Kind Regards from jjjjjj in Chile :)

**broken link removed**

Thx for kicking me to re-think my circuit. What I need is this: Normally both, Minor & 7th outputs should be earthed out, so that pressing accordion C-Button sends +5V only to C output. If then I want MINOR, I open SW Minor and a# tune is added (visa-versa with 7th)
So, this circuit is repeated for the whole octave (12 times):
**broken link removed**

This circuitry I only used to switch Live-Styler (YamahaStyles) accompaniment software, because I want to connect 120 accordion pentagonic buttons (from an old Fafisa electronic accordion) to my Synth.
Normally, the software works in the lowest octave of a Synth; requiring to additionally momentarily press the next black key to its left to obtain MINOR or the next white key to its left to obtain 7th accompaniment.
I want the resistance to be large enough values so as not to load the +5 PS. The outputs go to 6x 4066B (QuadSW) and then to the key SW of Synth (my Roland D20 has 2 switches per key!) For chords, another 6x 4066B! So, there are only microA at work, making it easy to earth out Minor & 7th currents.
If I'm helplessly lost, I'll have to just build a test module two 5K Pot's and then reduce its resistance until it works safely...
On a second thought... maybe I could connect my 120 accordion buttons via diodes directly to the Synth switches? In that case I only need about +3V for the lot. Not too sure if the Synth switches will work that way? They work with 4066B on +5V at VSS.

**broken link removed**
This schematic shows an example of 3 Rolands (D20) Synth switches of C, E and G. This circuit exist 12 times for the 12 different tunes of an octave.
As you see, each Roland key switch has two switches. The Roland Synth uses conductive material as switch to soften transients (like in PC-keyboards!)
When I press the accordion's C-major button these three tunes should sound at the same time, forming the c-major chord.
Question: I need to connect these switches to a 120-button accordion accompaniment. When I press the accordion's C-major button these three tunes should sound at the same time, forming the c-major chord.
What's the simplest way of doing this?
Can I just use diodes and directly connect to Roland key switches?
Or use two transistors per Roland key switch?
Or have I to use 4066B?
 
Last edited by a moderator:
hi jjjj,

Let me first explain I am not a musician, but I enjoy listening to most music.

If I understand you correctly, you are trying to enable groups of 4066 devices, when switches are closed???

In your logic, you require other logic gates, for example: 'OR' gates, which will combine your switches, before they enable the 4066's.

As you are trying to drive multiple 4066's directly from the switches, using resistors, its a possible voltage switching level problem.

Can you post a sketch, with just two 4066's interconnected, I maybe able to suggest a solution.

Regards
EricG
 
Last edited:
Hi Johannes,

Your last drawing was difficult to read.

Based on your first drawing and the notes I have tried to show on the attached drawing, a method of interconnecting your switches, using gates.

The switch names I have chosen are just to demonstrate the idea.

If you have a problem understanding any point, please ask.

As your 65, to me, you are still a young man, I have a 10 year head start and I'm still under 'full sail' !

Regards
Eric
 
Last edited:
Hi Johannes,

I'm sure a logic gate solution is possible, but you say, there is no free space to implement it.

How would you like to proceed.?

Eric
 
Hi Johannes,

On the gates/4066 that are connected to mechanical switches, its important that the ENABLE pin is not left 'floating'
ie; open circuit, place a resistor say about 22K:eek:hm: from the enable pin to 0volts.

The inputs of this type of device have a very high input impedance and if they are left 'open' hand capacitance can make them switch ON/OFF.
Also any external electric fields close the devices will cause mis-operation.

Can you try this to cure the touch effect? [resistors to 0V]

Regards
Eric
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top