How Optocouplers work - opto-isolator solid state relays phototransistor

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this is an optocoupler it's used to control circuits and we're going to learn how they work and also how to design some simple optocoupler circuits in this video optocouplers are integrated electronic components that look something like this they are also known as opto isolators optical isolators and photo couplers in this version we have the main body with four pins pin one is the anode pin two is the cathode pin three is the collector pin four is the emitter and we also have a small circular indentation in the body next to pin 1 and we use this to identify the different pins on the body we also have some text this is the part number we use this to identify the type of optocoupler and also find the manufacturer's data sheet this device is basically a solid state relay which interconnects two separate electronic circuits circuit one is connected across pins one and two the second circuit is connected across pins three and four this allows circuit one to control circuit two we can use it to transfer a signal across but the two circuits are electronically isolated from each other why is that important because voltage spikes and noise on one circuit will not destroy or disrupt the other circuit so our circuits are protected they will also only allow electrons to flow in one direction because of the semiconductor materials inside the two circuits can therefore use different voltages and currents because of the separation we can expand the capabilities of the device by adding another component such as a transistor to the output of circuit 2. this allows us to control even higher voltages and currents and automate circuit control there are a few variations of optocouplers but we're going to stick to the basic phototransistor version for this video when we look at the symbol of this octocoupler we see there is an led symbol on the left and on the right side the symbol looks very similar to a transistor that's because it's a modified version of a transistor known as a photo transistor the terminals are named collector and emitter just like a normal transistor except we're missing the base pin in a normal transistor circuit we have the main circuit and a control circuit the transistor is blocking the current in the main circuit so the light is off when we apply a small voltage to the base pin this will turn the transistor on and it will allow current to flow in the main circuit so the main light turns on by the way we have covered how transistors work in detail in our previous video links for that in the video description down below the transistor within the optocoupler works slightly differently it also blocks the current in the main circuit but it acts as a receiver when the light emitted from the led hits the transistor this will turn it on and allow current to flow in the main circuit so when circuit 1 is complete the led turns on this shines a beam of light across which hits the transistor the transistor detects this and turns on allowing current to flow in circuit two we simply control this by turning the internal led on and off the photo transistor acts like an insulator blocking the flow of current unless is exposed to light the led and the transistor are both enclosed within the case so we can't see them but we can see how they work with these simple circuits which we will learn how to make later on in this video so how does the led turn the transistor on inside the photo transistor we have different layers of semiconductor materials there are n-type and p-type which are sandwiched together the n-type and p-type are both made from silicon but they have each been mixed with other materials to change their electrical properties the n-type has been mixed with a material which gives it lots of extra as well as unneeded electrons these are free to move around to other atoms the p-type has been mixed with another material which has fewer electrons so this has lots of empty space where electrons can move too when the materials are joined together an electrical barrier develops and prevents electrons from flowing however when the led is turned on it will emit another particle known as a photon the photons hit the p-type material and knocks the electrons across the barrier and into the n-type material the electrons at the first barrier will now also be able to make the jump and so a current is developed once the led is turned off the photons stop knocking the electrons across the barrier and so the current in the secondary side stops so we can control a secondary circuit just by using a beam of light this works because of the semiconductor material in normal wires the copper is the conductor and the rubber is the insulator electrons can easily flow through the copper but they can't flow through the rubber insulator looking at the basic model of a metal conductor we have the nucleus at the center which is surrounded by a number of orbital shells which hold the electrons each shell holds a maximum number of electrons and an electron needs a certain amount of energy to be accepted into each shell those furthest away from the nucleus have the most energy the outermost shell is known as the valence shell a conductor has between one and three electrons in its valence shell the electrons are held in place by the nucleus but there is another shell known as the conduction band if an electron can reach this conduction band then it can break free from the atom and move to other atoms with a metal atom such as copper the valence shell and the conduction band overlap so it's very easy for an electron to break free and move to another atom with an insulator the outermost shell is packed there's very little to no room for an electron to join the nucleus has a tight grip on the electrons and the conduction band is far away so electrons can't reach this to escape therefore electricity cannot flow through this material however a semiconductor is different it has one too many electrons in its valence shell for it to be a conductor so it acts as an insulator however the conduction band is quite close so if we provide the electrons with some external energy such as a photon some electrons will gain enough energy to make the jump into the conduction band and become free therefore a semiconductor can act as both an insulator and a conductor the first circuit we will look at uses a light dependent resistor and a white led the ldr varies its resistance depending on how much light it is exposed to in darkness it has a very high resistance in bright light it has a very low resistance this white led is rated for 20 milliamps if i connect this to the dc bench power supply we can see it requires 3 volts to achieve that 20 milliamps when i test this ldr we see that with a dim light it's around 40 kilo ohms of resistance when i hide it in my hand it's around four mega ohms and with two hands completely covering it it's around nine mega ohms however when i shine the white led onto the ldr it's around 66 ohms if i wrap my fingers around them both then it's around 70 ohms so on the primary circuit we need a white led which has a voltage drop of 3 volts and uses 0.02 amps we will control this with a switch and use a 9 volt battery to power the circuit the resistor is found by 9 volts subtract 3 volts for the led which gives us 6 volts this will be the voltage drop of the resistor the circuit current is 0.02 amps so 6 volts divided by 0.02 amps is 300 ohms now this circuit will work fine on 20 milliamps but i'm going to use a slightly higher resistor value to reduce the current of the led this will also slightly reduce the brightness of the led i'm going to use a 330 ohm and a 22 ohm resistor these will combine to form 352 ohms of resistance so to check that 6 volts divided by 352 ohms is 0.01 amps or 17 milliamps i place the components into the circuit and it looks like this the current will flow through the circuit like this shown using conventional current when i press the switch the led illuminates on the secondary side we have a red led with a voltage drop of 2 volts and a current of 0.02 amps this will turn on to indicate the circuit is working we place the ldr opposite the white led this will provide a resistance of approximately 70 ohms when exposed to the light to find the resistor for the led we simply need to do 9 volts subtract 2 volts which is 7 volts 7 volts divided by 0.02 amps is 350 ohms 350 subtract 70 ohms for the ldr gives us 280 ohms instead of this i'm going to use two 150 ohm resistors which equals 300 ohms so assuming the ldr is 70 ohms we have 307 ohms of resistance 7 volts divided by 370 ohms is 0.019 amps so if i place the components on the secondary side of the circuit board it looks like this notice the red led is on that's because the ldr is receiving the ambient light from the room to stop this all we need to do is take some electrical tape just cut off a few small pieces and wrap them around both the ldr and the led this will block the ambient light from the room and the led is now off when i press the button on the primary circuit the white led turns on this shines the light onto the ldr which turns the red led on in the secondary side the problem with circuit one was that natural light was activating the circuit so we will use an infrared emitter and receiver instead for this circuit on the primary side we have an infrared emitter the one i'm using is rated for 30 milliamps but i'm going to use a lot less current than this when i test the led we see at 1.2 volts it has a current of 0.02 amps so we will use this value by the way if you look at this with your eye you won't be able to see any light because it's infrared and humans cannot see infrared because of this you're going to assume that the led is off but it's not if you use the camera of your phone you can see it's actually on you can also test this yourself using your tv remote as it also uses an infrared led so on the primary side we have a nine volt supply and an led infrared emitter with a voltage drop of 1.2 volts we place a red led into the circuit to indicate when the circuit is activated simply because we can't see the infrared led this red led has a voltage drop of 2 volts and a current demand of 0.02 amps so 9 volts subtract 2 volts subtract 1.2 volts is 5.8 volts the current of the circuit will be 0.02 amps so 5.8 volts divided by 20 milliamps is 290 ohms now i don't have a 290 ohm resistor so i'm going to use a 270 and a 22 ohm resistor this gives 292 ohms and to check that we do 5.8 volts divided by 292 ohms which is 0.01986 amps so this will be fine we will also add a switch into the circuit to be able to control it when i connect the components into the circuit it will look like this when i press the switch the red led turns on and the infrared led emitter will emit a beam of light on the secondary side we have the receiver led this one is rated for up to 1.4 volts and also 30 milliamps we will include a red led on this side to indicate when the circuit is activated this also has a voltage drop of 2 volts and a current of 0.02 amps so we have 9 volts on the supply subtract 2 volts subtract 1.4 volts which gives us 5.6 volts 5.6 divided by 0.02 amps is 280 ohms i will use a 270 ohm and a 10 ohm resistor to get the required 280 ohms i place these components into the circuit and it looks like this the emitter and receiver are opposite and in close proximity when i press the switch the primary side red led turns on and the emitter shines a beam of infrared light at the receiver the receiver detects this and allows current to flow in the secondary side and so the secondary side red led also turns on the third circuit uses a pc817 opto coupler the input side uses an internal led the led is rated for 1.2 volts and 20 milliamps i can connect one to the dc power supply and see at 1.2 volts the current is 20 milliamps so we will use this value on the input side we will use a switch to control the circuit and also a red led to indicate when the circuit is activated this again has a voltage drop of 2 volts and a current of 0.02 amps so with a 9 volt supply 9 volt subtract 2 volts subtract 1.2 volts gives us 5.8 volts 5.8 volts divided by 0.02 amps is 290 ohms i'm going to use a 270 ohm and a 22 ohm resistor to make 292 ohms this will give us 0.01986 amps i place the components into the circuit board and it looks like this when i press the switch the red led will turn on for the secondary side the optocoupler is rated for a maximum of 50 milliamps we're just going to use a red led on the secondary side which has a voltage drop of 2 volts and requires a current of 20 milliamps the secondary side will have a 9 volt supply with the positive connected to the collector and the emitter connected to the negative we must use a resistor otherwise the optocoupler will be destroyed looking at the manufacturer's data sheet we see a chart with collector current versus collector emitter voltage the collector current will be 20 milliamps and that's from our red led so reading the chart we move across until we hit the 20 milliamp line this shows that the collector emitter voltage is 2 volts we have a 9 volt supply so 9 volts subtract 2 volts for the led and 2 volts for the transistors collector emitter equals 5 volts 5 volts divided by the collector current of 0.02 amps is 250 ohms i don't have a 250 ohm resistor so i will use a 100 ohm and a 150 ohm resistor these will combine to form 250 ohms i place the components into the circuit and they look like this the secondary side is off but when i press the switch the primary side red led turns on the led inside the optocoupler turns on and the beam of light hits the internal photo transistor this will allow current to flow in the secondary side and so the secondary side red led is now on check out one of the videos on screen now to continue learning about electrical and electronics engineering as this is sadly the end of this video don't forget to follow us on facebook twitter instagram linkedin and of course the engineeringmindset.com
Info
Channel: The Engineering Mindset
Views: 707,751
Rating: 4.9370627 out of 5
Keywords: optocoupler, opto-isolator, electronics, optoisolator, triac, photocoupler, digital isolators, relays, transistor, relay, phototransistor, scr, photo transistor, solid state relay, opto isolator, optocoupler testing, everycircuit, pc817, photo diode, semiconductor, electronics engineering, optocoupler tutorial, photodiode, ldr, optocoupler arduino, power controllers, diac, analog devices, silicon controlled rectifier, semiconductors, what is optocoupler, thyristor, power electronics, p-type, bjt, diode
Id: 3AVHqV_xASQ
Channel Id: undefined
Length: 18min 7sec (1087 seconds)
Published: Sun Mar 21 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.