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)

Attempt 2


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 :-|
I appreciate all your hard work and making this technology available with an affordable price point. Can't wait to try it. I don't have enough patience to wait so I ordered a V1 last night :)
Hi Joshua, what is the latest ETA on the v2?
@Joshua Brewster so no device with HEG + EEG/EKG/FNIRS in the works?
We are currently wifi enabled also, but that likely won't fly for an EEG due to interference, but it will still have bluetooth and USB regardless and ways to tinker with WiFi.
Hi @Joshua Brewster! On May 2020, someone on Reddit mentioned (https://www.reddit.com/r/Neurofeedback/comments/g1x1o7/new_neurofeedback_consumer_gadget/fox9uz1/) that your device was going to combine HEG, EEG, EKG, and that it also had WiFi enabled. The user also reported that he received this information directly from you through email. So... what happened to those features???
@Jinsub Can't say! This is just a passive measurement tool so it would be your own effort doing the influencing. Hypothetically you should be able to read some kind of brain waves in CSF but I'm not that far yet, and the heart rate signal is quite strong so CSF waves will be harder to pick out. That said, I seem to see something wavy on top of the pulsatile peaks! Lots to experiment with! I'm always suspicious of any expensive therapies tbh, there is a lot of bunkum out there. Good news also, the fixed connector pieces work great and I'm shipping for sure, during the first week of October. Incoming pics and stuff of me or a friend using the thing with the headband. Here's the base kit, it's very simple, able to be disassembled with parts replaced easily, and does everything my original did and more! I'm including a USB cord and an upgraded (from my original) neoprene band that will hold it comfortably on your head. Still sorting the battery/hard case issue but you'll all be getting good working devices regardless!
I am so incredibly relieved. I pushed myself hard to get this right and staked my ability to move forward in general with my work on the risk of this not working to make it that much more urgent. It might not look like much but this is deciding the future for biofeedback and home therapy as well as low cost, transparent medical hardware. This isn't quite medical grade just because I lack some amount of high voltage electrical isolation on it (I've yet to have any problems, though) - but that's why it's a dev kit! The data is state-of-the-art, however, so we're rocking and rolling.
I'm inching my way into medical instrumentation and being persistently open source and co-operative about my approach so that there's nothing but a humanistic ethical bent being baked into every step of this project. You can't fully be working in other people's interests unless the whole veneer of for-profit medicine is obliterated. It also is a very effective networking tool, because like, I'm just cool yo.
Eventually all this stuff should just be free, provided for by our infrastructure because it's better to raise healthy humans than stop them from healing or reaching their potential because they can't pay up - at least that's the reality in the US. Other places deal with shortages - in part due to price, or just because of a lack of industry and expertise in that region. Again, an open affordable model helps answer that problem by being so accessible.
A buddy of mine who's becoming a therapist just introduced one of my original kits to a recovering addict and they reported all of the changes/effects that seem to be standard with this thing of increasing clarity and alertness, feeling more in control, and feeling a sense of improved circulation. In my opinion that's nothing short of profound but only because I'm seeing this consistently, and it's so immediate. My buddy wants to get these things into our local halfway houses and recovery programs, and out into the villages up here so rural kids can learn and find some benefit from these things. This is only possible with my affordable and open source model, and if it really takes off and is consistently effective we could be making a massive difference in people's lives.
I believe there are some basic physiological models of mental illness as it relates to circulation and cumulative/developmental stress not being learned by most care providers that this device and accompanying exercise demonstrates. This stuff might just be so new to science that there's just not wider recognition or a well developed language for it (which is why I write so verbosely), and I have met some level of skepticism from my scientific peers. However, blood flow recovery/exercise is a very basic idea with a very long history directly or indirectly - it's hardly a stretch of the imagination (har har), though I never learned anything relating it to my brain's health in my non-biofeedback education. I dunno guys, we're onto something here :-)
@Joshua Brewster Hi Joshua ! 😊 Can I use this device to influence brain waves in cerebrospinal fluid (CSF)? I hope it is possible! In Korea, where I am, the CSF flow improvement therapy (Cranio-Sacral Therapy) is sold at a very high price. I heard it's good for my health, but I haven't done it. p.s Your mushroom photos are really beautiful. It looks really healthy and delicious!!
@Alin Samson
Yes I am overdue for an update
Here are a few progress pics.
So I want to point out a few things.
First is I've adopted stacking headers for the precious parts - the ESP32 and the MAX86141 boards, so that they can be popped off and experimented with separately. I envision this developer kit sort of being a launch pad for integrating with more complicated hardware (e.g. VR headsets) for those who like to tinker, so I find it ideal that it's compact and disassemble-able. This also increases the lifetime of the parts in case another part fails, so it's easy to repair. The MAX86141 chip is almost identical to the ones you find in those smartwatches and phones (but slightly better), so this is what you want for coming up with miniaturized solutions that can be integrated with other hardware. The spacing of the flex sensor enables it to be used as either a foldable pulse oximeter or a brain FNIRS device.
Secondly, there are additional LED placements available on the connector board (the long strip), so you can experiment with your own LEDs and flashing routines. There is boilerplate code for this in my firmware. The MAX86141 can use up to 3 LEDs (or 6 with GPIO control) simultaneously but I reserved one slot for a raw ambient light reading.
I had no trouble updating my V1 code for the new sensor, so you'll get the same software that's available now both on-board or downloadable, and I'll soon have some time to start improving it again - including getting it ported to a true mobile app.
So, that's all pretty cool, however I have been dealing with a few issues with my headband setup that I am still solving.
First and foremost is durability, I can't seem to solder the connector strip I have in a way where I get data throughput consistently. The LEDs light up as you can see but I've gotten data on 1/10 of my attempts at assembling these fully. I had this problem on the original kit which I solved by adding more stiffener to help distribute heat and keep the pads from melting or bending when soldered - so I reordered these pieces with the same fix which should get me to the finish line. The sensor breakouts and ESP32 boards by themselves work very consistently however, which is good as they are the essential components. I can say that this is pretty comfy in a headband at least, and the stacking headers don't make it awkward which I worried about.
Secondly is the battery, which you can see in the last pic. While LiPo batteries are not apt to explode like Li-Ion can, they can still get *VERY* hot nearly instantly when compromised - even with the short-circuit protection. So that makes it a bit of a safety risk even though you will find these batteries in most wearables these days. My issue is I don't have a hard case for this yet, and I am not going to burn a hole in my own or someone's head if I can help it, so I'm trying to come up with something by initial release to make the battery a safe inclusion via some kind of hard case. That will also ensure that I can safely mail these overseas for my international orders with less issues. If I'm not able to solve this, I'm going to throw in an extra ESP32 to provide something of equal value, a well as recommended sources for on buying your own battery, at your own risk.
No headband pics of someone wearing this thing yet, it's not going to be anything fancy just comfortable and made of neoprene. My very small budget all goes to the most practical parts, while it'll at least be a bit nicer than my original headband (just a single neoprene strip). One of the first uses for it will be in the local esports scene, and in a Canadian TBI recovery program. A really awesome carotid artery surgeon also reached out to me about using these in some kind of brain/neck surgery to monitor blood oxygen changes so there's something else. A few scientists are on standby to validate the output as well, and then from there maybe I can get some grant funding or something to make a final product and not just these dev kits - which is only what is feasible for me currently.
My other occupation is as a mushroom forager, the first two years of this for me were funded almost exclusively by mushroom money, as well as helping Brain Trainer with their own HEG project. The past few weeks I've primarily been outdoors enjoying the best part of Fall (Fall lasts like 2 weeks here before snow hits). My main project has been to get as many good photos of my favorite Hericium Coralloides mushroom as I can to build some kind of web page dedicated to their awesomeness. We are fortunate to have one of the best land regions for finding them in incredible abundance, and they have all kinds of potential pharmacological applications for brain and immune function. Here are a few pics:
Hello,any updates?Maybe some photos too?
All the best!
Hey I have not shipped the V2s yet. First units now shipping in 2 weeks! I have order a bunch more to fill the rest of the orders, meaning the rest should go out by end of September or first week of October now, in order of who ordered first - so those of you who purchased first will get your devices first. I was conservative with my quantities so I didn't blow all your money on duds. @Florian Brisbane I just got my final tests done which confirms my device is AWESOME. I'm so pleased, this was a year of my life.
@redoalf I will be selling these as both breakout boards and full assemblies like the V1 but I am putting more effort into the look of it so it feels like you're getting a professional device. I am going to drop the price for single units here shortly I'm just getting organized now.
Here's the main piece of the sensor, I had to wait to order the mount piece for this to make the headband as the results of these tests determined some design changes I was pending on:
I can see pulse clear as day even on my forehead, meaning HRV will be possible simultaneously with the HEG exercise which is a huge feature improvement and validation of the device:
Here's another important feature: It's not useless when plugged into the wall (not perfect but not bad), here is my pulse very clear on my finger when plugged straight into my crappy cabin wall:
And then battery power:
So look at that! All the problems solved minus giving it some nice digs which is what my next couple weeks are dedicated to along with updating the firmware to work just like V1 otherwise. We now have access to a REALLY nice pulse ox and HEG, dual purpose i.e. foldable to be a finger pulse ox etc. This is a big deal for cost effective tech. And for developers this device is way easier to code as well, no manual ADC routines just pure built-in IC feature goodness which drops the code from about 1000 lines to about, uh, 20, to handle the sensor on the microcontroller.
If we order an Hegduino v2 now, will we receive exactly the same device that will be sold after launch? Also is it possible to order now an already assembled and ready to use Hegduino v2 as for the v1?
That sounds exciting!
I've seen posts from members who seem to already be playing with their devices.
Does this mean they've already been shipped out, or are these V1 devices?
I am on the other side of the world, so mine will likely take a while to arrive.
I think what you are doing is particularly excellent!
Keep up the good work!!
Kudos, man! Impressive!