Hey all, I dropped a small but not insignificant firmware update adding some simple Infinite Impulse Response (IIR) notch and low pass filters, as well as an optional DC blocker if you only want to get the pulse waveform. You can use the 'F' command to toggle the filters (default ON for obvious reasons) and the 'X' command to add the DC blocker on. They will eat 50/60Hz AC noise for breakfast and ensure a smooth curve on pulse readings on the Delobotomizer regardless of power source. For the V1 HEGduino's I'm not entirely sure how well they work so I need some feedback, I'll be testing them within a day or two I just have to build another one real quick as I don't have any laying around. With any luck these filters will more or less rescue the V1 devices from their pretty serious signal quality problems.
Here's a SUPER noisy signal with and without the filters. I'm applying 3 of each 2nd order 50Hz and 60Hz notch filters (for depending on where you live), and 3 2nd order low pass filters. You can see how pulse is obscured by the significant high frequency noise.

For reference this is what the signal should look like without filtering if there is less environment noise. I'm pretty sure the above picture is due to my laptop battery crapping out.

Next is my new favorite and by far the simplest filter, the DC blocker. This will help me make pulse measurement much more accurate.

One thing that's kind of neat is that these filters are using some cool adaptive complex numbers math so you can see the filters scrub the signal in real time. I don't really understand them yet but they work like a charm. I'm stuck on the phase locked loop part which is a similar problem, which led me to integrating these in the first place. Here's what happens when you switch on the DC filter at first, the signals quickly trend to 0. It makes it plainly obvious how your pulse is even visible just with ambient light, and this is in my very dimly lit room. You can monitor pulse just with a phone camera especially if it's IR sensitive.

Otherwise, I have a pretty gigantic improvement for the software coming. If you check out this repo: https://github.com/moothyknight/eegpwa you can see what I've been up to the past few months on the software work. This is going to be a plug and play software for the FreeEEG32 and beyond, as I created a brand new javascript format to drive the app and make it much easier to develop modular features for it that should still carry over to the microcontroller's hosting capabilities pretty well, including a bunch of itty bitty libraries for high performance data visualization. I've basically refined everything I've learned about web software development into something I'm really pretty happy with and I can continually improve on and get others involved with more readily. Our friend Dovydas in the community here showed us a ton of tricks. Here's a WIP image from it using the EEG, before implementing similar filters there as well. The spikes are eye blinks, the lower chart is a messy coherence time series. There's a lot of cool features that will apply to the HEG nicely.

Yaaaaaay learning! To do it right you gotta do it yourself, so we're gonna do it all ourselves and kick BCI into a higher gear.
Hey Joshua,
When is the Crowd Supply campaign going to get launched?
I've been looking at the signal with the DC offset filter a bit and there are definitely some interesting things you can see pretty much instantaneously. This first graph is what happens 2 seconds into taking a deep breath, you can see how much stronger and regular the pulse gets there in the second half, then it goes back to normal semi-irregular humps off screen soon as I quit breathing deeply.
And in this next graph I'm holding my breath. You can see a the orange line (IR) rapidly increasing over the red line (the Red LED). This shows just how fast your brain's blood oxygen drops if you aren't breathing right. If each peak is about a second, then you get like 6 seconds of bad or no breathing before your body starts to notice. With the new software updates I'm working on it will be really easy to view this data.
I'm still stuck on the phase locked loop. This is how great the signal looks after cleaning things up and tuning the filters (plugged in no less). I came up with some more filters too after finding a great guide to pretty much just copy so I will look into whether I need them or not for this, but I don't know if you can get a better pulse signal. One thing I will try however is filtering pulse entirely and seeing if we can start to see some low frequency brain rhythms :-) My next sensor sets will have some even stronger LEDs on them so I think we should be as close as we can get to seeing these mystical brain goo waves
Thanks for the quick reply! @Joshua Brewster 👍👍
But there is something weird here.
I updated the bin file on my V2 HEGduino, but the update doesn't seem to work.
When I type X, F in the serial port monitor program, nothing happens.
And the bluetooth is not working yet.😂
Another suspicious one is this.
I checked the version on the ESP32 web page, but it still shows last year.
[Alpha v0.1.12.2 Dec 8, 2020.]
I think the date and version number should change after updating.
How do I check the exact version of my device?
Thanks, @Jinsub
Okay looks like I might have one of the settings wrong on the filter for the V1 which would cause it to crash. If I set the SPS too low it goes haywire so I need to tweak that. I just pushed a fix for the BLE, I had some outdated settings on the Delobotomizer. I just realized the WiFi connection won't work on the hosted app as the device is serving from an http connection and the secure host rejects it. I will see how I can address that, I have a few ideas. Otherwise wifi only works if you download the repo and run it from node, although the BLE actually appears to run better now than the WiFi. The chrome extension worked because it was on a local host.
@Joshua Brewster Thanks for updating! so, there are two problems and One good news! 1. My V1 HEGduino (Lolin32) got an update error.❌ Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. Core 1 register dump: PC: 0x400d87ae PS: 0x00060530 A0: 0x800d884e A1: 0x3ffdf1c0 A2: 0x3ffe3ef4 A3: 0x00304288 A4: 0x00000024 A5: 0x3ffe2dd4 A6: 0x0a0d0a0d A7: 0x203a6174 A8: 0x800d87bc A9: 0x3ffdf1a0 A10: 0x00000024 A11: 0x00000048 A12: 0x00000024 A13: 0x00000024 A14: 0x00000000 A15: 0x7061000a SAR: 0x0000000a EXCCAUSE: 0x0000001c EXCVADDR: 0x00304288 LBEG: 0x4000c2e0 LEND: 0x4000c2f6 LCOUNT: 0xffffffff Backtrace: 0x400d87ae:0x3ffdf1c0 0x400d884b:0x3ffdf1e0 0x400d886b:0x3ffdf200 0x400d88c1:0x3ffdf220 0x400d2045:0x3ffdf250 0x4008f2dd:0x3ffdf270 2. hegalomania.netlify.app doesn't work for me😂 I tried to connect the V1 and V2 HEGduino to the app, but the Wifi and Bluetooth connection failed. I tested it on my laptop (Windows 10) and two Galaxy phones. I plan to test it on another PC next week. 3. The good news is that my dad said he felt his headache relieved while using the V2. (He sometimes suffers from severe headaches.) And I use it for the left frontal lobe, and I feel an increased emotional comfort.🧘♂️🧘♀️