Mind Poetry Mindflex Hack

Project Perceives Pondering, Prints Poetry

If poetry is your thing, this hack might convince you that your brain is more advanced than the rest of us poor sots. [Roni Brandini] designed a system that prints lines of poetry when you concentrate. The Mind Poetry project uses an EEG headset from Mattel’s Mindflex toy and pipes your brain’s signals to an Arduino Mega 2560. The system then looks for patterns of brain waves that indicate concentration. As you maintain your concentration, the system continues to print lines of poetry to a small display.

Tapping into the mindflex

[Roni] follows the standard Mindflex hack process by tapping into the data transmission pin on the Mindflex board. Optoisolation is provided by a PC817 to make sure wall power can’t accidentally bleed over into your own wetware. You could get away with just using batteries, but isolation is still a best practice.

The Arduino Brain Library is used to decipher the signal. The Mindflex picks up brain waves from roughly 1 Hz to 50 Hz, which is enough bandwidth to approximately determine mental state. For example, Theta waves are in the 4 Hz to 7 Hz range and can indicate a relaxed, meditative state. Low Beta waves range from 13 Hz to 17 Hz and indicate an alert, focused mental state. The Mindflex system is also generous in that it provides derived meditation and attention scores, ranging from 0 to 100.

It’s difficult to get a high level of precision with this sensor and sampling system, so the code uses [Roni]’s custom recipe of meditation score, attention score, and Low Beta value. He finds it most effective to trigger actions based on a relationship of these scores instead of focusing on the readings themselves. For example, an uptick in both Low Beta waves and the attention score indicate concentration.

Mindflex Brainwave Chart

If the wearer is concentrating, the system prints lines of poetry to the display and charts the three values. As an added gamification, it’ll tell you how many times you broke concentration before you completed the poem. One can imagine a game that tries to break concentration by printing other phrases or even activating an array of mechanical distractions.

If poetry isn’t your thing, you’re in luck. The “Mind Poetry” project also makes some headway (pun intended) with processing the EEG headset’s signals and triggering actions This means you don’t have to be into the poetry scene to reap the benefits. You now have the bones of a hack that lets you control things with your brain muscles and without your muscle muscles.

For inspiration, check out some other Mindflex hacks that let you order drinks with your mind (recommended), shock the heck out of people (not recommended), or even move around your skirt (uh… you do you?).

Continue reading “Project Perceives Pondering, Prints Poetry”

Scientists Create Speech From Brain Signals

One of the things that makes us human is our ability to communicate. However, a stroke or other medical impairment can take that ability away without warning. Although Stephen Hawking managed to do great things with a computer-aided voice, it took a lot of patience and technology to get there. Composing an e-mail or an utterance for a speech synthesizer using a tongue stick or by blinking can be quite frustrating since most people can only manage about ten words a minute. Conventional speech averages about 150 words per minute. However, scientists recently reported in the journal Nature that they have successfully decoded brain signals into speech directly, which could open up an entirely new world for people who need assistance communicating.

The tech is still only lab-ready, but they claim to be able to produce mostly intelligible sentences using the technique. Previous efforts have only managed to produce single syllables, not entire sentences.

Continue reading “Scientists Create Speech From Brain Signals”

Brain Hacking With Entrainment

Can you electronically enhance your brain? I’m not talking about surgically turning into a Borg. But are there electronic methods that can improve various functions of your brain? Fans of brainwave entrainment say yes.

There was an old recruiting ad for electrical engineers that started with the headline: The best electronic brains are still human. While it is true that even a toddler can do things our best computers struggle with, it is easy to feel a little inadequate compared to some of our modern electronic brains. Then again, your brain is an electronic device of sorts. While we don’t understand everything about how it works, there are definitely electric signals going between neurons. And where there are electric signals there are ways to measure them.

The tool for measuring electric signals in the brain is an EEG (electroencephalograph). While you can’t use an EEG to read your mind, exactly, it can tell you some pretty interesting information, such as when you are relaxed or concentrating. At its most basic we’ve seen toys and simple hobby projects that purport to be “mind controlled” but only at an incredibly rudimentary level.

Brainwave entrainment is a hypothesis that sending low frequency waves to your brain can give your mind a nudge and sync up brain activity with the equipment measuring it. The ability to synchronize with the brain could yield much better measurements for a meaningful interface between modern electronics and electric storm of thought happening in your head.

Continue reading “Brain Hacking With Entrainment”

Alma The Talking Dog Might Win Some Bar Bets

Students at the University of Illinois at Urbana-Champaign have a brain-computer interface that can measure brainwaves. What did they do with it? They gave it to Alma, a golden labrador, as you can see in the video below. The code and enough info to duplicate the electronics are on GitHub.

