Previous in Forum: Voltage Inputs to Comass   Next in Forum: Control Valve
Close
Close
Close
36 comments
Rate Comments: Nested
Member

Join Date: Sep 2010
Posts: 7

Providing TTL Signal from NPN Output

09/26/2010 8:33 AM

I have a Banner Q60LAF laser adjustable field sensor that I am using to detect the presence of a part on a conveyor for a R&D project I am working on. The sensor is intended to send a TTL signal to a timing generator to initiate a remote measurement using some NDE equipment I am testing. Before I bought the sensor, I knew that the majority of these sensor types are intended to interface with PLC via NPN or PNP outputs. So, I searched around to determine how to use an NPN or PNP output to generate a TTL pulse. Not being an electrical engineer, I am merely "dangerous" with my limited knowledge of electronics, but I thought this was going to be relatively easy. I actually found a post here on CR4 that looked promising. But, based on the voltages I am measuring on the bench, I'm not sure my sensor actually functions as that example does. Here is an image of the wiring diagram for my sensor:

I expected to use the black wire from my sensor in much the same way as this:

In the second image, I expect that when the sensor is conducting, the black wire is simply brought low (to ground) by the open collector, basically completing the circuit. However, in my sensor in the first image, I actually get roughly the supply voltage (+24VDC in the case of my current power supply) on the black wire. So, I don't think this will work as I expect.

Please tell me I'm not crazy and that I do understand this relatively correctly and that my sensor is not like the one pictured in the second image. The second image doesn't represent a circuit that gets the supply voltage on the black output wire, right?

Then, the follow-up: How do I use my sensor to create a +5V TTL pulse?

Thanks in advance for helping an electronics newbie.

Jeff

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Guru

Join Date: Oct 2008
Location: Deepest Darkest Rutherford Oz
Posts: 951
Good Answers: 145
#1

Re: Providing TTL Signal from NPN Output

09/26/2010 9:02 PM

You could use an opto coupler like a 4N25, use an appropriate dropping resistor 1.2k to feed the led in the optocoupler and use the pull up resistor to the 5 volt TTL supply on the collector of the opto transistor tie the emitter to ground. Now you have your 24V to 5V TTL signal interface.

You could build it on a piece of veroboard.

I can't do a drawing as I'm not at my "work" computer sorry but if you google the data sheet for a 4N25 you'll get the idea.

Just so you know most Electrical Engineers are just as dangerous with electronics, even some Electronics Engineers leave a lot to be desired and are barred from wielding soldering irons.

__________________
There are two reasons for a man to do a thing, One that sounds good, and the real one...
Register to Reply Score 1 for Good Answer
Member

Join Date: Sep 2010
Posts: 7
#2
In reply to #1

Re: Providing TTL Signal from NPN Output

09/26/2010 9:31 PM

That's a good idea. I'll give it a shot.

Am I correct that the sensor described in the first image can't be wired up as the circuit in the second image to generate the TTL pulse?

Register to Reply
Anonymous Poster
#3
In reply to #2

Re: Providing TTL Signal from NPN Output

09/26/2010 11:44 PM

It is possible, but you are probably better off with the optoisolator suggested.

This is particularly true if there is going to be any physical seperation between the sensor and the reader device as the optoisolator allows for independent ground systems (no pesky ground loops).

Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act United Kingdom - Member - New Member United States - Member - New Member Canada - Member - New Member

Join Date: Aug 2006
Location: AM-51, Deen Dayal Nagar, Gwalior, Madhya Pradesh, MP 474001, India
Posts: 3418
Good Answers: 32
#4
In reply to #3

Re: Providing TTL Signal from NPN Output

09/27/2010 1:00 AM

I agree. Optical isolation is a good idea. Care to be taken in wiring an optical isolator with power source having large change in power supply voltage from 10V to 30V range.

Critical part in Opto-isolator is LED and its current can be planned to 10mA typical at mid level of power supply voltage dynamic range and 5mA to 15mA range variation using 1K to 2K Ohms variable resistance.

Opto-isolator need to work properly in this range and its critical damage current level need to be >50mA. Usually engineers damage the LED of the opto-isolator by passing large current.

Methods to protect LED can also be applied such as placing a diode in parallel to prevent excessive voltage across LED. Generally LED requires larger forward voltage than diode so one can use two diode in series to match LED forward voltage. Excessive current will flow through diode/s and LED will remain safe.

