Light Inducing Seizure Warning System

by TechMartian in Circuits > Assistive Tech

1111 Views, 4 Favorites, 0 Comments

Light Inducing Seizure Warning System

UNADJUSTEDNONRAW_thumb_b6b.jpg
UNADJUSTEDNONRAW_thumb_b68.jpg

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.

BoM

IMG_20170827_144527.jpg

* Arduino

* Photosensor

* Buzzer

Tools:

* Hot glue gun and hot glue

* Soldering Iron and solder

Soldering

IMG_20170827_110228.jpg
IMG_20170827_110327.jpg
IMG_20170827_110414.jpg
IMG_20170827_110608.jpg
IMG_20170827_110850.jpg

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

Wiring

IMG_20170827_144424.jpg
IMG_20170827_144446.jpg
IMG_20170827_144508.jpg

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

Code and Upload

Screen Shot 2017-08-30 at 7.34.49 PM.png

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);  }
  }
    
}

Mount

UNADJUSTEDNONRAW_thumb_b69.jpg
UNADJUSTEDNONRAW_thumb_b67.jpg
UNADJUSTEDNONRAW_thumb_b6a.jpg