Make a Simple Ambient Light Sensor/Night Light Paper Circuit

9,828

61

26

Introduction: Make a Simple Ambient Light Sensor/Night Light Paper Circuit

About: I'm the Making and Tinkering Programs Manager for the spectrUM Discovery Area, a hands-on science museum in Missoula, MT. I love to make, tinker and play both at work and in my free time, and am especially int…

This is part of a series of Instructables detailing free science kits and activities developed by the spectrUM Discovery Area in Missoula, MT. The kits and activities are for use at home, in the classroom, or in a distance learning setting with teachers.

For more on how our museum shares these activities with students and teachers, see this video on YouTube.

Making a simple battery-powered night light is a great way to learn about circuits and sensors. This sensor will detect when it is dark, and turn on a red LED. It would be great to put in your hallway or bedroom, and is powered by a small watch battery that should last a few weeks or more.

This circuit is a bit simpler than many of the others that you might find on Instructables or elsewhere - we won't be using an additional transistor to our light sensor, as we'll be using the properties of a specific phototransistor. It's easiest to build on a piece of paper, and helpful to print the included card to cut out and tape copper tape to connect the components. If you prefer to use wires and solder or a breadboard, those are options as well - I'll include a circuit diagram so as to help with those alternative methods of connecting the components.

This Instructable is entered into the Battery Powered Contest, so if you find it helpful or useful be sure to vote!

