Issues with Arduino "pushing" buttons on another platform.

Hi all,
apologies if this question has been posted earlier - but I've searched through the Forum for 4066 related issues and similar situations and have not been able to solve my problem.


For a project I am working on, I need Arduino to be able to "push" buttons at an external platform - which is a standalone, separately powered device. These buttons exist as physical buttons - please see a sample schematic attached here (schematic_sample.jpg) which is identical to how these switches are wired to the device in question.

One approach I've tried is using the 4066 IC. Please see a sample breadboard attached here (breadboard_sample.jpg) for how it is wired in my application - the big red switch is to refer to one of the switches in the previous attachment (schematic_sample.jpg).


The project, using the code here (I've only shown the void in question for brevity) works as expected:

void switchMode()
  intMode = intMode + 1;
  if (intMode > 1) { intMode = 0; digitalWrite(pinSwitchSWT, LOW); }
  else { digitalWrite(pinSwitchSWT, HIGH); }

Initiating the routine "clicks" the button as expected.


The problem I am experiencing happens when the Arduino is not powered. Seeing the two platforms have independent power supplies, it can happen (and it does) that the "controlled platform" is still powered and working while the Arduino can be off.

When the Arduino is off, the outputs of the 4066, connected to the switch, seem to act as if they are closed, i.e. as if I am still pushing the button.

Browsing the 4066 datasheet with my limited knowledge seems to indicate that when no power is applied, the contacts should be open, and the button should not be "pushed".

Once the Arduino is powered on again, it all seems to work again as expected - but while the Arduino initializes for a few seconds, the other platform acts as if the buttons are randomly pushed.

Any thoughts to what I am doing wrong?


Images from Original Post so we don't have to download them. See this Simple Image Guide



Is the black thing the 4066 IC - you have not labelled it. Neither have you labelled its pins.

And it does not seem to be connected to anything other than the switch and the Nano.

What is the first diagram meant to illustrate?

When the Arduino starts all the I/O pins are initially set as INPUT until your code changes things.

Post your complete program.