Microcontroller/optoisolator interface

  • Thread starter Thread starter nothing909
  • Start date Start date
  • Tags Tags
    Interface
Click For Summary

Discussion Overview

The discussion revolves around the connection of a microcontroller to an optoisolator, specifically addressing the need for an interface device, such as an open collector, between the two components. Participants explore various configurations, requirements, and potential issues related to this interface in the context of controlling devices like IGBTs in power electronics.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • Some participants suggest that the necessity of an interface device depends on the specific optoisolator being used, with some requiring additional components like pullup or current-limiting resistors.
  • Others argue that a direct connection may be possible for certain microcontrollers, provided they can supply sufficient current to the optoisolator.
  • One participant mentions that using an open collector stage before the optocoupler may be unnecessary and could slow down the interface, proposing a digital buffer instead.
  • Another participant highlights the importance of noise immunity in power electronics, suggesting that a buffer is often recommended for practical reasons, even if a direct connection is theoretically possible.
  • Some participants discuss the implications of signal direction in the circuit and how it affects the design choices, particularly regarding the use of pullup resistors.
  • There are mentions of different types of optocouplers, including push-pull types that can directly drive microcontroller inputs.
  • Participants also note the importance of considering the power supply voltage and current capabilities of the microcontroller when designing the interface.

Areas of Agreement / Disagreement

The discussion reveals multiple competing views regarding the necessity and design of the interface between the microcontroller and optoisolator. There is no consensus on whether an open collector is required or if a direct connection is feasible, as opinions vary based on specific use cases and components involved.

Contextual Notes

Participants express uncertainty about the specific requirements for their projects, indicating that the discussion is influenced by varying designs, component specifications, and application contexts. Limitations in understanding the complete problem statement and circuit diagrams are noted.

Who May Find This Useful

This discussion may be useful for individuals working on microcontroller interfacing, particularly in applications involving optoisolators and power electronics, as well as those seeking to understand the implications of different circuit configurations.

nothing909
Messages
168
Reaction score
4
I have to connect a micro controller to an optoisolator, but I'm told to do this, I can't directly connect the micro controller to the optoisolator, I need an interface device in between (for example an open collector). Why is this, what is the reason for the interface device and why can I not directly connect the micro controller to the optoisolator?
 
Last edited by a moderator:
Engineering news on Phys.org
nothing909 said:
I have to connect a micro controller to an optoisolator, but I'm told to do this, I can't directly connect the micro controller to the optoisolator, I need an interface device in between (for example an open collector). Why is this, what is the reason for the interface device and why can I not directly connect the micro controller to the optoisolator?
That depends on the optoisolator. Some can be connected directly, others need at least a pullup resistor on the output transistor side, and some need a current-limiting resistor on the input photodiode side. Can you post a link to the datasheet of the opto? Is your uC running off of 3.3V or 5V?
 
I have a drawing similar to that picture given to me to help me out. I've only just started this project so I've not got anything specific. Can you explain to me what's happening in that circuit?
 

Attachments

  • circuit.PNG
    circuit.PNG
    2.5 KB · Views: 729
nothing909 said:
I have a drawing similar to that picture given to me to help me out. I've only just started this project so I've not got anything specific. Can you explain to me what's happening in that circuit?
That circuit shows an input LED that is driven by an external digital gate (with a current-limiting resistor), and a photodiode that will convert the light from the LED into a photocurrent.

Unless you need a really fast optocoupler, that's not the easiest way to go. It requires a current-to-voltage converter at the output. A much more practical version uses a phototransistor at the output, which only requires a pullup resistor to make a digital output signal. More like this...

http://www.eblogbd.com/wp-content/uploads/2013/01/opto-coupler-or-opto-isolator3.jpg
opto-coupler-or-opto-isolator3.jpg
 
I know for pretty much certain, I definitely need an open collector, an optocoupler and a microcontroller.

When you explained that circuit, you said it had an input LED... is that not the open collector or am I just confused?
 
nothing909 said:
I know for pretty much certain, I definitely need an open collector, an optocoupler and a microcontroller.

