Arduino Forum

Using Arduino => General Electronics => Topic started by: g43q654wutrjh on Oct 27, 2016, 06:33 pm

Title: digital switch ? with arduino . how to do it
Post by: g43q654wutrjh on Oct 27, 2016, 06:33 pm
i have a separate device that has a push button switch.

is there a simple way to use the arduino to trigger the switch?

like a relay or like a transistor or is there a way without?


for example a led torch, the switch is not switching the power to the led only switching (triggering) an IC to turn on the torch.

thanks
Title: Re: digital switch ? with arduino . how to do it
Post by: larryd on Oct 27, 2016, 06:42 pm
Are you familiar with switches and outputs?
http://www.gammon.com.au/forum/?id=11955 (http://www.gammon.com.au/forum/?id=11955)

(http://i.imgur.com/6vbduK2.jpg)

(http://i.imgur.com/f5nBHpB.jpg)


.
Title: Re: digital switch ? with arduino . how to do it
Post by: g43q654wutrjh on Oct 28, 2016, 08:29 am
sorry I don't understand what your comment has to do with my question ?


i have a separate device that has a push button switch.

is there a simple way to use the arduino to trigger the switch?

like a relay or like a transistor or is there a way without?


for example a led torch, the switch is not switching the power to the led only switching (triggering) an IC to turn on the torch.

thanks
Title: Re: digital switch ? with arduino . how to do it
Post by: septillion on Oct 28, 2016, 10:16 am
You have to be more precise. Yes, probably it's possible but what is the best/easiest method we can't tell. The "switch" might be a tiny switch on a remote or a massive 400V 3-phase switch. Both switches, both controllable from the Arduino but the solution is quite different...
Title: Re: digital switch ? with arduino . how to do it
Post by: g43q654wutrjh on Oct 28, 2016, 11:38 am
pretty sure I covered that in my example

"for example a led torch, the switch is not switching the power to the led only switching (triggering) an IC to turn on the torch."

= LOW POWER  ...yes like a remote.

thanks


You have to be more precise. Yes, probably it's possible but what is the best/easiest method we can't tell. The "switch" might be a tiny switch on a remote or a massive 400V 3-phase switch. Both switches, both controllable from the Arduino but the solution is quite different...
Title: Re: digital switch ? with arduino . how to do it
Post by: septillion on Oct 28, 2016, 11:53 am
But that still doesn't tell us everything. What does it switch? To GND? To 12V? To 5V? What is the rest voltage etc. Just "low power" doesn't cut it ;)

And you say, for example. But keep in mind another "example" might need a complete different approach.
Title: Re: digital switch ? with arduino . how to do it
Post by: Grumpy_Mike on Oct 28, 2016, 02:09 pm
The low risk approach is to use the Arduino to turn on a relay and then wire the relay contacts across your switch. That way everything is isolated.

The wiring to do this is shown in LarryD's second diagram which shows a relay being driven from the Arduino through a FET.
Title: Re: digital switch ? with arduino . how to do it
Post by: septillion on Oct 28, 2016, 04:22 pm
That indeed always works if you choose a relay that can handle the voltage and current.

Cons of that:
-Slow, so you cannot switch it fast
-Probably way over complicated for a lot of cases
Title: Re: digital switch ? with arduino . how to do it
Post by: g43q654wutrjh on Oct 28, 2016, 08:55 pm
a relay uses to much power need something to keep the power down maybe a transistor but not sure which will be best
Title: Re: digital switch ? with arduino . how to do it
Post by: Grumpy_Mike on Oct 28, 2016, 08:57 pm
Quote
a relay uses to much power
How much is too much?
You can get very low power relays you know.
Title: Re: digital switch ? with arduino . how to do it
Post by: dlloyd on Oct 29, 2016, 03:36 am
(http://i.imgur.com/8k8DMFW.png)

You can loose the diode once you know the polarity for button connections. The "+" terminal connects to the collector, "-" terminal to emitter. Can determine polarity with multimeter (or trial and error).