Photosensitive epilepsy affects about 3 percent of people with epilepsy and may cause potentially life-threatening seizures upon exposure to provocative patterns of light. The purpose of this project is to create a pair of glasses that detects and block these harmful lights from the wearer. This pair of glasses consists of a light sensor, a microcontroller with a neural network, and a liquid crystal light valve (LCLV) glass that darkens when power is sent through it. The light sensor on the glasses detects the surrounding light and outputs the readings to the microcontroller. To determine if the surrounding environment may cause a seizure, a neural network was trained to recognize flashing lights of frequencies greater than 1 Hz. After training, it had an accuracy rate of about 99.4% on the testing set. Upon detection of harmful patterns of light, power is sent to darken the LCLV glass and block the light from the wearer’s eyes. While other glasses have been developed that filter out bright lights and certain wavelengths of lights, they may limit the user’s vision. By only darkening the lenses in conditions with flashing lights, users are able to see normally the rest of the time. Due to its high accuracy rate, glasses with neural networks are a promising assistive device for people with photosensitive epilepsy, helping them lead better lives.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Parts List
1. A 3D printer is needed to 3D print the glasses.
1a. Download the attached files and 3D print the glasses.
2. Liquid Crystal Light Valve (LCLV) glass used to darken the glasses: https://www.adafruit.com/product/3330
3. A Pro Trinket microcontroller will be used to control the LCLV glass: https://www.adafruit.com/product/2010
4. An ambient light sensor will be needed to detect the surrounding light conditions.
5. Resistors (270K Ohm).
Step 2: Assemble the Glasses
1. Push the glass into the frame.
2. Connect arms and frame together with screws.
3. Glue the pro trinket on top of the panel towards the right (as shown in picture)
4. Glue the light sensor on the front of the panel towards the left (as shown in picture)
Step 3: Electronics
Wires should be soldered to the LCLV glass, but not directly onto the microcontroller or the light sensor.
A. Connect the light sensor wires
1. Power (red) to 5V
2. Ground (black) to ground
3. Data (blue) to A4
B. Connect the LCLV glass to microcontroller
1. One side to ground.
2. One side to pin 6.
Step 4: Install Arduino IDE and Download the Code
The Arduino IDE can be installed here: https://www.arduino.cc/en/Guide/Windows
Download the attached code and put that in the Arduino IDE.
Step 5: Download Drivers for Protrinket
Follow the instructions to install the drivers required to upload code to the protrinket.
After the installation, prior to uploading the code, change the board to the ProTrinket 5V/16MHz (shown in picture)
When running the code on the protrinket, make sure to press the button on the microcontroller before uploading the code. It may take a few tries.
Step 6: Supporting Documentation
Documentation supporting prototyping of innovation.