艺术
美容与健康
工艺
文化与历史
娱乐
环境
食品与饮料
逆向工程
科学
体育
技术
可穿戴设备
The Implantable Pacemaker
Volt

创建者

Volt

27. 八月 2026SE
25
0
0
0
0

The Implantable Pacemaker

Wilson Greatbatch was building an oscillator to record heart sounds when he reached into a box and fitted the wrong resistor — a megohm where he wanted ten kilohms. The circuit stopped doing what he had asked and started emitting a pulse, then a pause, then a pulse, at about the rate of a heartbeat. He recognised what he was looking at. That is the whole device. A pacemaker is a relaxation oscillator: something charges slowly, reaches a threshold, dumps its charge as a short sharp pulse, and starts again. The family is the one behind the flip-flop and the multivibrator, and Greatbatch's was a blocking oscillator, a cousin of both. The engineering that made it implantable was not the circuit. It was the energy budget and the sealing. A device inside a person cannot be recharged and cannot be opened, so its battery is its lifetime, and every microamp of standing current is measured in months of surgery avoided. Greatbatch's later contribution — a lithium-iodine cell — did more for patients than the oscillator did, taking a device that lasted about two years to one that lasted ten. You will build the oscillator on the bench, add demand inhibition so it stays quiet when a rhythm is already present, and compute the energy budget that decides how long it would live. It drives an indicator and an oscilloscope. It is never connected to a person or an animal, and the sense input comes from a signal generator, not from anybody's chest.
高级
7 hours 30 minutes

说明

1

Start from the relaxation oscillator

Before adding anything clinical, build the oscillator itself and see the family resemblance. The flip-flop blueprint gives you the cross-coupled pair whose two states each undermine the other. Make one of the coupling paths slow — a resistor charging a capacitor rather than a direct connection — and the circuit stops being bistable and starts being astable: it will not sit still, it flips, waits for the capacitor, flips back. The waiting time is set by the resistor and capacitor together, and that product is the whole of the rate control. Build it, put it on the scope, and change the resistor. Watch the rate move. Greatbatch's accident was exactly this, arrived at from the other direction: he changed the resistor without meaning to and the rate landed in the range of a human heart. Once you have it running, note the mark-to-space ratio. A pacemaker needs a very short pulse and a very long gap — under a millisecond of output and most of a second of silence — because the pulse is what costs energy. A symmetrical oscillator would waste hundreds of times more charge than it needs to. Getting that asymmetry is the first real design decision and step 3 is where it pays.

此步骤所需材料:

Transistor AssortmentTransistor Assortment1
Resistor KitResistor Kit1 套件
Electrolytic Capacitor KitElectrolytic Capacitor Kit1 套件
Perfboard - ProtoboardPerfboard - Protoboard1

所需工具:

Soldering StationSoldering Station
Digital Oscilloscope (100MHz, 2-Channel)Digital Oscilloscope (100MHz, 2-Channel)
Digital Multimeter (Lab Grade)Digital Multimeter (Lab Grade)
2

The energy budget is the design

正在加载 Jupyter 笔记本…

所需工具:

Desktop ComputerDesktop Computer
3

Demand logic on the bench

A fixed-rate pacer competes with whatever the heart is doing. Demand pacing watches for a natural beat and stays quiet if one arrives in time, pacing only into the silence. This sketch implements that logic explicitly, with the two timers that define it. The escape interval is how long the circuit waits for a natural beat before pacing. The blanking period after any event — sensed or paced — is a deliberate deafness that stops the circuit from hearing its own output and mistaking it for a heartbeat, which would inhibit it forever. The sense input is a signal generator or a recorded trace played into the analog pin. Not a person. The output drives an indicator LED and a scope probe through a resistor, at logic level, into a dummy load standing in for a lead. Everything about the program is a bench demonstration of the timing rules, which are the interesting part and are identical in the real device.
demand_pacer_bench.inoarduino
/*
 * Demand pacing logic — BENCH DEMONSTRATOR
 *
 * Wiring:
 *   A0  <- synthesised cardiac signal from a SIGNAL GENERATOR or recorded trace
 *   D9  -> 1k resistor -> indicator LED -> GND        (the "stimulus")
 *   D8  -> scope probe, mirrors the stimulus for timing measurement
 *
 * THIS IS NOT A PACEMAKER. It drives an LED and a scope.
 * It must never be connected to a person or an animal, by any route,
 * and the sense input must never come from electrodes on a living subject.
 * A real pacemaker is an implanted, sealed, regulated device with an
 * energy budget, a lead system and a clinician behind it.
 */

const uint8_t PIN_SENSE = A0;
const uint8_t PIN_PACE  = 9;
const uint8_t PIN_MARK  = 8;

// --- the two intervals that define demand pacing ---
const uint16_t BASE_RATE_PPM   = 70;                      // pace this slowly if nothing is sensed
const uint16_t ESCAPE_MS       = 60000UL / BASE_RATE_PPM; // 857 ms at 70 ppm
const uint16_t BLANK_MS        = 250;                     // deaf after ANY event
const uint16_t PULSE_WIDTH_US  = 500;                     // 0.5 ms stimulus

const uint16_t SENSE_THRESHOLD = 120;   // above baseline, in ADC counts

uint32_t lastEventMs = 0;      // sensed OR paced — both restart the escape timer
uint32_t pacedCount  = 0;
uint32_t sensedCount = 0;

void setup() {
  Serial.begin(115200);
  pinMode(PIN_PACE, OUTPUT);
  pinMode(PIN_MARK, OUTPUT);
  digitalWrite(PIN_PACE, LOW);
  digitalWrite(PIN_MARK, LOW);
  lastEventMs = millis();
  Serial.println(F("# event  interval_ms  paced  sensed"));
}

void emitStimulus() {
  digitalWrite(PIN_MARK, HIGH);
  digitalWrite(PIN_PACE, HIGH);
  delayMicroseconds(PULSE_WIDTH_US);    // short on purpose: the pulse is the energy cost
  digitalWrite(PIN_PACE, LOW);
  digitalWrite(PIN_MARK, LOW);
}

void loop() {
  uint32_t now = millis();
  uint32_t sinceEvent = now - lastEventMs;

  // Blanking: refuse to sense anything at all for a fixed window after any
  // event. Without this the circuit hears its own stimulus, calls it a
  // heartbeat, inhibits itself, and never paces again.
  bool listening = (sinceEvent > BLANK_MS);

  if (listening) {
    int v = analogRead(PIN_SENSE) - 512;
    if (abs(v) > SENSE_THRESHOLD) {
      // Natural beat arrived in time — stay quiet. This is the whole point.
      sensedCount++;
      Serial.print(F("SENSE ")); Serial.print(sinceEvent);
      Serial.print(' '); Serial.print(pacedCount);
      Serial.print(' '); Serial.println(sensedCount);
      lastEventMs = now;
      return;
    }
  }

  // Escape: nothing arrived within the interval, so pace.
  if (sinceEvent >= ESCAPE_MS) {
    emitStimulus();
    pacedCount++;
    Serial.print(F("PACE  ")); Serial.print(sinceEvent);
    Serial.print(' '); Serial.print(pacedCount);
    Serial.print(' '); Serial.println(sensedCount);
    lastEventMs = millis();
  }
}

此步骤所需材料:

Arduino BoardArduino Board1
LED Indicator SetLED Indicator Set1
Resistor KitResistor Kit1 套件

所需工具:

Computer with Arduino IDEComputer with Arduino IDE
Digital Oscilloscope (100MHz, 2-Channel)Digital Oscilloscope (100MHz, 2-Channel)
Function Generator (10MHz)Function Generator (10MHz)
4

The timing states, and the failure each guard prevents

Demand pacing is a small state machine and every state exists to prevent a specific, named failure. This diagram puts the failure next to the guard. Follow the loop: after any event the circuit is blank, then listening, then either sensing a beat or timing out and pacing. Both outcomes return to blank, which is why the blanking period applies to sensed beats as well as paced ones. The three failure branches are the ones that killed early devices. Sensing your own output means permanent inhibition and no pacing at all. Sensing external interference means the same. Pacing into the vulnerable window of a beat that is already underway can trigger a dangerous rhythm — which is precisely why demand mode was developed and why a fixed-rate device is not acceptable when a natural rhythm may return. Read the diagram alongside the sketch in step 3 and check that each guarded transition in the drawing exists as a line of code.

Flow

Loading...

所需工具:

Digital Oscilloscope (100MHz, 2-Channel)Digital Oscilloscope (100MHz, 2-Channel)
Function Generator (10MHz)Function Generator (10MHz)
5

Measure the standing current, then stop here

Do the measurement the notebook says decides everything, because measuring microamps is a skill and most people have never tried. Put the multimeter in series with the supply on its microamp range and read the current between pulses. On an Arduino you will read milliamps, not microamps — three orders of magnitude worse than the budget in step 2 — because the board is running a crystal, a regulator, a serial chip and an idle loop. That number is the honest result and it is the lesson: the demonstration board is a fine way to learn the timing rules and a hopeless way to build anything that must live on a cell for years. Then do it properly on the discrete oscillator from step 1. Strip it to the transistor pair, the timing resistor and the capacitor, run it from a coin cell, and measure again. Trade the timing resistor upward and watch the standing current fall and the rate slow together — they are the same resistor, which is the fundamental tension in the whole design and the reason the real devices moved to a different topology entirely. Where this stops, and it stops here completely. You have built a relaxation oscillator, implemented demand timing, and measured an energy budget. All three are genuine and transfer to any long-lived low-power device — a remote sensor, a tracker, a datalogger meant to run for years untouched. What you have not built, and must not attempt, is a medical device. An implantable pacemaker is hermetically sealed against body fluid for a decade, biocompatible in every exposed material, protected against defibrillation and electrosurgery and magnetic fields, fitted with a lead whose fixation and impedance are verified at implant, programmable and interrogable without opening the patient, manufactured under regulation with full traceability, and implanted and followed by a clinical team. A failure is not a bug. Do not connect this circuit to any living thing, do not use it to observe anybody's rhythm, and if you or someone near you has a heart rhythm question, that is a question for a clinician and not for a bench.

此步骤所需材料:

CR2032 Coin Cell BatteryCR2032 Coin Cell Battery2
Resistor KitResistor Kit1 套件

所需工具:

Digital Multimeter (Lab Grade)Digital Multimeter (Lab Grade)
Digital Oscilloscope (100MHz, 2-Channel)Digital Oscilloscope (100MHz, 2-Channel)
Soldering StationSoldering Station

材料

7

所需工具

6

CC0 公共领域

此蓝图以 CC0 协议发布。你可以自由复制、修改、分发和使用此作品,无需征得许可。

通过购买蓝图中的产品支持创客,他们将获得 创客佣金 (由供应商设定),或创建此蓝图的新版本并将其作为连接包含在你自己的蓝图中以分享收入。

讨论

(0)

登录 加入讨论

加载评论中...