Mindfulness Monitor pt 4

This series of posts will be documenting the development of Group 17’s (Evan Oskierko-Jeznacki, Christina Kim, Jiaang Hu) final project for ESE 519 Real-time Embedded Systems. Advisor: Dr. Nalaka S. Gooneratne, M.D., M.Sc.

While the ECG circuit is well-documented, it was necessary to reconfigure it to accommodate the particular needs of our project. That is, the circuit needs to accommodate the particular electrodes, leads, etc. that we chose to use. The diagram below is the version we used to build our preliminary circuit on a breadboard.

Because we are using a RaspberryPi as our primary processing unit, which does not have an onboard ADC, we had to construct an analog sensor input circuit built around a mcp3004 4-channel, 10-bit ADC chip. The preliminary results of our ECG circuit, through the ADC, can be seen below. The electrodes (V+ and V- into the amplification circuit) were swapped, resulting in the inverse curvature (peaks low, instead of peaks high), however this will not actually affect the BPM calculation. Three electrodes were used. One on the left ankle (could also be the right ankle), and two on the wrists (one on each). We had originally tested using four electrodes, with one each on the L-ankle, R-ankle, L-wrist, R-wrist, however this provided no noticeable improvement. As we wanted to simplify the hardware as much as possible, we removed the second ankle electrode. These ankle electrodes provide a ground for the ECG circuit, while the L-wrist and R-wrist provide the V+ and V-.

Following this test we added the ability to adjust the output gain from the ECG amplification circuit to fine tune the signal into the ADC and minimize noise. Furthermore, at this point we noticed significant reliability issues with the breadboard built ECG circuit, given that it was at times more of an AM radio than anything else. It was always the intention, time permitting, to print the circuit on a PCB. While we will not have time to professionally print a PCB, we are in the process now of mounting the circuit onto a PCB ourselves both to minimize its footprint but also minimize room for error and interference. Moving forward, we have configured two signal generators to simulate the ECG and respiratory signals. This is both as a backup, in case our ECG circuit does not function for the demonstration, and to fine tune the circuit under controlled situations. That is, we can simulate the progression through the mindfulness states without an actual test subject to filter out as many unknown variables as possible.

The next post will begin to cover the respiratory belt inputs, and the feedback hardware and software, both the haptic and visual mechanisms.


Leave a Comment