I would like to operate a 12V lamp from the arduino uno, 150 meter away. Any possible solution is possible to implement!
How would be the best way to do it? What kind of cables do i need? Transistors? Relay?
I am open for all kind of solution.
What if I would like to control 230V, 150 meters away later, do i need to change the whole configuration? The best would be if it would be enough to change just for example a relay in one end.
If you are using a relay suitable for the 230 volts and it's load, you'll only need to change the bulb to a 230 volts variant.
Use cable suitable for 230 volts between relay and lamp.
You'll find out that having a, say 2 volts, drop over the 230 volts will have lesser influence to the lamp brightness than having that over the 12 volts.
A drop like that will occur because of the length and the resistance of the cable, but i have no idea of the actual size of that voltage drop (depends on the wire gauge and the respective load).
2 volts is less than 1 % @230 volts, but about 17 % @ 12 volts.
Assuming the power is at the far-end, 150M is not a big deal.
If the power goes over 150M, you need heavy-gauge wire. The more wattage and current, the fatter the wire needs to be. With just a small amount of current to "trigger" a relay or transistor, you can use a small wire.
A relay is only for on-off control (no dimming). A relay is probably easier for a beginner. You just need a relay with a 5V rated coil that can run directly from the Arduino, and contact ratings at least as high as the voltage and current you are controlling.
Assuming the power source for the lighting is at the far-end, the relay goes at the far-end with the lights. The power for the Arduino doesn't have to be from the same source as the lamp-power.
If you are sending AC signals or data over long distances, you might need to be concerned with noise-pickup. But with a simple on-or-off DC control line, noise is usually not a problem, and if it is it can easily be filtered-out with a capacitor.
I think 24V dc opto coupled circuit should work. The input is the arduino 5v signal. the opto output is the
24V dc powered link that powers the input on an opto at the other end. The output of the opto at the other
end controls a relay that connects or disconnects the 12V light.
Definitely a wireless method is best - the cost of 100's of metres of wire is much more than
a couple of RF12M's or similar RF modules. For 12V you need the power source close to
the load, or you'll be needing many kg of copper to carry the current - there's a reason power
distribution uses high voltages.
Thinking about it find modules that don't need a separate microcontroller to drive a single
logic output, then you only need Arduino at the sending end? MOSFET to switch 12V
load, opto-triac to handle mains.