All About Circuits Forum  

Go Back   All About Circuits Forum > Electronics Forums > The Projects Forum

Notices

The Projects Forum Working on an electronics project and would like some suggestions, help or critiques? If you would like to comment or assist others with their projects, this is the place to do it.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 09-25-2012, 02:42 AM
suzusky suzusky is offline
Junior Member
 
Join Date: Sep 2012
Posts: 25
Smile PNP or NPN for plc and motor driver?

Folks, I'm new here and I'm hoping to get some help from our community here.
Here I goes. I have a stepper motor driver for hobbyist from sparkfun (easydriver).
I also have a Keyence plc transistor output to send pulse to my driver.
Now the problem is that I have used npn for all my previous projects. It seems like the easydriver is not a npn device.

On the easydriver is 3 inputs, "step", "dir" and "gnd". Let's just focus on step and gnd.
For npn connection, rightfully plc output common is connected to negative 0v. +24v to step pin of easydriver. Gnd of easydriver connect to Plc pulse output. This to me is seems more like a pull signal by plc rather than feeding signal to easydriver to drive motor.

Should the flow be plc output common to +24v. 0v to Gnd of easydriver. Plc pulse output to step pin of easydriver. This circuit seems more right to me because signal is coming out from plc pulse output. Is this circuit correct and is this circuit called pnp?

Seriously, any help is really appreciated. Thanks!
Reply With Quote
  #2  
Old 09-25-2012, 03:27 AM
GetDeviceInfo's Avatar
GetDeviceInfo GetDeviceInfo is offline
Senior Member
 
Join Date: Jun 2009
Location: Canada
Posts: 1,501
Default

Quote:
Originally Posted by suzusky View Post
Folks, I'm new here and I'm hoping to get some help from our community here.
Here I goes. I have a stepper motor driver for hobbyist from sparkfun (easydriver).
I also have a Keyence plc transistor output to send pulse to my driver.
Now the problem is that I have used npn for all my previous projects. It seems like the easydriver is not a npn device.

On the easydriver is 3 inputs, "step", "dir" and "gnd". Let's just focus on step and gnd.
For npn connection, rightfully plc output common is connected to negative 0v. +24v to step pin of easydriver. Gnd of easydriver connect to Plc pulse output. This to me is seems more like a pull signal by plc rather than feeding signal to easydriver to drive motor.

Should the flow be plc output common to +24v. 0v to Gnd of easydriver. Plc pulse output to step pin of easydriver. This circuit seems more right to me because signal is coming out from plc pulse output. Is this circuit correct and is this circuit called pnp?

Seriously, any help is really appreciated. Thanks!
you tell us, as there are many I/O configurations. Check your specific model documentation.
__________________
I get all the news I need on the weather report
Reply With Quote
  #3  
Old 09-25-2012, 04:43 AM
suzusky suzusky is offline
Junior Member
 
Join Date: Sep 2012
Posts: 25
Default

From the model documents, i sees NPN and PNP connections as in the attached file. Does it means that it can be universal, meaning i can put it NPN or PNP whenever i want it to?
Attached Images
File Type: jpg PNP - NPN.jpg (116.1 KB, 45 views)
File Type: png EasyDriver_V44_Description.png (239.2 KB, 36 views)
Reply With Quote
  #4  
Old 09-25-2012, 05:01 AM
suzusky suzusky is offline
Junior Member
 
Join Date: Sep 2012
Posts: 25
Default

I tried to post physical wiring of my proposed method. I do not know if my wiring is considered PNP wiring so i hope someone can advise me.
Attached Images
File Type: jpg PLC to Driver.jpg (124.9 KB, 27 views)
Reply With Quote
  #5  
Old 09-25-2012, 05:25 AM
panic mode's Avatar
panic mode panic mode is offline
Senior Member
 
Join Date: Oct 2011
Location: Mississauga, Ontario
Posts: 1,091
Default

1. what is the plc model you have there
2. what is the output type, polarity and voltage of your plc outputs
3. you must use transistor output (not relay) to drive easydriver board.
4. easydriver is not isolated. how do you plan to power it?

