open circuit

Greetings,

Is there a way to have a open circuit on an output pin.

I am using the Arduino mega output pin to switch a Leo bodnar BBI32 controller card what uses the negative from the mega to operate the controller card digitalwrite LOW

Is there a way to switch the pin so it not out putting a negative or 5v, I need it volt free

The same as a relay when it is normally open

Thanks in advance

Laurence

As long as the pin will not see <-0.5V or >5.5V you could try setting the pin to INPUT with a pinMode function. Inputs are hi-z (>10 MOhm). Then change back to OUTPUT when required.

DigitalWrite() does not make a negative, just near 0V. Not sure that I understand your problem so not really sure that the solution is the above. May be an XY problem.

Thank you
And apologies for posting in the wrong section

2020laurence:
Greetings,

Is there a way to have a open circuit on an output pin.

I am using the Arduino mega output pin to switch a Leo bodnar BBI32 controller card what uses the negative from the mega to operate the controller card digitalwrite LOW

Have you actually tested your Mega to see what happens? on my Uno board I get 0 volts from the output when it is LOW and 4.97 volts when HIGH

// set pin numbers

const int intled =  13;
const int out_test = 8;

void setup() {

  pinMode(intled, OUTPUT);
  pinMode (out_test, OUTPUT);
}

void loop() {

  digitalWrite(intled, LOW);
  digitalWrite(out_test, HIGH);
  delay (2000);
  digitalWrite(intled, HIGH);
  digitalWrite(out_test, LOW);
  delay(2000);
}

Is there a way to switch the pin so it not out putting a negative or 5v, I need it volt free

No. That is called an open collector output and the Arduino does not have them.

However, a simple NPN transistor with emitter to ground, and base connected to an input through a 1K resistor will produce such an output on the transistor's collector