How to simulate a switch (safely) ?

This is probably basic, but I really want to avoid damaging my $300 PCB. The PCB is a 5V device and it takes input via button presses. The button simply connects common to the input.

How do I simulate that button press with the arduino? And do I need to test the PCB first to clarify anything about how it works?

my guess would be:
connect pin0 to the PCB input
connect commons
and:
pinMode(0, OUTPUT); // set pin to output
digitalWrite(0, LOW); // turn on

PS. they will be sharing a 5V supply, if that is relevant.

Is it supposed to be a momentary button or a switch ? You didn't change the low back to a high.

Also consider the impedance to your PCB circuit... I'm "guessing" that it has high impedance but you don't want to risk it... make sure a high can't burn it out. Also not all boards at 5V tolerant although it may be powered by 5V (USB is convenient). Check datasheets your mileage may vary.

Hi, A relay would be the simplest, although an opto-coupler would be better and both provide isolation protection for your $300 PCB.

Can you tell us your electronics, programming, arduino, hardware experience?

Thanks.. Tom.. :)

Thanks for the opto-coupler idea. I will buy one to add to my kit of parts, but I'm not that keen for this project because I need 4channels and unless I can find the right parts it will complicate my manufacture a lot, at the moment the design is just a (pre-soldered nano) plugged into a pre-soldered screw terminal board, ie zero soldering for me which is good because I could be making 20 or more of these.

I've just taken a meter to the PCB. The input pins are sitting at 5V. And given that they are usually shorted to ground, I'm thinking that means the arduino couldn't possibly hurt it ???

So I'm nearly ready to connect it up, but would appreciate a re-assuring nod from someone knowledgeable.

I vote for using a relay because it is just a (wired) remote control switch. Choose a reed relay with a built-in diode across the coil. Herb

jimmer: Thanks for the opto-coupler idea. I will buy one to add to my kit of parts, but I'm not that keen for this project because I need 4channels and unless I can find the right parts it will complicate my manufacture a lot, at the moment the design is just a (pre-soldered nano) plugged into a pre-soldered screw terminal board, ie zero soldering for me which is good because I could be making 20 or more of these.

I've just taken a meter to the PCB. The input pins are sitting at 5V. And given that they are usually shorted to ground, I'm thinking that means the arduino couldn't possibly hurt it ???

So I'm nearly ready to connect it up, but would appreciate a re-assuring nod from someone knowledgeable.

You can get nice 4 relay Arduino "shields" for much less than building your own circuit with relays, driver transistors, opto isolators, etc..

LINK.

"This is probably basic, but I really want to avoid damaging my $300 PCB. "

You would be more likely to damage your Arduino.

You say that the open-circuit voltage at the switch is +5V, what is the closed-circuit current? (Put a VOM set to Amps across the switch contacts. Your $300 board should act as if the switch was pressed, and the VOM will tell you what is the board current draw. If it's less than 20mA, then you can probably connect directly to the Arduino GPIO pin. (Assuming you are only simulating one switch at a time).

If you don't know what the $300 board switch input is connecting to, you may want a diode from the GPIO to ground in case the switch input to the $300 board is an inductive load.

You don't say what the $300 board does, but is there a problem if the switches are activated faster than a human finger can press them?

Thanks Steve,

The current reading is 1.1mA on a closed input.

Does that make it a 5k input impedance ?

The board is a fpga simulation of the Williams Defender PCBs, 2nd board down wsysfpga here: http://www.jrok.com/

The button input pins all go to those ICs TM1,TM2.TM3. They don't have any markings on my board. I will only be triggering the inputs at finger pressing speeds, and a maximum of 3 at the same time.

I'm pretty confident now that the pcb will be safe.