• 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.

Question about X-Y Matrix for Keypad

Not open for further replies.


New Member
I'm reverse engineering an X-Y matrix on a device (a pump) so that it can be controlled by a computer. The devices is old and uses an Motorola MC146805 process. My plan is to insert a PhotoMos relay in place of each key contact so that I can run the thing remotely.


I've already have the on/off pushbuttons working, but they are not in the x-y matrix but instead go to individual components. The problem that I am having is with the matrix'ed swtiches. I can toggle any one switch with a PhotoMos realy, but when I hook up multiple switches, those that share a driving line don't work.

This x-y matrix is a little different than typically. Instead of having power from the supply, as in this reference note (figure 3),


Instead, power is supplied from the MC146805 pins. Then, there are current limiting resistors (10K) going to ground that are used to generate the voltage for the key detection line. 3 supply pins; 3 detection pins; Also, this is a 6.8 volt device, (I said it was old).

I'm assuming that the keypad is just a bunch of switches and nothing else, (I've not been able to disassemble it, but from my resistance tests that appears to be true). I have no control over the MC146805 timing, but it should just be a matter of contact closure.

So my questions is, could the PhotoMos relay be ringing? The on spec is 1ms with an off time of 0.1ms.


Well-Known Member
Most Helpful Member
The AQY272 s are not designed for low-current DC switching. You need real dry-contact relays, or some low-level Mos transistor switches. Why not make a replacement for the entire switch matrix with some CMOS logic-gates?


New Member
>>MikeMl said:
>The AQY272 s are not designed for low-current DC switching.

Hmmm, Okay. The spec sheet only listed upper limits.
The devices that I have work fine for a single contact.
It was the x-y matrix where I was having trouble.

>You need real dry-contact relays, or some low-level Mos transistor
>switches. Why not make a replacement for the entire switch matrix
>with some CMOS logic-gates?

Isn't the PhotoMOS essentially a CMOS logic-gates with an opto-front end?

I'm driving the system from a 0-5volt USB discrete output device.
the original systems is a 0-6.8 volt system
I figured that all I needed to replace the switches were some
contact closures and since I wanted opto-isolation, the photoMOS
seemed like a way to go.

Dick Cappels

Active Member
About 100 years ago (not literally, of course), I did something similar but used CD4016 quad transmission gates. Suggest you give that a try as a simple replacement for the relays or solid state relays. The MC74HC4066 is the modern-day replacement.


New Member
The application information for the MC74HC4066 states that ON/OFF control pins should be at Vcc or GND, but the DC electrical characterists lists a minimum High-Level voltage (Vih) that is about 70% of Vcc, so maybe it'll work for my application. It's a little tight as 70% of 6.8 volts = 4.76 volts and USB voltages can vary.

However, while the MC74HC4066 doesn't have opto-isolation built in, if I add another component for this, then I can solve this 70% Vih ON issue as well. I'll look into it. Thanks for the comment.


New Member
I think that I've figured out what the problem was. Using a scope, I could see that when the MC146805 switches on VCC to a column in the X-Y Matrix of switches, the PhotoMOS passes the voltage spike and it lasts long enough, with a high enough voltages that the voltage detector catches it and it looks like multiple push buttons are being pressed. I was able to get the circuit running properly using an RC Snubber circuit on the load side (current limiting resistor).

It works, but I'm not sure that I like this solution. I'm a little bothered with the photoMOS passing the spike with the input is turned OFF, and it requires the RC snubber on each push button, so I'm still looking for a nicely packaged alternative.
Not open for further replies.

Latest threads

EE World Online Articles