Matrix Keypad Emulator using Arduino

Hello! Everyone,

I want to simulate/emulate Matrix Keypad (4x4) using Arduino.

One of our project has 4x4 Matrix Keypad and there are lots of test cases for the Project Testing, in which we have to select process and enter values using keypad.
I want to automate this whole process with the help of PC. A PC application will control the hardware and the simulate the keypress based on the input received from PC using serial Port.

I saw one such post

http://forum.arduino.cc/index.php?topic=38753.0

This is exactly what i want.

Can anyone help me, with the OptoCoupler circuit for this task.

Thanks in advance.

The 4051 are easier to use than optocouplers.

Do I understand you right, that you want to send key codes from the PC to an Arduino, which emulates the key presses on a keypad, which is attached to another device? And you want to isolate the Arduino from the keypad?

Using analog multiplexers, one turns on the row and the other one the column of the key to press, given the row and column index.
Using optocouplers, you need one for each column, and one for each row, then turn on the optocouplers for the desired row and column.

DrDiettrich:
The 4051 are easier to use than optocouplers.

Thanks for this suggestion, i will look into this solution as well.

DrDiettrich:
Do I understand you right, that you want to send key codes from the PC to an Arduino, which emulates the key presses on a keypad, which is attached to another device? And you want to isolate the Arduino from the keypad?

Yes this is what i want.
I want to replace my matrix membrane based keypad using this device, and want to simulate the keypress from PC, because by using PC i can automate the keypress.

DrDiettrich:
Using analog multiplexers, one turns on the row and the other one the column of the key to press, given the row and column index.
Using optocouplers, you need one for each column, and one for each row, then turn on the optocouplers for the desired row and column.

I think i got it.
I selected optocoupler because the guy used opotocoupler in the link shared by me above, and its working perfectly, i had seen its video uploaded on YouTube.

In optocoupler we get isolation and that's i want to use this.

The optocoupler polarity confused me, that's why i posted here.

If you have any circuit diagram please share it here.

Rest i am trying this and if face problem i will revert back in this post again.

Right, polarity is important with (bipolar) optocouplers. Also the voltage is important, at which the keyboard is scanned. The usual bipolar optocouplers have a minimum forward voltage of about 0.4V, i.e. two such couplers (for row and column) have a voltage drop of 0.8V, what may prevent the recognition as a closed contact.

Find out yourself, wether 2 optocouplers with their outputs in series can simulate a pressed key. No program is required for that purpose, simply supply sufficient current to the optocoupler input LED.