I tried to connect a relay that switches at 3 volt to an IO port on an EMX board. However when I measure the voltage after connecting the relay it is only 0.9 volts or so. That’s not enough to switch the relay. Is it possible to connect a relay directly to an IO port or do I need to put some electrical component inbetween?
You’ll also want to put a reverse polarized diode across the relay coil to keep the back EMF from destroying the transistor. Some mosfet transistors have these built in though.
Do NOT ever connect a relay directly to a micro, any micro not just FEZ. Not only relays need too much power, they generate huge spikes that can kill your micro.
A quick google search give this this as the first hit…you only have to ask google
Better still… Always use a darlington pair transistor… These also have diode protection and only consume a real tiny current base to emitter. You can drive loads up to10A with a base resistor of 1k…