Start with LEDs and get that working before adding the 240V circuitry.
I'd leave the people-motion sensor for last... You'll have to figure-out the hardware connections depending on how the motion sensor works. Typically, you run a motion sensor off 12VDC, and the output either goes from 0 to 12V when motion is sensed, or the other way from 12V to zero. Or, it might have normally-open or normally-closed relay contacts. On the software side, all you need is an If-statement
... Do one thing if the condition is met, and do something else (or nothing) if the condition is not met.
how to convert/use the Arduino (UNO) to be able to output the sequence to actual 4 halogen lights of 50W each / 240V power supply.You MUST isolate the high voltage
from the Arduino and yourself. The easiest and best way to to that (if you don't need dimming) is with solid state relays (one relay per lamp or one per output-channel.)
). Make sure the solid state relay can be triggered from the Arduino's 5V output, and the output rating should be at least
240V and about 1 Amp. (240V at 50W is about 1/4 of an amp).
A relay is just a switch that's operated electrically... With a tiny amount of electricity (from a battery or Arduino, etc.) you can turn on/off a huge amount of electricity.
Mechanical relays could work, but they make a bit of noise, might be slow, and most won't work direclty from the Arduino's 5V output.
How do I ground 4 lights?
On the AC side, the ground is not part of the lighting circuit. If the lamp (or appliance) is grounded, the metal case is grounded for safety.
If something goes wrong and a "hot" wire somehow gets connected to the case, nobody will get shocked because the case remains at ground potential (zero volts). With this error condition... Current flows directly to ground (with essentially no resistance) and the circuit breaker blows.
And since the AC is isolated by the relay, you don't need a connection between the Arduino's low-voltage ground and the AC ground. (One of the relay'slow-voltage input terminals is connected to the Arduino's ground.)
So if the lamp has 3 connections/terminals, one is ground, one is "hot" and the other is "neutral". Current flows (something like water in a pipe*) from hot, through the light, and back through the neutral. (The power source or battery is like a water pump.)
A switch (or relay) wired in series with the hot (or neutral) connection can break the connection, stop current flow, and turn off the light. Normally the switch should be wired to the hot side, but a switch on either side will break the circuit and turn off the light.
* Water pipes are a actually poor analogy, because if you break a wire (or open a connection) the electrons don't spill out.
And, it's AC, so the direction of curren flow is alternating, and it may be hard to understand how resistance is related to work & energy such as "generating" heat or light. The important thing to understand is that electricity flows in a circuit/circle, and if you break the circuit, currnet stops flowing.