DIY LED Brightness Detector

17

Willie Chen

J05049

9D

Kang Chiao International School

Introduction:

My module is a brightness detector. Whenever the sensor detects the different levels of brightness there will be different amounts of LED lights being activated. Nowadays, many pupils will get eyesight problems due to the brightness level in their room is = too dark. Therefore this innovative invention will help many kids improve their eyesight.

Disclaimer:

There are many safety precautions and I am not responsible for any harm or injury caused by this DIY. Please be careful of external power banks and please do not swing around items because it will injure pupils near you. Observe your surroundings before you begin and always remember safety is number one priority.

Step 1:

First, we have to find a box that fits your desk and fits your Arduino board. For the outside of the box, you can customize it in your own style whatever you want it won't affect the detecting.

Step 2:

You have to write an Arduino code and put on the circuit to function the whole thing.

void setup()
{ Serial.begin(9600); pinMode( 12 , OUTPUT); pinMode( 8 , OUTPUT); pinMode( 7 , OUTPUT); }
void loop()
{
  Serial.print(analogRead( A0 ));
  Serial.print(" ");
  Serial.println();
  if (( ( analogRead( A0 ) ) < ( 505 ) ))
  {
    digitalWrite( 12 , LOW );
  }
  if (( ( analogRead( A0 ) ) > ( 515 ) ))
  {
    digitalWrite( 12 , HIGH );
  }
  if (( ( analogRead( A0 ) ) < ( 610 ) ))
  {
    digitalWrite( 8 , LOW );
  }
  if (( ( analogRead( A0 ) ) > ( 620 ) ))
  {
    digitalWrite( 8 , HIGH );
  }
  if (( ( analogRead( A0 ) ) < ( 860 ) ))
  {
    digitalWrite( 7 , LOW );
  }
  if (( ( analogRead( A0 ) ) > ( 880 ) ))
  {
    digitalWrite( 7 , HIGH );
  }
}

Step 3:

You have to solder the parts that will fall down easily.

Step 4:

Test the product does it work or not and make sure your code, the circuit is correct.

Step 5:

The last step, you got to connect the Arduino board with the circuit. After that put it inside and on to the case that you decorated. Now plug into a power band or a USD power to start up and function the module.

Step 6:

Enjoy the product. Thank You!

Supplies:

20* Wires

1* Blue Resistor

3* Yellow Resistor

3* Red LED Lights

1* Mini Photocell

1* USB Cable

Share

    Recommendations

    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Backyard Contest

      Backyard Contest
    • 1 Hour Challenge

      1 Hour Challenge

    Discussions