This version can be used to power devices such as lamp which are connected to the mains.
It's based on a BC547 NPN transistor, with a max rating of (I believe) 30V and max 100mA.
It is controlled by an Arduino, whose pins have a current max of 40mA.
In this circuit, you could power the relay directly, but in my build I will use relays which draw currents of over 40mA.
You can use this to power on/off your lamps at a certain time or signal, if you want check out my other latest circuit for an idea of an IR remote control for the Arduino
Enjoy!