Optocoupler Help

I don’t really have anything that I can take apart to try and use with an optocoupler, so I made my own circuit that uses a switch to turn on an LED.

Then I made another circuit on the left breadboard. My goal was to bypass the switch on the right breadboard, and be able to turn the LED on with the switch on the left breadboard.

I gave each breadboard it’s own 9V battery, so the circuits would be separate, then connected the optocoupler to the ground of the breadboard with the LED and the other pin to the anode of the LED.

The right switch works but the left switch does nothing.

I’ve never used an optocoupler before, so I wanted to ask what I was doing wrong, before I destroy the chip.

Can someone please look at my circuits and see what I’m doing wrong?

Also, what happens when the “normal” switch on the right breadboard is pushed? Does power go into the optocoupler from that circuit? Would that damage the chip?

Thanks.

Edit: Seems like you might need to download the picture. The website seems to enlarge it so much that it’s impossible to see.

It appears that bottom lead of the LED is hooked up to the GND directly, the top via opto to the GND as well.
When you provide the LED with some current, make sure you add a resistor somewhere in there as well. Now you don't have any in the opto part.

an opto is nothing more than a LED in a chip.
replace it with an LED so you can see what it is doing.
and, you can have both and led and the opto same as if it were two LED's in a row.

for the opto output, put in yet another LED with resistor. just use the opto as a transistor.

I don’t think I’m understanding what you’re saying. I can see a little “window” on the chip. It appears to be a window anyway. So I was assuming that I would be able to see the LED in the optocoupler when it’s turned on. Maybe it’s just writing on the chip, its so small its hard to tell.

I tried to test it another way, and nothing it happening. I was expecting to see the LED inside the optocoupler light up (assuming that really is a window).

I doubt it has a window - that would make the output side susceptible to outside light/interference.

Can someone provide an example of how to use this thing then?

Project 15 in the starter kit isn't making any sense to me. I've looked on YouTube and found some examples, but the circuits were way too complicated for me to understand.

I just want an example so that I can see how to use an optocoupler, and I also want to make sure that the chip is working correctly.

I book is telling me that I can have a circuit with a switch and then use the optocoupler to hack the circuit pushing the switch without actually touching it.

See the picture attached.
One side is an LED - you will not be able to see it light up - there is no window.
The other side is a photo transistor - put a LED in series with a resistor one end to +5V and the other end to the collector of the photo transistor. The emitter of the photo transistor to the ground of the 5V you attached the LED to.

Hi,

The little black circle in the top-left is what I thought was some type of window to see the LED inside. On my chip it’s a different color and it is so small it looked like it might have been a “window” to me.

The picture you showed helps, and it’s similar to the picture in project 15, but for some reason I cannot get a circuit setup that actually uses the optocoupler.

I would like to build something on the breadboard that uses it, so I can see it in action.

try this version.

I added an LED in series with the signal and an LED to let you see what is happening.

opto.png

The little black circle in the top-left is what I thought was some type of window to see the LED inside. On my chip it's a different color and it is so small it looked like it might have been a "window" to me.

It shows where pin 1 is on the chip. It is not a window. Opto couplers do not have windows.

The only chip I know of with a window is an old type of PROM where you can erase the chip by shining UV light through the window for 10 minutes or so.

OK,

I think I got it working. Both lights turn on with the switch. It’s not what I expected to happen, because I thought the yellow light could also be controlled by a switch on the right circuit.

So I would add a switch to the right circuit that would only activate the yellow LED, and the switch on the left circuit would activate both LEDs. Maybe that can’t even be done, idk.

I’ve only been doing this for about a couple weeks.

I think I’ve got something working though. I put a new picture.

Thanks!

For god sake stop posting absolutely enormous pictures. Pictures are shown the size they are by web browsers.

So I would add a switch to the right circuit that would only activate the yellow LED, and the switch on the left circuit would activate both LEDs.

To do that wire the switch across the emitter and collector of the photo transistor. Although why you would want to do such a thing heaven only knows.

Grumpy_Mike:
It shows where pin 1 is on the chip. It is not a window. Opto couplers do not have windows.

The only chip I know of with a window is an old type of PROM where you can erase the chip by shining UV light through the window for 10 minutes or so.

Yea, I can see that now, thanks. The chip I have is really small, and when I was told there was an LED inside it, my eyes saw a window, haha. At first. I thought this was just an LED, like an indicator light, inside of a chip. Project 15 in the starter kit had me a little confused.

I think I'm starting to understand how it works now. It's just not what I "thought" it was going to do.

EDIT: Also, in my picture I know I used the wrong kinds of wires. I used green for ground and white for the other signal. I had to put two white together, because that's the only size I had.

I just won a massive set of wires on eBay for a couple dollars, so once that gets here, I will be able to use proper color coding and sizes.

Grumpy_Mike:
For god sake stop posting absolutely enormous pictures. Pictures are shown the size they are by web browsers.

I don't know why the website makes the pictures so large. If you click the icon it will download and you can view it on your computer at the normal size. It's no where near that size on my computer.

CSGuy:
I don't know why the website makes the pictures so large.

The website does not alter the file in anyway. It is an exact copy of what you uploaded.

It just zooms it in.

CSGuy:
It just zooms it in.

No it shows the picture in the size you took the picture. It is your computer that is making it look small.

If you click the icon it will download and you can view it on your computer at the normal size.

Yes and that takes some effort, downloading, locating, calling up a viewing program, and then deleting them, when if you were to post images of a sensible size it is a simple operation.
It is you who are asking the questions so it is your responsibility to make our job as easy as possible.

CSGuy:
I don’t know why the website makes the pictures so large. If you click the icon it will download and you can view it on your computer at the normal size. It’s no where near that size on my computer.

Do you have a photo editor of any kind? If not, you can download a free one called GIMP. With a photo editor you can resize a picture easily. It’s best to make it something like 800 pixels wide or 800 pixels high (whichever direction the longest side is oriented). Then when we click on it, the right hand side of the picture won’t be in the kitchen somewhere.

the pictures are HUGE. 2 meg files.

here are a couple more circuits.

the one on the left uses two optos to control the LED.
this is like an OR gate. if the first OR the second call for light, the LED will light.

the one on the right uses a transistor. the transistor is turned on and off by the opto.
on the right, the LED will be lit all the time. the 5V goes to the base of the transistor and the transistor will complete the circuit for the LED.

when the opto is energized, it pulls the base of the transistor to ground and the LED is turned OFF.
this would invert your input signal.