I am trying to build an automatic light switch for my aquarium lights. The ones I bought started making a weird noise after a while and since I have some Arduino knowledge I thought I could give it a try.
My first idea was to use a transistor, cut one of the wires from the lights cable and connect it to the collector and emitter of the transistor and then connect the base to an output pin from the Arduino so I can control it from software. I will be using a real time clock module for the time and have it switch at fixed intervals. I plan on adding more functionality in time, after i make this work.
I could not find a 220/240 V transistor and, since I live in Europe, I was thinking of using 3 120V 2N5401 transistors in parallel. 3 because "better safe than sorry".
Also, the light I will connect is connected directly to the wall plug, so AC.
I have made a drawing of the circuit I have in mind. I am aware that one transistor is flipped the other way and I don't know if the orientation if the current source is correct. I made this in a hurry and I plan on doing more research before building it.
At first, everything will be built on a breadboard. I will consult with a hardware store staff member / electrician about connecting the 220V wires to the breadboard, as well as everything I learn here before building it.
Questions:
1. Will the 3 2N5401 transistors handle 220V in this configuration?
2. Can they be used for AC current, if the base is connected to an DC pin on the Arduino board?
3. Any other suggestions, like necessary resistors or anything else?
4. Except for a way of turning ON/OFF the light manually and a hardware input for the intervals at which the switch activates (buttons, display, joystick, etc), any other functionality you think I could add to it?