Of course, the dog doesn’t directly generate speech. Instead, the circuit watches her brainwaves via an Arduino and feeds the raw data to a Raspberry Pi. A machine learning algorithm determines Alma’s brainwave state and plays prerecorded audio expressing Alma’s thoughts.

Continue reading “Alma The Talking Dog Might Win Some Bar Bets”

Jittery Back Off To Speed Up

In systems where there are multiple participants who need to interact with a shared resource some sort of concurrency protection is usually appropriate. The obvious technique is to use locking (and fun words like “mutex”) but this adds a constant performance hit as every participant needs to spend time interacting with the lock regardless of the number of other participants. It turns out this is actually a Big Problem that garners original research, but there are techniques that can yield great effect without a PhD. Years ago [Marc] posted a great walkthrough of one such method, exponential backoff with jitter, to Amazon’s AWS blog which is a great introduction to one such solution.

The blog post was written specifically to deal systems using a specific technique called optimistic concurrency control (OCC) but that doesn’t mean the advice isn’t generally applicable. OCC refers to a method where each writer checks for a write collision only after performing the write (but before committing it), which works well in scenarios where writes are relatively uncommon. [Marc] observed that even in systems where this is a safe assumption things bog down significantly when there are too many writers clamoring for attention all at once.

The traditional solution to such a problem is for each writer to pause for an exponentially increasing amount of time before trying again, but as writers come back in big groups the same problem can recur. He provides a discussion of simple modifications to that strategy which result in significantly reduced wait times for writers.

Problems like this are not especially relevant for single Arduino sensor networks, but even small groups of systems can have concurrency trouble and it’s nice to see such an accessible write up with solutions which are viable even for simple systems. Bonus points to [Marc] for posting source to his test tool online. It doesn’t require anything outside of your computer to run (no AWS required) so if you have any brainwaves about speeding up multi-writer environments it might make a nice test environment! Maybe don’t mention the blog post in your PhD applications though.

Turning A Fitness Tracker Into An EEG

Several years ago, a company called Neurosky came out with an interesting chipset meant to be put in an EEG headset. This chipset would track your brainwaves, do some fancy math, and output a few numbers based on the Delta, Gamma, Alpha, and Beta waves in your brain. Of course, the senseable thing to do with this technology would be to put it in a Star Wars-branded toy where you pretend to be a Jedi. All was good with the world, and a few people hacked these Jedi Mind Trainers for some interesting builds.

But the Neurosky chip was still a black box. No one knew how it worked. The ‘concentration’ number had no relation to anything, except how hard you were apparently concentrating. In an effort to break this black box and build upon years worth of EEG hacks, [Curt White] is hacking a fitness tracker for EEG analysis for his entry into the Hackaday Prize.

The hardware in question for this build is a B20 Fitness Tracker, an ungodly cheap piece of hardware that contains an ADS1292 bioimpedance sensor that can be used for ECG, EMG, and EEG. There’s also an nRF microcontroller with Bluetooth that’s easily programmed with an Arduino. All the building blocks are there.

Right now, [Curt] has successfully opened up one of these fitness trackers and has done enough of a teardown to get the data off of the bioimpedence sensor. The trick now is to emulate the ‘concentration’ and ‘relaxation’ values the Neurosky chip puts out. This is fairly difficult, as what these values actually mean in terms of brainwaves is a bit opaque, but [Curt] has some filters and some tools to pull data from the brain and output something. Now it’s just a question of outputting the right values.

It’s a fantastic hack, that is sure to be a lot more affordable than buying some old Star Wars toys or paying a licensing fee to Neurosky. This is commodity hardware hacked to do something it was never intended to do, and an excellent entry to this year’s Hackaday Prize.

Order Drinks With Your Mind

Barbots are a popular project around these parts. With a few pumps and a microcontroller or two, it’s possible to build something that can approximate mixing a drink. If you’ve got the patience and attention to detail, you can probably even get it to the point where it doesn’t just end up as a leaking wet mess on your mantlepiece. [Robert] has taken his build a step further by adding mind control.

To achieve this feat, a Mindflex EEG headset is pressed into service. This picks up brainwaves from the user, and processes them into two output values of concentration and meditation. Through some careful hacking, it’s possible to retrieve these values. [Robert] sends the values over Bluetooth to the barbot controller for processing. Concentration values over a certain threshold are used to cycle through the drink selection, while meditation values are used to confirm the order. Once it’s made, a voice command to “hit me” will see the drink served.

It’s a tidy build that adds a bit of fun to an already cool project. We’d love to see this taken up several levels of complexity to the point where you can directly order the drink you want, just by the power of thought. If your university-grade research project is at that level, be sure to let us know. Else, if you’re interested in how the barbot came to be, check out [Robert]’s earlier work.