Mains Power: Difference between revisions

From Caps Wiki
Jump to navigation Jump to search
m (Typos)
(→‎Tools and Devices for Working with Mains Powered Devices: Add new images and socket testers & NCV)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div style="background-color:#fceee6; padding: 1.2rem; margin-top: 0.5em; border: 1px solid #df5c15 ; border-top-color:bf3333; border-top-width: .4rem; border-radius: .20rem; box-shadow: 2px 2px #F7F8F9;">[[File:OOjs UI icon alert-warning.svg|35px|left|link=]]'''WARNING''' Mains powered devices contain potentially lethal hazards or can become lethal hazards if not correctly repaired which may result in death or serious injury. Ensure you fully understand the content of this page before attempting to disassemble or repair a mains powered device. Do not attempt to disassemble or repair a mains powered device unless you understand how to do so safely.<br/></div>
{{WarnAlt|warning|large|Mains powered devices contain potentially lethal hazards or can become lethal hazards if not correctly repaired which may result in death or serious injury. Ensure you fully understand the content of this page before attempting to disassemble or repair a mains powered device. Do not attempt to disassemble or repair a mains powered device unless you understand how to do so safely.}}
<div style="background-color:#f8f9fa; padding: 1.2rem; margin-top: 0.5em; border: 1px solid #4666c8; border-top-color:4666c8 ; border-top-width: .4rem; border-radius: .20rem; box-shadow: 2px 2px #F7F8F9;">[[File:OOjs UI icon information-progressive.svg|35px|left|link=]]'''NOTE''' The content of this Wiki is community contributed and is a continuous work-in-progress and as such no guarantees that this information is complete, accurate or applicable can be made. Caps Wiki and its owner/operator and contributors assume no liability for actions taken based on this information.<br/></div>
{{WarnAlt|note|large|The content of this Wiki is community contributed and is a continuous work-in-progress and as such no guarantees that this information is complete, accurate or applicable can be made. Caps Wiki and its owner/operator and contributors assume no liability for actions taken based on this information.}}
 
'''Mains power''' (often called '''line''', '''active''', '''hot''' or '''AC''') refers to the AC power at the final stage of the electrical grid that is run into most buildings and is available at wall outlets. The voltage used varies throughout the world however in North America the standard is 110 - 127 V AC while Europe is 220 - 240 V AC. There is significant danger in coming into contact with mains as the only limit to the current is a breaker or fuse in the service box for the building which is designed to prevent damage to the building's wiring, not prevent damage to connected devices or electrocution. As such devices with exposed mains power have inherent hazards both when they are powered or were recently powered.  
'''Mains power''' (often called '''line''', '''active''', '''hot''' or '''AC''') refers to the AC power at the final stage of the electrical grid that is run into most buildings and is available at wall outlets. The voltage used varies throughout the world however in North America the standard is 110 - 127 V AC while Europe is 220 - 240 V AC. There is significant danger in coming into contact with mains as the only limit to the current is a breaker or fuse in the service box for the building which is designed to prevent damage to the building's wiring, not prevent damage to connected devices or electrocution. As such devices with exposed mains power have inherent hazards both when they are powered or were recently powered.  
== Devices with Separated Mains Voltage Power Supplies ==
== Devices with Separated Mains Voltage Power Supplies ==
[[File:Touching_mains_powered_class_II_low_voltage_circuit.jpg|upright=0.5|thumb|There is no risk of an electric shock when touching a low voltage circuit powered by a compliant isolated class I or II external mains power adapter]]
[[File:Touching_mains_powered_class_II_low_voltage_circuit.jpg|upright=0.5|thumb|There is no risk of an electric shock when touching a low voltage circuit powered by a compliant isolated class I or II external mains power adapter]]
TODO
{{TODO|generic}}
 
