Relay Optocoupler Driver Circuit Not Operating via GPIO16 of Wemos D1 Mini

Thread Starter

Maria2002

Joined Jan 16, 2026
1
Hello,
I am operating a relay via the GPIO16(D0) pin of the Wemos D1 Mini board. I have made a relay optocoupler driver circuit (Fig 1). The main problem is that GPIO16 is HIGH at boot. To tackle the issue, I made another circuit and simulated it in Proteus (Fig 2). Relay activates when the signal is Low and deactivates when the signal is High. Will this solution work? I am a bit new to it. I am attaching both the figures.
 

Attachments

MisterBill2

Joined Jan 23, 2018
27,159
If there is a problem with it not working, measure the voltage between the base and th emitter when the relay is supposed to operate. It may be that the opto-isolator LED is not getting enough drive current.
 
Top