Can I sink 12V @ 15mA through an mbed pin?

23 Mar 2012

I want to operate a relay with the mbed. It requires 12V over a 800ohm coil at 15mA. Obviously, I can use a fet here, but I was wondering if this is strictly necessary? If I use an open-drain pin, will it take the 12V without something bad happening?

23 Mar 2012

Can you do a circuit diagram? If you pull the pin low to operate the relay how are you going to turn the relay off?

23 Mar 2012

Dont try that. Something bad will happen... Most of the inputs and outputs are 5V tolerant even when they are in three state mode. They will not like 12V, they will not like anything even higher when your relay switches on/off and generates inductionspikes. You have to use external drivers.

23 Mar 2012

... Wim is right, LPC1768 spec sheet says: Open-drain 5 V tolerant digital I/O pad

23 Mar 2012

A simple transistor, at most 25p, MBED £40,

No comparison

Ceri

24 Mar 2012

I think you can drive that coil directly if you put a Zener (4v7) between the I/O pin and ground.

24 Mar 2012

No

24 Mar 2012

Please do not do that ! You need a transistor and probably a fly-back diode.

Check out Wikipedia or Google.

Cheers

Ceri.

.........

Someone has done a truly amazing post on forum, about transistors, relays, solid state relays,

Have a search for that,

Bit difficult on my phone.

Ceri.

25 Mar 2012

Hello, this post mentoied by Ceri is here http://mbed.org/users/4180_1/notebook/relays1/. I am already reading it beacause it is new for me and want to give it a try. Thank You for mentoing this interesting article.