| Author |
Message |
xinz
Joined: 01 Jan 2008 Posts: 9
|
05 Oct 2008 14:38 which way best to use optocoupler? |
|
|
|
I want to isolate my parallel port from my step motor driver by optocoupler.
the input stage on my step motor driver is 74HC14N chip.
which one is best ? (the optocoupler on circuit is a sample,not the one my going to use)
and I hope you can give me some explaination about it. thanks
|
|
| Back to top |
|
 |
CMOS
Joined: 06 Jan 2004 Posts: 672 Helped: 26
|
05 Oct 2008 18:04 Re: which way best to use optocoupler? |
|
|
|
| None of them would provide you galvanic isolation !! Ground or Vcc are common in all of them. You need to separate grounds and supply.
|
|
| Back to top |
|
 |
xinz
Joined: 01 Jan 2008 Posts: 9
|
06 Oct 2008 12:14 Re: which way best to use optocoupler? |
|
|
|
thanks CMOS for your help.
lets assume I separate the VCC & Ground.
At the input stage of optocoupler I use 5v & Gnd from USB port then at the the ouput stage of optocoupler I use external voltage source such from 7805 chip and also ext Gnd.
now, which circuit is best (the data pulse frequency from parallel port is around 10khz)?
|
|
| Back to top |
|
 |
t_maggot
Joined: 09 Nov 2006 Posts: 24 Helped: 2
|
11 Oct 2008 22:02 Re: which way best to use optocoupler? |
|
|
|
First, you MUST use, separate power suplies to have isolation in either side of an optocoupler.
Then you calculate the resistor to use in series to drive the optocouplers led.
R = (Vin-Vf)/If
Vin is the voltage you use for input, Vf is the optocouplers led forward voltage drop (you will find it in o/c datasheet) and If is the o/c led drive current (also in the datasheet)
From the circuits you provide, the left will work for you (first separate grounds) if you will drive the o/c direct. In the middle, you add a pull-up of 2K2 in the led anode, I don't find it a good idea because a costant curent will flow trough it. In the right circuit you control the led cathode. This is usefull if you use a transistor as a low side switch to drive the o/c. And the 10K resitor you add between anode and cathode it will make no difference. If you want a logic level from the o/c collector, probably use a pull-up between 1K and 10K.
Also if you want to drive the optocoupler direct from Parallel, i think if you want more than 5mA for the o/c led, you must use a transistor for this (for example a bc547) and a separate power supply.
and take a look here
http://www.epanorama.net/circuits/parallel_output.html
Good luck!
|
|
| Back to top |
|
 |
xinz
Joined: 01 Jan 2008 Posts: 9
|
16 Oct 2008 10:39 Re: which way best to use optocoupler? |
|
|
|
| THANKS alot for your infos t_maggot, your explaination really help me.
|
|
| Back to top |
|
 |