__________________
Prof. (Dr.) Shyam, Managing Director for Sensors Technology Private Limited. Gwalior, MP474001, India.
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#5

Re: Providing TTL Signal from NPN Output

09/27/2010 3:14 AM

The black wire is the PNP output. You should connect brown to supply+ and blue to GND, and use the white (NPN) output with the 10K pullup to the TTL supply. Make sure the TTL 0V is connected to the photosensor GND.

While I agree that an optoisolator is a good idea, particularly in noisy environments and/or with long cable runs, and it is more-or-less essential if the sensor supplies cannot share a ground connection with the TTL system, the simple pull-up arrangement should work fine (provided you use the right output! ).

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act United Kingdom - Member - New Member United States - Member - New Member Canada - Member - New Member

Join Date: Aug 2006
Location: AM-51, Deen Dayal Nagar, Gwalior, Madhya Pradesh, MP 474001, India
Posts: 3418
Good Answers: 32
#6
In reply to #5

Re: Providing TTL Signal from NPN Output

09/27/2010 3:48 AM

Use this scheme for converting to safe TTL level. It is essential that TTL Ground and Power Ground is same.

__________________
Prof. (Dr.) Shyam, Managing Director for Sensors Technology Private Limited. Gwalior, MP474001, India.
Register to Reply
Member

Join Date: Sep 2010
Posts: 7
#8
In reply to #6

Re: Providing TTL Signal from NPN Output

09/27/2010 7:29 AM

Dr. Shyam, thanks for the great information. I believe I understand the need to maintain safe current for the LED in the optoisolator, and the good thing is that I will have control over the supply voltage and can provide the correct resistance.

In your image, which color wire from my sensor is at 10-30V and going through the 1K 1W resistor?

Also, what I don't understand from all the images on this page (from the perspective of understanding how current will flow through the circuit), is the portion labeled "TTL output". The timing generator I am using for this project is simply waiting to see a sweep up to 5V (or down to 0V). It doesn't generate any voltage (as far as I know). The voltage is provided by the external circuit. Perhaps that is the problem I am having with the circuits suggested. They all provide 10-30V, correct?

I think the opto-isolator is the way to go in this case, then. I just want to be sure I am understanding the science here for my own education. Any information on that would be much appreciated. Everyone has already been very helpful.

Thanks again,

Jeff

Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act United Kingdom - Member - New Member United States - Member - New Member Canada - Member - New Member

Join Date: Aug 2006
Location: AM-51, Deen Dayal Nagar, Gwalior, Madhya Pradesh, MP 474001, India
Posts: 3418
Good Answers: 32
#11
In reply to #8

Re: Providing TTL Signal from NPN Output

09/27/2010 8:18 AM

Resistance is connected between WHITE (Output)- and BROWN (Power 10V to 30V). Zener is connected between WHITE (Output) and BLUE (Ground). WHITE still remains output but its level changes to TTL level automatically. TTL will use Blue wire Ground as reference point.

Only two components are added. One resistance 1K ohms 1W and one Zener diode 3.3V 1W. Zener diode has a ring which is Cathode (K) to be connected to output WHITE wire. Zener Anode is to be connected to BLUE wire or Ground or Negative of power supply.

Transistor is inside and not outside so you do not have to wire transistor.Typically power supply is +24V DC and +10V to +30V are margins given to it.

Any more questions?

__________________
Prof. (Dr.) Shyam, Managing Director for Sensors Technology Private Limited. Gwalior, MP474001, India.
Register to Reply
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#19
In reply to #6

Re: Providing TTL Signal from NPN Output

10/09/2010 11:43 AM

Why not use a 5 volt Zener?

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act United Kingdom - Member - New Member United States - Member - New Member Canada - Member - New Member

Join Date: Aug 2006
Location: AM-51, Deen Dayal Nagar, Gwalior, Madhya Pradesh, MP 474001, India
Posts: 3418
Good Answers: 32
#20
In reply to #19

Re: Providing TTL Signal from NPN Output

10/09/2010 12:40 PM