easydriver expects positive signals that are in 0-5V range. most PLCs use 24V. if you send 24V to easydriver like you show, you will fry it and possibly even damage plc output.
if your plc has 24v pnp outputs, you need to add resistor between plc output and easydriver input. also you have to ensure that all such signals are clamped to 5V of the easy driver.
Reply With Quote
  #6  
Old 09-25-2012, 06:26 AM
suzusky suzusky is offline
Junior Member
 
Join Date: Sep 2012
Posts: 25
Default

Quote:
Originally Posted by panic mode View Post
1. what is the plc model you have there
2. what is the output type, polarity and voltage of your plc outputs
3. you must use transistor output (not relay) to drive easydriver board.
4. easydriver is not isolated. how do you plan to power it?

easydriver expects positive signals that are in 0-5V range. most PLCs use 24V. if you send 24V to easydriver like you show, you will fry it and possibly even damage plc output.
if your plc has 24v pnp outputs, you need to add resistor between plc output and easydriver input. also you have to ensure that all such signals are clamped to 5V of the easy driver.
Hi Panic mode,

1. what is the plc model you have there Keyence PLC
2. what is the output type, polarity and voltage of your plc outputs I have a transistor type ouput and will supply 24VDC to PLC (the above pic "PNP and NPN" is the plc specs and it says that "a 1.6kΩ is connected to the plc output to connect a driver") I guess it should be safe to connect to easydriver "Step" input.
3. you must use transistor output (not relay) to drive easydriver board.
4. easydriver is not isolated. how do you plan to power it?
I plan to use a separate power supply to the easydriver for driving my stepper motor and also control the pulse into easydriver using a plc.

easydriver expects positive signals that are in 0-5V range. most PLCs use 24V. if you send 24V to easydriver like you show, you will fry it and possibly even damage plc output. As above, if a 1.6kΩ is in series with the plc output, i hope i am safe here.
if your plc has 24v pnp outputs, you need to add resistor between plc output and easydriver input. also you have to ensure that all such signals are clamped to 5V of the easy driver. Since you mention that plc output is to be connected to the easydriver "Step" input, then could you advise me if the above pics "Plc to driver" is correct? There is no way i can connect NPN because the plc output will be connected to "gnd" of easydriver which i feel is wrong. And is that pics wiring call PNP?
Reply With Quote
  #7  
Old 09-25-2012, 01:12 PM
ScottWang ScottWang is online now
Senior Member
 
Join Date: Aug 2012
Location: Taiwan,Asia (GMT +8)
Posts: 1,541
Blog Entries: 7
Default

1. First you have to disconnect the Easydriver from PLC.

2. According to C3 and 500 of PLC, you can test the polar of Zener, then you can identify is that a NPN output type or PNP output type, after that you can do the rest test .

3. To test what kind of output type of your PLC? (to choose one of LED)
a) If you wired as NPN output to test, and the LED is lighting, then the type is NPN type, otherwise is PNP type.


b) If you wired as PNP output to test, and the LED is lighting, then the type is PNP type, otherwise is NPN type.


4) NPN output type, We called it "current sink type", it means that the current is come from the next device, C3 should connect to GND.


5) PNP output type, we called it "current output type", it means that the current is output to the next device, C3 should connect to +24V


All value may need to adjust, if it isn't work very well.
Attached Images
File Type: png PLCoutput_NPNtest.png (20.5 KB, 165 views)
File Type: png PLCoutput_PNPtest.png (19.7 KB, 155 views)
File Type: png PLC_NPNoutput_toEasyDriver.png (36.9 KB, 161 views)
File Type: png PLC_PNPoutput_toEasyDriver.png (38.5 KB, 159 views)
Reply With Quote
  #8  
Old 09-25-2012, 01:40 PM
panic mode's Avatar
panic mode panic mode is offline
Senior Member
 
Join Date: Oct 2011
Location: Mississauga, Ontario
Posts: 1,091
Default

NO, you need to CLAMP signal to 5V or you WILL damage easydriver IC.
above circuit idea could or would work for current sensitive device such as LED or optocoupler but NOT for voltage sensitive high impedance input. input current here is in micro amps and those resistors will not do anything without additional components.

