Controlled input state/voltage

Hello, I am fairly new in Arduino so maybe I will be asking very simple question.

I have industrial robot which is via DI sending logical 1 or 0 - this I want to read with Arduino (UNO). As the output voltage of robot is 24V, I will be using Optocoupler which will make voltage 3.3V.

Now, as voltage on idle is floating, my input pins are sadly by default when nothing is connected at 1 state (dont know if this is ideal or OK):

  • Is there a possiblity to perhaps connect input to GND so there will be 0 for sure, but this will change on incoming 3.3V input from optocoupler?
  • Or is there any other better solution which I dont know about? I've been studying a bit and in this case I am not sure about pullup i.e. because I am afraid that robot will be emitting GND all the time no matter state of his output.

thank you very much for your input

Welcome to the forum

Your topic was MOVED to its current forum category which is more appropriate than the original as it has nothing to do with Installation and Troubleshooting of the IDE

Are you sure about that?

Yes, this is just a illustration, I have version with 3.3V output. But if I am not mistaken it is still enough to trigger input HIGH

Could You present what You try to tell in a pen and paper schematics? GND here, pullup..... It's not precise enough for giving reliable answers.

This may answer your questions.

Thank you and pardon me for being silly:

Optocoupler in fact works with pullup inputs and setting them to "0" on incoming HIGH 24V, I was thinking complete opposite. Thank you dougp for reminding me this article, tested and all works now.

Thumbs-Up