Microcontroller/optoisolator interface

  • Thread starter nothing909
  • Start date
  • Tags
    Interface
In summary: 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...The signal is propagating from the input LED (the left side of the optocoupler) to the phototransistor (the right side of the optocoupler), and then to the IGBT.
  • #1
nothing909
170
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
  • #2
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?
 
  • #3
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: 675
  • #4
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
 
  • #6
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?
 
  • #7
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:
 
  • #8
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?
 
  • #9
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.
 

FAQ: Microcontroller/optoisolator interface

What is a microcontroller/optoisolator interface?

A microcontroller/optoisolator interface is a circuit that connects a microcontroller to an optoisolator, which is a device that electrically isolates two circuits while allowing them to communicate through light signals. This interface is commonly used in electronic systems to protect sensitive components from high voltage or noise interference.

Why is it important to have an optoisolator in a microcontroller interface?

Optoisolators provide electrical isolation between two circuits, which helps protect the microcontroller from external interference or voltage spikes. This is particularly important in industrial or high-voltage applications where the microcontroller may be exposed to harsh environments.

How does a microcontroller communicate with an optoisolator?

In a typical microcontroller/optoisolator interface, the microcontroller sends a signal to the input side of the optoisolator, which then converts it into a light signal. This light signal is then transmitted through an isolation barrier to the output side of the optoisolator, where it is converted back into an electrical signal that can be read by the microcontroller.

What are the benefits of using an optoisolator in a microcontroller interface?

In addition to providing electrical isolation, optoisolators also offer protection against voltage spikes and noise interference. They also have a fast response time and can operate at high switching frequencies, making them ideal for use in complex electronic systems.

Are there any limitations to using a microcontroller/optoisolator interface?

One limitation of using an optoisolator is that it can introduce a small amount of delay in the communication between the microcontroller and the external circuit. Additionally, optoisolators have a limited bandwidth, so they may not be suitable for applications that require high-speed communication. It is important to select the right type of optoisolator for the specific application to ensure optimal performance.

Similar threads

Back
Top