When you explained that circuit, you said it had an input LED... is that not the open collector or am I just confused?
If you look at the circuit in my Post #4 above, you see an input LED on the left side of the optocoupler, and a phototransistor on the right side. You drive the input LED with some signal, and limit the LED current with a series resistor. On the output phototransistor, you usually ground the emitter and put a pullup resistor from the collector to 3.3V or 5V (whatever your uC uses), and also connect that collector to the input of your uC. Does that make sense?

An alternate output connection is to connect the collector to the power supply rail (3.3V or 5V), and connect a resistor from the emitter to ground. The emitter is also connected to the input line of your uC. Can you see how the two types of output connections result in a signal inversion when compared to each other? :smile:
 
I do understand what you're saying but I'm kinda confused.

What I'm doing is building a switching device for a switched reluctance motor. I've just started so I'm not too sure what I'm doing but I know the basic devices I NEED.

upload_2016-11-17_20-36-38.png


That picture shows the basic way it'll be connected up. I know for sure I need all these devices, but put VERY SIMPLY, why do I need that open collector there? Why can't I just remove the open collector altogether?
 
nothing909 said:
That picture shows the basic way it'll be connected up. I know for sure I need all these devices, but put VERY SIMPLY, why do I need that open collector there? Why can't I just remove the open collector altogether?
I don't know of any reason for an open collector stage before the optocoupler. In fact, it would appear to be bad design practice on the face of it. It will slow down the interface -- a simple digital buffer gate can be used if the uC does not have enough drive capability for the LED side of the optocoupler.

Is there a more complete problem statement that you can share with us?
 
  • #10
Actually, which direction is the signal propagating in that diagram? I'd assumed left-to-right to drive the IGBT. But if the signal is propagating right-to-left as a monitoring signal fed back to the uC, then the diagram may only be saying that the output of the optocoupler on the left needs to be treated as an open collector signal going to the uC on the left, and hence you need the resistor pullup to 3.3V or 5V. Could that be what they are trying to show?
 
  • #11
Some micro-controllers have outputs that can drive an opto isolator with nothing more than a resistor. Check the recommended maximum output current on all of the available outputs. Look for both source and sink as you can wire the opto up for either current direction. If you find something that is higher than the minimum current of the opto (taking into consideration the current transfer ratio) you are good.

The easiest course of action is to find a device that has logic input and is designed to drive an IGBT. You have gate charge to contend with and that will give you slow switching using just a transistor output isolator.

This all assumes you are using the micro to control the IGBT.

BoB
 
  • #12
Hello Nothing -

Since you are using an IGBT and Not a MOSFET you are probably not dealing with a 1-2 Amp / low voltage switching case correct? In power electronics - it is very common to add a buffer between the controller and the opto; the general reason is noise immunity but there are few others. The controller may be mounted separate from the power electronics ( Switching devices and drivers - etc) -- and the buffer, opto (IGBT driver) and IGBTs are all assembled close to one another. Since the IGBT switching generates a lot of EMI, you want the signal from the controller to the power electronics to stay "clean".

Did they also say to use a separate power supply for the controller and the Buffer/ Opto? This can also allow a level shift between the two. Or the link from the uC to the Buffer may be at a higher voltage - also for noise immunity- requiring a level shift to the opto - by always putting (or expecting to put) a buffer there, you will be more successful and have fewer problems.

Is it possible you are being told to do this as a "best practice"?

As such - from a pure electrical circuit standpoint, yes the uC can run the opto, but in practice this is not ideal for this case.
 
  • #13
An open collector driver might be used where the microcontroller runs on a low-power regulator, or where a low supply voltage is used, the opto-isolator is then run on a higher voltage or on the unregulated supply.

What make / model is your microcontroller ?
What voltage power supply does it use ?
 
  • #14
You can find push-pull optocouplers that can directly drive an input pin for an MCU. I'm actually using one with a project I'm working on right now; link.

Another consideration with optocouplers is you need to drive a diode so you need a signal source with fairly low impedance. In my case I'm using a driver since the signal comes from a source with fairly high impedance; link.
 
  • #15
FAN3100T is a rather meaty driver. If your grounds are common you should be able to get away with driving the IGBT directly with that.

BoB

PS: There is an error on Fig 6 of the FAN3100T datasheet.
 

Similar threads

Replies
4
Views
7K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 10 ·
Replies
10
Views
3K
Replies
10
Views
5K
  • · Replies 3 ·
Replies
3
Views
916
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 15 ·
Replies
15
Views
3K