Polykyma docs
Get live 16-channel data into Python, and understand the hardware well enough to modify it.
Safety and intended use
- 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:
$ pip install pylsl numpyPull live frames into NumPy:
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 modelSamples arrive as raw ADC counts unless your firmware scales them. To convert:
# 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 # microvoltsOverview and data path
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.