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?
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?
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.
... Wim is right, LPC1768 spec sheet says:
Open-drain 5 V tolerant digital I/O pad
A simple transistor, at most 25p, MBED £40,
I think you can drive that coil directly if you put a Zener (4v7) between the I/O pin and ground.
Please do not do that !
You need a transistor and probably a fly-back diode.
Check out Wikipedia or Google.
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.
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.
Please log in to post a reply.
mbed, the fastest way to prototype with ARM based microcontrollers.
^ back to top