You can use 5V Zener for CMOS compatibility. TTL compatibility avoids high voltages. 3.3V zener permits both 5V and 3.3V TTL compatibility. If you use 5V Zener and logic is 3.3V then it will act as 5V power source through input protection diode and may damage it if 3.3V power has large capacitor. In some cases 5V may be OK but current need to be limited to <1mA from high side coming from power source 10V to 30V.

Design need to be foolproof.

__________________
Prof. (Dr.) Shyam, Managing Director for Sensors Technology Private Limited. Gwalior, MP474001, India.
Register to Reply
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#21
In reply to #20

Re: Providing TTL Signal from NPN Output

10/09/2010 1:52 PM

If you look here:-

http://en.wikipedia.org/wiki/Transistor-transistor_logic

You will notice a single sentence which I also believe to be completely true......:-

"All standardized common TTL circuits operate with a 5-volt power supply."

I do realize that you can trigger TTL with a 0-3.3 volt level, but for reliabitiy and signal strength, its far better to use the 5 volt levels.....

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#22
In reply to #21

Re: Providing TTL Signal from NPN Output

10/09/2010 6:05 PM

Two of the problems with using a "5V Zener" here are 1) finding one, and 2) the maximum voltage that the TTL input will see.

Selecting a 5V zener from RS Components, for example, comes up with only one exact match - the Philips PLVA650A. Farnell have no exact matches.

Checking out the datasheet for the PLVA650A shows that it's a teeny SOT23 surface mount device, rated at 250mW ( with a 1k resistor and 30V supply, its smokey soul would leave its poor little body). Also, checking the range of Zener voltages from the datasheet, this "5V" zener has a spread of 4.8 to 5.2 volts.

As TTL spec. requires VIH ≥ 2V, a 3.3V Zener would be quite appropriate.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#24
In reply to #22

Re: Providing TTL Signal from NPN Output

10/10/2010 9:12 AM

In Germany I was able to quickly find both 4.7v and 5.1v Zeners at 500mW and even 5.1 volts at 1.3 watts from Conrad Electronic.

At €0.21 each, even cheaper by the dozen....about 25 US Cents or so....

I am very surprised that in the UK it appears that you are so restricted for choice..... surely not completely true....?

But changing the 1K resistor shown for one around/close to 3 KOhms would allow the Zener you found to work well within its power limits for between 10 and 30 volts of supply.....

Let us not forget that a standard TTL input (which I believe is what he needs to drive/compatability) only needs apromimately 1.2ma (or less) to switch, which will easily be achieved even with a 3K resistor at only 10 volts, which will still allow up to around 3ma drive current to be available if needed....of course at 30 volts supply it would allow even more drive current to be available, but still within the 250mW limit of the zener.

Fine tuning of the resistor value would allow even more current to be available if needed, still without overloading the 250mW limit of the Zener you found....(the 1 watt resistor version recommended is higher than technically needed if a higher resistance value is eventually selected, but no real matter either way......)

Later/better TTL versions switch reliably with even less current if I remember correctly.....though I was far too lazy today to look that up!! as I haven't used TTL much for many, many years.....CMOS is easier to use in many areas and generally faster!

In my business life, I always made sure that when interfacing (and other similar work), I always used the full "correct" values of voltage/current etc., it kept me out of "hot" places more often than I can remember. Especially when other companies used "Quick and Dirty" methods....

Even today, I am able to still help friends who get electronic problems, particularly when interfacing DIY built CNC Router machines to PC Printer Parallel Ports.

These Parallel Ports are only guaranteed to be TTL compatible with regard to current sinking and sourcing....though of course today the port is usually built into larger chips that control many more PC functions, not in individual TTL chips.....