Some mains powered devices, especially more modern ones, may have their hazardous high voltage mains power supply separated from the rest of the low voltage circuity. Examples are; a separate external sealed brick power supply, an internal closed frame power supply or an internal open frame power supply with removable plastic covers.
Some mains powered devices, especially more modern ones, may have their hazardous high voltage mains power supply separated from the rest of the low voltage circuity. Examples are; a separate external sealed brick power supply, an internal closed frame power supply or an internal open frame power supply with removable plastic covers.
== Live or Hot Components ==
== Live or Hot Components ==
=== Mains Connected Chassis ===
=== Mains Connected Chassis ===
{{Wikipedia|AC/DC receiver design}}
Some devices such as [[CRT]] displays or televisions or radios may have been designed with a live chassis that is connected to mains power. This means touching the chassis while having contact with either neutral or mains earth can complete a circuit and result in a significant electrical shock. These also pose a hazard for diagnostics and can lead to other difficulties such as finding a suitable DC ground reference for taking measurements.
Some devices such as [[CRT]] displays or televisions or radios may have been designed with a live chassis that is connected to mains power. This means touching the chassis while having contact with either neutral or mains earth can complete a circuit and result in a significant electrical shock. These also pose a hazard for diagnostics and can lead to other difficulties such as finding a suitable DC ground reference for taking measurements.
 
{{TODO|Document methods of determining a live chassis in an unpowered state.}}
TODO - Document methods of determining a live chassis in an unpowered state.
 
=== Non-Isolated Mains Power Supplies ===
=== Non-Isolated Mains Power Supplies ===
TODO
{{TODO|generic}}
*Those power supplies may generate low voltages however they are not isolated but instead are referenced to mains earth which can result in a severe electric shock if touched.
*Those power supplies may generate low voltages however they are not isolated but instead are referenced to mains earth which can result in a severe electric shock if touched.
== Mains Voltage Capacitors ==
== Mains Voltage Capacitors ==
[[File:Mains_bulk_capacitors_big_and_small.jpg|thumb|Mains bulk capacitors from a; 490 W SMPS (left), 10 W SMPS (right)]]
[[File:Mains_bulk_capacitors_big_and_small.jpg|thumb|Mains bulk capacitors from a; 490 W SMPS (left), 10 W SMPS (right)]]
=== Mains Bulk Capacitors ===
=== Mains Bulk Capacitors ===
Mains bulk capacitors are present in many new and old devices, most notably the vast majority of general purpose AC-to-DC power supplies are SMPS (Switch Mode Power Supplies), those power supplies rely on rectifying the mains input voltage from AC into DC which is stored in bulk capacitors. This is done to allow a transistor to switch this DC through a transformer at much higher frequencies (often 100 kHz to 1 MHz) than the grid (50 or 60 Hz), this allows the magnetics (eg. transformer) in the power supply to be smaller, lighter, cheaper and more efficient. However those mains voltage bulk capacitors can be rather large on high powered devices to improve regulation performance and increase hold-up time during grid brownouts, because of this those large mains voltage capacitors can pose a shock hazard even after the device has been powered off due to the charge stored in those capacitors.
Mains bulk capacitors are present in many new and old devices, most notably the vast majority of general purpose AC-to-DC power supplies are SMPS (Switch Mode Power Supplies), those power supplies rely on rectifying the mains input voltage from AC into DC which is stored in bulk capacitors. This is done to allow a transistor to switch this DC through a transformer at much higher frequencies (often 100 kHz to 1 MHz) than the grid (50 or 60 Hz), this allows the magnetics (eg. transformer) in the power supply to be smaller, lighter, cheaper and more efficient. However those mains voltage bulk capacitors can be rather large on high powered devices to improve regulation performance and increase hold-up time during grid brownouts, because of this those large mains voltage capacitors can pose a shock hazard even after the device has been powered off due to the charge stored in those capacitors.
==== Discharging Mains Bulk Capacitors ====
==== Discharging Mains Bulk Capacitors ====
Most modern devices include bleeder resistors to discharge those capacitors however this can take tens of minutes and those resistors can fail. '''Because of this you should always discharge mains bulk capacitors before touching a PCB after it has been powered on.''' To discharge a capacitor manually use an insulated tool such as plastic handled pliers to place a resistor directly across the pins of the capacitor, this will discharge the capacitor over a longer period of time and avoid damaging the capacitor or metal tool due to a sudden discharge. A 100 kΩ 1/4 W resistor can be used to discharge small (<100 µF <450 V) capacitors in under 30 s, when using a lower value resistor or discharging a larger capacitor for a long period a higher power resistor is needed otherwise the resistor may overheat and burn. Some multi-meters have a 'Low-Z' mode which will slowly discharge mains voltage capacitors and provide a readout of the voltage. After this step or on devices where you can visually identify the bleeder resistor across the capacitor and have confidence it is functional you can then bridge the capacitor pins with a metal tool directly. If the device is not connected to mains earth, a non-insulated metal tool can be used as a circuit cannot be made through you however this is generally discouraged.
Most modern devices include bleeder resistors to discharge those capacitors however this can take tens of minutes and those resistors can fail. '''Because of this you should always discharge mains bulk capacitors before touching a PCB after it has been powered on.''' To discharge a capacitor manually use an insulated tool such as plastic handled pliers to place a resistor directly across the pins of the capacitor, this will discharge the capacitor over a longer period of time and avoid damaging the capacitor or metal tool due to a sudden discharge. A 100 kΩ 1/4 W resistor can be used to discharge small (<100 µF <450 V) capacitors in under 30 s, when using a lower value resistor or discharging a larger capacitor for a long period a higher power resistor is needed otherwise the resistor may overheat and burn. Some multi-meters have a 'Low-Z' mode which will slowly discharge mains voltage capacitors and provide a readout of the voltage. After this step or on devices where you can visually identify the bleeder resistor across the capacitor and have confidence it is functional you can then bridge the capacitor pins with a metal tool directly. If the device is not connected to mains earth, a non-insulated metal tool can be used as a circuit cannot be made through you however this is generally discouraged.
<gallery>
<gallery>
File:HT-PCB-140-08058A-P-V06-main-hv-cap.jpg|Combined VFD and SMPS PCB with 37 J mains bulk capacitor
File:HT-PCB-140-08058A-P-V06-main-hv-cap.jpg|Combined VFD and SMPS PCB with 37 J mains bulk capacitor
Line 35: Line 25:
File:HT-PCB-140-08058A-P-V06-main-hv-cap-verify-safe.jpg|Verifying capacitor is discharged by shorting pins
File:HT-PCB-140-08058A-P-V06-main-hv-cap-verify-safe.jpg|Verifying capacitor is discharged by shorting pins
</gallery>
</gallery>
==== Voltages Present on Mains Bulk Capacitors ====
==== Voltages Present on Mains Bulk Capacitors ====
Mains bulk capacitors are charged through rectifiers to the peak mains voltage, however while mains voltage is typically denoted as '230 V AC' this is a contraction of '230 Vrms AC' with 'rms' meaning root mean square. AC voltage is expressed in terms of rms because it allows for easier calculations of power and compatibility with ohms law. An example being 220 Vrms AC × 0.5 A = 110 W. However this means the peak voltage is higher than the rms voltage and this peak voltage is what those capacitors are charged to (240 Vrms AC will be 340 Vp AC and 120 Vrms AC will be 170 Vp AC).
Mains bulk capacitors are charged through rectifiers to the peak mains voltage, however while mains voltage is typically denoted as '230 V AC' this is a contraction of '230 Vrms AC' with 'rms' meaning root mean square. AC voltage is expressed in terms of rms because it allows for easier calculations of power and compatibility with ohms law. An example being 220 Vrms AC × 0.5 A = 110 W. However this means the peak voltage is higher than the rms voltage and this peak voltage is what those capacitors are charged to (240 Vrms AC will be 340 Vp AC and 120 Vrms AC will be 170 Vp AC).


