At 5v the 180 ohm resistor should provide 27ma to the TLP521. The TLP521 has a Current Transfer Ratio of 50%, which should provide 13+ma to the relay coil which requires 12ma to operate.
Sorry...I neglected to state that I also feed +5v and GND to the coil side of the optocoupler. The +5v is coming straight from the power supply. The power supply is rated at 500ma and my entire circuit is currently consuming ~30ma, so the additional 40ma shouldn't be a problem at all for the power supply.-Mitch
You have wired the output transistor wrong, it needs to be in a 'low side' npn switching configuration. Ground the emitter pin 9, wire pin 10 to C1 on the relay, wire C2 on relay to +5vdc. That should work.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16