Project tutorial

Snap Circuits® - Light Controlled Launcher © GPL3+

Snap Circuits® makes learning electronics easy and fun! These projects are designed for younger kids who want to be introduced to IoT.

  • 1,689 views
  • 1 comment
  • 4 respects

Components and supplies

Necessary tools and machines

Flashlight

Apps and online services

About this project

Follow the Snap Circuits platform!

Overview

What Are Snap Circuits?

Snap Circuits® makes learning electronics easy and fun! Learn how to integrate Snap Circuits® with your hardware. Fun for kids!

Introductory Project

If you have not completed the introductory project please go to Snap Circuits - Introduction. This project also contains a complete index of Snap Circuit projects.

Let's Get Started

Project Objective

Using the Arduino, launch the fan when light is detected.

Building the Circuit

The minimum set requirement for this project is SC-300.

Build the following circuit:

Click the link below to download a PDF containing the circuit diagram and instructions to build it (the PDF file can also be found in the GitHub repository).

Download Circuit Diagram and Instructions

Here are images of the components that you will use to build the circuit.

Completed Circuit

Here are images of the completed circuit.

Loading the Sketch

The attachment below contain the sketch for this project. Click the link below and save this to your computer.

Download Arduino Sketch (you may need to right-click and choose Download or Save Target As)

Load this sketch into the Arduino IDE in the same manner as in the Blinking LED project. After it is loaded compile and run it. The sketch for this project will write output to the serial port so you will need to open the Serial Monitor from the Tools menu (you can press Ctrl-Shift M).

How this Works

The Circuit

This project is really two circuits in one. The first circuit monitors the photo resistor. When light is shined directly on the photo resistor the resistance drops significantly which connects the 3V3 pin directly to the D3 and causes D3 to go HIGH. When no light is shined on the photo resistor the resistance is very high and causes D3 to go LOW.

The photo resistor is being used as a switch by connecting it to a digital port. To see how to use it on an analog port see the project Measuring Light.

The second circuit uses a relay to turn a motor connected to a battery on and off. The relay and battery are required because the Arduino cannot push enough current to run the motor on its own. The relay is a switch that is activated by current from another isolated circuit. The relay in this circuit is connected to an Arduino digital port that will activate and deactivate the relay. When the relay is activated, the circuit connecting the battery to the lamp is closed and the motor turns on. When the relay is deactivated the circuit is open and the motor turns off.

The Software

The software will monitor the value of pin D3. When the pin is LOW the software ignores it and does nothing. When the pin goes HIGH (light is detected) the software changes a flag to indicate that light was detected and starts the motor. When the light is removed, the software will turn the motor off. This action will cause the fan to launch from the motor.

Code

Source Code for all Snap Circuit Projects
This is the GitHub repository for all of the source code, documents and files presented in the Snap Circuit projects.

Schematics

Breadboard
Light controlled launcher bb
Breadboard
Light controlled launcher bb
Schematic
Light controlled launcher schem
Fritzing File
Light_Controlled_Launcher.fzz

Comments

Similar projects you might like

Snap Circuits® - Button Controlled Launcher

Project tutorial by Daniel Porrey

  • 3,886 views
  • 0 comments
  • 12 respects

Snap Circuits® - Count Down Launcher

Project tutorial by Daniel Porrey

  • 1,994 views
  • 2 comments
  • 10 respects

Snap Circuits® - Measuring Light

Project tutorial by Daniel Porrey

  • 1,635 views
  • 0 comments
  • 10 respects

Snap Circuits® - Night Light

Project tutorial by Daniel Porrey

  • 1,568 views
  • 0 comments
  • 6 respects

Snap Circuits® - Push Button Monitor

Project tutorial by Daniel Porrey

  • 1,135 views
  • 0 comments
  • 8 respects

Snap Circuits® - Push Button LED

Project tutorial by Daniel Porrey

  • 2,280 views
  • 0 comments
  • 10 respects
Add projectSign up / Login