PNP or NPN for plc and motor driver?

panic mode

Joined Oct 10, 2011
2,715
not exactly, that just means you need to read related documentation.

PLC inputs terminals are same regardless if they are configured to 24 or 5V.


your PLC works with 24V. Your EasyDriver can work from 8-30V.
This means it can also work from 24V (which is same as your PLC).

http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Robotics/EasyDriver_v44.pdf

On board EasyDriver there is a 5V voltage regulator. You don't need to provide additional 5V source as EasyDriver can and does derive this 5V from 24V for example. You can (but you don't have to) use this 5V to power other devices (if you had anything else running on 5V). If you want, you can use this 5V to drive inputs 000-007 of your PLC.
 

Thread Starter

suzusky

Joined Sep 24, 2012
25
You can (but you don't have to) use this 5V to power other devices (if you had anything else running on 5V). If you want, you can use this 5V to drive inputs 000-007 of your PLC.
Thanks but i don't really know how to use this 5V on the plc inputs 000-007. Would you help advise me? The problem with me is that all the inputs terminal share the same common "C1". So since the input common is tapped with +24V, so where should the +5v go to now?
 

Attachments

ScottWang

Joined Aug 23, 2012
7,397
>only inputs 000-007 can be switched to operate in 5V range

I think the voltage changing is to affect the output current of photocoupler, there are no relatonship with the terminal.

I'm not sure how to change the voltage from 24V to 5V, maybe use dip swicth or software, I have no datasheet about the PLC.

Here is the photocoupler and PLC terminal connection.

 

Attachments

Thread Starter

suzusky

Joined Sep 24, 2012
25
I'm not sure how to change the voltage from 24V to 5V, maybe use dip swicth or software, I have no datasheet about the PLC.
Hi Scott,

Thank you. I understand that only inputs 000-007 can be changed to 5V and i also know where the dip switch to select 24V and 5V (Slide 1).
My problem is i don't know how to do the connection. Can you see if i am doing correctly?

If the dip switch is set 5V, so i will connect inputs 000-007 to the same way as 008-015? The only difference is that 000-007 will become 5V and 008-015 will always be 24V? (Slide 2)
 

Attachments

panic mode

Joined Oct 10, 2011
2,715
i don't think you confirmed full part number of your PLC so it is still
unclear if you have PNP or NPN version.

for PNP connections you would do something like this:
 

Attachments

Thread Starter

suzusky

Joined Sep 24, 2012
25
i don't think you confirmed full part number of your PLC so it is still
unclear if you have PNP or NPN version.

for PNP connections you would do something like this:
Hi panic mode, thanks for diagram, that was very clear but On my post #10, I mentioned the part number which is kv-40dt. Thus it is a NPN version.since it is NPN, does the common connect to 24v. The diagram you shown will be totally different right?

Then on post #25, I believed I do not need to connect from external 5v source because there is already resistors inside to drop down the voltage to 5v if I were to select 5v on the plc dip switch. Am I right to say that? Please correct me if I'm wrong.
 

panic mode

Joined Oct 10, 2011
2,715
Hi panic mode, thanks for diagram, that was very clear but On my post #10, I mentioned the part number which is kv-40dt.
yes you did. and in post 13 i explained that there is good chance of more than one label and that full part number is usually not printed on front of the unit. but if that is full part number your unit is NPN, we can move on...


your last diagram is incorrect. if you connect things like that, you must switch inputs 000-007 to use 24V because voltage across input and common is 24V.
 

Thread Starter

suzusky

Joined Sep 24, 2012
25
Yes, I'm glad that you explained about the purpose of part number which says that kv-40dt is NPN whereas kv-40dtp is PNP. So I can confirmed mine is NPN.

So for the connection, how should we actually connect the wiring for NPN inputs as well as to use the 5v input voltage?

Really appreciate the help..
 

panic mode

Joined Oct 10, 2011
2,715
the datasheet shows only one common terminal and that is disadvantage that complicates things.

from what i can see, input optocouplers have two diodes so inputs should work in either PNP or NPN configuration which is quite common for small PLCs (but the outputs will be only NPN).

to get 5V to group of inputs 000-007 you should to wire them like this:
 

Attachments

Last edited:

Thread Starter

suzusky

Joined Sep 24, 2012
25
to get 5V to group of inputs 000-007 you should to wire them like this:
I notice on your diagram, you put a 5V symbol.
From my understanding, am i right to say that i do not need to connect any 5V supply, In order to have 5V input voltage, I will still connect 24V to one end of switch for input 000-007 and plc will drop the voltage down to 5v automatically only when dip switch is set to 5v. is that correct?
 

Attachments

panic mode

Joined Oct 10, 2011
2,715
no, this is PLC, not voltage regulator. inputs are to be treated as loads. when load is specified to operate at 5V, you better make sure input voltage is really 5V and not more.


24V is almost five times greater. when voltage is increased 5 times, current will increase 5 times too. power is product of voltage and current:

P=V*I

This means that power dissipated by PLC input would be 5*5=25 times greater than normal. that is 2500% of what is listed in datasheet. this is simply way too much.
 

Thread Starter

suzusky

Joined Sep 24, 2012
25
Oh, I'm very sorry. Please bear with me for a while. My electronic is really bad. Yes I understand that 24v is definitely too high and it may burned everything out if I'm not careful. But the dip switch allows us to do the selection of 24v and 5v. So I thought that by switching the dip to 5v, the 24v wire will still connect to one end of switch, when switch closed, it goes thru a series resistor of 4.7k ohms. Does the resistor drop the voltage down to 5v or is it used to limit current? What was the purpose of that resistor?
 

panic mode

Joined Oct 10, 2011
2,715
Please bear with me for a while.
i will try but forgive me if i loose patience or interest as this is barely moving forward. for some strange reason you keep on trying to bring 24V power source to circuit configured to operate with 5V. i fail to see reason to this, in my mind it should be obvious that this is a bad idea.

also you don't seem to understand concept of closed circuit. i'd suggest to learn basics of DC circuit analysis, like open and closed circuit, voltage divider and biasing LED before moving any further but it is your call.

resistor is used to limit current and provide proper bias for whatever type of opto-coupler was used. those two are not the only components in the circuit but we don't know much more as the diagram is just simplification and includes "black box" blocks.
therefore we don't mess with it. just wire it according to datasheet and be done with it. switch is there to configure PLC inputs so that they can work optimally with signal levels of various devices: including 5V and 24V because those are the most common ones.

if the inputs are industrial sensors or switches such as inductive proxy sensors, photoeyes, buttons etc, use 24V.

if the signals are coming from low voltage circuitry where signal levels match TTL levels for example, use 5V. many encoders or position outputs from industrial servo drives are TTL levels and this is what really this setting of 5V is for.

btw. circuit in post 35 is not ok because:
1. you use 24V as input voltage while text and image show switch in 5V position. this is wrong. revise your thinking/interpretation of function of that switch.
2. remaining inputs will simply not work because the circuit is not closed. the 24V that goes to switches wired to inputs 008, 009 etc is not connected to common terminal on the PLC (C1). in other words circuit is open regardless of state of the switches wired to those inputs. from PLC perspective, they are all off.
 

Thread Starter

suzusky

Joined Sep 24, 2012
25
i will try but forgive me if i loose patience or interest as this is barely moving forward. for some strange reason you keep on trying to bring 24V power source to circuit configured to operate with 5V. i fail to see reason to this, in my mind it should be obvious that this is a bad idea.
I'm sorry for making you unhealthy due to my strange understanding. But let's stay cool buddy, please do forgive me as I am only at rookie level trying to understand as much as i can from guys like you who are the experts in plc or perhaps electronics. I'm glad that you have been great in sharing the knowledge to we people here.

I do have a basis on why i have been asking such simple questions to you. On the input circuit for "008 or later", internally there are two resistors. One of them is 4.3K. So my thinking is that this resistor not only limit current but also drop down voltage so that the photocoupler can have approx 3V across it. Taking working current to be 5mA. According to ohm's law, the resistor value should be (24-3)/0.005=4.2K. From the diagram, i can now understand how they derive to 4.3K. Then for the next resistor which is supposed to consume 3V, the resistor value is calculated to be 3/0.005=600 ohms - diagram shows 510 ohms which is quite close to my calculated value. In this case for input 008 or later, i have no problem understanding as it always uses 24V regardless of dip switch.

Next for input "000-007", The first internal resistor is 4.3K and voltage across here is 24-3=21V. As the voltage here is selectable between 24V and 5V, so when dip switch is set to 24V, immediately i know that the box in the diagram that says "24V/5V selector circuit" is a second resistor of 510 ohms (exactly the same to input 008 or later) so that i can have approx 3V across the photocoupler (24V-21V). Then next comes the problem.

When the dip switch is set to 5V, Assuming I have hook on an external 5V supply, Since the first resistor is still 4.3K, so i reckon that the voltage across the first resistor to be (5-3=2V) and current is 2/4300=0.4mA. The remaining 3V is for the second resistor across the photocoupler and is calculated to be 3V/0.0004=7.5K. Therefore by switching dip switch to 24V, the box in the internal diagram contains a resistor of 510 ohms and by switching dip switch to 5V, the box in the internal diagram contains a resistor of 7.5K.

So could you advise if i'm getting this right so far or could the box in the diagram is something that i can't derive at all?

also you don't seem to understand concept of closed circuit. i'd suggest to learn basics of DC circuit analysis, like open and closed circuit, voltage divider and biasing LED before moving any further but it is your call.
I do understand the basic of closed loop circuit but perhaps its because i doesn't know how to phrase or draw my questions in a way understandable to you.

btw. circuit in post 35 is not ok because:
1. you use 24V as input voltage while text and image show switch in 5V position. this is wrong. revise your thinking/interpretation of function of that switch.
2. remaining inputs will simply not work because the circuit is not closed. the 24V that goes to switches wired to inputs 008, 009 etc is not connected to common terminal on the PLC (C1). in other words circuit is open regardless of state of the switches wired to those inputs. from PLC perspective, they are all off.
Yes, i understand that i can only use 24V input voltage only when I set to 24V on the dip switch,
Basically i will be using the same 24V and GND source for all the inputs/outputs so there will be no issue on open circuit. Yes, i gotta work on my graphical.
 

Attachments

panic mode

Joined Oct 10, 2011
2,715
you are still overthinking it... and i can't help but wonder why are you so obsessed with it?

anyone else would be eager to connect it, fire it up and make it do something. but you seem to be fascinated with theorizing or drawing conclusion on something that is purposely omitted from manual. circuit shown in manual is an illustration only. it could (but does not need to) resemble what real circuit is as long as it conveys message "you can think of it as IF it was something like this". nothing more and nothing less.

if you are really interested what they use, open your PLC and check it out.
 
Top