Inside the Loop, Issue 31 | Daniel C. Pettus | 16 November 2026
I rebuilt a 1986 brain monitor with an AI and tested it until it stopped improving. What a developer can learn in three days now, good and bad, before the deep investment.
In the 1980s, I worked on an EEG monitor called the Lifescan Brain Activity Monitor. In its product video, the anesthesiologist N. Ty Smith said: “It’s been said that brain activity monitoring should be used in all high-risk surgical procedures and for routine procedures on high-risk patients. I’d like to take that one step further and envision the day when brain activity is routinely monitored in all patients receiving general anesthesia.” [1] Forty years later, that day has not come.
This issue is off my usual beat. No infusion pumps, no hospital AI governance. It is about something a developer can do today that I could not do in 1986, or even a few years ago: design a system and test it against thousands of real cases before anyone spends real money. It ends where every issue ends: data, then reasoning, then a human who decides.
What the Lifescan did
Most EEG monitors divide the signal into blocks of about two seconds, apply a Fourier transform to each, and report the average frequency content. The Lifescan detected each wave by itself: valley, peak, valley. The height is the amplitude. The time between valleys is the frequency. Tom Gregory and I published the algorithm in 1986 [2]. The monitor drew those waves for the left and right sides of the brain.
The machine came in two parts. Five electrodes ran to a small preamplifier box near the patient. From there, each side of the brain had its own channel on a front-end board, and each channel had its own 8051 microcontroller. Those two chips handled analog-to-digital conversion and wave detection. The front end also checked electrode impedance, filtered noise, and detected artifacts. The 8051s ran no operating system. The code was written in PL/M-51 and assembler.
The wave data went to the main board, which sat under the CRT in the cabinet. An 80188 processor handled the display, user input, storage, and housekeeping under a real-time executive called VRTX, in PL/M-86 and assembler. Storage was RAM. There was no disk. The screen was drawn by a dedicated graphics chip, the NEC 7220. Nobody said GPU in 1985. The graphics analyst Jon Peddie calls the 7220 the first graphics processor chip [3], and it drew the screen so the main processor did not have to.
All of it was compiled on an Intel MDS development system and burned into EPROMs. One software change took several hours: recode, compile, burn, plug in the chips, test. We had an in-circuit emulator, a cable from the development system that took the place of the 80188. It was not perfect. Most of the time, we wrote breakpoints into the code, burned another EPROM, and tried again. Yes, it was that complicated.
People who used a Lifescan may remember what it did besides draw waves. It checked every electrode continuously, sending a very small 40 Hz signal through the common electrode. It kept about twelve hours of EEG in memory and could replay any of it. I wrote the data compression for that myself because there was nothing to buy. And it held nine numbered snapshots. In a carotid endarterectomy, you took a baseline, then called it back beside the present at any time.
Why it never became routine
Processed EEG monitors have been cleared for use under anesthesia for thirty years, and brain monitoring is still not routine. In the United Kingdom’s national survey it was used in 19 percent of general anesthetics [4]. The American Society of Anesthesiologists’ advisory says it “is not routinely indicated” [5]. My own diagnosis is short: too complicated, too expensive, hard to understand. A published estimate put the monitor near $9,000 and the single-use sensor near $17 [6], and nobody is paid to use it. The manufacturer’s own billing guide says there is no dedicated code [7]. Part of that diagnosis did not survive the week. I will come to it.
Three days with an AI
On November 12, I put a question to an AI model, Anthropic’s Claude: could the Lifescan be rebuilt as something small and cheap? In 1985 one software change took several hours. Three days after I asked, this much exists.
The analysis. The 1986 algorithm, rebuilt from the published paper in about 800 lines of C, with the same logic in Python and JavaScript as cross-checks. The three agree wave for wave.
The embedded software. About 500 lines of firmware for a headband pod: a driver for the amplifier chip, a packet format that marks lost radio packets so they are never drawn as EEG, and an interlock that stops acquisition whenever external power is connected. It is written for Zephyr, an open real-time operating system [8].
The display. A two-sided wave display that runs in a browser on synthetic EEG (Figure 1), with the Lifescan’s snapshots, recall and side-by-side compare working in it, and an iPhone app. The electrode check on that display is simulated.
The checks. 63 automated tests, including a simulated radio link with packets deliberately dropped.
The evidence. Thirteen separate studies on 2,574 public operating-room recordings [9], and one on 20 sedated volunteers [10].