In addition to charging directly through rectifiers some high powered devices like ATX power supplies will have APFC (Active Power Factor Correction), this uses a boost converter to optimize the power extracted from the full AC waveform to improve efficiency and reduce strain on the grid. However this results in the mains bulk capacitor being charged to higher than the mains peak voltage, in some cases up to 400 V DC even in countries where the grid voltage is 100 Vrms AC.
In addition to charging directly through rectifiers some high powered devices like ATX power supplies will have APFC (Active Power Factor Correction), this uses a boost converter to optimize the power extracted from the full AC waveform to improve efficiency and reduce strain on the grid. However this results in the mains bulk capacitor being charged to higher than the mains peak voltage, in some cases up to 400 V DC even in countries where the grid voltage is 100 Vrms AC.
=== Safety Capacitors ===
=== Safety Capacitors ===
Safety capacitors are often found in the EMI filters of many mains powered devices including many mains power supplies, in-particular SMPSs. Those capacitors are called 'safety' capacitors because their failure can result in a hazardous situation. Because of their placement in circuits often directly across line, neutral and earth or from line and neutral to exposed metalwork they can see very large transient events (eg. lightning transients) and must be rated to withstand those without failing catastrophically. There are two main types of safety capacitors for the two main hazards, class X and class Y. Because of this class X and Y safety capacitors must be replaced with proper safety capacitors of equivalent type, not just any random film or ceramic capacitor.
Safety capacitors are often found in the EMI filters of many mains powered devices including many mains power supplies, in-particular SMPSs. Those capacitors are called 'safety' capacitors because their failure can result in a hazardous situation. Because of their placement in circuits often directly across line, neutral and earth or from line and neutral to exposed metalwork they can see very large transient events (eg. lightning transients) and must be rated to withstand those without failing catastrophically. There are two main types of safety capacitors for the two main hazards, class X and class Y. Because of this class X and Y safety capacitors must be replaced with proper safety capacitors of equivalent type, not just any random film or ceramic capacitor.


Those capacitors may also store mains voltages and some more modern devices have bleeder resistors across them however they typically store significantly less energy than even small bulk filter capacitors so shocks are unlikely to be serious.  
Those capacitors may also store mains voltages and some more modern devices have bleeder resistors across them however they typically store significantly less energy than even small bulk filter capacitors so shocks are unlikely to be serious.  
 
{{Wikipedia|Residual-current device}}
==== Class X ====
==== Class X ====
Class X capacitors are used where their failure would result in an electrical fire, an example would be in an EMI filter directly on the mains input before any rectification or fuses. Those capacitors are often metallized film capacitors, typically PP (polypropylene) or PET (polyethylene terephthalate) however some older devices may have metallized paper capacitors (such as those manufactured by RIFA) which are known to fail short circuit and should be replaced. Class X1 is rated for higher voltages and better impulse endurance than X2 or X3.
Class X capacitors are used where their failure would result in an electrical fire, an example would be in an EMI filter directly on the mains input before any rectification or fuses. Those capacitors are often metallized film capacitors, typically PP (polypropylene) or PET (polyethylene terephthalate) however some older devices may have metallized paper capacitors (such as those manufactured by RIFA) which are known to fail short circuit and should be replaced. Class X1 is rated for higher voltages and better impulse endurance than X2 or X3.
Line 51: Line 39:
Those capacitors may also be found in certain 'dropper' style power supplies for low power non-isolated applications such as LED bulbs or motion sensors, those capacitors can degrade with time losing capacitance until the device no longer works.  
Those capacitors may also be found in certain 'dropper' style power supplies for low power non-isolated applications such as LED bulbs or motion sensors, those capacitors can degrade with time losing capacitance until the device no longer works.  
<gallery>
<gallery>
File:Capacitor_class_x_example_1.jpg
File:Capacitor class x example 1.jpg
File:Capacitor_class_x_example_2.jpg
File:Capacitor class x example 2.jpg
File:Tek2445_PSU_board_01_(crop).jpg
File:Tek2445 PSU board 01 (crop).jpg
File:ROBUS-PROTON-360-1-orig-caps-1.jpg
</gallery>
</gallery>
==== Class Y ====
==== Class Y ====
Class Y capacitors are used where their failure would result in things the user can touch becoming live at mains voltage, an example is the EMI suppression capacitor across the transformer in a SMPS. Those are often ceramic capacitors that do not fail often, if they fail they fail open circuit almost always. Class Y1 is rated for higher voltages and better impulse endurance than Y2, Y3 or Y4.
Class Y capacitors are used where their failure would result in things the user can touch becoming live at mains voltage, an example is the EMI suppression capacitor across the transformer in a SMPS. Those are often ceramic capacitors that do not fail often, if they fail they fail open circuit almost always. Class Y1 is rated for higher voltages and better impulse endurance than Y2, Y3 or Y4.
Line 63: Line 51:
File:Capacitor_class_y_example_3.jpg
File:Capacitor_class_y_example_3.jpg
</gallery>
</gallery>
==== Sealed EMI Filters ====
==== Sealed EMI Filters ====
Sealed EMI filters contain class X and Y capacitors typically along with filter chokes, they are sometimes integrated into IEC power sockets.
Sealed EMI filters contain class X and Y capacitors typically along with filter chokes, they are sometimes integrated into IEC power sockets.
Line 70: Line 57:
File:Netzfilter_modul.jpg
File:Netzfilter_modul.jpg
</gallery>
</gallery>
== Tools and Devices for Working with Mains Powered Devices ==


