Brain blood flow biofeedback meets affordable IoT technology

This project is coming soon. Sign up to receive updates and be notified when this project launches.

HEGduino uses red/infrared light sensing to determine the changes in the blood-oxygen levels in your brain in real time. Armed with this feedback, you can control these changes directly and literally exercise your brain! HEGduino brings Hemoencephalography (HEG) biofeedback into the easy, affordable, and hackable realms. This is designed to be able to be built by anyone with a soldering kit and a steady hand as a ground-up introduction to the science and the electronics.

HEGduino & Biofeedback Applications

  • Brain Exercise: increase brain blood-oxygen levels as an educational, clinical, or simply enthusiast tool
  • Stress Monitoring: prevent professional burnout
  • Research: measure neocortical functioning as correlated via blood-oxygen ratio changes
  • Biohacking: modify HEGduino and its app to fit your need. It’s open source!
  • Competitive Gains improve long-term cognition and awareness for playing your favorite sports or E-sports

HEGduino prototype (not final version).

Technical Specifications

  • Sensor Board:
    • Flexible circuit board to conform to the shape of your head and headgear
    • 650 nm 20 mA Red LED
    • 950 nm 20 mA IR LED
    • OPT101 monolithic photodiode
    • Connected to receiver by Molex connectors/wire
  • Controller Board:
    • ESP32-based control with either
      • Adafruit Huzzah32 (16 MB flash but less I/O)
      • or WeMos Lolin32 V1.0.0 (4 MB flash but more I/O)
    • ADS1115 16-bit 860 sps ADC
    • I/O breakouts for a maximum of:
      • 32 Inputs / Outputs
      • 26x digital pins (3.3 V) - all PWM capable (two occupied by LEDs)
      • 18x analog pin
      • 3x UART
      • 3x SPI
      • 2x I2S
      • 2x DAC
      • 2x I2C (1 occupied by the ADS1115)
      • 1x 5 V output
  • ESP32:
    • ESP-WROOM-32 from Espressif
    • Up to 240 MHz dual-core microprocessor
    • 4-16 MB SPI flash memory
    • Sleep mode consumption: 5 μA
  • Connectivity:
    • Wi-Fi: 802.11 b / g / n
      • Security: WEP, WPA / WPA2 PSK / Enterprise
      • Maximum power for data transfer: 19.5 dBm @ 802.11b, 16.5 dBm @ 802.11g, 15.5 dBm @ 802.11n
      • Sensitivity max. reception: -97 dBm
    • Bluetooth 4.0 Classic / Low-energy (BLE)
    • Integrated cryptographic chip supporting AES / SHA2 / Elliptical Curve Cryptography / RSA-4096 algorithms

Biofeedback App

The HEG is able to be controlled and interacted with via Bluetooth Classic/BLE connection to a phone or to a desktop interface via serial USB connection. We are creating a patch for the original HEGstudio to work with ours for comparison. We are also working on a mobile app you can take anywhere. It will include various ways to display and interact with the blood flow information returned from your brain. We are hard at work on the free mobile app to launch on Android and iOS! This will be a very humble interface at launch, but will improve rapidly with the power of open source!

Different kinds of feedback stimulus: - Visual - Auditory - Games

Different exercise focuses to demonstrate the device’s broad applicability: - Stress - Anxiety - Mood - Memory - Attention - Traumatic brain injury - Brain-computer interfacing

This structure will couple with user profiles that will provide long-term statistics to users and ways for them to mark up their data to keep notes.

HEGstudio by Jonathan Toomim (available under LGPL), working with HEGduino

What is Biofeedback and Why Use It?

First, we need a simplified lesson in human physiology to understand what this project is about. This won’t take long.

That's not simple...

“That’s not simple…”

Your brain made up of several systems. Those systems are delegated by the different structures in your brain, the most pronounced and recognizable being your outer neo-cortex. The neo-cortex is divided into lobes which provide different types of processing, and those lobes are further divided into columnar “tectonics,” as in bundles of neuronal columns (or capsules) that perform fairly specific functions (e.g. language processing, audio processing, visuo-spatial processing, and empathy to name the major ones). These columns are highly cross-wired through the neo-cortex while they all feed back into the inner brain, which is responsible for more primal baseline and survival processes like running your organs and generating emergency-response instincts. Your frontal lobe, for instance, contains inhibitory connections to the amygdala which strengthen with age and experience to allow for more learned versus emergency responses. The neo-cortex accounts for 80% of your brain mass and uses 30%-40% of your body’s overall energy. Human neo-cortexes are among the largest in proportion to the body among mammals. It is safe to say that the general health and stimulation of this organ is an important yet poorly articulated facet of human health.

