Additional components needed or not?

(deleted)

Only the relays ? or modules with relays ?
The current of an output pin might not be enough to activate the relay, so you need a transistor to drive the relay.

(deleted)

Yes, with a resistor to the base or gate.
The transistor with a resistor of 1k (no more than 1k8).
The mosfet with a protection resistor of 100 ohm (100 ohm to 10k).
And you need fly-back diodes parallel with the relay.

(deleted)

1N4148 Will be fine
BS170 Will also be fine
But using a PNP? It's no problem but you have to think different.

Pelle

Here is a great video on the basics of a MOSFET:

Just connect a resistor between G and S to discharge the MOSFET. It shouldn't be a problem when to actually drive the G to ground but if your Arduino pin goes into high impedance by taking off power and the power to the device is still on (like a light bulb or in your case a relay coil), the gate may still have enough charge to keep it on. A resistor of about 100kohm should be fine. Hope this helps!

the Yun delivers only 40 mA.

For future reference that 40mA figure is the absolute max before damage is expected, you should never draw than much current. 20mA is considered a good limit, 30 if you really must. And there are total limits on the IC package as well, so you can't draw even 20mA from every pin.


Rob