Making a DIY Optocoupler

By using an LED and an LDR, I made an optocoupler that worked better than I thought it will.
Dec 30, 2022 — 2 mins read — Electronics

Making a DIY Optocoupler

When I worked on my garage door opener, I wanted to use a 12V relay with a NodeMCU development board because that was what I had on hand but, I end up in a ton of trouble as I wasn't able to make it work.

The problem was that the high from the NodeMCU of 3.3V is way lower than the minimum high for a 12V relay so the relay was always on. This is easily solved with an optocoupler but I did not have one in stock at the moment so I ended up replacing the relay with a 5V one.

However, this got me thinking, about if it is possible to construct an optocoupler that can be handy for situations like this, and if it will work at all?!

In the end, the final optocoupler turned out much better than I thought it will and it worked flawlessly with the relay. You can see the entire build and testing phase in the video below.

These experiments are greatly possible because of the great help that Altium Designer and Octopart provide for my channel. As a gift to my viewers, Altium provides a free trial of Altium Designer and 25% off your Altium Designer purchase at: https://www.altium.com/yt/taste_the_code

Tools and materials used in the video:


led prototype experiment LDR
Read next

DIY Phone Repair: How to Easily Replace Your Screen at Home - Redmi 9A

Although many people will open up an appliance like a toaster or a washing machine to try and repair it, not a lot of people will even consi...

You might also enojy this

How to easily repair LED panel drivers in just 5 minutes

I had a bunch of broken LED drivers from the panel light that I use in my home so I decided to give it a go and try to repair them. LED pane...