Skip to main content
shopping_basket Basket 0
Login

Optocoupler PC817 good or bad?

Hi,

I am working on an electroncis project where need to control DC motors and I need to control speed & direction, I am using IGBT for that. But I have read online that I need to use optocoupler after microcontroller's pins.

I have found PC817 optocoupler online and it looks nice. So, should I use this one or can anyone suggest me a good one? and so I have to use it ?

Thanks.

0 Votes

Comments

April 19, 2021 08:44

Optocouplers are used to communicate signals between two circuits operating at different ground potentials, while providing isolation between the two circuits.

Parameters to consider include:

Isolation voltage (how much voltage difference between the two circuits the coupler can withstand). Values in the range 3000 - 5000 volts are common.

Type of output: The PC817 has a simple transistor output, with the current through the output transistor being roughly proportional to the amount of current through the emitter (LED) on the input side.

Current transfer ratio: how much output current the output transistor will pass for a given amount of input current through the emitter (LED).

Turn-on and turn-off times and rise/fall times: These are different measures of how quickly the output responds to changes at the input. The PC817 is relatively slow - up to 18 microseconds.

Some other optocouplers have buffering circuits that can respond more quickly to changes in the input, provide signal conditioning for higher output currents or clean logic-level output, but usual these require a power source on the output side for the buffering circuitry.

Another parameter is the capacitance between the input side and the output side. Even if the insulation resistance can withstand 3000-5000 volts between the input and output sides, transients can still be coupled by this input-to-output capacitance, including the "transient" when first connecting the two circuits of different system potential to the coupler.

PC board layout is also important when trying to provide voltage isolation between systems. Sometimes optoisolator packages are intentionally larger to provide increased distance between the input side terminals and output side terminals to prevent arcing between the two. That care and attention to safety is wasted if the circuit board designer doesn't maintain spaces between the corresponding traces, or routes other signals across the board in the space between the input and output sides of the coupler.

The turn-on/turn-off/rise/fall times become important if the signal being coupled is intended as high-frequency feedback in a switching output drive.
They are also important if you are coupling multiple control signals between the microcontroller and the output driver circuitry. On a bridge driver, for example, it is important that the high side and low side of the driver not be enabled at the same time, to prevent shoot-through current. But if they are controlled by separate optocoupled signals, slow or unbalanced couplers could cause overlap between the timing of the two signals. That could be addressed by increasing the dead time between the two signal transitions in software, but that may reduce system efficiency or response speed in some cases.

There are also digital isolators that use other techniques instead of optical to couple the input and output sides of the circuit.

0 Votes

April 19, 2021 08:44

It is always good to isolate the higher power and higher voltages from the microcontroller as you have read. The data on the PC817 looks fairly typical of what is available, just check rise and fall times meet your requirements (for pulse frequency) and that you drive the LED input side at an appropriate current for the load.
If you are new to using optocouplers this article appears a good description and may assist.
https://microcontrollerslab.com/pc817-optocoupler-pinout-working-examples-datasheet/
But I would add a resistor in series with the LED rather than rely on the uC output current limit. I also tend to drive Cathode low to turn on the LED so the series resistor on the Anode goes to the supply voltage. Others may disagree so look out for other comments posted here.
One of my old favourites, as it has an active pull-up and pull-down on the output, is the TLP251 https://uk.rs-online.com/web/p/optocoupler-ics/6258413/ but it does depend on what you are driving.

0 Votes
DesignSpark Electrical Logolinkedin