Make your Arduino click external switches using the 4066 IC bilateral switch
Have you ever wanted to connect your Arduino to another device and simulate pushing the buttons on it?
By itself the Arduino can’t really achieve that, since the buttons are on another device that uses it’s own voltage and ground.
You could use a relay to connect the pins on the button together, simulating pressing the switch (button) but you would need one relay for every switch you want to press.
In this tutorial we will look at the 4066 IC bilateral switch which enable you to control up to 4 switches. If you want more you can just use more 4066 IC’s.
Simple to use and inexpensive, this little IC is great when you want to control another device using it’s own buttons.
Pin 7 of the UNO is connected to Pin 13 of the 4066 IC which controls Pin 1 and 2 on the 4066 IC.
5V and Ground from the UNO goes to Pin 14 (VDD) and Pin 7 (GND) of the 4066 IC.
Pin 1 and 2 of the 4066 IC are connected to each leg of the arcade button.
One leg of the arcade button is connected to the external 5V and the other goes to the Vpin of the LED.
The external ground is connected to the ground pin of the LED.
Using the 4066 IC with an Arduino is very easy. All we have to do is make the digital pin of the Arduino that is connected to one of the 4066 input “HIGH” and it will trigger the corresponding output.
In this simple sketch, we are just making the pin go from “HIGH” to “LOW” with a small delay between the two to make our LED flash.
As always you can have a look at the tutorial video for more information.
Copy the above Sketch code in your Arduino IDE software to program your Arduino.
You can download the Datasheet (PDF) of the 4066 IC here: Download 4066 IC Datasheet