== Tools and Devices for Working with Mains Powered Devices ==
=== Socket Testers ===
{{Wikipedia|Electrical outlet tester}}
Socket testers are low cost devices that can be used to quickly determine if the wiring of a mains socket is seriously incorrect, for example having live and neutral reversed. Although those devices cannot detect all possible miswiring of a socket or more complex issues such as high ground resistance or a false ground they are still an essential tool for quick tests.<gallery>
File:UNI-T-UT07A-AU-live-neu-rev.jpg|UNI-T socket tester testing a faulty extension cord with live and neutral reversed
</gallery>


=== Non-Contact Voltage Testers ===
{{Wikipedia|Electrical outlet tester#Non-contact voltage detectors}}
{{TODO|generic}}
=== Earth Leakage Safety Devices ===
=== Earth Leakage Safety Devices ===
TODO
{{Wikipedia|Residual-current device}}
<br />
{{WarnAlt|severity=warning|size=small|message=Earth leakage safety devices of unsuitable Type (eg. Type AC) will not provide protection against shocks from certain devices such as SMPSs, inverters or EVs.}}


Earth leakage safety devices can reduce the risk of serious harm by disconnecting mains power when a current imbalance is detected between live and neutral implying current is leaking to ground somewhere in the circuit, possibly through a human. Those devices should be used at all times when working on mains voltage equipment and are required on most circuits in new homes and workplaces in most countries but standalone plug in units are available. There are two main specifications for those devices; the trip current, typically 30 mA (10 mA recommended for dedicated outlets) and their 'Type'. Type A is most common and will trigger in most household scenarios, Type B is for high frequency inverters with high voltage DC hazards, Type AC is not recommended for anything other than purely resistive loads such as heaters or house wiring itself. Those devices are typically reliable for many years however should be tested occasionally with their inbuilt test button to confirm basic functionality.
<gallery>
File:Schneider Electric A9D31620.JPG|Standard DIN rail mount RCBO protecting an entire circuit
File:Residential GFCI receptacle.jpg|North American GFCI protected outlet
</gallery>
=== Isolation Transformers ===
=== Isolation Transformers ===
TODO
{{Wikipedia|Isolation transformer#Electronics testing}}
<br />
{{WarnAlt|severity=warning|size=small|message=You can still receive a shock when touching active and neutral when using an isolation transformer.}}
<br />
{{WarnAlt|severity=warning|size=small|message=Earth leakage safety devices on the primary side are defeated when using an isolation transformer, they offer no protection against any shocks.}}
 
Isolation transformers allow a device to be powered from mains but without protective earth being bonded to neutral, this can be useful in certain probing scenarios, especially when a high-voltage differential probe is unavailable. Isolation transformers can also provide some safety against electrical shocks as touching mains voltage that is not referenced to earth will not travel through your body to earth as no circuit can be completed due to the galvanic isolation in the transformer.
=== High-Voltage Differential Probes and Isolated Oscilloscopes ===
[[Category:General Guides]]
{{WarnAlt|severity=warning|size=small|message=Do not tape over the protective earth pin of an oscilloscope or other device for a makeshift isolated measurement.}}


=== Differential Oscilloscopes and Probes ===
High-voltage differential probes and isolated oscilloscopes allow for measuring signals without the limitation of being always ground referenced, and example would be measuring between live and neutral, if using a normal oscilloscope, connecting the ground lead to neutral would create a short between neutral and protective earth possibly damaging the probe, oscilloscope and tripping any earth leakage safety devices. Those special probes and oscilloscopes have floating inputs so there is no risk of shorting anything.<gallery>
TODO
File:Micsig-dp20003-measuring-live-to-neutral.jpg|Micsig DP20003 100 MHz Differential HV Probe
</gallery>


[[Category:General Guides]]
== Laws ==
In some jurisdictions manufacturing, constructing, installing, testing, maintaining, repairing, altering, removing, or replacing 'fixed' or 'plug-in' mains powered devices is unlawful. Check local laws before attempting anything yourself and ensure you have the correct up to date certifications, registration and training.

Latest revision as of 15:35, 13 April 2023

warning
WARNING Mains powered devices contain potentially lethal hazards or can become lethal hazards if not correctly repaired which may result in death or serious injury. Ensure you fully understand the content of this page before attempting to disassemble or repair a mains powered device. Do not attempt to disassemble or repair a mains powered device unless you understand how to do so safely.
note
NOTE The content of this Wiki is community contributed and is a continuous work-in-progress and as such no guarantees that this information is complete, accurate or applicable can be made. Caps Wiki and its owner/operator and contributors assume no liability for actions taken based on this information.

Mains power (often called line, active, hot or AC) refers to the AC power at the final stage of the electrical grid that is run into most buildings and is available at wall outlets. The voltage used varies throughout the world however in North America the standard is 110 - 127 V AC while Europe is 220 - 240 V AC. There is significant danger in coming into contact with mains as the only limit to the current is a breaker or fuse in the service box for the building which is designed to prevent damage to the building's wiring, not prevent damage to connected devices or electrocution. As such devices with exposed mains power have inherent hazards both when they are powered or were recently powered.

Devices with Separated Mains Voltage Power Supplies

There is no risk of an electric shock when touching a low voltage circuit powered by a compliant isolated class I or II external mains power adapter
custom This section is a work in progress.

Some mains powered devices, especially more modern ones, may have their hazardous high voltage mains power supply separated from the rest of the low voltage circuity. Examples are; a separate external sealed brick power supply, an internal closed frame power supply or an internal open frame power supply with removable plastic covers.

Live or Hot Components

Mains Connected Chassis

For more information, see this article's corresponding Wikipedia page: AC/DC receiver design.

Some devices such as CRT displays or televisions or radios may have been designed with a live chassis that is connected to mains power. This means touching the chassis while having contact with either neutral or mains earth can complete a circuit and result in a significant electrical shock. These also pose a hazard for diagnostics and can lead to other difficulties such as finding a suitable DC ground reference for taking measurements.

custom TODO Document methods of determining a live chassis in an unpowered state.

Non-Isolated Mains Power Supplies

custom This section is a work in progress.
  • Those power supplies may generate low voltages however they are not isolated but instead are referenced to mains earth which can result in a severe electric shock if touched.

Mains Voltage Capacitors

Mains bulk capacitors from a; 490 W SMPS (left), 10 W SMPS (right)

Mains Bulk Capacitors

Mains bulk capacitors are present in many new and old devices, most notably the vast majority of general purpose AC-to-DC power supplies are SMPS (Switch Mode Power Supplies), those power supplies rely on rectifying the mains input voltage from AC into DC which is stored in bulk capacitors. This is done to allow a transistor to switch this DC through a transformer at much higher frequencies (often 100 kHz to 1 MHz) than the grid (50 or 60 Hz), this allows the magnetics (eg. transformer) in the power supply to be smaller, lighter, cheaper and more efficient. However those mains voltage bulk capacitors can be rather large on high powered devices to improve regulation performance and increase hold-up time during grid brownouts, because of this those large mains voltage capacitors can pose a shock hazard even after the device has been powered off due to the charge stored in those capacitors.

Discharging Mains Bulk Capacitors

Most modern devices include bleeder resistors to discharge those capacitors however this can take tens of minutes and those resistors can fail. Because of this you should always discharge mains bulk capacitors before touching a PCB after it has been powered on. To discharge a capacitor manually use an insulated tool such as plastic handled pliers to place a resistor directly across the pins of the capacitor, this will discharge the capacitor over a longer period of time and avoid damaging the capacitor or metal tool due to a sudden discharge. A 100 kΩ 1/4 W resistor can be used to discharge small (<100 µF <450 V) capacitors in under 30 s, when using a lower value resistor or discharging a larger capacitor for a long period a higher power resistor is needed otherwise the resistor may overheat and burn. Some multi-meters have a 'Low-Z' mode which will slowly discharge mains voltage capacitors and provide a readout of the voltage. After this step or on devices where you can visually identify the bleeder resistor across the capacitor and have confidence it is functional you can then bridge the capacitor pins with a metal tool directly. If the device is not connected to mains earth, a non-insulated metal tool can be used as a circuit cannot be made through you however this is generally discouraged.

Voltages Present on Mains Bulk Capacitors

Mains bulk capacitors are charged through rectifiers to the peak mains voltage, however while mains voltage is typically denoted as '230 V AC' this is a contraction of '230 Vrms AC' with 'rms' meaning root mean square. AC voltage is expressed in terms of rms because it allows for easier calculations of power and compatibility with ohms law. An example being 220 Vrms AC × 0.5 A = 110 W. However this means the peak voltage is higher than the rms voltage and this peak voltage is what those capacitors are charged to (240 Vrms AC will be 340 Vp AC and 120 Vrms AC will be 170 Vp AC).

In addition to charging directly through rectifiers some high powered devices like ATX power supplies will have APFC (Active Power Factor Correction), this uses a boost converter to optimize the power extracted from the full AC waveform to improve efficiency and reduce strain on the grid. However this results in the mains bulk capacitor being charged to higher than the mains peak voltage, in some cases up to 400 V DC even in countries where the grid voltage is 100 Vrms AC.

Safety Capacitors

Safety capacitors are often found in the EMI filters of many mains powered devices including many mains power supplies, in-particular SMPSs. Those capacitors are called 'safety' capacitors because their failure can result in a hazardous situation. Because of their placement in circuits often directly across line, neutral and earth or from line and neutral to exposed metalwork they can see very large transient events (eg. lightning transients) and must be rated to withstand those without failing catastrophically. There are two main types of safety capacitors for the two main hazards, class X and class Y. Because of this class X and Y safety capacitors must be replaced with proper safety capacitors of equivalent type, not just any random film or ceramic capacitor.

Those capacitors may also store mains voltages and some more modern devices have bleeder resistors across them however they typically store significantly less energy than even small bulk filter capacitors so shocks are unlikely to be serious.

For more information, see this article's corresponding Wikipedia page: Residual-current device.

Class X

Class X capacitors are used where their failure would result in an electrical fire, an example would be in an EMI filter directly on the mains input before any rectification or fuses. Those capacitors are often metallized film capacitors, typically PP (polypropylene) or PET (polyethylene terephthalate) however some older devices may have metallized paper capacitors (such as those manufactured by RIFA) which are known to fail short circuit and should be replaced. Class X1 is rated for higher voltages and better impulse endurance than X2 or X3.

Those capacitors may also be found in certain 'dropper' style power supplies for low power non-isolated applications such as LED bulbs or motion sensors, those capacitors can degrade with time losing capacitance until the device no longer works.

Class Y

Class Y capacitors are used where their failure would result in things the user can touch becoming live at mains voltage, an example is the EMI suppression capacitor across the transformer in a SMPS. Those are often ceramic capacitors that do not fail often, if they fail they fail open circuit almost always. Class Y1 is rated for higher voltages and better impulse endurance than Y2, Y3 or Y4.

Sealed EMI Filters

Sealed EMI filters contain class X and Y capacitors typically along with filter chokes, they are sometimes integrated into IEC power sockets.

Tools and Devices for Working with Mains Powered Devices

Socket Testers

For more information, see this article's corresponding Wikipedia page: Electrical outlet tester.

Socket testers are low cost devices that can be used to quickly determine if the wiring of a mains socket is seriously incorrect, for example having live and neutral reversed. Although those devices cannot detect all possible miswiring of a socket or more complex issues such as high ground resistance or a false ground they are still an essential tool for quick tests.

Non-Contact Voltage Testers

For more information, see this article's corresponding Wikipedia page: Electrical outlet tester#Non-contact voltage detectors.
custom This section is a work in progress.

Earth Leakage Safety Devices

For more information, see this article's corresponding Wikipedia page: Residual-current device.


warning WARNING Earth leakage safety devices of unsuitable Type (eg. Type AC) will not provide protection against shocks from certain devices such as SMPSs, inverters or EVs.

Earth leakage safety devices can reduce the risk of serious harm by disconnecting mains power when a current imbalance is detected between live and neutral implying current is leaking to ground somewhere in the circuit, possibly through a human. Those devices should be used at all times when working on mains voltage equipment and are required on most circuits in new homes and workplaces in most countries but standalone plug in units are available. There are two main specifications for those devices; the trip current, typically 30 mA (10 mA recommended for dedicated outlets) and their 'Type'. Type A is most common and will trigger in most household scenarios, Type B is for high frequency inverters with high voltage DC hazards, Type AC is not recommended for anything other than purely resistive loads such as heaters or house wiring itself. Those devices are typically reliable for many years however should be tested occasionally with their inbuilt test button to confirm basic functionality.

Isolation Transformers

For more information, see this article's corresponding Wikipedia page: Isolation transformer#Electronics testing.


warning WARNING You can still receive a shock when touching active and neutral when using an isolation transformer.
warning WARNING Earth leakage safety devices on the primary side are defeated when using an isolation transformer, they offer no protection against any shocks.

Isolation transformers allow a device to be powered from mains but without protective earth being bonded to neutral, this can be useful in certain probing scenarios, especially when a high-voltage differential probe is unavailable. Isolation transformers can also provide some safety against electrical shocks as touching mains voltage that is not referenced to earth will not travel through your body to earth as no circuit can be completed due to the galvanic isolation in the transformer.

High-Voltage Differential Probes and Isolated Oscilloscopes

warning WARNING Do not tape over the protective earth pin of an oscilloscope or other device for a makeshift isolated measurement.

High-voltage differential probes and isolated oscilloscopes allow for measuring signals without the limitation of being always ground referenced, and example would be measuring between live and neutral, if using a normal oscilloscope, connecting the ground lead to neutral would create a short between neutral and protective earth possibly damaging the probe, oscilloscope and tripping any earth leakage safety devices. Those special probes and oscilloscopes have floating inputs so there is no risk of shorting anything.

Laws

In some jurisdictions manufacturing, constructing, installing, testing, maintaining, repairing, altering, removing, or replacing 'fixed' or 'plug-in' mains powered devices is unlawful. Check local laws before attempting anything yourself and ensure you have the correct up to date certifications, registration and training.