read the datasheet:
http://www.sparkfun.com/datasheets/Robotics/A3967.pdf

this is how you do it, either option will work.
btw. "keyence plc" tells brand but not model. i asked for model. with model info, one can download and read correct datasheet. saying "allenbradley plc" is the same thing, does not even tell the family, not to mention output details like type, polarity and ratings. asking for help only makes sense when all info is provided such as exact part number and or link to datasheet.
Attached Images
File Type: jpg 24V to 5V.jpg (114.1 KB, 14 views)

Last edited by panic mode; 09-25-2012 at 01:54 PM.
Reply With Quote
  #9  
Old 09-25-2012, 05:35 PM
ScottWang ScottWang is online now
Senior Member
 
Join Date: Aug 2012
Location: Taiwan,Asia (GMT +8)
Posts: 1,541
Blog Entries: 7
Default

I forgot to add the Zener 5.1V, but "panic mode" mentioned that, so I decided to add it to the circuit.





Although we will add the zener to protect the IC from input, but if didn't add zener will it still work normally or will damage, because I also added the zener on the normal circuit, but never try if didn't add zener, will it really damage, I want to know the situation, so I did the lab as following:

I used a 5~24V through 1.5K to test 74HC00, and stay at 24V, the 74HC00 didn't damage.
24V → 1.5K → I_meter(11.5mA) → input 74HC00

I tested it after two hours, and I didn't feel any temperature, no warm, no heat, IC still working fine, but the Vcc had a little high(measured : 6.75V, calculating V = 24V - (11.5mA x 1.5K) = 24V - 17.25V = 6.75V, so measured value and calculation value are the same.

74HC00 datasheet, page 4, Vcc : 2~6V.
http://www.datasheetcatalog.org/data...CT00_CNV_2.pdf
Attached Images
File Type: png PLC_NPNoutput_toEasyDriver.png (37.0 KB, 177 views)
File Type: png PLC_PNPoutput_toEasyDriver.png (38.6 KB, 175 views)
Reply With Quote
  #10  
Old 09-25-2012, 08:13 PM
suzusky suzusky is offline
Junior Member
 
Join Date: Sep 2012
Posts: 25
Default

Thank you panic mode and Scott,

Pardon me pls. Because you asked for output type, polarity and voltage of plc output.
So I answered accordingly except for polarity. I tried to give whatever answer I know from your question because other than that I don't know what info to provide as I'm really new here. But then I never thought of putting a link to a datasheet. That's my bad. Sorry about that but I learned. The model of Keyence plc is kv-40dt (transistor type).

Datasheet:
http://www.hoskin.qc.ca/uploadpdf/In...4e717f216d.pdf

Initially I found two types of output circuit, NPN and PNP. So I was confused which circuit do I have. I think I need to find out which circuit do I have from the test provided by Scott.
Like what Scott stated, if my output circuit is NPN, then I'll have to flip the signal shown in the NPN circuit. If PNP, then I can connect according to either circuit from both of you.

is the signal diode shown by panic mode connected to 5v of easydriver like what you mentioned that ensure all such signal must be clamp to 5v of easydriver? Pardon me again, the 5v from easydriver shows output, and the signal diode shows direction towards the 5v.
Reply With Quote
Reply   Post New Thread

Tags
, , , ,


Related Site Pages
Section Title
Worksheet Microcontroller principles
Worksheet Conventional transistor overview and special transistors
Worksheet Class B BJT amplifiers
Worksheet Bipolar junction transistors as switches
Worksheet Step-up, step-down, and isolation transformers
Textbook The Silicon-Controlled Rectifier (SCR) : Thyristors
Textbook The common-base amplifier : Bipolar Junction Transistors
Textbook The common-collector amplifier : Bipolar Junction Transistors
Textbook The common-emitter amplifier : Bipolar Junction Transistors
Textbook Programmable logic controllers : Ladder Logic


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:54 AM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin
Copyright ©2000 - 2014, vBulletin Solutions, Inc.