Blink Detection for ALS
I was cruising the Arduino forum and came across a situation where someone with ALS could not communicate with his friends due to complete paralysis. They were looking for a blink detector so he could blink Morse Code.
There are all kinds of complicated ways of detecting a blink but I wanted to try something simple so anyone can have a blink detector. So I made something based on a 20 cent component.
Works like a charm! Every time I blink a little light comes on. I suppose this could be made for 20 bucks of parts or so. You don’t have to make a pair of glasses the sensor can clamp to anything.
Update: I learned that Clinton the person the forum request was made for has passed away. “ALS is a monster”. — Clinton’s friend Wayne.
How It Works
It uses the TCRT5000 sensors (donated by Dave Hunt) for an Arduino contest we hosted for fun. The TCRT5000 is a 20 cent component.
It’s a distance sensor that uses infrared reflection. Your eyeball and eyelid will reflect IR light differently so blinking will trigger a quick reading change. I don’t think the LED gives off very much light so it should be okay to point towards the eyeball.
So I made up a quick circuit, a pair of plastic glass frames (3D print) and a quick Arduino program.
Applications
I think there’s a lot that could be done with blink detection.
I am making some masquerade masks that will have lights on them and was thinking that blink detection would be nice.
Related
Excerpt from Arduino forum post from June 27th, 2014.
My friend has ALS, locked in with only eye movements to communicate. After looking at many sites we bought a high tech Tobi PCeye tracking device but his breathing mask and glasses interfere too much.
We are both hams and learned Morse code years ago. We both have some years of experience with arduino and other electronics programs. All I need is a simple sensor to detect blinks…say left for dots and right for dashes. I could interface to a morse to text converter and display on the computer screen.
We are hurting here…I thought the other stages were bad but not being able to communicate is the worst. So I’m quite desperate. Anyone who has an idea, i’ve seen many sensors: strain gauges and IR sensors and even proximity switches on a guys eyelid…so much to try. Someone must have done this by now. Simple is the key. Must be minimally irritating of course.
Thank you.
Procyan
Excerpt from September 3rd, 2014 in Arduino thread:
Re: eye blink sensor
I am so grateful to all of you. I know this thread will be a help to others. I am certainly willing to contribute as much as I can.
ALS is a process…a monstrous terrible sequence. Yet somehow we found moments to enjoy, even to laugh. His philosophy was “as long as I’m still able to learn I will stay here.” But even that was taken eventually.
Gone now, but so much more important that he lived. If you are reading this because you or someone you know has a problem I promise to help how ever I can. If you don’t know this forum, I encourage you to join and open a thread. There are some top notch minds here, far more capable than mine, to draw upon.
Of all the things we tried, the IR sensors worked best. I would recommend following InventorArtist’s lead. It rides high and out of the way of all the other gear. Small, simple practical solution.
fight, Fight, FIGHT ALS
Here is the Arduino Code from my proof of concept.
/* blink detector darcy@inventorArtist.comBlink Detection for ALSuses LED to detect blinking just looks for rising edges */ int sensorPin = 0; // IR Sensor int ledPin = 13; // Visualization int lastLevel = 0; // Previous IR level int lastChange = 0; // Change in IR level int changeThreshold = 5; // How hard a rising edge do we need? //visualization int duration = 100; // Length of visualization float lastStart = 0; // Last start of visualization void setup() { Serial.begin(9600); // Debug constructor pinMode(13, OUTPUT); // Visualizatio constructor } void loop() { int sensorValue = analogRead(sensorPin);Serial.println(sensorValue); // Read Data // look for rising edges lastChange = sensorValue - lastLevel; lastLevel = sensorValue; if (lastChange >=changeThreshold) { digitalWrite(ledPin, HIGH); lastStart = millis(); } if (millis() >= lastStart + duration) { digitalWrite(ledPin, LOW); } //absolute approach //if (sensorValue >=205) { // digitalWrite(13, HIGH); //}else{ // digitalWrite(13, LOW); //} //delay(100); }
hello sir,
i want this circuit diagram please send my mail id because i do this project sir please help
Hello sir,
please tell the you use the resistor color code or value of resistor
Eyeglass,reflective infrared optical sensor and arduino were the materials needed or there are still materials not mentioned? I also want to do this. Can you teach me how to? Thanks.
I guess you need the sensor and a couple resistors…
Where do you live?
What kind of sensor? Is it not the reflective IR optical sensor? Can I replace the sensor with IR LED and photodiode? Still dont know the circuitry from sensor to the arduino. Btw,I live in the Philippines. Hope you can help me. Thanks.
Why not try the sensor mentioned the TCRT5000?
I don’t see why you couldn’t use IRLED and photodiode. But you’d have to try.
Hi Sir Darcy, can I ask for the circuitry? Thanks. I wanna try the TCRT5000 if it would really work. Thanks.
Is there not a link in the post? I thought I linked that… I’m just in the middle of something I’ll make sure it is there shortly…
Thanks. The output should be the led would blink the moment you blink,right sir? Thanks.
But I am worry because I have read that infrared is bad for the eyes.
I think it is bad but I don’t think this amount is harmful. Otherwise there’d be a warning on your TV remote.
This is more practical than a bucket with some water and ice.
I love it! Could combine it with an eye tracking capability like:
http://www.pygaze.org/
Use one or two of those Point Grey cameras from Foxy… I picked up a few of them – Firefly I think…
Interesting… I like simple though. 🙂
haha
Hey you could also use it to play Flappy Bird like this guy!
http://hackaday.com/2014/07/09/the-future-of-distraction-right-in-front-of-your-face/