Use arduino to control a switch

I have a circuit that I need to turn on and off repeatedly. Right now I am doing that with a manual switch in the circuit. I instead want to program it to happen automatically. The circuit has 12V DC. Is there a way I can control a switch with an arduino?

I have spent lots of time googling the topic, but can only seem to find people controlling AC circuits. Mine is DC and I don't need to control the whole circuit, just the switch. Because I can't seem to find anything, I fear I am using the wrong key words. What do I call what I am trying to do?

Is there a way I can control a switch with an arduino?

With, or without, modifying the circuit?

With modifications would involve connecting a optoisolator in parallel with the switch so the Arduino could complete the circuit or you could manually press the switch..

Without modifications is easier. Just position a servo so that rotating the servo horn one way presses the switch and rotating it the other way releases the switch.

the above assuming: 1) it is a pushbutton switch, 2) the optoisolator can handle the current.

maybe use the arduino to drive a MOSFET?

Are you thinking about a relay?
If you don't know what a relay is, google it.

.

on/off repeatedly, relay? she wants an electronic switch, not a Marconi Spark Gap transmitter/ozone generator rolled into one. .... just kiddin'

123Splat:
on/off repeatedly, relay? she wants an electronic switch, not a Marconi Spark Gap transmitter/ozone generator rolled into one. … just kiddin’

As usual we have very little information of what is being attempted.
If they are using a switch now, a relay will do the same.
We have no indication there will be any spark or what the load is.
Operations are typically 106 operations
A relay is a very viable option.

Besides the Enterprise uses relays all over the place :wink:
.

@PaulS I was hoping to do it without modifying the circuit. My switch in currently a little lever back and forth. It is too stiff for a servo to move, but I could get a different switch. I have a good grasp on how to control motors with an arduino, so this may be a good option for my lack of electronics expertise.

@LarryD I am sorry, but I am not sure what you mean by load. The circuit is driven by a 12V function generator. It carries 1-700mA depending on the moment. Is that the information you need?

I am currently using a switch. After googling relay I think I understand that I can give it a little voltage (like the 5V an arduino can supply) and it will turn on a larger circuit (like my 12V one). (I found this website the easiest to understand http://www.explainthatstuff.com/howrelayswork.html). I am nervous because online it seems like relays can hurt the arduino. I keep seeing that people connect them to transistors. Do I have to do this? Or can I directly put a relay in where the switch is?

Thank you all so much for your help! I am new to electronics, but am trying to learn. Your help is teaching me so much!

You can replace the switch with a relay (connect the wires from the switch to the relay's switch wires).

The other side of the relay - where the Arduino goes - indeed requires a transistor as most relays draw too much current for an Arduino port to handle. As it's now a manual switch I suppose it's not switched on and off that often (often being more than once a second for long periods of time), a relay will do just fine.

Alternatively you may be able to replace the switch with an electronic switch (main advantages: smaller, even more durable and completely silent), but to do that for starters you have to know exactly how the switch is wired in the circuit (high/low side), then you can replace it by a MOSFET. 700 mA is no problem for them. If high side switching you may need some other components as well.

wvmarle:
The other side of the relay - where the Arduino goes - indeed requires a transistor as most relays draw too much current for an Arduino port to handle.

..and a diode. The inductance in the coil of the relay may be enough to damage that transistor.

Ah, yes, of course. Forgot to mention that one.