Skip to content
DOCUMENTATION

Polykyma docs

Get live 16-channel data into Python, and understand the hardware well enough to modify it.

Safety and intended use

Polykyma is for research and education. It is not a medical device and must not be used for diagnosis or treatment.
  • Record on battery power. Only connect USB through the onboard isolator.
  • Never connect electrodes on a person to anything mains-powered without isolation.
  • Stop if the skin under an electrode becomes irritated.

Python quickstart

Power the board from its battery, join it to your network, then install the LSL client:

terminal
$ pip install pylsl numpy

Pull live frames into NumPy:

quickstart.py
from pylsl import StreamInlet, resolve_byprop
import numpy as np

# Find the Polykyma 16-ch @ 2000 Hz stream
streams = resolve_byprop("name", "Polykyma_ADS1299", timeout=5.0)
inlet = StreamInlet(streams[0], max_buflen=60)

while True:
    chunk, ts = inlet.pull_chunk(timeout=0.05, max_samples=100)
    if ts:
        emg = np.asarray(chunk)  # (N, 16)
        # -> filter bank, envelope, or your model

Samples arrive as raw ADC counts unless your firmware scales them. To convert:

scaling
# ADS1299: 24-bit two's complement, Vref = 4.5 V
LSB = 4.5 / (2**23)                # volts per count at gain 1
uv = counts * LSB / pga_gain * 1e6  # microvolts

Overview and data path

ESP32-S3SPI host · LSL
⇄ SCLK · MOSI · MISO
ADS1299 · masterCH 1–8 · CLK out · BIAS
← DOUT daisy
ADS1299 · slaveCH 9–16 · ext CLK

Both converters run from the master's clock, so all 16 channels are sampled on the same edge. In daisy-chain mode the slave's output shifts through the master, and the MCU reads both devices in a single transaction per frame (two 27-byte blocks of status plus eight 24-bit channels each).

Reference and bias

sEMG (bipolar): each channel measures its own electrode pair differentially. SRB1 is left open and the bias electrode sits on a bony site such as the wrist.

EEG (common reference): setting SRB1 in MISC1 ties every channel's negative input to one reference electrode, typically an earlobe or mastoid. The BIAS amplifier drives common-mode signal back into the body to improve rejection.

Isolation and power

The analog side runs from a LiPo through low-noise LDOs. USB passes through an ADuM3160 full-speed digital isolator with an isolated DC-DC supply, so a tethered laptop never shares ground with the subject. For the lowest noise, record on battery over Wi-Fi.

Design files and licences

  • Hardware (schematics, layout, BOM, enclosures): CERN-OHL-S v2. Source location: https://github.com/trigeorgis/polykyma
  • Firmware and SDK: MIT or Apache 2.0.
  • Derived from Meower by Gleb Manokhin. Polykyma is independent and not official Meower hardware.