Relay switching circuit assistance.

JohnRob:
Try changing R1 to 1100 ohms or so.


Eh?

He originally specified 220 Ohms. :astonished:

Why would increasing the value improve things?

I do agree that a Darlington is a bad choice at 5 V. A common eBay (opto-isolated) relay module would do the job perfectly well - if you trust the clearance at the contact terminals - the ones with the slot in the PCB.

People sometimes unfortunately stumble across the old, obsolete 4N25 opto-isolators. The ones in the eBay modules are modern versions with much more appropriate CTR.