It is extremely important to isolate the EEG probes from any mains powered items (the circuit or the computer) to avoid electrocuting the patient.
This should be the FIRST consideration BEFORE making electrical connections to the human body. It should be tested and verified that there is ZERO leakage current between the "patient" and a good earth ground. Do this BEFORE powering up ANYTHING. There should also be ZERO leakage current between "patient" and a good earth ground AFTER the analog instrumentation is powered on.
... Isolation is usually provided with an optical coupler (LED to photo-diode). Then the input circuit from the probes is battery-powered and it feeds the isolating couplers.
There are many ways to provide galvanic isolation, both optical and electromagnetic. For linear analog signals, as represented by EEG signals on the scalp, linear amplification and bandwidth filtering followed by analog-to-digital conversion is necessary before optically-coupled isolators (which are typically on/off devices, not linear devices) can be used. This front-end circuitry MUST be galvanically isolated from earth ground. A simple approach is to use battery power and digitization, followed by optical couplers driven by the DIGITAL signals to provide galvanic isolation.
It is possible to use an optical isolator as a linear coupler, but that approach is seldom taken because of stability and linearity problems that must be overcome. If you want to try this, a simple circuit will drive the input LED of the isolator with a variable current, say 4 to 20 mA, that is a function of the input signal. The output photo-transistor of the isolator then drives a voltage-to-frequency converter circuit whose pulse rate represents the input signal. A common 555 timer can be used to implement the V-to-F conversion. A software look-up table can be used to "linearize" the pulse frequency (measured with a microprocessor) as a function of input signal. Seems deceptively simple and inexpensive, but analog-to-digital converters are also cheap and simple. So why not do the ADC function first, then optically isolate the resulting digital signal?
... The circuit on the Instructable has many errors because the author seems to know nothing about electronics. The unshielded alligator wires, the breadboard, the opamps and the biasing are wrong. The 12 ohm and 220 ohm resistors are crazy. The schematic shows noisy old LM358 dual opamps but the parts list has TL084 quad opamps that need an additional negative power supply for them.
The "projects" submitted to Instructables are not vetted and vary in quality and correctness. It would be extremely foolish to attempt to build an EEG or ECG using monkey see, monkey do "information" derived from an Instructable. There are far better sources of reliable information and Google is your friend to find them. And you can get help here on EP too, but we expect you to do your own research first.
This is a very old Instructable, and the circuits have been previously discussed here. Although it does appear to be the work of a serious amateur, he bailed out on replying four years ago. If you read the long list of comments, many people had problems with the "monkey see, monkey do" philosophy of Instructables project duplication, for which Instructables is infamous. Besides the problems that
@Audioguru pointed out, apparently the software was also full of errors and didn't work "out of the box". Some assembly required. Or maybe C, C++, or even BASIC.
So, if you want to build an EEG machine, take this Instructable only as a starting point for inspiration. There are good ideas therein, such as the use of instrumentation amplifiers, notch and bandpass filters, and battery operation for isolation. However, the use of a PC sound card in a battery-operated laptop computer for waveform digitization and galvanic isolation is a bit iffy. You will be tempted to use a line-powered power supply on the laptop, which may or may not provide galvanic isolation. Personally, I think it is a bit risky compared to an on-board ADC in the front-end circuits, with optical isolation of the digital signals between the front-end floating, battery-powered electronics and a USB serial port.
Building this project on a solderless breadboard is also likely to lead to a big fail. Microvolt signal processing needs point-to-point soldered connections and specific construction techniques. Brain wave signals are tiny and the subject is immersed and surrounded by much larger electrical fields from the mains wiring. Sophisticated techniques are required to recover the scalp potentials associated with brain-wave activity while rejecting all the ambient electrical noise. That noise includes myoelectric skin currents generated by muscle movement. I won't go so far as to say that the "patient" must be situated in a Faraday cage (or a conductive copper screen room) and paralyzed with strong drugs to prevent movement, but that would surely be an excellent "control" situation to test the EEG equipment against. Maybe just saying, "Hold still and concentrate" will be sufficient.
So are you saying that there should be optocoupler between the electrodes and the analog circuit (amps/filters).
That would difficult, if not impossible, to achieve.
Clearly you have NO understanding of galvanic isolation and why it is REQUIRED for "patient" safety. In the diagram you included with your first post, the entire diagram represents the "front end" of the EEG. This front-end needs to be galvanically isolated from earth ground (typically with optically-coupled isolators) at the point you labeled "9-pin Serial Output." This output represents the front-end connection to the real world. Anything can happen in the real world, including "patient" electrocution, without galvanic isolation.
Your EEG should be divided into two halves: a front-end signal conditioning half and an "everything else" half. The front-end includes the electrodes, the electrode leads, the instrumentation amplifier(s), the bandbass and notch filters, the Analog-to-Digital Converter (ADC), and the method used to galvanically isolate the front-end from the "real world". Typically, galvanic isolation is easily achieved by using the ADC digital output to drive one or more optically-coupled isolators. The input of the isolator is galvanically isolated from its output. When you attach the "patient" to the front-end using the electrodes, the "patient" becomes an integral part of the front-end circuitry. You DO NOT connect any part of the body of the "patient" to earth ground, nor do you allow any "leakage" currents to occur between the front-end and earth ground.
Your front-end circuitry will have a
common to which all its signals and voltages are referenced.
This common is floating. It is
not connected to earth ground. Never connect the front-end common to anything (other than the "patient") in the real world. Place the front-end circuitry, including batteries, in a plastic enclosure to ensure this never happens. It is okay to place the plastic enclosure with the front-end circuitry inside a conductive outer metal box connected to earth ground for shielding purposes. It may even be necessary to do this to prevent coupling external signals from the real world (nearby mains wiring usually) into the front-end circuitry.
For advanced builders, it
is possible to forego battery operation of the front-end and use an isolated line-powered power supply. After all, commercial EEG machines are line powered. However to attempt to build such a device as an amateur is highly risky.
Medically qualified isolated power supplies are pricey. See
here for examples. Specially constructed transformers and patient protection circuits are required to obtain safe and reliable isolation. Your typical wall-wart does not qualify, so don't even think about going there.