Many of your hard-wired internal response networks have specific pathways to different tectonics in the neo-cortex (see above DTI image), and it turns out we can begin to address many of the issues associated directly through biofeedback. Blood flow is essential for haemodynamic response in the brain, where metabolism in brain cells is 90% correlated with blood flow, due to these cells not having internal storage. They need a constant and adaptive blood supply to make their complex networks fire properly. One major neurological symptom discovered and articulated in recent years is something called Hypofrontality. While once thought to be a side effect of medications or the result of severe neuro-degeneration, it turns out hypofrontality is a unanimous stress response in humans, where up to 90% of the blood flow in the frontal lobe can be restricted in response to stress. These are some very important developments in medicine and for health education in general.

Hemoencephalography (HEG) biofeedback is a non-invasive biofeedback method allegorical to EEG neurofeedback. Originally developed in the 90’s by Hershel Toomim and Robert Marsh, HEG employs simple red/infrared blood-oxygen detection to the brain (derived from Near-Infrared Spectroscopy (NIRS)), allowing humans to easily read average blood-oxygen levels through the skull. From this information, the user is then able to assume control of their brain’s blood flow within minutes and perform what have been coined “brain pushups.” Original research with the HEG even revealed candidate locations where some of the major wiring for the amygdala meets the neo-cortex may be, by finding that individuals responded even better to different biofeedback exercises that targeted associated areas of the neo-cortex. Concussion patients responded well to memory exercises paired with biofeedback, children and teens with ADHD responded well to attention exercises paired with biofeedback, addiction patients gained more self control (see below SPECT image), and patients with migraines, depression, autism, and even schizophrenia found benefit as well. Even more, the average person is able to learn how to use the HEG in about 5 or 10 minutes in the first session whereas EEG-based biofeedback can take dozens of sessions over the course of months to see a benefit. In spite of clinical success, this device is still poorly recognized by the public or by health professionals.

SPECT image of a drug abuser’s brain pre and post-HEG treatment. Redder = More blood flow activity. Source

Enter HEGduino. This project came along in the course of being inspired by these developments in the sciences. Two issues are that not enough people are exposed to this information and then the devices themselves are prohibitively expensive. Current HEG solutions will cost you up to $1000 or more and are fairly bulky. The software by and large is not evolving with ever-improving front-end tools to provide more engaging experiences to newer generations. We are solving accessibility with free mobile apps and programs, with free information targeting general use (e.g. in school or for professionals between duties), and solving price with open source, up-to-date parts - soon to be even cheaper with the rapidly improving and miniaturizing tech on the market. This will allow you to take the HEG anywhere, have it last a long time, and use your data to better your own health. It will let you tinker, too, for all you budding brain scientists. Devices like this support the future of health education and research.

Lastly, the reality is that, at least in the U.S. and U.K., over 20% of the population is diagnosed or diagnosible with some kind of clinical stress, anxiety, depression, or other brain ailment. One-in-ten suffer from worse ailments like PTSD, Bi-polar, or dissociative disorders. The World Health Organization cites that over 300 million people worldwide have been diagnosed with depression alone, now the leading cause of disability and lost productivity in the global economy. In the U.S., demanding professional and school environments have resulted in widespread anxiety issues, burning out increasing numbers of people. Alaska has several times the national average for domestic and sexual violence, related to alcoholism. The opiate crisis has touched everybody’s lives. Many other countries face similar scales of issues, like Japan, which has over a million shut-ins (hikkikomori or NEETs). The list goes on and on. There is no possible way for the current volume of educated health professionals nationally or worldwide to address these issues face-to-face with everybody, it’s time to re-think how we educate and take care of our brains on a massive scale. We aren’t claiming this device is the answer, but a part of the conversation.

CDC - Drug Overdose Deaths have quadrupled since 1999, and sextupled since 1980.

Alcoholism is on the rise, too, especially in Alaska.

All Open Source!

We have a GitHub page for this project: LINK
We have another one for the wired-only DIY prototype: LINK

This platform will rapidly evolve over time through the wonders of open source collaboration. We hope the community will help us derive robust feature sets for blood flow biofeedback and participate in their health in new creative ways. This, we believe, is an important model for education and for addressing modern health crises facing many nations. This project and writeup was endorsed by Stephanie DuPont, President of the Biofeedback Institute of Los Angeles, and colleague of the original inventors of the HEG.

Hop on our Slack channel if you want to chat! JOIN

We need coders!

Do you have Python, mobile Javascript, or ESP32 & Bluetooth programming knowledge? Can’t wait to get started with the HEG? We’ve come pretty far, but you could help us make this the best launch possible!

We are a small Alaska-based team trying to bring positive change our state and our world!

Either join our Slack channel or email Josh @ brewster.joshua1@gmail.com

Written by Joshua Brewster, project leader. Team members: Eric Nichols and Zach White

Maximum Entropy

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects: