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.
Introduction
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).
Status
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.
Problem
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?