Open collector output arduino with led witch PLC inputs

Thread Starter

Big_Joe

Joined Feb 11, 2019
12
arduino_plc2.jpg


Hello

Please, let me know if the diagram is correct. Arduino hands out a transistor which in turn drives the input in the PLC. The PLC responds to a short to ground. The question is, why, despite the lack of the signal from andurino in the PLC, the entry at random moments is violated?
 

MaxHeadRoom

Joined Jul 18, 2013
28,576
I am assuming the PLC has a typical Opto isolator input?
What is the purpose of the LED? Most PLC's show the status of the input via its own LED.
You could have probably done it simpler with 2n7000.
Max.
 

Thread Starter

Big_Joe

Joined Feb 11, 2019
12
I am assuming the PLC has a typical Opto isolator input?
What is the purpose of the LED? Most PLC's show the status of the input via its own LED.
You could have probably done it simpler with 2n7000.
Max.
It looks like the PLC has no opto inputs. The LED is a need for optical control of the ardiuno output control. Transistor BC847.
 

MaxHeadRoom

Joined Jul 18, 2013
28,576
Why not substitute the diode on the collector for a LED and get rid of the other one.
So what is the nature of the input? What PLC?
Max.
 

Thread Starter

Big_Joe

Joined Feb 11, 2019
12
Why not substitute the diode on the collector for a LED and get rid of the other one.
So what is the nature of the input? What PLC?
Max.
The input data is a momentary / monostable signal with ardiuno, and "PLC" basically represents the alarm panel input which implements the bistable mode and switches on / off specific outputs after violation of the input. The problem is that occasionally the PLC controls the output despite the absence of a violation with ardiuno (the LED is off and the PLC informs about violation of the IN input).
 

MaxHeadRoom

Joined Jul 18, 2013
28,576
Sounds like a design issue there, not really sure of the (vague) details at this point however.
I still can't see why the LED cannot be placed in the output to the PLC?
Max.
 

Thread Starter

Big_Joe

Joined Feb 11, 2019
12
Sounds like a design issue there, not really sure of the (vague) details at this point however.
I still can't see why the LED cannot be placed in the output to the PLC?
Max.

Perhaps there is a problem in the assumptions, but it is not about that the LED should be lit ONLY when the input was violated (impulse) and it did not shine all the time after the output was turned on by the PLC.
 

LesJones

Joined Jan 8, 2017
4,174
When the transistor is off the LED will be reverse biased as the anode is at +5 volts and the cathode is being fed with +12 Volts via the PLC, the diode and the 200 ohm resistor. I don't know how much leakage there would be through the reverse biased LED. Increasing the value of the 200 ohm resistor and connecting the LED anode to +12 volts instead of + 5 volts would eliminate this potential problem.

Les.
 

MaxHeadRoom

Joined Jul 18, 2013
28,576
So going back to the original problem, it sounds as though you are getting random triggering of the PLC input?
You don't have details of exactly what the alarm panel is? Make? Manuf. info etc?
Max.
 

Thread Starter

Big_Joe

Joined Feb 11, 2019
12
So going back to the original problem, it sounds as though you are getting random triggering of the PLC input?
You don't have details of exactly what the alarm panel is? Make? Manuf. info etc?
Max.

The PLC is not guilty - if I unhook the ardurino system and connect the make contact button, everything works correctly.
 

Thread Starter

Big_Joe

Joined Feb 11, 2019
12
[QUOTE = "LesJones, post: 1355605, element: 406475"] Gdy tranzystor jest wyłączony, dioda LED będzie odwracana, ponieważ anoda ma +5 woltów, a katoda jest zasilana z +12 woltów przez PLC, dioda i rezystor 200 omów. Nie wiem, ile wycieku nastąpiłoby przez diodową LED. Zwiększenie wartości rezystora 200 omów i podłączenie anody LED do +12 woltów zamiast + 5 woltów wyeliminowałoby ten potencjalny problem.

Les. [/ QUOTE]
When the transistor is off the LED will be reverse biased as the anode is at +5 volts and the cathode is being fed with +12 Volts via the PLC, the diode and the 200 ohm resistor. I don't know how much leakage there would be through the reverse biased LED. Increasing the value of the 200 ohm resistor and connecting the LED anode to +12 volts instead of + 5 volts would eliminate this potential problem.

Les.


I think you're right - there is a problem with this layout with the led. The question is why it does not only happen sometimes.
 

LesJones

Joined Jan 8, 2017
4,174
I have never studied the mechanism of reverse breakdown in LEDs. I just know that they fail if the reverse breakdown is exceeded. You will just have to hope there are some semiconductor design specialists on the forum to answer that question. I think I remember a method of generating very short pulses using the reverse breakdown of the base emitter junction of transistors. You could also try Googeling "semiconductor reverse breakdown mechanism." I just take the simple approach of not exceeding device ratings. You could also try connecting a diode in series with the LED if it has to be connected to the 5 volt rail rather than the 12 volt rail. If my understanding of your post #7 that the LED stopped working then this would support my theory.

Les.
 

Thread Starter

Big_Joe

Joined Feb 11, 2019
12
Les. [/ QUOTE]
I have never studied the mechanism of reverse breakdown in LEDs. I just know that they fail if the reverse breakdown is exceeded. You will just have to hope there are some semiconductor design specialists on the forum to answer that question. I think I remember a method of generating very short pulses using the reverse breakdown of the base emitter junction of transistors. You could also try Googeling "semiconductor reverse breakdown mechanism." I just take the simple approach of not exceeding device ratings. You could also try connecting a diode in series with the LED if it has to be connected to the 5 volt rail rather than the 12 volt rail. If my understanding of your post #7 that the LED stopped working then this would support my theory.

Les.
The diode is working correctly all the time did not damage but I am trying to determine if exceeding the blocking voltage may cause unintentional triggering of the PLC input.
 

PhilTilson

Joined Nov 29, 2009
131
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?
 

Phil-S

Joined Dec 4, 2015
238
Why don't you provide the details of PLC manufacturer and the PLC model?
There will be specifications for inputs and outputs and voltage levels for reliable high and low logic detection, like the specifications for the Arduino digitals.
PLCs are normally used in industrial controls in factories etc. I hope that what you are doing is not some safety critical application.
Most of the PLCs I worked with were 24-V DC based, so starting with 12-V is going to make life difficult.
This is why it is so important to tell the people here the equipment you are working with
 
Top