Why the hum?
Where 60 Hz comes from, how it gets into you, why a notch filter is the wrong first answer, and the ordered list of things that actually fix it.
On this page10 min
The first thing your EEGElectroencephalography (EEG) Recording the brain's electrical activity from electrodes on the scalp, a few tens of microvolts of blurred, summed cortical activity. Related: Electrocorticography (ECoG)Electrocorticography (ECoG) Recording from electrodes placed on the surface of the brain under the skull, usually during epilepsy surgery evaluation; cleaner and sharper than EEG. , Magnetoencephalography (MEG)Magnetoencephalography (MEG) Recording the tiny magnetic fields produced by cortical currents with superconducting sensors in a shielded room; less blurred by the skull than EEG, and far more expensive. , Volume conductionVolume conduction The spreading of currents from a source through the conductive tissues of the head, which is why one source shows up on many electrodes and why scalp EEG is blurry. , Microvolt (µV)Microvolt (µV) One millionth of a volt. Scalp EEG is tens of microvolts; a AA battery is 1.5 million of them. . Glossary entry showed you was 60 hertz. Every wire in the walls carries alternating current at that frequency, and every wire is one plate of a capacitor whose other plate is you. A tiny current flows through that capacitor into your body, and your body, being a resistor, turns it into a voltage: the hum. Here is how it gets in, why filtering it out afterward is a bad first move, and the list of fixes in the order they work.
- Set Mains hum to 3. The trace is a solid band.
- Turn on the notchNotch filter A very narrow filter that removes one frequency, usually 60 Hz mains hum; it also rings and distorts nearby content, so fix the hum at the source first. Related: FilterFilter An operation that passes some frequencies and attenuates others; every filter also delays or distorts the timing of what it passes. , Common-mode signalCommon-mode signal A voltage that appears equally on both inputs of a differential amplifier, such as 60 Hz hum picked up by the whole body. . Glossary entry. The band mostly vanishes. Now press Blink and Clench jaw and look at the ringing after each.
- Turn the notchNotch filter A very narrow filter that removes one frequency, usually 60 Hz mains hum; it also rings and distorts nearby content, so fix the hum at the source first. Related: FilterFilter An operation that passes some frequencies and attenuates others; every filter also delays or distorts the timing of what it passes. , Common-mode signalCommon-mode signal A voltage that appears equally on both inputs of a differential amplifier, such as 60 Hz hum picked up by the whole body. . Glossary entry off and set the low-pass to 30 Hz instead. Compare.
How it gets in
Two paths. Capacitive coupling is the main one: the wall wiring, the lamp cord, the laptop charger are all at 120 volts alternating, and the air gap between them and your body is a capacitor of a few picofarads. At 60 Hz that capacitor passes a fraction of a microamp, which through your body’s impedance to wherever it exits makes millivolts. Magnetic coupling is smaller: a loop of wire (your two electrodeElectrode The conductor that turns ion currents in tissue into electron currents in a wire; its chemistry and contact quality set the noise you live with. Related: Silver/silver-chloride (Ag/AgCl)Silver/silver-chloride (Ag/AgCl) The standard electrode material for biopotentials, because its chemistry produces a stable, low-noise, low-drift interface with salty gel. , Electrode impedanceElectrode impedance How hard it is to push current through the skin-electrode contact, typically 5 to 50 kilohms with gel and megohms dry, higher at low frequencies. , Half-cell potentialHalf-cell potential The DC voltage that appears wherever a metal meets an electrolyte; two electrodes with different half-cell potentials produce an offset that can swamp the signal. . Glossary entry leads running apart from each other and rejoining at the amplifier) is an antenna for the changing magnetic field around any current-carrying cable.
Both paths deliver a signal that is nearly the same at every point on your body: common modeCommon-mode signal A voltage that appears equally on both inputs of a differential amplifier, such as 60 Hz hum picked up by the whole body. Related: Common-mode rejection ratio (CMRR)Common-mode rejection ratio (CMRR) How much better an amplifier responds to a difference between its inputs than to a signal shared by both, in decibels; 100 dB means 100,000 times. , Differential measurementDifferential measurement Measuring the difference between two electrodes rather than one electrode against ground, so anything common to both cancels. , Driven-right-leg circuitDriven-right-leg circuit A third electrode fed with an inverted copy of the common-mode signal, so the body's hum is actively cancelled instead of merely rejected. . Glossary entry, the thing the last explainer was about.
Your trace is mostly 60 Hz. Which single change is most likely to fix most of it?
Unplug the laptop. If the Arduino’s ground is connected through the laptop to the wall, your amplifier’s reference is tied to the mains ground and every stray current in the building has a path through your electrodesElectrode The conductor that turns ion currents in tissue into electron currents in a wire; its chemistry and contact quality set the noise you live with. Related: Silver/silver-chloride (Ag/AgCl)Silver/silver-chloride (Ag/AgCl) The standard electrode material for biopotentials, because its chemistry produces a stable, low-noise, low-drift interface with salty gel. , Electrode impedanceElectrode impedance How hard it is to push current through the skin-electrode contact, typically 5 to 50 kilohms with gel and megohms dry, higher at low frequencies. , Half-cell potentialHalf-cell potential The DC voltage that appears wherever a metal meets an electrolyte; two electrodes with different half-cell potentials produce an offset that can swamp the signal. . Glossary entry. It is also the safety rule. Do it first, every time.
Why the notch is the wrong first answer
A notch filterNotch filter A very narrow filter that removes one frequency, usually 60 Hz mains hum; it also rings and distorts nearby content, so fix the hum at the source first. Related: FilterFilter An operation that passes some frequencies and attenuates others; every filter also delays or distorts the timing of what it passes., Common-mode signalCommon-mode signal A voltage that appears equally on both inputs of a differential amplifier, such as 60 Hz hum picked up by the whole body.. Glossary entry removes a narrow band around 60 Hz. It works, in the sense that the trace looks better. Three problems. It also removes any brain activity near 60 Hz, which for EEGElectroencephalography (EEG) Recording the brain's electrical activity from electrodes on the scalp, a few tens of microvolts of blurred, summed cortical activity. Related: Electrocorticography (ECoG)Electrocorticography (ECoG) Recording from electrodes placed on the surface of the brain under the skull, usually during epilepsy surgery evaluation; cleaner and sharper than EEG. , Magnetoencephalography (MEG)Magnetoencephalography (MEG) Recording the tiny magnetic fields produced by cortical currents with superconducting sensors in a shielded room; less blurred by the skull than EEG, and far more expensive. , Volume conductionVolume conduction The spreading of currents from a source through the conductive tissues of the head, which is why one source shows up on many electrodes and why scalp EEG is blurry. , Microvolt (µV)Microvolt (µV) One millionth of a volt. Scalp EEG is tens of microvolts; a AA battery is 1.5 million of them. . Glossary entry is minor but for EMGElectromyography (EMG) Recording the electrical activity of muscles, hundreds of microvolts to millivolts, much larger than EEG. Related: Myoelectric prosthesisMyoelectric prosthesis An artificial limb controlled by EMG from the remaining muscles. , Electroencephalography (EEG)Electroencephalography (EEG) Recording the brain's electrical activity from electrodes on the scalp, a few tens of microvolts of blurred, summed cortical activity. . Glossary entry and spikesSpike Shorthand for an action potential as seen by an electrode, a brief blip about a millisecond wide. Related: Action potentialAction potential The brief, all-or-nothing voltage spike a neuron fires, about a millisecond long and about 100 millivolts tall across its membrane. , Spike sortingSpike sorting Deciding which spikes on an electrode came from which neuron, by clustering their waveform shapes. , Extracellular recordingExtracellular recording Recording with an electrode near neurons rather than inside one; you see small, fast blips from nearby cells rather than the full membrane swing. . Glossary entry is real signal. It rings: a sharp event like a blink or an electrodeElectrode The conductor that turns ion currents in tissue into electron currents in a wire; its chemistry and contact quality set the noise you live with. Related: Silver/silver-chloride (Ag/AgCl)Silver/silver-chloride (Ag/AgCl) The standard electrode material for biopotentials, because its chemistry produces a stable, low-noise, low-drift interface with salty gel. , Electrode impedanceElectrode impedance How hard it is to push current through the skin-electrode contact, typically 5 to 50 kilohms with gel and megohms dry, higher at low frequencies. , Half-cell potentialHalf-cell potential The DC voltage that appears wherever a metal meets an electrolyte; two electrodes with different half-cell potentials produce an offset that can swamp the signal. . Glossary entry pop excites the notchNotch filter A very narrow filter that removes one frequency, usually 60 Hz mains hum; it also rings and distorts nearby content, so fix the hum at the source first. Related: FilterFilter An operation that passes some frequencies and attenuates others; every filter also delays or distorts the timing of what it passes. , Common-mode signalCommon-mode signal A voltage that appears equally on both inputs of a differential amplifier, such as 60 Hz hum picked up by the whole body. . Glossary entry and it oscillates at 60 Hz for a while afterward, which you saw in the figure. And it hides the problem. A trace with a large 60 Hz component that has been notched out still has a saturated amplifier, a bad electrodeElectrode The conductor that turns ion currents in tissue into electron currents in a wire; its chemistry and contact quality set the noise you live with. Related: Silver/silver-chloride (Ag/AgCl)Silver/silver-chloride (Ag/AgCl) The standard electrode material for biopotentials, because its chemistry produces a stable, low-noise, low-drift interface with salty gel. , Electrode impedanceElectrode impedance How hard it is to push current through the skin-electrode contact, typically 5 to 50 kilohms with gel and megohms dry, higher at low frequencies. , Half-cell potentialHalf-cell potential The DC voltage that appears wherever a metal meets an electrolyte; two electrodes with different half-cell potentials produce an offset that can swamp the signal. . Glossary entry, or a ground loopGround loop Two paths to ground that form a loop through which stray currents flow, injecting hum into whatever is between them. Related: Electrical isolationElectrical isolation A barrier, such as a battery, an optocoupler, or an isolated USB link, with no conductive path from the mains to the patient. . Glossary entry behind it, and you have stopped being able to see the symptom.
Fix hum at the source. Use the notchNotch filter A very narrow filter that removes one frequency, usually 60 Hz mains hum; it also rings and distorts nearby content, so fix the hum at the source first. Related: FilterFilter An operation that passes some frequencies and attenuates others; every filter also delays or distorts the timing of what it passes. , Common-mode signalCommon-mode signal A voltage that appears equally on both inputs of a differential amplifier, such as 60 Hz hum picked up by the whole body. . Glossary entry last, if at all, and know that you did.
The list, in order
- Batteries, and unplug the laptop. Removes the conductive path to the mains ground. Fixes most of it, most of the time.
- The DRLDriven-right-leg circuit A third electrode fed with an inverted copy of the common-mode signal, so the body's hum is actively cancelled instead of merely rejected. Related: Common-mode signalCommon-mode signal A voltage that appears equally on both inputs of a differential amplifier, such as 60 Hz hum picked up by the whole body. , Ground electrodeGround electrode The electrode that ties the body to the amplifier's zero and, in a good design, is driven to cancel common-mode hum. . Glossary entry electrodeElectrode The conductor that turns ion currents in tissue into electron currents in a wire; its chemistry and contact quality set the noise you live with. Related: Silver/silver-chloride (Ag/AgCl)Silver/silver-chloride (Ag/AgCl) The standard electrode material for biopotentials, because its chemistry produces a stable, low-noise, low-drift interface with salty gel. , Electrode impedanceElectrode impedance How hard it is to push current through the skin-electrode contact, typically 5 to 50 kilohms with gel and megohms dry, higher at low frequencies. , Half-cell potentialHalf-cell potential The DC voltage that appears wherever a metal meets an electrolyte; two electrodes with different half-cell potentials produce an offset that can swamp the signal. . Glossary entry, with fresh paste. Actively cancels the common-mode voltage. Another 30 to 40 dB.
- Fresh paste on every electrodeElectrode The conductor that turns ion currents in tissue into electron currents in a wire; its chemistry and contact quality set the noise you live with. Related: Silver/silver-chloride (Ag/AgCl)Silver/silver-chloride (Ag/AgCl) The standard electrode material for biopotentials, because its chemistry produces a stable, low-noise, low-drift interface with salty gel. , Electrode impedanceElectrode impedance How hard it is to push current through the skin-electrode contact, typically 5 to 50 kilohms with gel and megohms dry, higher at low frequencies. , Half-cell potentialHalf-cell potential The DC voltage that appears wherever a metal meets an electrolyte; two electrodes with different half-cell potentials produce an offset that can swamp the signal. . Glossary entry; check for a half-lifted cup. Equalizes impedances so common modeCommon-mode signal A voltage that appears equally on both inputs of a differential amplifier, such as 60 Hz hum picked up by the whole body. Related: Common-mode rejection ratio (CMRR)Common-mode rejection ratio (CMRR) How much better an amplifier responds to a difference between its inputs than to a signal shared by both, in decibels; 100 dB means 100,000 times. , Differential measurementDifferential measurement Measuring the difference between two electrodes rather than one electrode against ground, so anything common to both cancels. , Driven-right-leg circuitDriven-right-leg circuit A third electrode fed with an inverted copy of the common-mode signal, so the body's hum is actively cancelled instead of merely rejected. . Glossary entry does not become differential.
- Short leads, run together, twisted if possible. Shrinks the loop area for magnetic pickup and keeps capacitive pickup equal on both leads.
- Distance. Move a metre from the power strip, the fluorescent light, the monitor’s power brick. Coupling falls off fast with distance.
- Bypass capacitors at every chip and a low-pass before the ADCAnalog-to-digital converter (ADC) The chip that measures a voltage at regular instants and turns each into a number. Related: Sampling rateSampling rate How many measurements per second the ADC takes; EEG is usually 250 to 1000 per second. , QuantizationQuantization Rounding each sample to one of a finite set of levels; a 10-bit ADC has 1024 of them, a 24-bit one about 16 million. , Delta-sigma ADCDelta-sigma ADC A converter that samples very fast with a crude 1-bit decision and averages, achieving 24-bit resolution at modest rates; what the ADS1299 uses. . Glossary entry. Keeps the amplifier from also picking up radio and from aliasingAliasing A frequency above Nyquist masquerading as a lower one after sampling; nothing downstream can undo it. Related: Nyquist frequencyNyquist frequency Half the sampling rate; anything in the signal above it cannot be represented and will appear as something false. , Anti-alias filterAnti-alias filter A low-pass filter placed before the ADC to remove everything above Nyquist, so nothing can alias. . Glossary entry 60 Hz harmonics.
- Shielded cable, shield to ground at the amplifier end only. For when the above is not enough, usually because the leads are long.
- A notch filterNotch filter A very narrow filter that removes one frequency, usually 60 Hz mains hum; it also rings and distorts nearby content, so fix the hum at the source first. Related: FilterFilter An operation that passes some frequencies and attenuates others; every filter also delays or distorts the timing of what it passes. , Common-mode signalCommon-mode signal A voltage that appears equally on both inputs of a differential amplifier, such as 60 Hz hum picked up by the whole body. . Glossary entry, in software, after the fact, labelled as such.
Deep dive Why 60 Hz and not something else, and what the harmonics are 3 min
North American mains is 60 Hz; most of the rest of the world is 50. Anything nonlinear, such as a switching power supply, a dimmer, or an LED driver, distorts the sine and produces harmonics at 120, 180, 240 Hz and beyond. Switching supplies also produce their own frequencies, from tens of kilohertz up. Those are above your low-pass, but if there is no anti-alias filterAnti-alias filter A low-pass filter placed before the ADC to remove everything above Nyquist, so nothing can alias. Related: AliasingAliasing A frequency above Nyquist masquerading as a lower one after sampling; nothing downstream can undo it. , Low-pass filterLow-pass filter Removes fast content above a cutoff; the anti-alias filter is one, and so is the smoothing you apply to a noisy trace. . Glossary entry before the ADCAnalog-to-digital converter (ADC) The chip that measures a voltage at regular instants and turns each into a number. Related: Sampling rateSampling rate How many measurements per second the ADC takes; EEG is usually 250 to 1000 per second. , QuantizationQuantization Rounding each sample to one of a finite set of levels; a 10-bit ADC has 1024 of them, a 24-bit one about 16 million. , Delta-sigma ADCDelta-sigma ADC A converter that samples very fast with a crude 1-bit decision and averages, achieving 24-bit resolution at modest rates; what the ADS1299 uses. . Glossary entry, they alias down into the EEGElectroencephalography (EEG) Recording the brain's electrical activity from electrodes on the scalp, a few tens of microvolts of blurred, summed cortical activity. Related: Electrocorticography (ECoG)Electrocorticography (ECoG) Recording from electrodes placed on the surface of the brain under the skull, usually during epilepsy surgery evaluation; cleaner and sharper than EEG. , Magnetoencephalography (MEG)Magnetoencephalography (MEG) Recording the tiny magnetic fields produced by cortical currents with superconducting sensors in a shielded room; less blurred by the skull than EEG, and far more expensive. , Volume conductionVolume conduction The spreading of currents from a source through the conductive tissues of the head, which is why one source shows up on many electrodes and why scalp EEG is blurry. , Microvolt (µV)Microvolt (µV) One millionth of a volt. Scalp EEG is tens of microvolts; a AA battery is 1.5 million of them. . Glossary entry band as something that is not 60 Hz and is very hard to identify. That is the low-pass’s other job.
Deep dive Ground loops 3 min
Two pieces of equipment, each with its own path to ground, connected to each other by a cable, form a loop. Any changing magnetic field through the loop, or any difference between the two ground potentials, drives a current around it, and that current flows through the cable’s ground wire and becomes a voltage on your signal. The classic case is an amplifier grounded to a scope and a laptop that are plugged into different outlets. The cure is one ground, one path, which batteries give you for free.
Explain what this page was about to your roommate in three sentences. No jargon they would not know.
We pick up 60 Hz because wall wiring at 120 volts couples through a few picofarads of air to our bodies, producing millivolts of shared voltage at every electrode. We fix it in order with battery power and an unplugged laptop first, then a driven right leg electrode with fresh paste for another 30 to 40 decibels, then matched paste, short twisted leads, distance of about a metre, and filtering. We save the notch filter for last because it erases nearby brain signal, rings after blinks, and hides the bad contact or ground loop we should have repaired.
Yours does not have to match. Check that the three ideas are there.