All articles

    Safety with Household Mains (220 V): Rules Before Any Project

    The safety rules before you work on anything connected to 220 V mains: why it's dangerous and how current affects the body, the breaker, the fuse and the 30 mA residual-current device and the difference between them, earth, multimeter CAT ratings, closed enclosures and spacing on the board, capacitors that stay charged, danger signs in a project, what to do if someone gets a shock, and when to call an electrician.

    Updated 7 min read

    Most electronics projects run on 5 or 12 V, which is safe for your body. But as soon as you get near household mains, the story is completely different: a mistake here can be fatal, or start a fire. This article isn't an explanation of 220 V wiring; it's the rules you must know before anything else.

    220 V alternating, with a peak of about 311 V
    220 V alternating, with a peak of about 311 V

    Why is it dangerous?

    • Mains in Egypt is 220 V AC, 50 Hz. That's the effective voltage: the peak is about 311 V. See AC and DC.
    • Dry skin resists somewhat, but moisture and sweat lower the resistance greatly.
    • A small current (tens of milliamps) passing through the heart can be enough to stop it.
    • Heat from a loose connection or thin wire can start a fire without anyone noticing.

    It's the current that harms

    Not the voltage alone: it's the current flowing through the body that does the damage, and a high voltage is what can push it. Roughly, for 50 Hz AC:

    Current through the bodyApproximate effect
    About 1 mABarely felt
    5–10 mAPainful
    10–20 mAThe muscles contract and you may not be able to let go of the wire
    30 mA and aboveDanger to breathing and the heart

    Simply by Ohm's law: 220 V across a body of 2000 Ω (a wet hand) = 110 mA. That's why household mains isn't a toy. See Ohm's law.

    Why is 12 V safe? The same body, 12 ÷ 2000 = 6 mA in the worst conditions, and much less with dry skin. That's why a voltage below about 50 V is generally considered a safe low voltage in normal conditions.

    The rules

    1. Disconnect the power before you touch anything: unplug it from the wall, not just the device's switch.
    2. Confirm by measuring that there's no voltage, with a multimeter of a suitable category (CAT II or III) with sound leads.
    3. Don't work alone on something connected, and have someone present who knows how to cut the power.
    4. One hand if you must measure while it's live, with the other kept away, so current doesn't pass through your chest.
    5. A dry floor and shoes, and no water nearby.

    Test the multimeter first: measure a source known to be live (another socket) before and after measuring the place you've disconnected. If the multimeter is faulty or on the wrong setting, it will tell you "zero" while the power is there.

    Multimeter categories (CAT)

    CategoryFor use on
    CAT ILow-voltage electronics only
    CAT IIAppliances that plug into a socket
    CAT IIIThe distribution board and fixed wiring in the home

    A very cheap multimeter marked CAT III may not really be so. If you'll measure 220 V regularly, buy a meter from a trusted source.

    Protection in the home and the device

    • A residual-current device (RCD or ELCB) with 30 mA sensitivity: it disconnects if current is leaking to earth, as when someone gets a shock. The most important protection for people.
    • A fuse of a suitable rating on the device's input.
    • Earth connected to any metal body. See what is ground.

    The difference between them

    ProtectionProtects againstDoesn't protect against
    The fuse and ordinary breakerShort circuits and overload (fire)Current passing through your body
    The 30 mA RCDCurrent leaking to earth through a personTouching both conductors together (live and neutral)
    EarthA metal body becoming liveA broken earth wire itself

    So no single protection is enough. And an ordinary breaker (10 or 16 A) is designed to protect the wire from fire, not to protect you, because 16 A is vastly more than what harms the body.

    Test the RCD: it has a Test button. Press it every few months; it must disconnect immediately.

    In your project

    • Use ready-made, isolated and certified modules and power supplies instead of designing a 220 V circuit yourself.
    • A closed enclosure (preferably insulating plastic), with no part at 220 V that you can touch.
    • Secure the cable with a clamp so that if it's pulled it doesn't come out of the terminal.
    • Enough spacing on the board between the 220 V part and the low-voltage part (creepage and clearance), and sometimes a slot in the board. This is an essential part of PCB design.
    • An optocoupler or relay separates the microcontroller from the 220 V. See the optocoupler and the relay module.

    A relay module isn't safe on its own: on most cheap modules the spacing on the board between the 220 V terminals and the Arduino side is small, and the terminals are exposed. If you use one, put it in a closed enclosure, and don't leave the 220 V terminals exposed. Better for a beginner: a ready-made, certified smart plug that you control remotely.

    Spacing on the board

    • Clearance: the shortest distance through the air between two conductors.
    • Creepage: the shortest distance along the surface of the board between them (dust and moisture travel along it).
    • For safe separation between 220 V and low voltage, the required distance is millimetres (6–8 mm is often quoted), and the exact value comes from the standards for the type of device. A slot in the board lengthens the creepage.

    Capacitors: a danger after disconnection

    Power supply capacitors can stay charged to a high voltage for minutes after disconnection. Don't touch an open power supply board until you're sure it's discharged. See bulging capacitors.

    The large capacitor next to the input in a power supply charges to about 311 V (the peak of the 220). Measure it with the multimeter before touching anything. And if you're not sure, don't open the power supply at all: it's one of the most dangerous things for a beginner.

    Danger signs in a working project

    • A smell of plastic or burning, or a crackling sound.
    • A plug or wire that's hot or discoloured.
    • A spark when connecting or disconnecting.
    • A slight tingle when you touch the device's metal body: the earth isn't connected and there's leakage.

    In any of these cases: disconnect it at the source and don't switch it on again until you know the cause.

    If someone gets a shock

    1. Don't touch them while they're still connected, or you'll get a shock too.
    2. Cut the power at the breaker or plug immediately.
    3. If you can't cut it, push them away with something dry and insulating (wood or plastic) while standing on something dry.
    4. Call an ambulance immediately (123 in Egypt), even if they say they're fine, because the effect of electricity on the heart can appear later.

    When to say "no"?

    • If you're not 100% sure of the wiring.
    • If you'll modify the household wiring itself (sockets, the board, wires in the wall): that's an electrician's job.
    • If the project will be left running on its own with no one nearby (heaters, chargers).

    Start and build your experience on low voltage first. Electronics has plenty of fun and useful things without going near 220 V.

    FAQ

    Why doesn't the fuse protect me? Because a fuse disconnects at amps, and your body is harmed by milliamps. The fuse protects the device and the wire from fire. What protects you is the RCD, insulation and earth.

    Is a test screwdriver (the one that lights up) enough to check? It gives you a quick idea, but it can be wrong (a faint light you can't see, or a weak battery in electronic types). To confirm the power is off, use a suitable multimeter.

    Circuits Nerd
    © 2026 Circuits Nerd. All rights reserved.