# Photo Sensing LED Cube

4,032

54

3

Published

## Introduction: Photo Sensing LED Cube

In this instructable I'm going to show you how to make a simple, yet very effective and nice looking decoration for your room and it takes about 5-10minutes to make it when you have all components.
You can use it to add some light to dark corners of your room, to set a mood or use it as a night light when you have to go to the toilet or fridge in the middle of the night :)

** Part list **
- 1x perforated board where you will solder the components + soldering iron (or breadboard and jumper cables)
- 1x IRE5 Phototransistor (any photo transistor would do)
- 1x BC337 NPN transitor (any NPN transistor would do)
- 1-3x Blue LED (you can chose color and amount based on how bright light you want and which color you prefer)
- 1-3x 100-220Ω resistors to limit current trough your LEDs. Value should be calculated to be adequate for your LED.
- 1x 10KΩ resistor
- 1x 3K3Ω (3300Ω ;) ) resistor
- 1x 68Ω resistor

Total: Under 5\$

Let's get started...

## Step 1: Prototyping Phase

** Prototyping and how stuff work **
Photo transistor
As you can see from the schematic, when photo transistor is under light it is turned ON, base of NPN transistor is then on 0V so it is switched OFF, and both sides of the LED are connected to +3V (so it has 0V across it) and it will not light up.

When photo transistor is in darkness (or in shadow) it is switched off so the base of NPN transistor is connected to +3V via 68ohm and 10K pull-up resistor. Now the NPN transistor is turned ON and it connects the cathode (- side) of the LED to the 0V so the LED has +3 volts between anode and cathode (actually in my setup via one side of the resistor and cathode) and the LED turns ON.

LED resistor
You can swap the resistor from anode to cathode, it shouldn't really matter in this application, as long as the anode (+ side) of the LED is connected to the +3V and cathode (- side) is connected to the collector of the transistor.

Also you should calculate the value of the resistor that is needed for your LED and when you add more LEDs in parallel, each LED should have it's OWN resistor. So if you add 3 LEDs you should add 3 resistor, one per each LED.

Fine tuning
Tuning of the light threshold when the LED start to light up is done by changing the values of the resistors connected to the two transistors. You can experiment with values that best suite your needs but in my case the photo transistor that I had laying around wasn't that sensitive. it had ether ON or OFF status with almost no space in between, with these values of resistors I've managed to expand that space a little bit and get some kind of fade-in and fade-out when light slowly changes but you can play with the resistor values until you hit the one that you like. :)

## Step 2: Last Steps: Making the Board and Packing

Now when we have tested the design on the solder-less breadboard we can get the perforated board and solder all the components together. As you can see from the schematic, I've added resistors to the anode of my LEDs instead of adding them to cathode, it really shouldn't matter much in this build but it was easier for me to solder resistors to +3V and then anode of the LED to the resistor instead of stretching the LED between +3V and resistor. You connect them in a way that is more convenient for you.

This is a very simple build so I'm not going to bother you with how-to solder two parts together, it's really simple and it requires almost no skill to do it. So don't be afraid, it's important just to have a connection between two leads, if they are messy or not so pretty as you would like them to be, no one will notice because it will be under some plastic or inside some glass box :)

When I've soldered everything together and ensured that everything is working alright, I've used a small zip-tie and tied the board to the AA battery case. Now the board is fixed in place and it's really tiny so I can place/hide it in almost anything.

I've found the old case from another project that I didn't use anymore so I placed the LEDs under it and... whoa-la, it looks pretty nice for a 10min and 5\$ build :)

You can place yours in a bottle or under it, or under some glass bowl, in a corner of a room or behind your bed and it will give a really nice mood to your room when your have someone over at your place :)

Obviously you can change the color of LEDs to your favorite, I had few blue LEDs laying around so I've used them but you can try with red, orange, purple or even ultra-violet LEDs, go nuts!

Also this circuit could be made even simpler but I had these components laying around and it is really cheap build anyway.
Also if you have photo-resistor you could using it instead of the photo transistor, although the photo resistors are about 2-3 times more expensive, but they could give you the better/wider fade-in fade-out region and more light sensitivity than photo-transistor.

I would love to see pictures of your builds and to hear your comments and suggestions how to improve this build or use it in another applications :)

If you have any questions feel free to ask! :)

## Recommendations

• ### Large Motors Class

8,828 Enrolled

• ### Clocks Contest

We have a be nice policy.