Writing Wireless ECG
By Andrew HigginsFull-Stack Engineer & Team Lead at Moat
Cutting the Ground Wire
An ECG has four electrodes and only three of them measure anything. The fourth is why the other three work, and it is the one that makes a wireless ECG hard.
A hackathon at UVU at the start of the summer, three of us, one weekend. The question we picked was whether you could build an electrocardiogram with no wires at all. Not a chest strap with a radio bolted on, but four independent electrodes that talk to a hub and to nothing else.
We designed against three targets: four electrodes with three measuring and one acting as reference, sampling at 500 Hz or better, and encrypted transport, because the data is medical. Those are the numbers we worked to. I am deliberately not calling them regulatory requirements, because the actual rules for diagnostic ECG live in standards like AAMI EC11 and IEC 60601-2-25 and depend on a device's intended use, and I have not read them closely enough to tell you what a real submission would need.
Nothing was built. This is a feasibility argument, and the interesting part is which of the three problems turned out to be hard.
The easy hard problem: keeping clocks together
Four nodes sampling independently have to agree on when each sample was taken, or you cannot reconstruct a waveform across them. Free-running clocks drift, and the drift we worked with was about 50 microseconds per second, which matched a five minute bench test showing roughly 13 milliseconds of accumulated error.
The fix is arithmetic rather than cleverness. If the hub broadcasts its time fifty times a second, no node ever runs free for longer than twenty milliseconds, and fifty microseconds per second across twenty milliseconds is one microsecond. Worst case alignment of one microsecond per sample, which is comfortably tighter than 500 Hz needs and leaves room above 1 kHz.
The part that makes that real rather than theoretical is doing the sampling on hardware that can be trusted to fire on time. Timer-driven capture on something like an ESP32 or an nRF5340, timestamped at the moment of conversion, rather than sampling inside a loop that a radio interrupt can preempt. Then the packet carries the timestamp and the hub reassembles.
Security, which pairing solves better than cryptography
Medical data has to be encrypted in transit, and a body area network is an obvious target for interception because the attacker only has to be near the patient. The scheme we chose was to exchange keys when the nodes and hub are sitting in the charger together, so establishing trust requires physical custody of the hardware. Only the hub holds the key to decrypt.
The property worth noticing is that the trust boundary becomes a physical object rather than a protocol. There is no pairing mode to attack over the air because pairing does not happen over the air.
The problem that is actually hard
An ECG measures tiny voltage differences across the body while the body sits in a bath of electrical noise, most of it mains hum. Three electrodes measure. The fourth, conventionally on the right leg, measures nothing. It is a driven right leg circuit: the amplifier takes the common mode noise it sees, inverts it, and pushes it back into the patient, actively cancelling the interference so the measuring electrodes can see the heart. Published figures put that at around 40 dB of rejection at 60 Hz with a driven right leg gain of 1000.
That works because a wire connects the amplifier to the leg. Cut every wire and the four electrodes have no shared reference, no path to drive a correction signal through, and three very sensitive amplifiers each measuring against a different idea of zero. You have not just lost a wire. You have lost the mechanism that makes the other three electrodes trustworthy.
This was the part I worked on, and it is the reason the project was interesting rather than an exercise in radio protocols.
Using the body as the wire
The idea was to stop treating the patient as the thing being measured and start treating them as part of the circuit. Skin and tissue conduct. If the reference signal travels through the body itself, the driven right leg loop closes without copper, and the four nodes share a reference by virtue of being attached to the same person.
Having since read around it, that idea has a name and a literature. It is intrabody communication, and the galvanic coupling variant passes small currents through tissue rather than radiating. The IEEE standardised a human body communication physical layer in 802.15.6 back in 2012. Reported advantages include roughly two orders of magnitude better energy efficiency than RF, and a natural privacy benefit, since a signal confined to the body is harder to intercept than one broadcast into a room.
So the honest position is not that nobody has thought of this. It is that the technique is well studied, standardised, and still rare in shipping products, and that applying it specifically as the return path for a distributed driven right leg is a narrower idea than intrabody communication in general.
It is also not the only answer to the grounding problem. Wearable ECG patents describe giving each electrode its own localised driven ground instead of one shared reference, and a wireless ECG patent from 1993 derives a reference through a Wilson network and transmits it to the right leg electrode. Our claim in the deck that most wireless systems cannot capture diagnostic quality waveforms was pitch language. The truthful version is that this is a known hard problem with several competing answers, and ours was one of them.
Is it safe
Putting current through a patient on purpose deserves more than an assertion, and the deck asserted. So, what the literature actually says.
IEC 60601-1 caps patient auxiliary current at 100 microamps below 100 kHz and 10 milliamps above it. ICNIRP guidance limits current density to 25 milliamps per square metre between 100 kHz and 60 MHz for the general public. An electrical exposure analysis of galvanic coupled intrabody communication modelled arm tissue and found roughly 0.6 milliamps per square metre for a 1 milliamp input, well under that ceiling.
That is reassuring but it is not a safety case. The same literature notes that few safety analyses exist for galvanic coupling specifically, and a bench model of an arm is not a clinical trial. What I can honestly say is that the currents involved appear to sit far below published exposure limits, and that anything further would need work none of us did in a weekend.
What I would test first
The synchronisation design I believe, because it is arithmetic and the arithmetic is checkable. The pairing scheme I believe, because it moves a hard problem into a physical one. The grounding idea is the one carrying all the risk, and it is the one that would decide whether any of this works.
The experiment is small: two electrodes, one amplifier, and a driven right leg return through skin rather than wire, measured against a wired control on the same person in the same room. If the common mode rejection collapses, the whole architecture collapses with it and the answer arrives in an afternoon. That is the test I would want before drawing another block diagram.