Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Industrial I/O question

Status
Not open for further replies.

jnnewton

Member
I would like to implement some 24V I/O via a pic. I am having trouble deciding what type of protection is best. I have used standard 4n27 opto's with 1.3 Vf and 60mA If. This works with a 390 ohm input resistor, but what if the input voltage jumps up to say around 45V. I would like the input to come on between 18 and 45V, with 22-30 being normal and anything above 45 would be considered out of the design criteria for the system. So, with 45V, I get a 820 ohm resistor with a 3 W capability needed which even if i knew where to get one, would get very hot. Is there an easy way to do this??? what happens if I put a zener between the input and ground, say a 27V one. Would a TVS work also, ( I could then account for a reversed Input).. Thanks for any Ideas.
 
There's no easy way to reduce the power if you need 60mA to drive the 4N27.

You might try a lower current opto coupler such as a Fairchild HSR312. It only requires 2mA input current which would lower your maximum power to less than 0.2W (using a 11K ohm resistor to give ~2mA @ 24V).
 
We use LM339/LM393 Comparators for inputs with 10K/100K input resistors to limit current in the case of overvoltage. There is no earthly reason why your inputs should ever be above the specified range.

For outputs we use current limited high side and low side bipolar switches. MJD340/MJD350 work well for this application.

Using opto-isolators introduces another set of reliability problems that you just don't need unless you have a really good reson for needing isolation. BTW most people who think they need it can't really justify it. It's kinda like IBM. Nobody ever got fired for buying IBM even when there were better alternatives
 
Certainly if the 24V ground is common with the pic circuit common you don't need an opto isolator. However, if you're in an industrial environment where you may want to keep the grounds isolated, then an opto isolator may be needed.
 
Why would you use 60ma. That's the "absolute maximum" Ifwd for the 4N27.
https://www.fairchildsemi.com/ds/4N/4N27-M.pdf
And it has a current transfer ratio of only 10%. Why not choose a better opto? What's the current requirement on the output side?

Ken
 
KMoffett has a good point. For example the 4N35/36/37 has a forward transfer ratio of about 0.5 at 1mA input which would thus switch 0.5mA at the output. This would give a 5V swing with a 10K ohm resistor connected to 5V which should be adequate for the pic input.
 
crutschow said:
Certainly if the 24V ground is common with the pic circuit common you don't need an opto isolator. However, if you're in an industrial environment where you may want to keep the grounds isolated, then an opto isolator may be needed.
True enough, but just because the environment is "industrial" does not mean that isolation is "required".

It is also the case that the CTR(current transfer ratio) will degrade with age. You can anticipate a future time when the opto will fail to work acceptably without some careful component choices.
 
i know this is an old one, but to papabravo, we tried the lm239 comparators, and it appears that they are not rail to rail, so i would need a divider on the input, which leads me to ask, why not just use a divider into the pic input? we put 5v on the inverting input, 24 input on the non-inverting, on 24V rail, and apparently these things have issues when the inputs are close to the supply (within 2 or so volts).
 
Last edited:
I would like to implement some 24V I/O via a pic. I am having trouble deciding what type of protection is best. I have used standard 4n27 opto's with 1.3 Vf and 60mA If. This works with a 390 ohm input resistor, but what if the input voltage jumps up to say around 45V. I would like the input to come on between 18 and 45V, with 22-30 being normal and anything above 45 would be considered out of the design criteria for the system. QUOTE]

Why set a design criteria and then move the goal posts?


24v i/o on a pic....with 22-30v being normal....

I would like the input to come between 18 and 45 volts.......and anything above.........

Hmm! just read the orig date....


Sounds like english politics
 
Last edited:
i know this is an old one, but to papabravo, we tried the lm239 comparators, and it appears that they are not rail to rail, so i would need a divider on the input, which leads me to ask, why not just use a divider into the pic input? we put 5v on the inverting input, 24 input on the non-inverting, on 24V rail, and apparently these things have issues when the inputs are close to the supply (within 2 or so volts).
You don't use a divider on the PIC input because you're still vulnerable to extreme overvoltage. 100K in series with a high impedane input at least limits the current to the input. Comparator outputs are open collector so you always pull them up to the PIC's VCC -- no problem there. We use the comparators with one input at V/2 to establish a threshold. With window comparators we use V/3 and 2V/3. The other input can go all the way to the rail without causing the common mode input malfunction. You have to read the datasheet very carefully to find this -- it's in the notes. We also use diode clamps and PTC resetable fuses. AFAIK none of our industrial customers has EVER complained.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top