Maybe I am being too "exact" for many people, but it does really help, when as a professional, you find when things stop working (or don't start!!), I hope you will allow me some "leeway" in this area......thanks in advance.

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act United Kingdom - Member - New Member United States - Member - New Member Canada - Member - New Member

Join Date: Aug 2006
Location: AM-51, Deen Dayal Nagar, Gwalior, Madhya Pradesh, MP 474001, India
Posts: 3418
Good Answers: 32
#25
In reply to #24

Re: Providing TTL Signal from NPN Output

10/10/2010 10:52 AM

Hello Andy Germany,

I think your observation is precise. I usually purchase these zener diodes of 1W in volume of 1000 so they last long.

Point here is whether one should make his own circuit or use one from expert design. I will say, use expert design. Many people who are highly experienced one can use their own design as they are expert in any way.

The very question that this forum initiator can not use PLC and has to use high precision delay timer makes this discussion very diverse now.

As I design trigger pulse for timer and count on each ns delay, skew and distortion, these simple design will go nowhere near to what he may require.

Unless an expert help is taken or lots of time spend in understanding the fast signal, one is not expected to get any worthwhile results.

I have just now completed a timer design to trigger ion gate pulse with 50ns rise time and fall time and programmable pulse width and repeat rate. This one has been developed a for a research lab. It will be used for IMS, Electron Gun and Ion Beam, TOF experiments, a lot of them.

I have also developed +/-1kV fast high voltage switch that goes along with above timer.

These now will be produced in bulk for use in research. I am happy that this all is ready now. Other can use these in just few minutes while I spent near 10 months on this design now. 10/10/2010 is a good date that it is completed now.

I am sure willing to help who are in such a high demanding technology need, but discussing in forum such a simple thing like PLC to TTL converter sure will not help much.

In last 40 years I designed almost 4-5 new designs each year and now you can see how valuable these years were. I will be 60 year in January 1, 2011. I still work in same way other than that I own an industry and have greater money to use for developments. From my experience I can say that young engineers need to play around with technology fearlessly and then they will be able to master it a lot easily.

I wish good luck to all those making one positive step. They are progressing for sure.

__________________
Prof. (Dr.) Shyam, Managing Director for Sensors Technology Private Limited. Gwalior, MP474001, India.
Register to Reply Score 1 for Good Answer
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#26
In reply to #25

Re: Providing TTL Signal from NPN Output

10/10/2010 2:23 PM

GA.

Nicely put, thanks.

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#27
In reply to #24

Re: Providing TTL Signal from NPN Output

10/10/2010 4:00 PM

Andy, surely it's pretty obvious that I was being "picky" about the Zener - I even underlined the word "exactly" (referring to the 5V spec). How many 5V Zeners did you find? If you don't think the UK can yield the same range of component values as any other country in Europe (or anywhere else in the world), you'd better think again.

To someone unaccustomed to electronics design, a 4V7 or 5V1 Zener is not the same as a 5V Zener (indeed they are not the same, but the difference is usually negligible, given the spread of production values). Also, to use an SMT packaged component in what is almost certainly a one-off is not good advice.

I still hold that a 3V3 Zener is a better compromise for this application.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#28
In reply to #27

Re: Providing TTL Signal from NPN Output

10/10/2010 5:10 PM

John,if you re-read your post that I was replying to, YOU gave the impression that it was difficult to find Zeners in the UK of 5 volts, saying a 3.3 volt zener will do the job like one of 5 volts is just not true for all occasions.....

For example, a 5 volt clock signal, that must be repeated as exactly as possible, but has flanks that are not truly vertical, will have the timing relationship slightly changed by the 3.3v version to say the 4.7v version....(not that this is the right way to follow a clock signal, its just an example!)

You wrote:-

Selecting a 5V zener from RS Components, for example, comes up with only one exact match - the Phillips PLVA650A. Farnell have no exact matches.

Two leading suppliers and only one component!!! Leads one to think supply is not easy or what??

I was simply stupid enough to believe you knew what you were talking about!!!

I don't live there anymore, so how would I know, I was just surprised thats all....

You obviously didn't know what you were talking about, if what you now say is true. Now you have changed your tune again.

I wrote:-

I am very surprised that in the UK it appears that you are so restricted for choice..... surely not completely true....?

Have I caught you at the wrong time of the month or what????

Please try and follow your own logic.

Sorry, I do not agree that a 3.3v zener is good enough for Quality work, it will do for MOST work, that I agree with.

The 4.7 and the 5.1 volt versions I found with no trouble at all are much better......

It just depends on how exact you want to be or need to be.........as Shyam (?) himself said, the method he offered is not very accurate, he is completely correct, which is why I gave him a GA.

At least he appears to know what he is talking about.....and I fully agreed with his comments in that area....

You appear to be vacillitating.......and not obviously "Picky" if that was intended to be funny or something......

Remember I live in Germany, we have all lost our sense of humour here!!

(Joke by the way!! I have been teaching them when to laugh for many years now!!)

Stay well John, mostly I really value your posts and comments very highly.....just not today it would seem......

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act United Kingdom - Member - New Member United States - Member - New Member Canada - Member - New Member

Join Date: Aug 2006
Location: AM-51, Deen Dayal Nagar, Gwalior, Madhya Pradesh, MP 474001, India
Posts: 3418
Good Answers: 32
#29
In reply to #28

Re: Providing TTL Signal from NPN Output

10/10/2010 11:02 PM

Dear Andy,

There are new ways now that high speed electronics designers apply. Fast ESD protection devices can clip voltage above desired voltages much quickly and can absorb large amount of current through the device. Look for ESD protection devices from Vishay and other manufacturers and watch out for maximum clipping voltage.

Devices act like Schottky ZENERs.

__________________
Prof. (Dr.) Shyam, Managing Director for Sensors Technology Private Limited. Gwalior, MP474001, India.
Register to Reply
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#30
In reply to #29

Re: Providing TTL Signal from NPN Output

10/11/2010 6:46 AM

Very true.

I too also try to use modern devices when designing/changing/improving/repairing something.

It gets quite involved keeping up with some specialized new devices I find....or catching up when needed!!

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act United Kingdom - Member - New Member United States - Member - New Member Canada - Member - New Member

Join Date: Aug 2006
Location: AM-51, Deen Dayal Nagar, Gwalior, Madhya Pradesh, MP 474001, India
Posts: 3418
Good Answers: 32
#32
In reply to #30

Re: Providing TTL Signal from NPN Output

10/11/2010 9:27 AM

Considering that this typical application is universal to Engineers all over the world, I have made a new much superior design and it will soon appear in Electronics Design Magazine. It will be free to use by all engineers. I can not disclose elsewhere until they publish, so wait till they decide to take to print media.

I did publish one design for PNP/PNP converter before and now a lot better design for NPN to TTL/CMOS converter has been sent for publication.

__________________
Prof. (Dr.) Shyam, Managing Director for Sensors Technology Private Limited. Gwalior, MP474001, India.
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#31
In reply to #28

Re: Providing TTL Signal from NPN Output

10/11/2010 9:03 AM

"Have I caught you at the wrong time of the month or what????"

DON'T BE SUCH AN OBNOXIOUS BASTARD.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply Off Topic (Score 10)
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#33
In reply to #31

Re: Providing TTL Signal from NPN Output

10/11/2010 11:05 AM

Don't be so picky on others, you have no right to do that.

I was not rude till you lost it!!!

.....and read and understand what you write and how it can be easily (mis-) interpreted by others.....

Anyone who jerks around like that HAS to have some real problems......

Have a great day anyway. Hope to see you again when you have cooled down......

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply Off Topic (Score 10)
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#34
In reply to #33

Re: Providing TTL Signal from NPN Output

10/11/2010 11:19 AM

Lost what?

True, I gave the impression that it is difficult to find Zeners in the UK of 5 volts - BECAUSE IT IS DIFFICULT TO FIND ONE ANYWHERE. 4.7 is not equal to 5, just as 5.1 is not equal to 5.

"...saying a 3.3 volt zener will do the job like one of 5 volts is just not true for all occasions..."

I did not say that - it is you who are not reading or understanding the words. Go back and re-read #27. Take particular note of the words "... is a better compromise for this application...".

I also take exception to your comment "Anyone who jerks around like that HAS to have some real problems......"

Would you care to expand on it?

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#35
In reply to #34

Re: Providing TTL Signal from NPN Output

10/12/2010 3:06 PM

If you need an explanation, just read your two posts from the point of view of someone else.......

Your words imply that its difficult to find particular (5 volt) zeners (you could be right for all I know don't forget!!), you said you only found one (at 5 volts).....and suddenly finding a 4.7 or a 5.1 volt as being not accuirate enough after recommending a 3.3v one is simply ludicrous to say the least......

So in this case, "jerking around" is finding 3.3v near enough to 5 volts at one point, but not 4.7 or 5.1 volts.......

Do you need more of this by the way?????

regards

Andy

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#36
In reply to #35

Re: Providing TTL Signal from NPN Output

10/12/2010 5:33 PM

No comment.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act United Kingdom - Member - New Member United States - Member - New Member Canada - Member - New Member

Join Date: Aug 2006
Location: AM-51, Deen Dayal Nagar, Gwalior, Madhya Pradesh, MP 474001, India
Posts: 3418
Good Answers: 32
#23
In reply to #21

Re: Providing TTL Signal from NPN Output

10/10/2010 12:33 AM

TTL trigger is at 1.5V.

Levels defined at 0.4V as below up to zero volts as zero and 2.4V and above up to 5V as one. Giving margins, some IC also permit 0.8V to 2V. There is no harm if you use 5V or even 5V signal for 5V power. However, the moment you switch off you instrument and 5V is applied to input then it can easily damage the gate. Usually gates get damaged when power is OFF and not when power is ON.

It is better to keep the TTL signal towards 2.4V and not to exceed 3.3V and current is not more than 1mA through input safety diode connected to VCC. There are two input diodes, one to Ground and one to VCC.

For LOGIC gates it is clearly stated that input must not exceed 0.5V above VCC. What happens when VCC is switched OFF and is at zero volts? Input signal having high voltage high current kills the gate if you force too much current through diode. How much is high voltage? Any voltage above diode conduction becomes high voltage. Safer practice is to keep the voltage on safer side of forward bias of diode that keeps the current limited. One also can use high value of resistance like 10K or even 22K. Long cables can store huge charge on cable capacitance and can kill the IC input stage while switching OFF. Hence, a discharge resistance is also essential.

The scheme shown below is for TTL gate safety.

__________________
Prof. (Dr.) Shyam, Managing Director for Sensors Technology Private Limited. Gwalior, MP474001, India.
Register to Reply
Member

Join Date: Sep 2010
Posts: 7
#7
In reply to #5

Re: Providing TTL Signal from NPN Output

09/27/2010 7:23 AM

Really? Wow, it's clear that I don't understand NPN/PNP. I thought NPN (mnemonic: Not Pointing iN) was basically switched to ground when conducting. In both images, that looks like what is happening in the sensor. For my own education, why am I confusing them?

Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#9
In reply to #7

Re: Providing TTL Signal from NPN Output

09/27/2010 8:09 AM

Here's a re-arranged drawing (same circuit as in your original post, but omitting the control input):

The black is a PNP-type output, sourcing current to the load, and through it to GND. The white is an NPN-type, current sinking output. You can see that if the switches are made, the black wire will be pulled up to the supply +ve, while the white will be pulled down to GND.

BTW, in Shyam's diagram, the wire labelled "TTL Output" is the output (white wire) from your optoswitch. It can be connected to a "TTL Input". Using the zener diode means that you don't need access to the TTL +5V supply - the signal will be limited to (about) 3.3 volts.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act United Kingdom - Member - New Member United States - Member - New Member Canada - Member - New Member

Join Date: Aug 2006
Location: AM-51, Deen Dayal Nagar, Gwalior, Madhya Pradesh, MP 474001, India
Posts: 3418
Good Answers: 32
#10
In reply to #7

Re: Providing TTL Signal from NPN Output

09/27/2010 8:10 AM

It is easy to understand NPN and PNP configuration.

PNP means voltage and current is sourced out into load resistance connected to ground.

You can get almost same voltage at the output as much you apply to the device. 10-30V will give 10-30V Vout as well. PNP transistor emitter is connected to power internally and collector is the external output pin.

NPN circuit gives out no voltage, but has a capability to sink current from external voltage source or current source. Load is connected to external power source. NPN emitter is connected to Ground internally and collector is external output pin. It is also called open collector circuit.

See the direction of current here

PNP output -------> Vout to Load to Ground

NPN output <------- Load to VCC 10V to 30V

__________________
Prof. (Dr.) Shyam, Managing Director for Sensors Technology Private Limited. Gwalior, MP474001, India.
Register to Reply
Member

Join Date: Sep 2010
Posts: 7
#12
In reply to #10

Re: Providing TTL Signal from NPN Output

09/27/2010 9:43 AM

Dr. Shyam and John, very helpful comments. I think I understand now and will head out to the bench to play.

Thanks again,

Jeff

Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act United Kingdom - Member - New Member United States - Member - New Member Canada - Member - New Member

Join Date: Aug 2006
Location: AM-51, Deen Dayal Nagar, Gwalior, Madhya Pradesh, MP 474001, India
Posts: 3418
Good Answers: 32
#13
In reply to #12

Re: Providing TTL Signal from NPN Output

09/27/2010 10:13 AM

Good. If you run into problem then come back again with your story.

By the way, what is that you are going to do with TTL signal? You may run into problem using it if not used it properly.

Most of the bipolar LOGIC gates directly accept open collector NPN output as input without any external interface like pull up resistors as they do have pull up inside.

CMOS LOGIC gates and uC input are different types.

__________________
Prof. (Dr.) Shyam, Managing Director for Sensors Technology Private Limited. Gwalior, MP474001, India.
Register to Reply
Member

Join Date: Sep 2010
Posts: 7
#14
In reply to #13

Re: Providing TTL Signal from NPN Output

09/27/2010 10:19 AM

The TTL signal is being used to trigger a timing generator. The timing generator expects to see a square wave sweeping up to 5V or down to 0V. The timing generator will then fire a number of NDE measurements (lasers, x-rays) in sequence. I'm pretty sure the timing generator won't accept NPN or PNP outputs. You may have a good point about the need for a pull-up resistor as I'm not sure if they are internal to the generator.

Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#15
In reply to #14

Re: Providing TTL Signal from NPN Output

09/27/2010 10:21 AM

Is the timing generator a commercial product? (i.e. can you give us manufacturer & part number?).

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act United Kingdom - Member - New Member United States - Member - New Member Canada - Member - New Member

Join Date: Aug 2006
Location: AM-51, Deen Dayal Nagar, Gwalior, Madhya Pradesh, MP 474001, India
Posts: 3418
Good Answers: 32
#16
In reply to #14

Re: Providing TTL Signal from NPN Output

09/27/2010 10:30 AM

You have to look at the catalog of the timing generator.

__________________
Prof. (Dr.) Shyam, Managing Director for Sensors Technology Private Limited. Gwalior, MP474001, India.
Register to Reply
Member

Join Date: Sep 2010
Posts: 7
#17
In reply to #16

Re: Providing TTL Signal from NPN Output

09/27/2010 12:57 PM

The pulse/timing generator is a Berkeley Nucleonics Model 575. This is the manufacturer's page. Now that I am looking at it again and understanding the PNP/NPN outputs of the sensor better, I'm thinking that I don't need to do anything to get a 5V TTL -- the timing generator will accept up to a 60V external trigger. Am I reading that correctly? (Click the "Specifications" tab). I don't see anything there about the maximum current allowed for the external trigger, though... so maybe a pull-up resistor is required.

Comments?

Register to Reply
Guru
India - Member - Sensors Technology Popular Science - Cosmology - Dream, Think and Act United Kingdom - Member - New Member United States - Member - New Member Canada - Member - New Member

Join Date: Aug 2006
Location: AM-51, Deen Dayal Nagar, Gwalior, Madhya Pradesh, MP 474001, India
Posts: 3418
Good Answers: 32
#18
In reply to #17

Re: Providing TTL Signal from NPN Output

09/27/2010 2:17 PM

60V external trigger? Then why do you need TTL? Some instruments are designed to accepts large signal and they are protected against excessive voltage by scheme they employ at the input stage. They often use high impedance attenuator, and then diode protection scheme and a fast comparator for regenerating trigger voltage. Their input stage circuits are well designed. You can also see similar circuits in oscilloscopes.

As these instruments are designed to be sensitive to trigger jitter of about 250ps, your NPN/PNP logic going to be worst to micro second.

You are supposed to use CFD type optical sensor with walk of the order of 250ps to maximum 1ns nd mostly ECL negative pulser for trigger output for proper timing and synchronization.

I have designed similar delay signal generators having 500ps jitter, Model ST2006.

I think 575 is excellent delay timing generator machine. However, your sensor going to be worst thing I can imagine to go with it. It is almost an insult to the supper system. Never mind if it does your job you want to do in this scheme. I will never do it in this way.

__________________
Prof. (Dr.) Shyam, Managing Director for Sensors Technology Private Limited. Gwalior, MP474001, India.
Register to Reply Score 1 for Good Answer
Register to Reply 36 comments

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Copy to Clipboard

Users who posted comments:

Andy Germany (8); JohnDG (8); JWeb (6); Shyam (12); Tobugrynbak (1)

Previous in Forum: Voltage Inputs to Comass   Next in Forum: Control Valve

Advertisement