On isolating my own circuits from LPT port using optocoupler

This is a group to discuss all details on home automation, home security technology and related technologies.

On isolating my own circuits from LPT port using optocoupler

Postby Lalas on Thu Jan 26, 2006 4:42 am

Hi

Some great stuff here !

I want to add a little bit of protection/isolation to the LPT port of my computer from my pet parallel port interface circuits using optocouplers.

My understanding is that I should connect 36 optocouplers (one for each pin) of the Centronics connector? (or 25 optocouplers for the PC'c DB25 connector - if I am not using the printer cable)

Is that correct ? Will it impact the functioning of the circuits ?

If so, how else can I isolate my computer's LPT port from my circuits ?

Thanks for sharing. Please do reply.
Lalas
 
Posts: 8
Joined: Thu Jan 26, 2006 4:33 am

LPT isolation

Postby Tomi Engdahl on Thu Jan 26, 2006 7:01 am

Some great stuff here !


Thank you for your feedback.

I want to add a little bit of protection/isolation to the LPT port of my computer from my pet parallel port interface circuits using optocouplers.
My understanding is that I should connect 36 optocouplers (one for each pin) of the Centronics connector? (or 25 optocouplers for the PC'c DB25 connector - if I am not using the printer cable)
Is that correct ?


No.

Will it impact the functioning of the circuits ?


Usually yes. Typically the signal type provided by the optoisolator is not exactly the same as that what is coming from parallel port.

If so, how else can I isolate my computer's LPT port from my circuits ?


If you want a system that has optoisolation and looks exactly like signals on parallel port, you will need more electronics than just the optoisolators.
For signal output the easies solution would be logic level output optioisolators for each output pin and then suitable power supply for the optoisolator output side operation. And for inputs some buffer IC between the signal input and optoisolator LED...

Other approach is to use normal optoisolators and design the circuit that you connect to the output side in such way that they work with that optoisolator can give.

My parallel port document at http://www.epanorama.net/circuits/parallel_output.html gives some examples of optisolated printer port input and output circuits.

Some picks from it:

Image


Code: Select all
                                                V+  (12V)
                                                 |
                                    +------------+
                                    |            +------+
Parallel                            |            |      |
Port                                |    D1     ---     |
                                    |   1N4001  / \    Relay coil
          R1    1  ----------- 5    |          /---\    |
D(x) ----1k------| Opto-     |-----+            |      |
                  | Isolator  |                  +------+
GND -------------|           |-+                |
                2  ----------- 4|                |
                   CNY 17 or    |   R2        | /
                   4N25         |   4.7K    B |/  C   T1
                                +--\/\/\/\/---|      BC547A or 2N2222A
                                              |\  E
                                              | V
                                                |
                                          external circuit ground





Code: Select all
                                    out + 
          R1    1  ----------- 5    |   
in+  ----1k------| Opto-     |-----+   
                  | Isolator  |         
in- -------------|           |-+       
                2  ----------- 4|       
                   CNY 17 or    |
                   4N25         |
                               out -
                              (wire to ground)
Tomi Engdahl
Site Admin
 
Posts: 1839
Joined: Mon Oct 20, 2003 6:15 pm
Location: Espoo, Finland

Re: LPT isolation

Postby Lalas on Fri Jan 27, 2006 1:28 am

If you want a system that has optoisolation and looks exactly like signals on parallel port, you will need more electronics than just the optoisolators.
For signal output the easies solution would be logic level output optioisolators for each output pin and then suitable power supply for the optoisolator output side operation. And for inputs some buffer IC between the signal input and optoisolator LED...


Yes, I will be extensively using my circuits for both input AND output.
To make you understand better, just think as if I am putting an array of optocouplers between the the LPT (DB25 male) port of my computer AND the DB25 (female) connector of the printer cable.

The solution using optoisloation should be such that even after isolation, my printers should work EXACTLY the same as they were before.

I hope I was able to drive my point across.

My parallel port document at http://www.epanorama.net/circuits/parallel_output.html gives some examples of optisolated printer port input and output circuits.


Yes ofcourse. I saw it first before posting :wink:

However, I don't think I can just use it right away because you specifically designed it for high power switching, and in my case the optoisloation is just to isolate the DB25 port of my computer from the one of the printer (which draws it's own power externally)


Thanks a lot for your time, but what about others ?

PS: Do you mind if I use this thread and convert it into a small FAQ/guide for optoisolation if we finally solve this problem ?
Lalas
 
Posts: 8
Joined: Thu Jan 26, 2006 4:33 am

Paralle Port input

Postby ian147 on Sat Jan 28, 2006 10:28 am

Can anyone suggest best way to read input back to linux pc via parallel port. C/C++

I have tried and kept getting result "127" - I know I have to invert the MSB.
ian147
 
Posts: 2
Joined: Wed Aug 17, 2005 5:35 pm
Location: UK

Parallel port in Linux

Postby Tomi Engdahl on Sun Jan 29, 2006 9:54 am

For Linux parallel port writing and reading information take a look at this document:

http://www.epanorama.net/circuits/parallel_output.html
Tomi Engdahl
Site Admin
 
Posts: 1839
Joined: Mon Oct 20, 2003 6:15 pm
Location: Espoo, Finland

Parallel port isolation

Postby Tomi Engdahl on Sun Jan 29, 2006 9:57 am

To make you understand better, just think as if I am putting an array of optocouplers between the the LPT (DB25 male) port of my computer AND the DB25 (female) connector of the printer cable.

The solution using optoisloation should be such that even after isolation, my printers should work EXACTLY the same as they were before.


I don't have any ready tested circuit idea for exactly this application.

When I have made parallel port isolation, the circuits have been simple parallel port control application, not the full perinter connection.

And on some modern printers use parallel port data lines bidirectionally, supporting that would be pretty complicated for the isolation circuit.
Tomi Engdahl
Site Admin
 
Posts: 1839
Joined: Mon Oct 20, 2003 6:15 pm
Location: Espoo, Finland

Postby newbie on Mon Feb 19, 2007 5:01 pm

Hi, i'm a newbie here, keen to learn more..:)

actually i wish to obtain some advices from u guys, i'm currently running on a project to control a 12v dc motor thru the parallel port.

i wish to apply the optoisolator 4n38 as well as the h-bridge power mosfet for the motor. but since the signal trigger for the direction control requires only 1 5V terminal (i guess it's +ve terminal), how can i make the optoisolator output as 5V? where should i put the -ve terminal?

also, is it ok for me to make a common ground for those 5v and 12v batteries? hope somebody can help me..thanks in advance! :)
newbie
 
Posts: 1
Joined: Mon Feb 19, 2007 3:58 pm


Return to Home Automation

Who is online

Users browsing this forum: No registered users and 2 guests

cron