Hey all, it's about time I give you an extensive hardware update. I have been holding off on this for a while as I've been waiting on prototypes and running tests and fixing stuff. I don't have as much fun stuff to show you today as I was hoping, including definitive demonstrations of the V2 tech, but I have come incredibly far in 6 months and thanks to your support we have not one but three different low cost hardware designs that all *should* work now that I've narrowed down all the problems I've been running into. So this will cover each different design, my considerations for each, and how I will be turning this into the final product along with several secondary developer board options
So here is what we are working with in order of sophistication:
MAX30112 - 19 bit 3200sps single channel A/D converter made specifically to drive pulse oximeters
I designed this test board to simply require a LOLIN32 or TTGO T1 to be popped onto the end there, so the controller would sit on the side of your head. The idea was to proof of concept a simple cost-effective HEG solution based on my current working platform on the HEGduino V1 but without all the tedious assembly stuff (which was a purposeful design decision for the DIY kits). But guess what? It didn't work. I received these back in, I think February? I had the libraries prepared for it but I was sure for a long time it was my code that was the issue. I *finally* was able to put this all under a scope with an expert and it turns out the libraries were just fine (available free on my Github profile). Nope, the issue was that TINY black piece that's barely visible next to those resistors in the middle. See, this is where the importance of silkscreens and carefully reading nearly microscopic part markings comes in. There's a very, VERY tiny dot on that little logic leveler chip, which tells me it's... upside down. Now, was I aware of that when I had the chance to correct it? Nope, clearly. So, well, I just got a heat gun in the mail to see about fixing that tiny thing, and I'll throw another chunk of savings at a board refresh here soon if I think it's worth it, but otherwise the design plans and code are all free on my Github - have fun! They cost me $30-$50 a pop to prototype at low volume, and should drop to near $10/unit at scale. Next up is the design I'll *probably* feature for HEGduino V2.
MAX86141 Breakout board - 19 bit 4000sps dual channel simultaneous sampling ADC made specifically for pulse oximetry.
Attempt 1 (worked, sorta)
So this design has a fun story. I've been working with Peter van Deusen on his Statechanger project since last year. First I made him just a sort of funky suped up version of my HEGduino with two channels and full forehead coverage, then decided I could do him one better with some MAXIM chips I had been studying so he'd have something more professional. Enter the MAX86141. After a bunch of hacky stuff with some MAX30102 breakouts I designed a board with one of these chips for him in his particular configuration. We eventually got it working after some great help from another more experienced engineer, while I've also had these miniaturized breakout board prototypes cooking. Unfortunately in that time the Mendi was released which is nearly identical (the Mendi guy used Brain Trainer's stuff before), and then I'm not so sure the Statechanger is going to be offered at what I think is a fair price anyway due to the development hell they've dealt with for a few years driving their costs up.
This is what heart rate looks like coming from these MAX86141 chips on my finger at just 20sps output speed. You can see very clear systolic and diastolic peaks (bigger and smaller), spaced at about 60BPM, which is expected. Pulse ox's can see not just perfusion but even guess your blood pressure!
Ideally, I'll get not just an HEG signal on my forehead, but something close to this too! I have not yet verified if it's possible to get the fully analyzable pulse ox signal yet on my forehead with the 3cm sensor spacing, however, due to production problems with these prototypes I'll cover below. The signal you see here came from much smaller photodiodes than the ones on the prototypes shown, so forehead pulse was somewhat obscure at that time. The initial miniaturized design shown here as Attempt 1 was actually sponsored (on the agreement of keeping this open source) by John Chibuk at BlueberryX as a potential base design for his product, who is releasing fNIRS smart glasses to do basically the same thing I'm doing. I was not able to get this design working for him for many months, unfortunately, this time due to software issues (free libraries that *definitely* work are on my Github), and then eventually finding out there were also some grounding issues on this design, so I missed his due dates but these designs are completely open now no holds barred. On Attempt 2, well wouldn't you know it the damn logic leveler chips were upside down again, and I didn't catch it *gags* ... In fact the same hour I figured out why my MAX30112 designs weren't working (6 months later...), I looked at my beautiful new prototypes and facepalmed so hard at seeing the same mistake the concussion broke all the windows in my cabin... Won't be making that mistake again... Again, not a huge loss at $30-$50 a pop but I work on a shoestring so that still adds up - mostly in precious time. What's cool with these is that they're self contained SPI sensing units that can function as HEG sensors with powerful photodiodes and a 3cm spacing from the LEDs, or they can function as pulse oximeters if you simply fold the LEDs over your finger like a normal finger tip pulse oximeter. Pretty cool, and they're in a breakout board fashion for all you Arduino lovers like me. You can see how I've considered different PCB archetype ideas depending on how I want to build the product - whether as something more modular and Arduino-like or something just to get the job done. I favor the modularness, and I am thinking I'll simply add another flex component to these MAX86141 boards as connectors to the ESP32, and call it good and offer the breakouts separately along with maybe a fixed MAX30112 breakout of similar stature. I've got a refresh coming here in a few weeks now, ideally to hit the August target as planned and make my early backers happy. Keep reading, by the way, if you've supported me already with a pre-order, as I am sweetening the deal for you as thanks.
This next design, however, has me *really* excited, as it is represents a broad scope that I have been dreaming of for this business for a while now, and it also will dovetail with some awesome collaboration I'm doing on EEG. AD7771 - 24 bit 128ksps sigma delta simultaneous sampling 8-channel (and a whole lot of other features) ADC breakout board.
This is my favorite chip of the bunch now, though definitely the most complicated and the one I've spent the most time on as of late. The status is it seemingly works and I am getting channel data but I need to do more to the drivers and my test setup to finally show off some data. This is a test chiplet design for an AD7771 breakout board. The idea was these castellated holes on the edges (I still need to add true throughhole pins) would be ideal for mounting this, say on a flex piece with electrodes or photodiode placements. It even has a (backwards, due to bad docs) isolated DC/DC converter for meeting power safety regulations. That way I could have a truly powerful, yet affordable workhorse to base not only some epic HEG designs off of that could get me into initial 2D and 3D brain mapping (akin to fMRI), but also EEG - which this design is intended for. I've now started collaborating with Dmitry Sukhoruchkin to help him launch his new FreeEEG32 project, which features 4 of these AD7771s in a 32 channel configuration. We'll be doing it here: https://crowdsupply.com/neuroidss/freeeeg32 :-) There's a Slack channel available too for those interested.
So my goal is to not make some super hyper mega channel science device myself (Dmitry's got me beat there anyway, so support his work!), I'm more trying to hit the golden cost range (i.e. as low as possible without sacrificing quality) on devices that are affordable, open source, and scientifically valid - in order to bring the strongest possible community platform for home biofeedback and a very serious ethical, medical, and educational crisis in this country and beyond surrounding our brain health. EEGs also get more interesting and useful when you have several channels, and this would be enough to do a good forehead EEG akin to the Muse (but fully open source), though obviously more DIY looking and at more like $100-$200 price. EEG doubles as an ECG and EMG monitor, and there are plenty of other sensors we could hook up to this to get a real smooth 24 bit signal. I made as many low noise considerations as I could, looking for nanovolt to microvolt noise chips that could allow EEG signals to appear cleanly. I ordered 3 of these, and they cost me less than $50 each to prototype (with a $30 discount), just FYI if you do this stuff yourself. I've even produced some cheap test PCBs that contain electrode pads and an active amplifier breakout.
On one set the copper pads have coverlay (to create supposedly capacitive electrodes according to one neat paper), the other is gold plated for a more standard electrode setup. I'm testing different sized pads to see what the limit is on viable electrode size to get a clean signal (if I get a good signal at all). Pretty fun stuff! This pales in comparison to the custom headset work by Bernard Markus, who's made his entirely unique mixed 3D printed and hand crafted EEG headsets for the FreeEEG32.
So the verdict is, I have everything I need to deliver on the HEGduino V2 as promised while I don't have as much ready now as I had triple-double-crossed my fingers on having. You can see the ground I covered thus far and get an idea of how I plan to provide a good synthesis. The plan is to go with the MAX86141 design as the base on this release and focus on turning that into the new star of the HEGduino platform as it will be more reliable, consistent, and professionally-graded. I've reworked my software recently to allow compatibility with any arbitrary formatted data stream too as long as it meets a couple conditions, so it's very easy for me to design cross hardware support in now (even changing hardware mid-session) and also add EEG support with some new features I have planned as part of turning my humble software into a fully realized and optimized free web BCI platform. It'll be a reckoning for the industry as we know it when all is said and done. I want this more than any of you, trust me, so having my hardware only kinda-working at this moment is agonizing. I've learned this hardware stuff all from scratch over the past two years and the software stuff from scratch over about 4 years on and off, so I'm very proud of my progress - but there's no slowing down. I'm not in this alone thanks to all of the amazing mentors and friends who've guided the way at times, while with everything about my niche with this particular tech and my nearly unexploitable business model, I've had to take a stance of "if not me, then nobody" and grit my teeth and carry the weight. You'd be surprised who's snubbed me and who's genuinely helped in this process, it's never who you expect. As long as I keep my intentions pure and inventive, nothing's gonna stop this. Because, however, the design I want to do can be produced at so low cost, it would be unconscionable to charge $125 or even $100 for this thing, and I'll be dropping that price closer to my V1 kits at launch now that I know the territory I'm in so much better. I won't be able to give you the Apple product look, but it'll do a great job and live on a fully open and evolving platform. So for those of you who backed me early, you wonderful people will be receiving not one but two HEGduino V2's on release. The AD7771 breakout will be on offer separately, too, along with the plain MAX86141 breakout and again maybe the MAX30112 board. Any new pre-orders will also receive two devices until I drop the price at launch. I am scrambling for what is now a late August release due to the damn factory issues I didn't see coming on my latest prototypes, but I'm holding fast. As your chosen provider of this tech, you will not be disappointed. And hopefully you can forgive me for the little extra wait :-|