Now, the part most AI stories leave out. No hardware exists. Nothing has been powered. The firmware and the phone app have never been compiled, let alone run on a chip. It is not a medical device, and nobody should use it on a patient. I have a design, working analysis software, and evidence. I have a parts list and no parts.
The design is a headband with five ordinary snap electrodes, the kind already in a hospital supply room, at about $1.55 per patient [11]. A matchbox-sized pod amplifies two channels and sends them via Bluetooth to an iPhone or iPad. No cable, no dedicated monitor, no proprietary sensor (Figure 2). Two-sided monitoring by itself is not new. Three commercial monitors offer it today [12]. The working name is EveryWave.

What three days of testing said
The recordings come from VitalDB, a public dataset from Seoul National University Hospital. Each one carries the raw EEG and what a commercial BIS monitor reported at the same moment [9]. Before any result was looked at, half the cases were sealed for one final test. Everything below is from the other 1,256. About half of what came back was bad news.
What held up:
Awake or anesthetized. Before propofol, against under it, with the pump and not a monitor deciding which was which, the edge was higher awake in 87 percent of 324 patients (Figure 3). The commercial monitor’s own spectral edge managed 52 percent.
A 0 to 100 index. Learned from the whole wave picture, it landed within 10 points of BIS 89 percent of the time.
Following the drug. An index built for the drug in use followed that drug’s concentration inside a patient better than BIS did, in 319 of 477 gas cases and 574 of 752 propofol cases (Figure 4). Drug concentration is not depth, and the propofol figure is a pump’s estimate, not a blood level.
The cheap amplifier. I assumed a chip built for ECG would be too noisy. With each chip’s noise added to real EEG, the cheap one, at about a quarter of the price, cost nothing I could measure [13].
The electrode behind the ear. In 20 volunteers recorded with 91 electrodes, a forehead-to-ear channel gave waves 1.6 times taller than the forehead-to-temple channel commercial sensors use [10].
Noticing the drug stop. When the propofol stopped at the end of 628 cases, the wave analysis alarmed within ten minutes in 64 percent of them, the same as BIS at the same false alarm rate [14]. It got there only after it started counting the waves above 30 Hz, which the 1986 method ignores.

What did not
The edge as a depth number. Between light and deep anesthesia it went flat, and in about one case in eight it ran the wrong way. In the sedated volunteers it rose before it fell.
The second edge I remembered. The Lifescan offered a sum-of-squares edge, meant to sit closer to a spectral edge. It put the edge higher awake in 42 percent of the 324 patients [15]. That is worse than a coin. Counting every wave once got all 324, though part of that is likely forehead muscle.
Beating BIS. Nothing I tried beat it at noticing the drug going away. Matching it took four attempts.
Small changes. When the propofol was turned down by a fifth in mid-case, no method, BIS included, noticed more than about one time in three within fifteen minutes.

None of that makes it an accurate depth monitor, and I will not call it one. BIS itself is cleared with the wording that it “may be used as an aid in monitoring the effects of certain anesthetic agents” [16]. An aid. Within a patient, BIS has been shown to track anesthetic gas concentration poorly [17], and it has read as low as 44 in fully awake volunteers given a muscle relaxant [18]. The bar is lower than marketing suggests. Even so, everything I have is from recordings of adults, made at one hospital using another company’s sensor on the forehead and temple. My design places two of its electrodes behind the ears. The volunteers say that position shifts the numbers by about 2 Hz, so anything tuned on these recordings has to be retuned on the band.
Where the AI earned its keep
It wrote most of the code, which was the least interesting thing it did. The useful part was the arguing. I expected a strong opioid to shift the edge, because in the 1980s I watched fentanyl pull the whole picture down into the slow waves. On these recordings, it did not. The technique is the difference. Then, fentanyl and oxygen were the whole anesthetic, and this same method showed the edge falling by more than half [19]. Here, remifentanil rides along with propofol or gas as a supplement. When I reached for the phrase “accurate depth,” it pointed to our own numbers.
It was also wrong, more than once. It repeated a claim about infusion pump standards that I had corrected in August. It gathered my patent files into a folder that backs up to GitHub and caught that one itself within the hour. On the last night, it found a gain from one of its own methods, checked how it had scored the test, and withdrew the result before it reached me. That last one is the behavior I want. A capable reasoner still needs someone in the loop who knows the subject.
AI as a reasoning function
Depth of anesthesia depends on the drug and the patient. One index and one target band are typically used for every drug and every patient, and I do not think that is right. The recordings agree. At the same BIS, the edge sat at 14.5 Hz on propofol, 13.6 on sevoflurane, and 13.1 on desflurane, and it rose with age.
The index built for each drug uses machine learning, and I expect it to improve with more data. But learning is not the part I care most about. Reasoning is.
A monitor that reasons would take three things together: the waves, the record of what the pump has actually delivered, and who the patient is. It would tell the anesthesiologist one of three things, for this drug and this patient: too light, in range, or too deep. And it would notice when the record and the brain disagree. If the pump says propofol is running while the brain is getting lighter, the first thing to check is the IV line, because awareness under intravenous anesthesia is commonly a failure to deliver the drug [20].
I tested a first, crude version of that check, with the end of each case standing in for a failed line. One fact came out in its favor: about half of the monitor’s alarms during steady anesthesia came just after someone had turned a drug down [14]. The pump record explains half of what a brain monitor complains about. But both rules I wrote to use that fact failed. One alarmed every time the dose went up. The other went deaf a third of the time. The idea has evidence and no working rule yet.
I have filed a provisional patent application on the method. Detecting which drug is on board from the EEG alone is not new; someone else holds a patent on it [21]. Putting the drug record, the patient, and the waves in front of a reasoner, with a clinician making every decision, is the argument this newsletter has been making in other clothes. I spent half a career getting data off infusion pumps. It turns out the brain monitor wants it too.
The opportunity I did not have
In 1986, there was no public library of recorded operations to test an idea against, and one software change took hours. Take the traditional path from where I started this week to where I am now: a requirements document, a software development plan, a system design, the algorithm written and verified, a protocol, and months of recordings to test it on, with each analysis a project of its own. My estimate is twelve to eighteen months and a team of five before we knew what these three days told me.
Count what happened instead. Thirteen studies. 2,574 recorded operations and 20 volunteers. Ten versions of the project page, five drafts of this article, one patent filing, and one blunt review from an anesthesiologist. About half the results were bad news, and I have them now, not after the money was spent.
That is the opportunity. It is not that an AI builds the product. It does not. The hardware, the patients, and the regulator are all still ahead, and none of them got shorter. What got shorter is the distance between an idea and an honest answer about it. My gut says there is more in the raw EEG than three days found. That is for another day.
What I am asking
I am not going to take this to production as a one-person effort, and I am not raising money or selling anything. I have sent the project page to the Society for Technology in Anesthesia, where I once served on the board, to ask the people who would have to use it whether it deserves to exist. The page includes a display you can drive yourself, a list of what Lifescan did and where each function stands today, the circuit (Figure 5), the costs, and eight questions [22]. The first is the one I most want answered: why has EEG monitoring not become routine?

