This is a bit fragmented because I mostly described the differences between EOGee1 and EOGee2 from a circuit perspective in the previous article about DC coupling. Here I will give a quick overview of the intention behind EOGee2 as well as the physical differences
The main barrier to getting a DC coupled signal using EOGee1 was that the DC offset voltage of the EOGee signal was much larger than the actual signal itself. Because the signal itself is so small we need a large gain to amplify it, but this also amplifies the offset voltage which then saturates the amplifier.
My solution is to use a signal chain like this:
Previously we have focused on the mains interference component of noise in the EOG signal. This is because it has been the dominant source. However we have seen that this noise can be significantly reduced with appropriate shielding and we could reduce it further still with shorter leads.
Now that the 60Hz noise is reduced, there is a very clear spiking signal coming from somewhere. The signal does not have any obvious periodicity but it is significantly larger than the other noise and also generally affects only one sample. It is easier to see the noise if I remove R108 which means that the final gain stage is disconnected from previous gain stages so the ADC is driven to midrail and is not affected by 60Hz noise at the input.
In the last article I made a PCB that allowed me to easily inject signals from my signal generator into the EOG cables. This allows me to more easily simulate signals without wiring myself up, but also allows me to isolate the effects of the cables. The first thing I wanted to try was to shield the cables.
Now that I have an EOG system working to some extent, it is inconvenient to wire myself up each time I want to take a measurement. Not to mention that the silver chloride electrode pads are single use which is wasteful and expensive (I reuse them multiple times, but the connection and adhesion definitely degrade). On top of this, I don’t like being connected to the system while it is connected to any mains powered device due to risk of an electrical fault being directed straight to my head – I can unplug my laptop, but my oscilloscope isn’t battery powered. So I decided to make an adapter from my signal generator to the snap connectors so I can inject false EOG signals.
As of the last post, the digital aspect of the project is mostly pulling its weight. Although we are filtering the 60Hz noise in the digital domain, I mentioned that it would be ideal to prevent the noise in the first place by improving the analog side. There are three aspects I want to start diving into.
The first is shielding the signal – a lot of the noise is picked up on the long wire from the electrode to the device and this can be improved by shielding the wires (potentially more complex than it sounds). Secondly, I want to better understand the analog signal path that is based on the backyard brains design and where it can be improved to lower noise and provide a larger signal. Finally I want to try and DC couple the signal, rather than using AC coupling as is currently the case. With AC coupling we are only able to detect movements of the eyes, and not absolute positions. Today we will be looking mostly at the second, and skimming the surface of the third.
In the previous article I showed the analog EOG measurement being digitised and sent over USB to my Mac where it was plotted in a python script. While the EOG signal was clear, it was partially obscured by a strong 60Hz signal from the mains interference.
There are multiple ways of reducing this interference, in both software and hardware. A comparison of each of these methods can be found in Effective Biopotential Signal Acquisition: Comparison of Different Shielded Drive Technologies (Y. Jiang, O. Samuel, X. Liu, X. Wang, P. Idowu, P. Li, F. Chen, M. Zhu, Y. Geng, F. Wu, S. Chen, G. Li – Appl. Sci. Basel 8, 276 (2018).
The simplest way is to use a 60Hz notch filter to remove the noise. This has disadvantages of potentially distorting the signal. Furthermore, by allowing additional noise in the analog signal there is a loss of dynamic range. Nonetheless, filtering yields a significant improvement in the signal with minimal investment.
In the first article, I showed the amplified electrooculography signals on my oscilloscope. In the second article I showed the STM32 streaming a synthesised saw-tooth wave over USB to a simple python plotting script on my Mac.
The next step was to enable the ADC on the STM32 to digitise the analog signal and send that over the USB.
The analogue signal I showed in the previous article feeds into the ADC of an STM32. This was the STM32 can digitise the signal and send it over USB to my Mac.
I’ve seen some cool tricks you can do by measuring the electrical signals of the body. One of these was using electrooculography (the measurement of the electrical signals of the eye) to detect movement of the eyes.
I looked about online and found the Spiker Shield by Backyard Brains, which is a board designed to interface with Arduino and measure EEG/EOG/ECG signals but it didn’t quite match my requirements – I wanted multiple channels and I wanted to work with an ARM processor. Luckily their design is open source so I took their basic analog design and built my own digital interface.