Introduction: Light Inducing Seizure Warning System

Picture of Light Inducing Seizure Warning System

In 1997, a Pokemon episode was banned since the flashing lights in the episode caused seizures in many Japanese Children. Inspired by this event, this is a photosensor mount on someone's glasses to detected the light sources in front of a subject that could be seizure inducing and send a warning signal to a user by buzzer.

Step 1: BoM

Picture of BoM

* Arduino

* Photosensor

* Buzzer

Tools:

* Hot glue gun and hot glue

* Soldering Iron and solder

Step 2: Soldering

Picture of Soldering

Solder a voltage divider onto the photoresistor as shown above.

* Solder a 10kΩ resistor onto one of the terminals.

* On this same terminal, solder a wire.

* Solder another wire onto the other pin of the photresistor

Step 3: Wiring

Picture of Wiring

Follow the table below for the connections between of the photosensor and the buzzer to the Arduino

I/OI/O pinArduino Pin
Photosensor1A0
Photosensor2GND**
Buzzer*19
Buzzer*2GND**

* Order of pins do not matter for the buzzer

** The Arduino board has at least 3 GND pins

Step 4: Code and Upload

Picture of Code and Upload

Upload the following code to the Arduino.

//cosntants for the pins where sensors are plugged into.
const int sensorPin = 0; const int buzzPin = 9;
unsigned long minute1; 
float time1;
//Set up some global variables for the light level an initial value.
int dark;  // initial value
int lightVal;   // light reading
void setup()
{
  // We'll set up the LED pin to be an output.
  dark = 300;
  //we will take a single reading from the light sensor and store it in the lightCal        //variable. This will give us a prelinary value to compare against in the loop
}
void loop()
{
  lightVal = analogRead(sensorPin); // read the current light levels
  //if lightVal is less than our initial reading withing a threshold then it is dark.
    while (lightVal > dark) {  // still sitting
    tone (buzzPin, 1000, 100);
    delay (100);
    noTone(buzzPin);  }
  }
    
}

Step 5: Mount

Picture of Mount

Comments

hedgesci (author)2017-08-31

would this work for fluorescent lights, cause they can trigger my seizures also?

TechMartian (author)hedgesci2017-08-31

I'd have to look into the FFT for these sensors. I'll get back to you in a few days. If not, PM me to remind me.

About This Instructable

209views

1favorite

License:

Bio: Aerospace Engineer working in Software Development with a passion for Hardware.
More by TechMartian:Flying Captain America's Shield - RC PlaneWide Angle ShotsLED Ping Pong With Shift Register
Add instructable to: