Hello All ... I am trying to emulate button presses on a machine and received the following diagram. I need some guidance:
Should I use a multiplexer ? Or should I use the outputs directly from the micro ? This is connecting to another controller, so I may need to add relays ...
If you want the arduino to effectively short out the matrix intersections you want to use a 4066 switch. You get four of these in each IC and when enabled can connect the appropriate column to the appropriate row.
The ground must be common between this system, and the arduino, and the signals on your matrix system should not be greater than 5V.
Relays will take up more space and use more power. If you do decide to go that route, use reed relays, which are smaller and need less power that traditional relays. The low power requirement allows them to be driven direct from Arduino pins or shift registers. OTOH they can only switch low voltages and currents, but that isn't an issue in your application.
That relay has 350 ohm coil resistance so it takes around 14mA at 5v, and the opto fet I linked to is spec'ed at 16mA (although it will probably work with less). So there isn't much to choose between them.
Since you need 29 of them, you'll either need to use an Arduino Mega (and check the total current draw is within limits) or you'll need shift registers or something similar to drive them. One 74HC595 per 5 relays (to keep within the 70mA Vcc and ground current limit) is one solution.
You can also get 5v reed relays with 500 ohm coil resistance (10mA current), but the ones I found cost more than the one you linked to.