Supplies:

  • Red LED (red is are better in this circuit because of the low power consumption). We like these 10mm ones from Evil Mad Scientist, they are easy to manipulate with smaller fingers.
  • 680 Ohm resistor, 1/4 watt
  • Ambient Light Sensor - it is important that you use this one from Radio Shack (part number 2760326, 5mm 3-24V) We've tried others from Digi-Key, Mouser and Arrow and this one is the only one that works without a transistor - if you find a better/cheaper alternative that works, put it in the comments!
  • CR2032 3V coin cell battery
  • 5mm Copper tape with conductive adhesive - I love this stuff from SparkFun
  • Scissors
  • Mini binder clip
  • Printed card with circuit layout (it's nicer to print on cardstock or thick paper but copy paper works too)

Step 1: Print Your Circuit Card or Plan Alternative Layout

Use the attached files to print the circuit card. One is a single image that you can print, the other is a 8.5 x 11 sheet full of them that you can cut out with scissors or a paper cutter. I recommend cardstock or thicker paper, though regular copy paper can work too. Each should be about 2" wide by about 4" tall.

If you are wiring this up using solder and wires or breadboard, see the circuit diagram above for reference on how to assemble the circuit (I know the symbol is for a photoresistor vs phototransistor, but the program I was using didn't have a phototransistor symbol - be sure to use the components specified in the supplies step).

Step 2: Add the Resistor

Time to wire this puppy up! Take your copper tape and cut a small section off, then tape over the gray circle where the battery will go and off to the left to where the resistor will be. USE CAUTION: the edges of the copper tape can be somewhat sharp, so don't run your finger along the edges or it can cut you. This will be the positive side of our circuit, and the positive side of the battery will be face down on this piece of the copper tape.

Then, take the 680 Ohm resistor and lay it down where the image indicates on the card. Resistors do not care about the direction that electricity flows in the circuit - called polarity - so lay it down with either leg pointing towards the battery. Then take a piece of copper tape and secure it so it's connected to the previous section of tape that is going to be underneath the battery. Push down a bit on the tape so it makes a good connection with the resistor - this will be important to do for all the rest of the components as well.

Step 3: Add the Light Sensor and LED and Tape Down the Positive (+) Side

Now, we'll add the ambient light sensor and the LED to our circuit. These two components are sensitive to polarity, meaning that electricity has to flow through them in a certain way for them to work. Take a close look at each of them - notice that one leg is longer than the other leg? The longer leg on both of these is the positive (+) side of the component. The shorter leg is the negative (-) side of the component. In DC circuits, positive is usually color-coded in wires as red, and negative is color-coded as black. We've followed this same convention on the circuit card.

Bend the legs of each component so that they can lay flat on the paper as show in the images, making sure that you know which leg is the longer/positive one (it can be hard to tell the difference when they are not right next to each other). In this step, we want to tape down the positive (+) side of both so that they connect with our resistor. If you get done and your circuit is not working, it's highly likely that this is what is going on - neither of these components will work if wired in backwards.

Tape over the top part of the resistor leg, the long leg of the ambient light sensor and the long leg of the red LED all in one piece. Push around where this tape touches each of these component leads, using your fingernail is a good way to get good contact.

Step 4: Tape Down the Negative/Ground Side of the Circuit

Now, we just need one more piece of copper tape that is a bit longer than either of the other two sections. Tape down the negative (-) leg of the LED and ambient light sensor (the shorter leg), and run the tape all the way down to the bottom of the paper card to the very edge as shown. It's important that it runs all the way to the end so that you can fold it over the negative (-) side of the battery in the next step. If it's too long you can bend it over the edge of the card to the back or cut it off.

In other circuits, you may see negative referred to as ground or earth, and it's usually color-coded as either black (in DC circuits) or green (in AC circuits), though there are other conventions as well.

Step 5: Add the Battery and Binder Clip Switch

We are ready to power up our circuit. Take your battery and lay it positive (+) side down. These usually have a big plus sign on the positive side, and the negative side typically has a grid or dotted pattern on it. If you can't tell, another way to tell is that the positive side wraps around the edges of the battery, whereas the negative side is just the "bottom". This is hard to explain, but if you look closely at your battery it should be obvious. This is how these types of batteries can sit flush inside of their holders in many other devices, making them easy to pop out and replace.

Simply lay your battery down, then fold the edge of the card with the tape running down the negative side over the top. Use the binder clip to secure this together. What happens? You can use the binder clip as the switch for your circuit - whenever you want to turn it off, just remove the binder clip and the battery!

Step 6: Test and Troubleshoot Your Circuit

If all is connected properly, your circuit will turn on when the ambient light sensor is covered (I just used my finger to cover it in the image above) or if it's in a dark room. Try testing out different light levels to see how bright the LED is when in bright, dim, or dark light.

Circuit not working? That's okay!! Creating electronic circuits almost always takes a bit of troubleshooting, and copper tape is no exception.

Here are some things you should investigate if your circuit is not working as expected:

  • Try pushing down the tape a bit, especially where it meets the component legs. If there is a loose connection here it can prevent the flow of electricity in our circuit. Use your fingernail to push it very close to the legs of each component.
  • Did you ensure that the longer/positive leg of the light sensor and LED are on the proper side? See step 3.
  • Is the positive side of the battery facing down?
  • Sometimes your battery can short circuit if the copper tape is touching the sides of the battery in addition to the bottom/negative side. Remove the clip and try to bow the folded part out a bit or move the battery away from it slightly to prevent this.
  • Cover the light sensor and push down at various joints to see if the light lights up - sometimes you really need to push these down to ensure that there's a good connection!

Step 7: Extensions and Explanations

This sensor circuit works very much like a night light that you may already have in your house. When light falls on the ambient light sensor component, it interrupts electrical current to the LED. When it is dark, the sensor allows the current to flow to the LED. The sensor is a phototransistor, meaning that it changes how the circuit operates based on the amount of light shining on it.

This type of light sensing circuit is used in quite a variety of applications! Night lights are certainly useful, but it is also used in street lights to sense when it is dark in the evening so that they can turn on (and turn off when it gets light in the morning). Ever notice that your cell phone dims its screen when close to your face when talking, but brightens when you move it away from your face? It's using the same sensor as we use here to tell when your ear is covering the speaker.

Scientists often measure the amount of light falling on an area in nature to determine things like the effects of light pollution on nocturnal animals, how much light plants are receiving throughout the day, and so much more! They use a more sophisticated way to measure the light than our sensor could detect, but the concept is very similar.

Here are some ideas to ponder:

  • Can you think of other applications of a circuit like this one in everyday life?
  • What about a sensor that works the opposite of ours - it turns a light on when exposed to light, and off in the dark?
  • What happens when you shine a bright light on the circuit when it's in a dimly lit room?
  • If you're curious about why LEDs are sensitive to polarity, look up diodes or photodiodes on the internet - they are quite fascinating and a revolutionary technology in lighting. Many different circuit components are polarity-dependent.
Battery Powered Contest

This is an entry in the
Battery Powered Contest

Be the First to Share

    Recommendations

    • Make it Real Student Design Challenge

      Make it Real Student Design Challenge
    • Block Code Contest

      Block Code Contest
    • Battery Powered Contest

      Battery Powered Contest

    26 Discussions

    9
    wannabemadsci
    wannabemadsci

    23 days ago

    Thanks for posting this very detailed Instructable.

    I think the circuit is a bit misleading for a few reasons.

    1) The photosensitive component symbol shown in the schematic is for a photoresistor and not a phototransistor. I have attached the symbol for a phototransistor.

    2) The circuit is drawing power all the time, even when the LED is off. This is because the phototransistor is actually shorting out the LED when it gets light on it. The phototransistor is not really interrupting the current to the LED as much as it is diverting it through itself. Phototransistor with light on it conducts so instead of the current going to the LED it is going through the phototransistor, without the LED lighting.

    3) This is a very odd way to control an LED and why, as you mentioned, this circuit is much simpler than the other circuits that use an additional transistor to control the LED. The other circuits are probably using a secondary transistor to turn the LED on, rather than to short the LED off, drawing current through the phototransistor when the LED is off.

    4) This circuit will drain the battery faster than expected since the circuit is drawing battery power when the LED is off.

    It is still a very simple way to demonstrate light control of electronics and to get someone excited about electronics.

    Screenshot (562).png
    0
    3DNicholos
    3DNicholos

    Reply 17 days ago

    Thanks for the comment! I'm actually humbled to have your feedback, as I've seen some of your Instructables and follow you here - you make some impressive stuff. Yes, I'm aware of the photoresistor vs phototransistor symbol in the schematic - the program I was using to create it didn't have a phototransistor symbol, tried to be clear about that in the description.

    The other methods for making this type of circuit are certainly better from a usability perspective, and I understand that the way we are controlling this is a bit odd with regards to power consumption, etc. This was created for a science kit to allow for kids/young adults in grades 8-12 to create a very simple, semi-useful circuit on their own without direct instruction from an adult in a classroom setting. Through a few iterations, we found that this level of simplicity with regards to number of components and and their orientation with polarity and wiring was a good compromise between something useful, easy to troubleshoot and wire properly, and educational with regards to sensors, resistors, LEDs and polarity.

    I'd much prefer a circuit that used a secondary transistor with regards to longevity and usefulness, but entry-level learners have difficulty with orienting them appropriately and determining the difference between the base, emitter and collector. They are also trickier to tape onto a card with the copper tape without shorting across the legs. If you have recommendations for alternate components I would gladly put them into our next iteration of this kit - I'm decently knowledgeable about electronics and wiring, but don't have any formal education in electrical engineering. I consulted with someone who has an EE degree and they couldn't come up with any way to recreate this circuit without a secondary transistor. I also hate coughing up the $1.20 per ambient light sensor from Radio Shack when there are cheaper alternatives from Digi-Key that are like 9 or ten cents apiece, but I could not get those to work without including a secondary transistor.

    Thanks much!

    0
    wannabemadsci
    wannabemadsci

    Reply 17 days ago

    Thanks for your kind comments.
    Considering the goal of the circuit is to generate interest in electronics it does a great job. It might be nice to have a section "More Technical" that explains exactly what is going on in the circuit for those interested.
    I did a quick search on the web and one contributor thought this link might be the Radio Shack part.
    https://www.everlight.com/file/ProductFile/ALS-PDT...
    Unfortunately it appears that the above part has been discontinued.
    Looking at DigiKey, and the electrical ratings, have you tried either the Vishay TEPT5700 or TEPT5600 ? They are OK up to 6V and can conduct 20mA.
    Good Luck.

    0
    3DNicholos
    3DNicholos

    Reply 17 days ago

    Haha, yeah I came across that same post and tried Arrow, Mouser and Digi-Key to find it. There was one through one of those suppliers (can't remember exactly) that looked like it matched the datasheet closely and was from Everlight but minimum order was 4,000 of them and I didn't want to wait the 12-week lead time and spend that amount for something that wasn't going to work. My guess is that RadioShack purchases those then repackages and marks them up significantly. We're only making 800-1,000 of these kits so I guess we'll prop up RadioShack with our grant funds (they could use the money these days!).

    The first ones I tried were the Vishay TEPT5700 and then the 5600 - it works but the resistor value is high ~25K and the difference between on/off for the light is barely noticeable. Tried another Everlight sensor from Mouser with better results (10K resistor) but again the light isn't very bright when on.

    Oh and I saw your post on our Hovercrafts Instructable, thanks for sharing your clever 3D design for those - I like your check valve design on that using the side of the balloon's inflation tube! I'll try them out in our makerspace with the public when we are allowed to open to the public again.

    0
    wannabemadsci
    wannabemadsci

    Reply 16 days ago

    Glad you liked the 3D printed hovercraft. The valve makes it so much easier to use.
    Back to the circuit. I am surprised that the resistor values are so high when using the TEPT 5700 and 5600. Since those devices can handle 20mA, it would appear that the resistor could be as low as 150 ohms (with a 3V source). Have you tried resistor values as low as your original 680 ohm?

    0
    3DNicholos
    3DNicholos

    Reply 9 days ago

    I'm copying here so it notifies you: If you have a recommendation for how this could be copper taped up onto a card similar to shown that would be great. I taped up a version of this one, and it worked *okay*, but again was a challenge for kids to get right and troubleshoot over the version I published here: https://www.evilmadscientist.com/2007/a-simple-and-cheap-dark-detecting-led-circuit/.


    I subbed a 2222A NPN, 30k resistor, and this Everlight ambient light sensor and it worked a treat: https://www.mouser.com/ProductDetail/Everlight/EAALST05RDMA0?qs=hE2b9RNHrswnaSeTkgLkzg%3D%3D

    We bought Radio Shack out of those sensors, and given everyone else's feedback I'd like to improve this so that it is more functional - the way I designed it was a kludge for educational purposes, if I can get it all to fit on a card and taped in an obvious manner with a transistor I'd be very happy (and would update this 'ible with that information).

    Screen Shot 2020-11-25 at 12.29.50 PM.png
    0
    wannabemadsci
    wannabemadsci

    Reply 7 days ago

    I like that you are considering going to the transistor arrangement. I have some ideas on copper foil layout to make the operation more clear. I will take me a while to put it together. Does the circuit you have in the card image work?

    0
    3DNicholos
    3DNicholos

    Reply 4 days ago

    I got that arrangement working well. Found that wrapping the long ends of the resistor, LED and sensor over the top of the copper foil makes it much less buggy - the copper tape adhesive has always been unreliable as a conductor, this seems to help quite a bit just generally. Will rework the instructions to include a version 2.0, parts list, etc. this week. Thanks for all the input and nudges to make this a better design.

    IMG_7939.JPGIMG_7940.JPG
    0
    3DNicholos
    3DNicholos

    Reply 5 days ago

    Yeah, though I could avoid it but am not 100% happy with this design and its reliability and some of the drawbacks. The circuit in the diagram with transistor works on breadboard, I didn’t have enough copper tape at home to verify it completely but was able to lay it out in that way with what I did have and I think will be easy to replicate. It helps that one can tape the transistor to the card with the flat side down and achieve the orientation necessary to make it work. I’ll probably have time tomorrow to iterate with copper tape more when I can grab a roll from work.

    1
    3DNicholos
    3DNicholos

    Reply 16 days ago

    Yeah, I wired them up on a breadboard first with the 680 ohm resistor which didn't do anything, then to a potentiometer in place of the resistor and adjusted the potentiometer until I could get the LED to brighten when the sensor was covered/it was dark and completely dim when there was light falling on it. Then I measured the resistance on the pot with my multimeter and substituted the same value resistor into the breadboarded circuit.

    0
    Diablo_Desu
    Diablo_Desu

    Reply 12 days ago

    Hi, new here. What happens when you connect the phototransistor in series? does it not work like a controllable resistor (automated through light)?
    no degree or anything, just self taught electronics and high school physics.
    would that not solve the waisted electricity?

    0
    3DNicholos
    3DNicholos

    Reply 9 days ago

    I'm also self-taught, and have the same background. I thought it would work that way, but I think that's more in line a photoresistor or Light Dependent Resistor (LDR) which increase or decrease their resistance based on incident light falling on them. I tried that orientation, and it didn't work at all - the phototransistor works a bit differently, in ways that I honestly don't fully understand. I'm not an electronics engineer, just an enthusiast like many here :)

    I did try in series but it didn't work. See some of the other input on these discussions, I think that way would also have high power consumption because the resistor would just be soaking up more current than the light when light was falling on it, opposite when dark.

    0
    wannabemadsci
    wannabemadsci

    Reply 11 days ago

    Thanks for the suggestion. I think 3DNicholos (the author) will have to comment. However, I would think it would work. Only issue is that the circuit would operate "backwards". Covering (blocking light) the phototransistor would turn off LED and having light on ithe phototransistor would turn it on. So in the light the LED is on, and in the dark the LED is off. It would still be fun for newcomers to electronics to play with. This is still be a great example of light controlling a circuit, just does not turn on in the dark. ;-)
    It might even be a better explanation of current flow as all components are in series and it is plain what is going on, rather than the phototransistor shorting the LED.

    0
    maintann
    maintann

    10 days ago on Step 7

    I think a better circuit could be made by placing the phototransistor in series with the led, thus making it a led lights up when the light is on. Even simpler to build & better battery life & generally a better circuit.
    A next step could be to use a small npn transistor in the cathode side of the led with a strip of copper from the base running beside the V+ trace. This would make a simple touch switch - contact both copper traces & the light come on.

    0
    3DNicholos
    3DNicholos

    Reply 9 days ago

    Copying this from below so it notifies you: If you have a recommendation for how this could be copper taped up onto a card similar to shown that would be great. I taped up a version of this one, and it worked *okay*, but again was a challenge for kids to get right and troubleshoot over the version I published here: https://www.evilmadscientist.com/2007/a-simple-and-cheap-dark-detecting-led-circuit/.

    I subbed a 2222A NPN, 30k resistor, and this Everlight ambient light sensor https://www.mouser.com/ProductDetail/Everlight/EAALST05RDMA0?qs=hE2b9RNHrswnaSeTkgLkzg%3D%3D

    Screen Shot 2020-11-25 at 12.27.04 PM.png
    0
    needfulthing
    needfulthing

    Reply 9 days ago

    Just a little note: if you use wire colors you should stay with "red for + and black for -" convention. I like your simple circuit, it's flaw of draining current all the time makes it perfect for further explanation and the optimized transistor circuit as a second lesson.

    0
    3DNicholos
    3DNicholos

    Reply 8 days ago

    Hey, thanks! Agreed with the use of the convention for wire coloring. I'm working up a 2nd version that includes a transistor based on the discussions here and positive input from other members - gotta love the Instructables community!

    0
    3DNicholos
    3DNicholos

    Reply 9 days ago

    Yeah, I tried putting the phototransistor in series with the LED and it did not function. I agree that a transistor is probably the way to go with version 2.0 of this circuit - see my replies to some other feedback on these discussions, I built this as an educational demonstration of this circuit with ease of wiring and assembly in mind - long-term functionality was a secondary consideration, one that I hope to integrate into future iterations.

    I like your idea for the touch switch!

    1
    itscolin46
    itscolin46

    10 days ago on Introduction

    This is awful. It just short circuits the LED and drains the battery when it's light!

    0
    itscolin46
    itscolin46

    Reply 10 days ago

    Sorry did not read other posts .
    as described there are many much better circuits that are not very complex