Open collector output arduino with led witch PLC inputs

mvas

Joined Jun 19, 2017
537
a) What is the measured voltage at the PLC input when the Arduino output pin is OFF ?
b) What is the measured voltage at the PLC input when the Arduino output pin is ON ?

c) What is the specified voltage range for the PLC to sense Input = OFF ?
d) What is the specified voltage range for the PLC to sense Input = ON ?

Could the voltage on the PLC Input Pin be in the "Gray Area"?

What is the Max Reverse Voltage allowed on your LED ?
Test circuit with two transistors ...
a) one transistor for the LED
b) one transistor for PLC Input ( without the blocking diode ? )
to see if your problem goes away

If the voltages on the PLC Input Pin are valid then ...
Is it possible that your Arduino Code is incorrectly & quickly pulsing the output pin,
faster than you can see the LED blink?
 
Last edited:

Thread Starter

Big_Joe

Joined Feb 11, 2019
12
I am puzzled from the start. Your title says "Open-collector Arduino...", yet you show the base of the transistor taken to ground via the 10K resistor. Surely, with an open-collector output, you need a pull-UP resistor on the base which the Arduino output pulls DOWN when activated. Could this be the cause of your problem - unstable input voltages on the transistor base?


Ardiuno gives + 5V output so there is a pull down resistor
 

Thread Starter

Big_Joe

Joined Feb 11, 2019
12
Thank you all for your help.

It turns out that when I disconnect the LED, the system behaves steadily.

Inserting the rectifier diode in series with the led helped - no violations. T

he LED has a 5V back voltage and hence probably a problem?
 

mvas

Joined Jun 19, 2017
537
Ardiuno gives + 5V output so there is a pull down resistor
Correct me if I am wrong, but I thought the Arduino had Totem Pole Output?
Active Pull-Up to (+) Bus and Active Pull-Down to Ground

You need to measure the Voltages at the Input Pin of the PLC
when the Arduino Output Pin is ON, and then OFF
to discover what is wrong ...

I am also interested in how the Arduino Ground and the PLC Ground are tied together?
"Common Point" where ?

EDIT:
OK, I see your post regarding Max Reverse Voltage on LED.
So, you were operating the PLC Input in the "Gray Area" ...
 

Thread Starter

Big_Joe

Joined Feb 11, 2019
12
Correct me if I am wrong, but I thought the Arduino had Totem Pole Output?
Active Pull-Up to (+) Bus and Active Pull-Down to Ground

You need to measure the Voltages at the Input Pin of the PLC
when the Arduino Output Pin is ON, and then OFF
to discover what is wrong ...

I am also interested in how the Arduino Ground and the PLC Ground are tied together?
"Common Point" where ?

EDIT:
OK, I see your post regarding Max Reverse Voltage on LED.
So, you were operating the PLC Input in the "Gray Area" ...

I have improved the scheme, is the selection of diodes ok?arduino_plc2_v2.jpg
 

mvas

Joined Jun 19, 2017
537
I have improved the scheme, is the selection of diodes ok?View attachment 170613
That is "better", BUT read this ...
http://lednique.com/technology-basics/failure-modes-leds/
It might work, but it might not.
Adding a Series Diode as "Reverse Voltage Protection" for an LED is tricky, it is based on leakage current.

I suggest using two transistors ...
#1 Transistor + a 2.2k Base Resistor - to control the LED + 200R
#2 Transistor + a 2.2k Base Resistor - to control the PLC input
to isolate and eliminate your 12V vs 5V issues = No isolation diodes are needed.

Also, I thought the Arduino was TOTEM POLE output, so WHY the 10K pull-down resistor?
 

mvas

Joined Jun 19, 2017
537
Using only the components the OP already has ...
And keeping the same "High = ON" logic.
NOTE: The Arduino Output Pin now supplies the 20ma to the LED !
Previously, the OP powered the LED separately.
OP, was there a reason for that?

PLC.jpg
 

Attachments

PhilTilson

Joined Nov 29, 2009
81
Ardiuno gives + 5V output so there is a pull down resistor
Then it's not an open-collector output! By definition, "open-collector" means that the collector of the (NPN) transistor is left open. Thus in order for it to do something, it needs to be connected to a load which is tied to the +5V rail. Then, when the transistor operates, it pulls the lower side of the load to ground and current flows. If you connect nothing to the collector except a resistor to ground, nothing will happen - you will always have 0V on your output!

If, on the other hand, you are actually using a driven output, where there is one transistor to the top rail and another to the ground rail, then it's not open-collector. So, which is it?
 
Top