Hi,
I am going through the inventors kit and was wondering why the circuit with the relay requires a transistor and a diode? It appears the board sends enough power when i wire the output pin 2 directly to the relay coil things seem to work fine.
thanks,
Adam
Some relays are more sensitive, take less current, to energize than others. The one used in the SIK might work driven from the digital pin but a lot of the rest won’t. Perhaps the intent was to show a simple “driver circuit”, useful in almost all cases. Plus learning to use a transistor as a switch (for things other than just relays) is a good lesson.
As for the diode … you want that even w/o the transistor. It’s there to tame the inductive “kick” that happens when the current to the relay coil is shut off. Read more …
http://en.wikipedia.org/wiki/Flyback_diode
Continuing to use the relay directly w/o the diode will likely cause failure of that pin.