
Summary
Students design, build, and program a device that detects and measures light from multiple sources. Using light-emitting diodes (LEDs) that emit different wavelengths of light (such as infrared, visible, and ultraviolet), students develop code that enables their device to selectively identify and respond only to the wavelength containing the desired information. Through iterative testing and refinement, students integrate programming, electronics, and optics to create a functional sensing system. This activity models real-world challenges in optical communication and remote sensing, helping students explore how engineers design systems to transmit and detect information using electromagnetic radiation.Engineering Connection
Electrical and computer engineers design and program integrated hardware–software systems that use light to transmit, detect, and process information. They combine electronics, coding, and knowledge of electromagnetic radiation to create devices capable of distinguishing among different wavelengths of light and responding accurately in real time. Their work is critical in fields such as telecommunications, medical imaging, environmental monitoring, robotics, and space exploration, where precise detection and interpretation of light signals drive technological innovation and scientific discovery.
Learning Objectives
After this activity, students should be able to:
- Write, test, and debug code that controls hardware components, including LEDs, sensors, and output devices.
- Demonstrate an understanding of electromagnetic radiation and light wavelengths by designing a system that selectively detects and distinguishes between infrared (IR), visible, and ultraviolet (UV) light.
- Use data from sensors to make informed design decisions, including setting detection thresholds, analyzing sensor outputs, and iteratively refining code and hardware configurations.
Educational Standards
Each Teach Engineering lesson or activity is correlated to one or more K-12 science,
technology, engineering or math (STEM) educational standards.
All 100,000+ K-12 STEM standards covered in Teach Engineering are collected, maintained and packaged by the Achievement Standards Network (ASN),
a project of D2L (www.achievementstandards.org).
In the ASN, standards are hierarchically structured: first by source; e.g., by state; within source by type; e.g., science or mathematics;
within type by subtype, then by grade, etc.
Each Teach Engineering lesson or activity is correlated to one or more K-12 science, technology, engineering or math (STEM) educational standards.
All 100,000+ K-12 STEM standards covered in Teach Engineering are collected, maintained and packaged by the Achievement Standards Network (ASN), a project of D2L (www.achievementstandards.org).
In the ASN, standards are hierarchically structured: first by source; e.g., by state; within source by type; e.g., science or mathematics; within type by subtype, then by grade, etc.
NGSS: Next Generation Science Standards - Science
| NGSS Performance Expectation | ||
|---|---|---|
|
HS-ETS1-1. Analyze a major global challenge to specify qualitative and quantitative criteria and constraints for solutions that account for societal needs and wants. (Grades 9 - 12) Do you agree with this alignment? |
||
| Click to view other curriculum aligned to this Performance Expectation | ||
| This activity focuses on the following Three Dimensional Learning aspects of NGSS: | ||
| Science & Engineering Practices | Disciplinary Core Ideas | Crosscutting Concepts |
| Analyze complex real-world problems by specifying criteria and constraints for successful solutions. Alignment agreement: | Criteria and constraints also include satisfying any requirements set by society, such as taking issues of risk mitigation into account, and they should be quantified to the extent possible and stated in such a way that one can tell if a given design meets them. Alignment agreement: Humanity faces major global challenges today, such as the need for supplies of clean water and food or for energy sources that minimize pollution, which can be addressed through engineering. These global challenges also may have manifestations in local communities.Alignment agreement: | New technologies can have deep impacts on society and the environment, including some that were not anticipated. Analysis of costs and benefits is a critical aspect of decisions about technology. Alignment agreement: |
| NGSS Performance Expectation | ||
|---|---|---|
|
HS-ETS1-3. Evaluate a solution to a complex real-world problem based on prioritized criteria and trade-offs that account for a range of constraints, including cost, safety, reliability, and aesthetics, as well as possible social, cultural, and environmental impacts. (Grades 9 - 12) Do you agree with this alignment? |
||
| Click to view other curriculum aligned to this Performance Expectation | ||
| This activity focuses on the following Three Dimensional Learning aspects of NGSS: | ||
| Science & Engineering Practices | Disciplinary Core Ideas | Crosscutting Concepts |
| Evaluate a solution to a complex real-world problem, based on scientific knowledge, student-generated sources of evidence, prioritized criteria, and tradeoff considerations. Alignment agreement: | When evaluating solutions it is important to take into account a range of constraints including cost, safety, reliability and aesthetics and to consider social, cultural and environmental impacts. Alignment agreement: | New technologies can have deep impacts on society and the environment, including some that were not anticipated. Analysis of costs and benefits is a critical aspect of decisions about technology. Alignment agreement: |
| NGSS Performance Expectation | ||
|---|---|---|
|
HS-PS4-5. Communicate technical information about how some technological devices use the principles of wave behavior and wave interactions with matter to transmit and capture information and energy. (Grades 9 - 12) Do you agree with this alignment? |
||
| Click to view other curriculum aligned to this Performance Expectation | ||
| This activity focuses on the following Three Dimensional Learning aspects of NGSS: | ||
| Science & Engineering Practices | Disciplinary Core Ideas | Crosscutting Concepts |
| Communicate technical information or ideas (e.g. about phenomena and/or the process of development and the design and performance of a proposed process or system) in multiple formats (including orally, graphically, textually, and mathematically). Alignment agreement: | Solar cells are human-made devices that likewise capture the sun's energy and produce electrical energy. Alignment agreement: Information can be digitized (e.g., a picture stored as the values of an array of pixels); in this form, it can be stored reliably in computer memory and sent over long distances as a series of wave pulses.Alignment agreement: Photoelectric materials emit electrons when they absorb light of a high-enough frequency.Alignment agreement: Multiple technologies based on the understanding of waves and their interactions with matter are part of everyday experiences in the modern world (e.g., medical imaging, communications, scanners) and in scientific research. They are essential tools for producing, transmitting, and capturing signals and for storing and interpreting the information contained in them.Alignment agreement: | Systems can be designed to cause a desired effect. Alignment agreement: Science and engineering complement each other in the cycle known as research and development (R&D).Alignment agreement: Modern civilization depends on major technological systems.Alignment agreement: |
International Technology and Engineering Educators Association - Technology
-
Illustrate principles, elements, and factors of design.
(Grades
9 -
12)
More Details
Do you agree with this alignment?
-
Optimize a design by addressing desired qualities within criteria and constraints.
(Grades
9 -
12)
More Details
Do you agree with this alignment?
-
Apply a broad range of design skills to their design process.
(Grades
9 -
12)
More Details
Do you agree with this alignment?
Materials List
Each group needs:
- 1 laptop or tablet capable of running Python or a similar programming language
- 1 breadboard
- at least 3 LEDs, preferably including UV and IR LEDs in addition to standard visible lights
- 1 light sensor
- wires and resistors, as needed
- (optional) IR detector diode
- (optional) speaker
- (optional) digital display
Worksheets and Attachments
Visit [www.teachengineering.org/activities/view/jpl-3055-light-detector-space-communications-activity] to print or download.Pre-Req Knowledge
Students should have:
- Intermediate knowledge of programming languages.
- Background knowledge of how to import libraries for external sensors using Python and navigate online resources for operating loops.
Introduction/Motivation
As we explore the solar system and beyond, we rely on NASA’s Deep Space Network, or DSN, to serve as our communication device between Earth and our distant spacecraft. The DSN consists of a number of antennas across the globe that use radio waves to transmit information to and receive data from our missions in space.
(Optionally, show this NASA YouTube webinar “Teach Space with NASA – Engineering the Deep Space Network” [43:54 minutes; https://www.youtube.com/watch?v=B-sy7B9iSqg&t=28s], in which NASA experts talk about the system of antennas that make up the DSN and how it's used to communicate with distant spacecraft and collect science.)
However, radio waves are not very efficient when it comes to transmitting a lot of information in a short amount of time. Their long wavelengths mean that signals can better resist distortion, but as more and more complex data is being sent across space, NASA is exploring higher frequency (and therefore shorter wavelength) light sources to be able to beam messages more efficiently.

One such option being explored is known as Deep Space Optical Communications, or DSOC, which would use near infrared (NIR) light beams carefully aimed between spacecraft and our detectors on Earth to send data. By using IR light instead of radio waves, we would see a 10,000-fold increase in frequency, meaning 100 times more data could be transmitted.

Although this would mean we could get more data faster, it does come with some complications. Light does not move equally through different materials. This is why our sky is blue and why we build telescopes on top of high mountains. The atmosphere interferes with certain wavelengths of light, potentially distorting the data being received.
Additionally, recall that we receive much more than visible light here on Earth. We are bathed in light beyond what we can detect with the naked eye, such as ultraviolet light from the sun or radio waves from our phones and wireless internet.
To be successful, DSOC technology will need to be capable of resisting distortion as the light travels through space and our atmosphere, selective about the wavelength of light it detects, and carefully positioned to catch a focused beam of light. So far, it appears this all could be achievable. The DSOC technology has already been piloted in communications between Earth and the Moon and will next be tested aboard the Psyche mission.
Procedure
Background
NASA’s Deep Space Network (DSN) is a worldwide system of large antennas and communication facilities that supports interplanetary spacecraft missions. It allows engineers and scientists to send commands to spacecraft and receive scientific data, images, and telemetry from missions across the solar system. The DSN operates around the clock and consists of three main complexes located in California, Spain, and Australia. These locations are strategically spaced approximately 120 degrees apart in longitude to maintain continuous communication with spacecraft as the Earth rotates. The network relies heavily on radio waves to communicate over vast distances, from Earth to Mars, Jupiter, and beyond.
Although radio waves are reliable and have been the primary method of space communication for decades, they are not very efficient for transmitting large amounts of data quickly. Radio signals have relatively low bandwidth, meaning they can only carry a limited volume of information at any given time. Additionally, the strength of a radio signal diminishes with distance, requiring large antennas and sensitive receivers to detect faint signals from deep space. These constraints make transmitting high-resolution images, video, or large scientific datasets over interplanetary distances slow and challenging.
To overcome the limitations of radio waves, NASA is developing Deep Space Optical Communications (DSOC), which uses lasers to transmit data as pulses of light. Optical communication can carry much more information at faster rates than traditional radio signals because light has a much higher frequency and shorter wavelength. This technology requires precise alignment between spacecraft and Earth-based receivers, as the light beams are narrow and must be aimed accurately. DSOC has the potential to dramatically increase the speed of data transmission from future space missions, enabling scientists to receive more detailed scientific measurements and images in real time, supporting exploration across the solar system.
Before the Activity
- Gather the activity materials.
With the Students
Part I (60-120 minutes)
- Optional: Discuss optical communication and wavelength detection.
- Introduce the engineering challenge:
- Design, build, and program a device that can detect and respond to a specific wavelength of light emitted by one LED among multiple LEDs of different wavelengths.
- Teams must integrate programming, electronics, and optics to create a functional device that demonstrates the principles of light detection and wavelength discrimination, similar to challenges faced in optical communication and remote sensing.
- Emphasize that each group’s system must:
- Selectively identify the correct light signal.
- Provide feedback (e.g., display or speaker).
- Operate reliably in real time.
Teams must integrate programming, electronics, and optics to create a functional device that demonstrates the principles of light detection and wavelength discrimination, similar to challenges faced in optical communication and remote sensing.
- Put students into groups of two or three students.
- Ensure each group has a laptop or tablet capable of running Python or a similar programming language.
- Instruct students to set up their computing environment and import the libraries needed for their device. Note: This will likely include GPIO board, LEDs, and more, depending on student knowledge of coding and the devices being used (LEGO, Raspberry Pi, Cubit, etc.)
- Optional: Have each group brainstorm and plan how they will code and set up their device to satisfy the challenge and constraints.
- Break down the programming into three components:
- Turn lights on/off: Have students begin by writing a simple script capable of turning on and off at least three lights. (Note: It is recommended that the lights have very different wavelengths, such as IR, visible light, and UV.)
- Detect specific lights with a light sensor: Instruct students to experiment with code that will use a light sensor to detect one of the lights, but not the others. Note: This can be done using the intensity detected by the sensor.
- Output a detection message: Instruct students to write code that gives an output for whether the desired wavelength of light is being detected. For example, if students have a digital display, this can be as simple as printing out the message “Receiving.”
- Optional: Have students consider adding more indicators of success, such as triggering a speaker.
- Once each group has their three programming components, challenge students to write code to run both the light display sequence and the detection sequence concurrently. Note: This can be done by joining multiple loops or using the "multiprocessing" and "process" libraries.
- Allow students to experiment in creative ways.
- Potentially allow students to do online research about various techniques they might use.
- Reference the Coding Sheet for sample code.
Part II (60-120 minutes)
- Show students the materials available to build their physical devices. Note: Each group will need at least a breadboard, three LEDs, and one light sensor. Depending on the devices being used, they may need wires and resistors for each LED.
- Have students put together a blueprint of their physical device and an inventory of the materials needed to create their device.
- Optional: Check each group’s blueprint and materials list before allowing groups to move forward with gathering their materials and building their devices.
- Have students collect their planned materials.
- Instruct each group to divide its team members to include specific groups roles: programming, construction, and optics.
- Encourage students to communicate with their programming and optics counterparts to be sure they are all operating with the same supplies in mind.
- Begin construction of the device by having students align the LEDs on the breadboard either an equal distance from the light detector or in a way that the LEDs can be easily moved to a standard distance.

- Once their sample code (from Part I) is ready for testing, have each group verify that their lights are appropriately operating and that their LEDs are properly connected via their individual assemblies.
- Remind students that, depending on the wavelengths chosen, they may not be able to see that the LED is operating.
- Have students responsible for construction communicate with their programming counterpart to record the intensities of each light being detected.
- Instruct students to revise their code and threshold for detection based on their observations.
- Challenge students to attach a digital display and/or a speaker to their device that is triggered when the correct wavelength is detected above the threshold intensity.
- Give students time to execute their code, and then revise it, as needed.
- Use the Coding Rubric to evaluate each group’s device. Note: A successful project will have at least three LEDs cycling while simultaneously and reliably indicating detection of light when only the desired light is illuminated.
- Wrap up the activity by discussing the following questions:
- What challenges presented themselves in running two loops simultaneously? How was that resolved?
- How do we know that the light detector is capable of detecting the wavelengths of all of our LEDs? Was there a scenario where you were able to trigger the sensor with the UV light? The IR light?
- What possible complications do you predict would present themselves as we translate our device from lights and detectors in close proximity to those spread across the solar system?
Vocabulary/Definitions
breadboard: A tool used to build electronic circuits without soldering; allows easy connections of LEDs, sensors, and wires.
calibration: Adjusting a device so it measures accurately.
concurrent / multiprocessing: Running two or more loops or tasks at the same time in a program.
digital display: A screen that shows information from the program, such as “Receiving.”
IR light (infrared): Light with a wavelength longer than visible light; cannot be seen by the human eye.
light sensor: A device that detects light intensity and wavelength; can tell which LED is on.
light-emitting diode (LED): A type of electronic light source that emits light when electricity flows through it.
loop (programming): A section of code that repeats instructions multiple times.
optical communication: Sending information using light signals, such as using LEDs to transmit data.
resistor: A component that limits the amount of current flowing through a circuit.
signal interference: Anything that disturbs or blocks the light signal from being detected correctly.
threshold: The minimum light intensity the sensor needs to detect a signal.
ultraviolet light (UV): Light with a wavelength shorter than visible light; also invisible to the human eye.
wavelength: The distance between two consecutive peaks of a wave; determines the color or type of light (e.g., IR, UV, visible).
Assessment
Pre-Activity Assessment
Discussion / Quick Questions: Ask students what they know about light, wavelengths, LEDs, and sensors.
Activity Embedded (Formative) Assessment
Code Check: Ensure students’ scripts turn LEDs on/off, detect correct light, and give output.
Prototype Check: Review team blueprints and material inventory before device construction.
Post-Activity (Summative) Assessment
Wrap Up Engineering Discussion Questions: Discuss the following questions as a class.
- What challenges presented themselves in running two loops simultaneously? Potential answers:
- The LED display loop and the sensor detection loop were running at the same time, which caused timing conflicts or delays. For example, the sensor loop might miss a light signal if the LED loop was busy.
- The program might freeze or crash if multiple loops were not handled correctly.
- How was that resolved? Potential resolutions:
- Used Python “multiprocessing” or “threading” libraries to run the loops concurrently.
- Optimized loop timing so that the sensor checks often enough without interfering with the LED sequence.
- Ensured proper synchronization between loops (e.g., shared variables, flags).
- How do we know that the light detector is capable of detecting the wavelengths of all of our LEDs? Was there a scenario where you were able to trigger the sensor with the UV light? The IR light? Potential answers:
- Verification:
- Measured light intensity readings for each LED to ensure the sensor responds.
- Conducted tests by shining each LED individually and checking if the sensor output (“Receiving”) triggers.
- UV / IR scenarios:
- Sometimes UV or IR LEDs might not trigger if the sensor is not sensitive to that wavelength.
- Resolution might involve changing the sensor or adjusting placement/distance.
- Observation: Visible light usually triggers easily; IR and UV may require careful calibration or stronger LEDs.
- What possible complications do you predict would present themselves as we translate our device from lights and detectors in close proximity to those spread across the solar system? Potential answers:
- Distance / intensity: Light signals become weaker over astronomical distances; the sensor might not detect them.
- Time delay: Communication could take minutes or hours due to the speed of light limitations.
- Alignment: LEDs and detectors must be precisely aligned, which is harder over vast distances.
- Interference: Cosmic rays, solar radiation, or other light sources could interfere with detection.
- Signal attenuation: Dust, atmosphere, or other objects could reduce signal strength.
- Technical solution ideas:
- Use more sensitive detectors.
- Implement signal amplification or repetition.
- Encode information in pulses or modulation patterns to improve reliability.
Rubric-Based Assessment: Evaluate teamwork, engineering design process, problem-solving, and technical accuracy using the Coding Rubric.
Safety Issues
- Use low-voltage circuits (3–5V) to prevent electric shock; do not plug devices directly into wall sockets.
- Do not look directly into bright or UV LEDs; avoid pointing IR LEDs at eyes.
- Allow resistors and LEDs to cool before touching, as they may get warm.
- Be careful when inserting components into breadboards to avoid pinching fingers or bending wires sharply.
- Avoid solder fumes; stick to breadboards unless soldering is supervised.
- Handle microcontrollers and sensors carefully to prevent short circuits or device damage.
Troubleshooting Tips

Activity Extensions
- Have students encode a short message using blinking LEDs and decode it with their sensor.
- Move LEDs farther apart or place barriers to simulate real-world signal interference.
- Increase the number of LEDs to 4–5 and challenge students to detect only one while ignoring the rest.
- Use different sensors, microcontrollers, or platforms (Raspberry Pi, Arduino, LEGO Spike, etc.).
- If you have an IR camera available, an exciting demonstration and extension is to show students what their active device looks like under an IR camera instead of with the naked eye. Per the discussion above around complications of detecting light across the solar system, certain materials, such as plexiglass, block IR light.
- If student groups finish their device quickly, consider having them switch their light detector with an IR diode sensor. These simple devices cost under a dollar and can be used to selectively identify IR light instead of visible light.
Activity Scaling
Shorter activity or for less experienced students
- Focus only on programming a single LED and detecting one wavelength.
- Skip concurrent loops and instead have students write a simple detection script.
- Use pre-assembled hardware kits to save time.
Advanced / Extended Activity (2–3 hours):
- Have students run LED sequences concurrently using multiprocessing or threading.
- Require calibration of thresholds for all LEDs.
- Include digital display, speaker output, and optional data logging.
Subscribe
Get the inside scoop on all things Teach Engineering such as new site features, curriculum updates, video releases, and more by signing up for our newsletter!Copyright
© 2026 by Regents of the University of Colorado; original © 2025 Jet Propulsion LaboratorySupporting Program
NASA Jet Propulsion Laboratory (JPL)Acknowledgements
Modified from NASA - JPL Activity https://www.jpl.nasa.gov/edu/resources/lesson-plan/build-a-light-detector-inspired-by-space-communications
Last modified: May 2, 2026
User Comments & Tips