If you run an anesthesia department, build devices, or know why this idea stalled the first time, tell me what I got wrong. I would rather hear it now than after someone builds it.
One anesthesiologist already has. I led with the $1.55. The answer was that the main thing holding brain monitoring back is evidence, not price: nobody has convincingly shown that EEG-guided anesthesia beats anesthesia without it across the board. A cheaper sensor might get a monitor bought. It would not get it used. A tablet in the operating room raised questions I had not asked: who cleans it, who charges it, and where it lives between cases. And a band around the head during a long operation, on a patient who swells, is a hazard I had not listed. Three of my assumptions were challenged in one message. The large trials back that answer [23]. The one place a national standard says this monitoring should be used is intravenous anesthesia with a muscle relaxant, where there is no gas to measure [24]. That is where I would start, not with every patient.
Ty Smith wanted every patient monitored. Forty years later, the hard parts are still cost, evidence, and trust. What has changed is how fast one person can find out which of them is in the way.
Written with AI assistance. Concepts, sources, and conclusions are the author’s, and every source was checked by the author.
About me
Daniel Pettus spent forty years in medical device and health IT leadership at Alaris, CareFusion and BD, was a founding member of the iMetrikus team, and contributed to IHE Patient Care Device interoperability standards. He is co-inventor on US patent 7,375,647 and has filed five provisional applications on the reasoning method behind Ai MedAgent™. He writes Inside the Loop from Murrieta, California.
The serious version of the day job is a book. The Technology Was Never the Problem: forty years of trying to connect medical devices to the record, and what finally changed. pettusbook.com.
Ai MedAgent™ is a research demonstration of a patent-pending method. Advisory only. Not a medical device. Not FDA cleared. Synthetic patients and simulated feeds. See it at aimedagent.net. Ami is an unreleased experiment and is not available to download.
Notes
[1] N. Ty Smith, M.D., speaking in a Lifescan product video. Transcribed from the audio and confirmed against the video’s captions, 13 November 2026.
[2] Gregory TK, Pettus DC. An electroencephalographic processing algorithm specifically intended for analysis of cerebral electrical activity. J Clin Monit. 1986;2(3):190-197.
[3] Peddie J. Famous Graphics Chips: NEC µPD7220 Graphics Display Controller, the first graphics processor chip. IEEE Computer Society, 18 July 2018. https://www.computer.org/publications/tech-news/chasing-pixels/famous-graphics-chips . The 7220 is a graphics display controller that draws lines, arcs and characters in hardware. Sources date it to 1981 or 1982. The term GPU came later.
[4] Royal College of Anaesthetists. 7th National Audit Project (NAP7), chapter 31, Monitoring and transfer. Processed EEG was used in 3,223 of 16,739 general anesthetics (19.3%) in the November 2021 activity survey (Kane AD, et al. Anaesthesia. 2023;78(6):701-711). https://rcoa.ac.uk/media/39016
[5] American Society of Anesthesiologists Task Force on Intraoperative Awareness. Practice advisory for intraoperative awareness and brain function monitoring. Anesthesiology. 2006;104:847-864. The advisory dates from 2006; I did not confirm whether it has been replaced.
[6] Abenstein JP. Is BIS monitoring cost-effective? 31st Annual International Conference of the IEEE EMBS. 2009:7041-7044. US figures from 2009.
[7] Medtronic. 2022 Billing and Coding Guidelines: Bispectral Index monitoring system. January 2022. No dedicated code; payment is included in the associated procedure.
[8] VRTX is the Versatile Real-Time Executive, the system that ran on the Lifescan main processor. Zephyr is the real-time operating system in Nordic Semiconductor’s nRF Connect SDK, which Nordic recommends for new projects; its older nRF5 SDK is in maintenance mode. https://www.nordicsemi.com/Products/Development-software/nrf5-sdk
[9] Lee HC, et al. VitalDB, a high-fidelity multi-parameter vital signs database in surgical patients. Sci Data. 2022;9:279. Data used under CC BY 4.0. 2,574 adult general anesthesia cases were processed; results are from the 1,256 usable cases in the tuning half (1,921 hours).
[10] Chennu S, O’Connor S, Adapa R, Menon DK, Bekinschtein TA. Research data supporting “Brain connectivity during propofol sedation”. University of Cambridge, 2015. doi:10.17863/CAM.68959. Used under CC BY 2.0 UK. 20 volunteers, 91 channels, four sessions each, with measured plasma propofol. I formed forehead-to-ear and forehead-to-temple channels from the same recordings; the site behind the ear is the nearest one the data set kept, not the mastoid itself.
[11] 3M Red Dot 2248-50 monitoring electrodes at $310.09 per 1,000, a US distributor’s listed price on 12 November 2026. Five electrodes per patient. Hospital contract prices will differ.
[12] NeuroWave NeuroSENSE (an index for each hemisphere), Masimo SedLine (left and right spectrograms) and the Medtronic four-channel BIS (asymmetry indicator), from each maker’s product material, read 13 November 2026.
[13] Texas Instruments ADS1292 and ADS1299 data sheets (noise), and distributor prices of about $13 and $45 for single pieces on 14 November 2026. The noise test added each chip’s data-sheet noise to 70 recorded cases; with the index re-learned at each noise level, agreement with BIS was 82.5% with no added noise and 82.0% with the cheaper chip’s noise. White noise only, added to recordings, not a hardware measurement.
[14] The stop test. 628 propofol cases in the tuning half in which the pump’s final fall is on the record. A signal alarms on three consecutive 10-second readings beyond its threshold; thresholds were set so every method gave 0.5 false alarms per hour of steady anesthesia. Alarmed within ten minutes: BIS 64%, the wave analysis with its fast-wave and alpha measures 64%. Of BIS’s alarms during steady anesthesia, 52% came while the pump’s propofol or remifentanil estimate was below its high of the previous ten minutes. The end of surgery is a rough stand-in for a failed line.
[15] The same waves counted three ways for an 80% edge over 30 seconds: each wave once, by its amplitude, or by its amplitude squared. 324 propofol patients in the tuning half with clean EEG both before propofol and under it. The edge was higher before propofol in 100%, 87% and 42% of patients. Agreement with BIS inside a case: 0.31, 0.37 and 0.33. The table is on the project page.
[16] US FDA 510(k) K052362, Aspect Medical Systems BIS EEG Monitor, 2005, indications for use.
[17] Whitlock EL, et al. Relationship between bispectral index values and volatile anesthetic concentrations during the maintenance phase of anesthesia in the B-Unaware trial. Anesthesiology. 2011;115(6):1209-1218. Median within-patient correlation -0.16 in 1,100 patients.
[18] Schuller PJ, et al. Response of bispectral index to neuromuscular block in awake volunteers. Br J Anaesth. 2015. PubMed 26174308. Ten awake volunteers; BIS fell as low as 44 and 47 on the two monitors.
[19] Smith NT, Dec-Silver H, Sanford TJ, et al. EEGs during high-dose fentanyl-, sufentanil-, or morphine-oxygen anesthesia. Anesth Analg. 1984;63(4):386-393. Aperiodic analysis in 49 open-heart patients. With fentanyl and sufentanil the 90% edge fell from about 16 to 18 Hz to about 6 to 8 Hz. Read from the abstract.
[20] Safe Anaesthesia Liaison Group. Awareness during TIVA. Patient Safety Update, January to June 2023: “Accidental awareness with TIVA is commonly due to failure to deliver the drugs through i.v. cannulae.” https://www.salg.ac.uk/salg-publications/patient-safety-update/patient-safety-update-january-june-2023/awareness-during-tiva/
[21] US Patent 12,334,215 B2, Method for identifying anesthetic drug, and method and device for processing anesthesia electroencephalogram signal, granted 17 June 2025.
[22] The project page: https://danielpettus.com/everywave/ . EveryWave is a working name. Patent pending. A design concept, not a medical device, and not reviewed by the FDA.
[23] Avidan MS, et al. N Engl J Med. 2011 (BAG-RECALL: awareness in 19 of 2,861 patients with a BIS protocol and 8 of 2,852 with an end-tidal gas protocol). Short TG, et al. Lancet. 2019 (Balanced: 6,644 patients, no significant difference in one-year mortality between BIS 50 and BIS 35). Deschamps A, et al. JAMA. 2024;332(2):112-123 (ENGAGES-Canada: delirium 18.15% with EEG guidance, 18.10% without). Read from summaries, not the full papers.
[24] Association of Anaesthetists. Recommendations for standards of monitoring during anaesthesia and recovery 2021. Anaesthesia. 2021. doi:10.1111/anae.15501. Processed EEG “should be used” when total intravenous anaesthesia is given with a neuromuscular blocking drug. Read from a summary of the guideline.



