In Canada alone, thousands of people suffer from some form of inability to operate their limbs whether it be an amputation, a nerve disease or osteoporosis. For every single one of these people, tasks that many of us find simple and take for granted such as drinking or moving objects on a desk or fetching something become arduous chores that very few are able to do without relying on someone else. Through code, I wanted to make it that regardless of one's physical ability, they would be able to work and move objects on a desk just like anyone else. Human potential is the most undervalued resource in the world, and the biggest reason is because far too many people are dismissed because of something that they can't control.

What it does

The arm offers a 3DOF range of motion with an additional claw for grabbing and releasing. Once the headband is worn, a user can control the motion of the arm and use it for simple tasks such as fetching or moving objects with just their brain waves. With the addition of the firebase database, the user also doesn't need to be near the arm to operate it, all that's needed is a muse headband, the proper python scripts running on a nearby device and a stable internet connection, even if they're miles away from the actual arm.

How I built it

Building the arm from scratch would have been very difficult and taken a lot of manufacturing equipment I don't have. So in order to save time, I used an old desk lamp I found in my basement for the actual mechanical arm. In order to move it, I attached several servos at the joints which were all attached to an arduino which itself was connected over a serial port to a nodemcu.

The Nodemcu was constantly pulling from a specific firebase ref which had one character within it at any given time, the value of which would be read and sent to the arduino which, depending on what it was would trigger specific combinations of servos to move the arm in a specific way.

All the while, the user would connect their muse headband over bluetooth to their device and use my first python script to begin a stream of EEG data. Then the user would run my second python script which would take this stream and break down all the wave data received by frequency bands in order to distinguish different brain waves from one another. Afterwards, the user's beta waves are selected and should their amplitude spike (which a user can trigger in a number of ways) those spikes are counted and sent to the firebase ref, which is then pulled from by he nodemcu and used to control the motion of the arm.

Challenges I ran into

Initially my plan was to make it so that the firebase ref was set manually by the python script which was extracting the user's beta waves, however when I tried to use the firebase python libraries to do so they would often delay and cause a lot of latency in the system. This along with the latency problems with the nodemcu firebase libraries meant that sometimes I would send a command and the arm would wait seconds to execute it.

So in order to get past this, I leveraged a flask heroku app from a previous project and added several more routes which, instead of leading web pages would constantly run a python firebase script in the cloud and use web requests and triggers to add or return a value from a specific ref. This way the arm could be triggered by anyone from anywhere(with the proper credentials) and the interaction with firebase would be just as fast as the user's internet could make requests.

Accomplishments that I'm proud of

The problem with using a lamp for the arm is that it wasn't made for this sort of thing. When I initially added servos to the joints, they either wouldn't be strong enough to move the arm or would move it but wouldn't be able to move it back because of the arm locking position. In order to get past this, I added springs and rubber bands at several key points to make the arm constantly pulling back to its default position, and moved the servos further down in order to get more leverage and have to use less force to move the arm. This way the servos would have a much less chance of breaking upon moving the arm, and they could have the arm reverse direction by simply stopping to apply force.

What's next for Arm Brain

In the future, I'd like to implement more powerful servos and a much heavier appendage to allow the arm to carry much more, as this time it was limited to certain small desk items so it wouldn't damage the servos. I'd also like to get a much more suited base as because of the way the lamp was built, the arm had only about 45 degrees in either direction to swivel before being stopped which greatly limited its range of motion.

Share this project: