Hi, first of all, I'm completely new to Arduino and Electronics, so please dumb any replies down to an understandable level.
I have a small DC fan that works with a 18650 battery, and has a push button switch to turn it on or off. (this means pressing it once will turn it either on or off, not a mechanical switch that stays in two physical positions when on and off)
I want to take the two wires from this push button switch, and use an Arduino Uno to flip it. The ideal way would be to connect those wires to some 2 inputs of the Arduino Uno, and run some code that can make a momentary connection (perhaps for 50ms and break) between the two inputs. Kind of like the current momentarily flowing through the Arduino instead of the push button.
I repeat the word MOMENTARILY. The current doesn't have to flow continuously. (Similar to taking a jumper from one input and just touching it on the other input.)
The voltage between the two terminals is very low at about 3.6V. Momentary current as far as I can find from my multi-meter is less than 20mA (very short pulse). The fan DOES NOT run using the current through the switch. It's just a push button somehow integrated to it. Therefore, I think Arduino Uno wouldn't be damaged in anyway from letting the said current run through it instead of the push button.
So Is there a way to do this? I searched online and found some ways to flip a switch using a relay or a transistor and a resistor, providing the input from one Arduino Uno output. Is that the only way to do this? Isn't there a code to temporarily connect some two inputs and let a current flow through them momentarily, without using external components?
Thank you in advance. Sorry if my English is bad.