Your body is a quiet radio. The heart, brain, muscles, eyes, and skin all produce tiny electrical or optical signals. Hospitals read them with clinical machines. Makers now read a simplified version of the same idea with breakout boards and an ESP32. That does not make a hobby kit a medical device. It does make the signals learnable, if you put the right Analog Front-End (AFE) between the electrode and the microcontroller.
This post covers ten common electrical and physiological sensors: ECG, EEG, EMG, EOG, ERG, EGG, ENG, EDA/GSR, bioimpedance (BIA/ICG), and PPG. It then answers the practical question: can they all talk to an ESP32? Yes, with an AFE or a dedicated breakout. Direct electrode-to-GPIO wiring is how you get noise, bad data, and, if you stay plugged into mains, a safety problem (SparkFun, 2024; Texas Instruments, 2017).
Key Abbreviations in This Post
- ECG (Electrocardiography): Electrical activity of the heart.
- EEG (Electroencephalography): Brain-wave activity from the scalp.
- EMG (Electromyography): Electrical activity of skeletal muscle.
- EOG (Electrooculography): Potential changes around the eyes from eye movement.
- ERG (Electroretinography): Electrical response of the retina to light.
- EGG (Electrogastrography): Slow electrical rhythms of the stomach.
- ENG (Electroneurography): Conduction along peripheral nerves, often with a stimulus.
- EDA / GSR: Electrodermal activity / galvanic skin response. Skin conductance from sweat glands.
- BIA / ICG: Bioimpedance analysis / impedance cardiography. How tissue resists a tiny AC current.
- PPG (Photoplethysmography): Optical measure of blood-volume change, heart rate, and often SpO₂.
- AFE (Analog Front-End): The amp, filter, and often ADC chip between electrodes and a microcontroller.
- ESP32: Espressif Wi-Fi/BLE microcontroller family, common in battery-powered IoT projects.
- ADC: Analog-to-digital converter. Turns a voltage into a number.
The One-Minute Version
- Ten signals, two physics stories: most are biopotentials (microvolts to millivolts). PPG is light. BIA injects a safe AC current and measures impedance.
- ESP32 can host all of them if an AFE or breakout sits in the middle. Never wire bare electrodes to ADC pins and call it done.
- Easy start: AD8232 (ECG), MyoWare (EMG), BioAmp EXG (ECG/EMG/EOG/EEG-class), Grove GSR (EDA), MAX30102 (PPG).
- Harder: EGG, BIA/ICG, ENG, ERG. Same ESP32, more specialized chips, filters, electrodes, or a stimulator.
- Safety rule: while electrodes are on a person, power from a battery and send data over Wi-Fi or BLE. Unplug USB from the wall and from a charging laptop (SparkFun, 2024).
- Scope: education, research prototypes, and wearables experiments. Not diagnosis or treatment.
What These Sensors Actually Measure
Clinicians group them by organ. Engineers group them by signal size and frequency. Both views help when you pick an AFE.
Each Sensor, From Basics to Use
ECG: heart electricity
ECG records the depolarization wave as it moves through the atria and ventricles. A basic single-lead hobby setup shows rate and a rough QRS shape. A clinical 12-lead study maps the heart in more detail for ischemia and rhythm diagnosis (Goldberger et al., 2017). On an ESP32, the common module is the Analog Devices AD8232 heart-rate monitor front-end: three disposable electrodes, an analog output into an ADC pin (Analog Devices, 2012).
EEG: brain waves from the scalp
EEG is smaller than ECG by an order of magnitude or more. Frequency bands (delta, theta, alpha, beta, gamma) get used in sleep studies, epilepsy work, and research BCIs. A DIY board will not replace a clinical EEG lab. It can teach sampling, referencing, and how much 50/60 Hz mains noise lives on a scalp (Niedermeyer & Lopes da Silva, 2005). Multi-channel setups often use the TI ADS1299 over SPI.
EMG: muscle activation
Surface EMG listens to motor-unit firing under the skin. Rehab, gesture control, and sports science all use it. MyoWare-class modules rectify and smooth the signal into an envelope that an ESP32 can sample slowly. Raw EMG needs a wider bandwidth and a quieter front-end (Merletti & Parker, 2004; SparkFun, 2024).
EOG: eye movement
The eye is a dipole. Move the gaze, and the potential between electrodes near the canthi or above/below the eye changes. Sleep labs use EOG for REM. HCI experiments use it for blink and glance detection. Electrically it looks a lot like a slow ECG/EEG cousin, so BioAmp EXG or a re-filtered AD8232 often appears in maker builds.
ERG: retina response
ERG needs a light flash (or pattern) synchronized with the recording. Electrodes may be corneal or skin-based depending on the protocol. The electronics resemble other biopotential AFEs. The hard parts are optics, timing, and electrode type, not the ESP32 itself (McCulloch, 2019).
EGG: stomach rhythms
Gastric slow waves sit around a few cycles per minute. That means ultra-low-frequency filters (on the order of 0.01 to 0.5 Hz) and patience with motion artifact. You can reconfigure an ADS1299 or build an instrumentation-amp front-end. This is advanced DIY, not a weekend Amazon kit.
ENG: nerve conduction
ENG often stimulates a peripheral nerve and measures the compound action potential downstream. That means a safe, controlled stimulator plus a high-gain low-noise amp. An ESP32 can time the stimulus and log the response. Designing the stimulator is the real project, and safety review matters more than the Wi-Fi stack.
EDA / GSR: skin conductance
Sweat-gland activity changes how well the skin conducts. Stress and arousal studies use this a lot. Grove-style GSR modules are a voltage divider the ESP32 can read on an ADC pin. The signal is slow. Motion and electrode dryness matter more than sample rate.
BIA / ICG: bioimpedance
A tiny AC current is injected. The measured impedance relates to body composition (BIA) or, in thoracic setups, to blood-flow related changes (ICG). Chips such as Analog Devices AD5933 (I2C impedance converter) or Maxim MAX30001 (SPI) exist for this. Do not invent your own current-injection circuit without reading the safety limits in the datasheet (Analog Devices, 2017).
PPG: light, not electrodes
PPG shines LEDs into tissue and reads the reflected or transmitted light with a photodiode. Heart rate and SpO₂ wearables live here. MAX30102 / MAX30105 breakouts talk I2C to the ESP32 and are the friendliest first biosensor for most makers (Maxim Integrated, 2015).
Can an ESP32 Interface All of Them?
Yes, as a host. No, as a raw electrode ADC.
Biopotential amplitudes sit in the microvolt to millivolt range. The ESP32's GPIO and on-chip ADC expect volts-scale swings and are noisy near the rails. The missing piece is an AFE: gain, filtering, often driven-right-leg or bias, and preferably a dedicated ADC. Optical and impedance sensors already ship as digital breakouts, so the ESP32 only needs I2C or SPI (Espressif, 2023; Texas Instruments, 2017).
Problem: a student clips ECG electrodes to GPIO36 and sees garbage.
Cause: the heart signal is about a millivolt, buried in electrode offset and mains hum.
Effect: they blame the ESP32. Add an AD8232 (or better, a digital AFE), battery power, and a notch or digital filter. The waveform appears.
Easy to Interface: Plug-and-Play Modules
These have hobbyist boards that speak analog, I2C, or SPI to an ESP32 without a custom PCB.
- ECG: AD8232 (analog out) or MAX30003 (SPI digital AFE).
- EMG: MyoWare 2.0, Gravity Analog EMG, BioAmp EXG Pill (analog).
- EEG: BioAmp EXG Pill for single-channel experiments; TGAM-class modules; ADS1299 for multi-channel SPI.
- EOG: BioAmp EXG Pill, or AD8232 with filter parts retuned for slower eye signals.
- EDA / GSR: Grove GSR and similar voltage-divider modules (analog).
- PPG: MAX30102 / MAX30105 (I2C).
MyoWare 2.0 even has an official wireless shield with an ESP32-WROOM and a LiPo, built so the muscle sensor can run isolated from the wall (SparkFun, 2024). That pattern is the right mental model for the whole list: battery on the body, radio off the body.
Advanced: Custom Front Ends
- EGG: ultra-low-frequency filtering. AD620-class instrumentation amp or a carefully configured ADS1299.
- BIA / ICG: AD5933 (I2C) or MAX30001 (SPI) to inject and measure AC safely.
- ENG: high-gain amp (INA128 / ADS1299 class) plus a synchronized stimulator. Treat stimulus current as a safety design, not a GPIO hack.
- ERG: EEG/EOG-like electronics, plus specialized electrodes and a timed light flash.
The ESP32 still fits. The bill of materials and the validation plan get longer.
ESP32 Tips That Actually Matter
1. Treat the built-in ADC as a last resort
The ESP32 on-chip 12-bit ADC is convenient and imperfect: noise, non-linearity near 0 V and 3.3 V, and channel restrictions depending on Wi-Fi use (Espressif, 2023). For clean biopotentials, prefer:
- ADS1115 (I2C, 16-bit) after an analog AFE such as AD8232.
- Digital AFEs such as ADS1299 or MAX30003 that digitize on the sensor board and speak SPI.
2. Electrical safety is not optional
While electrodes touch a person, run the ESP32 from a battery (LiPo or pack). Stream over Wi-Fi or BLE. Do not leave USB connected to a wall charger or to a laptop that is itself on mains. SparkFun's MyoWare docs say the same thing in blunt language: remove the shield from the sensor when charging or programming, and do not charge while attached to a user (SparkFun, 2024). Open ADS1299 + ESP32 projects repeat the rule: battery on subject, USB disconnected (Asghar, 2024).
Problem: 50 Hz hum ruins every plot, and a fault path to mains is possible.
Cause: the subject and the wall share a ground through USB.
Effect: bad science and real shock risk. Battery + wireless fixes both.
3. Sample at the rate the physiology needs
- ECG: often 250 to 500 Hz for a useful waveform.
- EMG (raw): often 500 Hz to 1 kHz+; envelope outputs can be slower.
- EEG: often 250 to 500 Hz per channel, with serious attention to referencing.
- EDA / EGG: low rates are fine; filter design matters more.
- PPG: tens to a few hundred Hz, depending on the chip FIFO and your algorithm.
4. Filter in hardware first, then in software
AFEs already band-limit. Add digital notch (50/60 Hz), baseline wander removal, and, for EMG, envelope or RMS features. Do not expect a raw FFT on a noisy ADC pin to look like a textbook figure.
5. Label the project honestly
Breakout vendors and open BioAmp boards say it: research, education, prototyping. Not diagnosis, not treatment, not a cleared medical device (SparkFun, 2024; Texas Instruments, 2017). If you need clinical claims, you need clinical hardware, clinical process, and regulators.
A Practical Start Path
- Pick one signal. PPG or ECG for a first win. EEG if you already like signal processing.
- Buy a matched AFE module, not bare electrodes.
- Power the ESP32 from a LiPo whenever a person is connected.
- Read via I2C/SPI if you can; otherwise analog into ADS1115 or a quiet ADC1 pin with averaging.
- Stream over BLE or Wi-Fi to a phone or laptop for plots.
- Only then attempt EGG, BIA, ENG, or ERG, with datasheets and a safety plan open.
Module Cheatsheet
The alphabet soup (ECG, EEG, EMG, and the rest) is one family of body signals plus one optical cousin. The ESP32 is a capable wireless host for all of them. The product between the skin and the chip is what decides whether you learn physiology or fight noise. Start with PPG or ECG, keep the subject on battery power, and treat every plot as a lesson, not a diagnosis.
If you remember one line: electrodes never meet the ESP32 alone. An AFE, a battery, and a radio sit in between.
References
- Analog Devices. (2012). AD8232: Single-lead heart rate monitor front end [Datasheet]. https://www.analog.com/en/products/ad8232.html
- Analog Devices. (2017). AD5933: 1 MSPS, 12-bit impedance converter [Datasheet]. https://www.analog.com/en/products/ad5933.html
- Asghar, X. (2024). Low-Cost-EEG [Computer software]. GitHub. https://github.com/XavierAsghar/Low-Cost-EEG
- Espressif Systems. (2023). ESP32 technical reference manual. https://www.espressif.com/en/support/documents/technical-documents
- Goldberger, A. L., Goldberger, Z. D., & Shvilkin, A. (2017). Goldberger's clinical electrocardiography (9th ed.). Elsevier.
- Maxim Integrated. (2015). MAX30102: High-sensitivity pulse oximeter and heart-rate sensor [Datasheet]. Analog Devices.
- McCulloch, D. L. (2019). The visual evoked potential and the electroretinogram. In K. H. Chiappa (Ed.), Evoked potentials in clinical medicine. Related clinical literature.
- Merletti, R., & Parker, P. (Eds.). (2004). Electromyography: Physiology, engineering, and noninvasive applications. Wiley-IEEE Press.
- Niedermeyer, E., & Lopes da Silva, F. (Eds.). (2005). Electroencephalography: Basic principles, clinical applications, and related fields (5th ed.). Lippincott Williams & Wilkins.
- SparkFun Electronics. (2024). Getting started with the MyoWare 2.0 muscle sensor ecosystem. https://learn.sparkfun.com/tutorials/getting-started-with-the-myoware-20-muscle-sensor-ecosystem
- Texas Instruments. (2017). ADS1299: Low-noise, 8-channel, 24-bit analog front-end for biopotential measurements [Datasheet]. https://www.ti.com/product/ADS1299










