Skip to content
Learnearn.uk » Microbit Unit Home » Microbit Light Dependent Resistor Experiment

Microbit Light Dependent Resistor Experiment

Introduction

Microbit LDR Experiment

Light Dependent Resistors Allow the Microbit to detect light levels

In this experiment we will using a Light Dependent Resistor, a simple analog input sensor,  as an input device to measure light levels.

The components you will need are:

  • A Microbit
  • Some Crocodile Clip to jumper cables
  • Jumper Wires
  • A breadboard
  • 10K Ohm Resistor
  • A Light Dependent Resistor

 

Wiring

Wiring Diagram

Microbit LDR Wiring Diagram light sensor KS3

Click to enlarge

 

Circuit

Circuit Diagram

The circuit diagram for connecting an LDR to the Microbit

Code

Microbit Blockly Code

Challenge 1

Challenge 1 – Smiley Sad

For challenge 1 you need to adapt your code so that the when somebody places their hand over the sensor it displays a sad face, when they take their hand away it displays a happy face.

Here’s some code to help you get started

2

Challenge 2 – Light Synthesizer

Did you know you can use the light levels from the ldr to make a hand controlled musical instrument?

See if you can get the Microbit to play a tone that varies depending on the light level!

 

3

Challenge 3 – Light Meter

Can you get the Microbit to display the light levels using the 5 bars of the LED matrix instead of displaying a number?

 

4

Challenge 4 – Automatic Street Light Simulator

Many street lights use light dependent resistors to turn on the street lights at night time. Can you create your own simulation of this so that an LED turns on when there is no light coming into the LDR?

You will need use what you learned from experiment one in order to complete this challenge!

Resources

Resources

Printable Worksheet