For those who have not seen it, this is based on SCMUTILS -- an open source symbolic manipulation engine, much like Mathematica or Maple. It is extremely powerful, and the book is worth reading just to understand the design patterns used there.
To give an example, in a dozen lines of readable, intuitive code, you can:
* write a lagrangian as a normal Scheme function
* symbolically take derivatives of that to get equations of motion
* print those equations with LaTeX.
* compile those equations to native code and numerically integrate and plot the motion of the system
Good at lying with statistics. The plots don't say what the text does. Non-zero y axis makes tiny effects look big. Worst culprit are the age plots, which show retirees watching more tv than young'uns. It doesn't change over time, but text claims youngsters do not do tv.
You are incorrect. This circuit can potentially apply unsafe currents across the patient. A standard medical biopotential measurement circuit will have single-point failure protection to prevent conditions like this. This is required by standards like EC11, EC13, and 60601. Those systems are extremely safe.
Most hobbyist designs, like the one in this article, do not have such protection. Indeed, for this particular circuit, a simple static discharge, as might happen when you're applying the electrodes after walking over carpet, can fry the input amplifier, connecting it to the power rails. ESD (and, indeed, defibrillation -- which is about a thousand times more energy than ESD) protection would be present and required in any medical biopotential amplifier, even unrelated to the single-point protection described above.
If the ESD failure happens to short out to power rails, your current will be your power rails divided by your electrode impedance. This distribution is described in EC11/EC13 (although electrode technology has improved since the days when those tests were done, so impedance is even lower). Even with the ancient electrodes in EC11/EC13, you would get unsafe currents some of the time. With modern electrodes, you would get unsafe currents much of the time.
I've seen dozens of circuits for home EEG/ECG/EMG. Almost all of them, including this one, are a deathtrap. They will work okay most of the time. At some point, someone's going to kill themselves.
Disclaimer: I am not a physician, but I've designed ECG circuits all the way through safe, successful human trials.
Your talking potentially "unsafe" vs somewhat likely hazard.
Most of the "danger" comes from poor isolation. The skin resistance is too high for EEG to cause major problems. I realize the actual standards have requirements that are detailed and somewhat strict.
The difference is that ECG has sensors that can directly put current through the path to the heart so the risk is higher if there is a worse-case ESD latchup. 5mA is enough to stop a heart in certain conditions.
EEG isn't ECG or EMG and have different characteristics even though they seem vaguely similar.
Skin resistance is quite low. You are thinking skin-electrode impedance. That is generally high enough to be safe, but with modern electrodes and luck, it can get somewhat low too. 5v 1k 5mA would not be unreasonable.
Sure. Have your entire kit powered by a AA batteries. Any connection to the outside world should be either radio-only (wifi/bluetooth) or optical. That way, there's no electrical path that can carry current from a device that's plugged into the wall to your body. In the worst case, you'll have a pair of AA batteries tied to your body, which should be a negligible risk.
AA batteries are a negligible risk when you touch metal with skin. That resistance is very high. Resistance inside your body is much lower -- 100 ohms is typical. If you were to get 0.5v between you arms, you could get unsafe currents.
With electrodes, the current can be /much/ greater than touching metal wires with a finger. Single-digit kilo ohms is typical. The big ECG paddles are tens of ohms, probably.
Another way to think about it -- have you ever felt even a 24v battery? No. Now You know that 9v tingling on your tongue? That's saliva and a tiny contact area. Now think of a large patch of engineered electrolyte can do.
To give an example, in a dozen lines of readable, intuitive code, you can:
* write a lagrangian as a normal Scheme function
* symbolically take derivatives of that to get equations of motion
* print those equations with LaTeX.
* compile those equations to native code and numerically integrate and plot the motion of the system
It's like magic the first time you see it.