Introduction: Shedding Some Light on Things

Picture of Shedding Some Light on Things

The following information is a single lesson in a larger project. Find more great projects here.

Return to Previous Lesson: Turn Up for Resistance

Lesson Overview:

Now we'll learn about sensing light!

Step 1: Introduction

Picture of Introduction

In this lesson, you’ll learn about a new kind of component: the photo sensor (also called a light sensor).

A sensor is a type of component that takes some input like light, sound, or temperature and turns it into a signal that the circuit can use to create another output.

If you have a night light at home, it uses a photo sensor! When your room gets dark, the sensor changes its output signal, which makes the light turn on.

Remember the NPN transistor from the Basic Kit course? We used it as a touch sensor. A small amount of current flowing into the base of the NPN opened up a gate for a large current to flow.

The photo sensor in the Circuit Scribe kit is similar, but the small current is produced when light shines on the sensor! See the diagram below:

  1. Press the "next" button below to continue.

Step 2: Making a Bright Light Sensor

Picture of Making a Bright Light Sensor

A battery and photo sensor are already in the workplane. Notice that the VCC and Ground feet of the photo sensor are aligned with the (+) and (-) terminals of the battery.

The Photo sensor is an "active" component, meaning that it needs power from the battery. Aligning the (+) and (-) battery terminals with the VCC and Ground feet of the sensor make this easy to wire up.

Next, you’ll add an output component - the LED - and then you will wire it up!

  1. Open the Modules + tab and drag an LED into the Workplane.
  2. Place it to the right of the photo sensor and slightly below.
  3. Close the Modules + tab and select the Conductive Pen.
  4. Draw a connection between the (+) terminal of the battery and the top VCC foot of the photo sensor.
  5. Draw a connection between the (-) terminal of the battery and the bottom Ground foot of the photo sensor. Now the photo sensor module has power!
  6. Finally, wire up the LED by connecting one terminal to the output foot of the photo sensor and the other terminal to the Ground foot of the photo sensor.
  7. Press the "next" button below to continue.

Step 3: Simulating Your Circuit

Picture of Simulating Your Circuit

Try simulating your circuit by clicking the “Start Simulation” button. When you select the photo sensor module, you will see a slider on the side that lets you simulate the amount of light shining on the module.

  1. After the simulation has started, highlight the photo sensor by clicking on it.
  2. A slider with dark and light icons will appear. Drag the handle on the slider up and down to simulate a change in room lighting.
  3. Observe what happens to the LED as you change the amount of light shining on the sensor.
  4. Press the "next" button below to continue.

Step 4: Understanding Your Circuit (part 1)

Picture of Understanding Your Circuit (part 1)

In the previous step, you should have observed that the LED gets brighter as you turn up the amount of light shining on the sensor. Why does this happen?

It all has to do with the amount of voltage at the output of the sensor. As you shine light on the sensor, the output voltage increases from 0 Volts to 9 Volts.

Since current flows from points of high voltage to low voltage, current will start flowing from the output, through the LED, to the ground terminal of the sensor. The current gets stronger as the voltage at the output increases!

The picture below illustrates what happens at the output and ground pins when the amount of light shining on the sensor increases. In this illustration, the voltage drop over the LED module changes from 4 volts to 9 volts and the light gets brighter.

  1. Press the "next" button below to continue.

Step 5: Using the Sensor in Dark Mode

Picture of Using the Sensor in Dark Mode

The sensor can also be used in a mode where the LED gets dimmer as you shine light on the photo sensor. Simply hook up the LED between the output and the VCC foot of the sensor.Try it yourself!

Make sure you only have one LED connected to the sensor at a time (you will see why this is important in a later step).

  1. Stop the simulation.
  2. To use the photo sensor in a new way, move the LED off its current pads to a space above the sensor.
  3. Use the Conductive Pen to connect one terminal of the LED to the output of the photo sensor.
  4. Use the Conductive Pen to connect the other terminal of the LED to the VCC foot of the photo sensor.
  5. Simulate the circuit and move the light source slider up and down to see what happens!
  6. Press the "next" button below to continue.

Step 6: Understanding Your Circuit (part 2)

Why does this setup have the opposite behavior? Here’s how it works:

No light on sensor:

The VCC foot of the photo sensor is at 9 Volts since it is directly connected to the (+) terminal of the battery. Again, current will flow from a point of high voltage to a point of low voltage. When no light shines on the sensor, current will flow from from the VCC foot (9 V) to the output (0 V).

Bright light on sensor:

When light shines on the sensor, the output voltage increases again. But this time, an increasing output voltage DECREASES the voltage difference over the terminals of the LED, eventually turning it off as more light shines on the sensor!

  1. Press the "next" button below to continue.

Step 7: Printing Out Your Circuit

Print out and fill in your circuit with the Circuit Scribe pen and modules to try both circuit setups yourself!

To activate the light sensor, you will need to shine a bright light on it. Find a flashlight and hold it close to the sensor.

  1. Press the "next" button below to continue.

Step 8: Connecting One LED at a Time

Picture of Connecting One LED at a Time

There is one potential problem with this circuit that you might have already discovered. What happens when you connect two LEDs at the same time on both LED locations?

Go ahead and try it in the simulator. Does changing the light level do anything to the brightness of the LEDs? Why or why not?

Check out diagram below to see what happens when you remove the light sensor from the circuit. Can you explain why both lights stay on? (see hint.)

  1. Open the Modules + menu and drag another LED onto the bottom set of component pads.
  2. Press the "next" button below to continue.
  3. Stuck? HINT: When both lights are connected, current avoids the photo sensor. There is a complete loop connecting both LEDs to the battery.

Step 9: How Will You Use Your Photo Sensor?

Congratulations on successfully completing a light sensor circuit!

In the time that you have remaining, try using different output modules with the photo sensor, like the buzzer.

Can you think of a situation where light sensors are used in your daily life?

We’re almost there! In the next lesson, you will learn about a component that creates a square wave: the blinker module.

Next Lesson:Blink, Buzz! Blink, Buzz!

Comments

About This Instructable

115views

2favorites

License:

Bio: Circuit lessons for Tinkercad Circuits!
More by circuits:IntroductionProject 15: Hacking ButtonsProject 14: Tweak the Arduino Logo
Add instructable to: