JPL
Careers
Education
Science & Technology
JPL LogoJPL Logo
Education
NASA OSTEM
JPL LogoJPL Logo
Education
Coding a Radio Message for Space

Lesson .

.

Coding a Radio Message for Space

Jet Propulsion Laboratory https://www.jpl.nasa.gov/ Last Updated: Sept. 25, 2025
Subject
Technology
Grade Levels
6-12
Time Required
30 - 60 mins
Standards .
Science Standards (NGSS)
.

Make observations to provide evidence that energy can be transferred from place to place by sound, light, heat, and electric currents.

Develop and use a model to describe that waves are reflected, absorbed, or transmitted through various materials.

Evaluate the claims, evidence, and reasoning behind the idea that electromagnetic radiation can be described either by a wave model or a particle model, and that for some situations one model is more useful than the other.

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.

Evaluate questions about the advantages of using a digital transmission and storage of information.

Your browser cannot play the provided video file(s).

Overview

In this activity, students use their knowledge of coding to create a system that can send and receive radio signals. Students then encode a message into the signal that can be decoded by other students.

Materials

  • Programmable microcontroller (e.g., Micro:Bit or Arduino)
  • Radio transmitter and receiver for microcontroller
  • Input device (e.g., button or switch)
  • Output device (e.g., LEDs or a speaker)
  • Thin materials to test signal blocking capabilities (e.g., paper, plastic, cloth, aluminum foil, etc.)

Management

  • Depending on student abilities, students can code in a text-based language, such as Python or JavaScript, or a visual-based language, such as MakeCode, Blockly, or Scratch.
  • Some devices, such as Micro:bits, have built-in radio receivers, transmitters, LEDs, etc.. Other devices will need to have them attached and will require additional coding to function.
  • When working with a limited number of devices, check to see if the microcontroller you are using has an online emulator that students can use to test their code before loading it to the device(s).
  • Depending on availability of devices, consider splitting students into groups that write code for receiving devices or transmitting devices exclusively.
  • Students should run and debug their code throughout the programming process rather than waiting to test everything at the end.

Background

NASA has been sending robotic spacecraft into the solar system for more than five decades. These mechanical explorers have ventured out to study every planet in the solar system and more, serving as our eyes and ears on their journeys to these far-off worlds by sending wondrous images and fascinating information back to Earth.

Your browser cannot play the provided video file(s).

The Deep Space Network is made up of three complexes of antennas located approximately 120 degrees apart so we never lose touch with spacecraft even as Earth rotates. Image credit: NASA/JPL-Caltech

But none of these missions of discovery would have been possible without NASA’s Deep Space Network, or DSN – a worldwide system of sensitive antennas that communicates with interplanetary spacecraft. The Deep Space Network is made up of complexes of antennas at three locations around the globe: one complex in Goldstone, California (in the Mojave Desert), one near Canberra, Australia, and one near Madrid, Spain. This arrangement allows for any one station to have a line of sight with a spacecraft as Earth rotates. When a spacecraft “sets” below the horizon (like the Sun does at the end of each day) as viewed from one antenna station, another antenna station can track the spacecraft as it rises above the horizon at that location. This repeats as Earth rotates and the spacecraft moves out of view of the second station and into view of the third, and so on.

Watch this video to find out how NASA uses giant antennas stationed around Earth to navigate faraway spacecraft. | Video Transcript

Signals sent between the Deep Space Network and spacecraft travel millions, even billions, of kilometers, yet these signals are transmitted at very low power, usually at about the same wattage as a refrigerator light bulb (20 watts). As the signal travels to Earth, it weakens. Signals arriving at DSN antennas on Earth can be as weak as a billionth of a billionth of a watt. That is 20 billion times less than the power required for a digital wristwatch.

A 34-meter antenna at the Goldstone Deep Space Communications Complex in Goldstone, California. Credit: NASA/JPL-Caltech

A 34-meter antenna at the Goldstone Deep Space Communications Complex in Goldstone, California. Image credit: NASA/JPL-Caltech

Credit: NASA/JPL-Caltech

To hear the low-power spacecraft signal, receiving antennas on Earth must be very large, with extremely sensitive receivers. The signal from the spacecraft travels in a straight line, and it can be focused by a curved reflector dish (parabolic antenna). For this reason, it’s crucial to have large antenna dishes with precisely shaped surfaces. The Deep Space Network’s parabolic dishes, which range from 26 to 70 meters (85 to 230 feet) in diameter, are focusing mechanisms that concentrate power when receiving data and also when transmitting commands. The antennas must point very accurately toward the spacecraft because an antenna can “see” only a tiny portion of the sky – as though it's looking at the sky through a soda straw.

NASA experts talk about the system of antennas that make up the Deep Space Network and how it's used to communicate with distant spacecraft and collect science. | Watch on YouTube

To hear the spacecraft’s faint signal, the antennas are equipped with amplifiers, but that presents two challenges. First, the signal becomes degraded by background radio noise (static) emitted naturally by nearly all objects in the universe, including the Sun and Earth. The background noise gets amplified along with the signal. Second, the powerful electronic equipment amplifying the signal adds noise of its own. The Deep Space Network uses highly sophisticated technology and techniques, including cooling the amplifiers to a few degrees above absolute zero and employing special coding techniques so the receiving system can distinguish the signal from the unwanted noise.

A giant antenna dish is shown in a desert landscape as the sun is setting.

This artist's concept shows what a new antenna dish capable of supporting both radio wave and laser communications, will look like when completed at the Deep Space Network's complex in Goldstone, California. Image credit: NASA/JPL-Caltech

Credit: NASA/JPL-Caltech

The long wavelengths of radio waves mean that signals can better resist distortion, but radio waves are not very efficient when it comes to transmitting a lot of information in a short amount of time. 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.

This new form of spacecraft communication, called Deep Space Optical Communications, will use a focused beam of infrared light to transmit information. Switching from the longer wavelengths of radio to the shorter wavelengths of infrared light could result in 100 times more data being transmitted.

Learn more about the Deep Space Network and see which spacecraft we are communicating with at this very moment on the DSN Now interactive.

Procedures

  1. Ask students how humans communicate with spacecraft. If necessary, share with students that radio signals are used to send commands to and receive information from spacecraft, such as photos and measurements.

  2. Tell students their challenge is to program a microcontroller to send a signal, receive a signal, or both, and include code that instructs an output device, such as an LED or speaker, to indicate that a signal has been sent or received.

  3. Sending a signal: Students will code their device to send a radio signal on command. This should be a signal triggered by an input rather than a constant radio signal. Students should consider:

    • What will be sent? A single digit? A string of characters? Something else?
    • What type of input will trigger the sending of the signal?
    • How will the device confirm the signal has been sent?
    • Can the output power level be adjusted?
    • How far can the signal travel?
    • How can a receiving device identify the source of this signal?
    This iframe displays a code snippet from GitHub Gist.

    Example send-signal script in JavaScript.

    View on GitHub
    This iframe displays a code snippet from GitHub Gist.

    Example send-signal script in Python.

    View on GitHub
  4. Receiving a signal: Students will develop code that will allow a device to receive a radio signal from another device. The device should indicate, in some way, that a signal has been received. Students should consider:

    • How will the device display the received signal? Characters on an LED grid? Blinking lights or a buzzing sound in Morse code? Something else?
    • How will the device distinguish the signal from one transmitter over another?
    • How far from the transmitting device can the receiving device be and still receive a signal?
    • Can the device send a return signal to the transmitting device?
    This iframe displays a code snippet from GitHub Gist.

    Example receive-signal script in JavaScript.

    View on GitHub
    This iframe displays a code snippet from GitHub Gist.

    Example receive-signal script in Python.

    View on GitHub
  5. If students are working in groups to write code for receiving or transmitting devices exclusively, be sure they work together to ensure their devices can communicate with each other.

  6. Testing devices: Students should test and debug their code throughout the development process. When students have a working version of the code for sending and receiving signals, they should practice sending signals between their devices to make sure their code works “in the real world” and is not affected by other devices. Students should also test what materials block or reflect signals and what materials allow signals to pass through.

Discussion

  • What do spacecraft operators need to consider when planning communications between Earth and spacecraft? Other spacecraft communicating with Earth, confirmation that signals have been sent and received, lost signals
  • What do spacecraft designers have to consider when building spacecraft? Signal frequency, signal strength, distance from Earth

Assessment

  • Students can explain what their code is supposed to do.
  • Devices send and/or receive signals as designed.

Extensions

Educator Guides & Resources

educators.

Lesson Collection: Deep Space Network

Explore a collection of standards-aligned educator guides to get students engaged in STEM while learning about the Deep Space Network.

educators.

Teaching Space: Engineering the Deep Space Network

In this one-hour education webinar, NASA experts discuss how we communicate with spacecraft using the Deep Space Network, a system of massive antennas stationed around the world.

educators.

Teaching Space: La Red del Espacio Profundo de NASA

Un bosquejo de su importancia para la exploración del universo; un esfuerzo en busca de descubrimientos beneficiosos para la humanidad.

Student Activities

students.

Mars in a Minute: Phoning Home – Communicating from Mars

How did we know that the Curiosity Mars rover landed safely on the surface of Mars?

students.

Building With Spaghetti

Use spaghetti to build a tower modeled after the giant structures NASA uses to talk to spacecraft.

students.

The NASA Pi Day Challenge

Can you use π (pi) to solve these stellar math problems faced by NASA scientists and engineers?

students.

Mars in a Minute: What Happens When the Sun Blocks Our Signal?

What is "solar conjunction," and how does it affect communications with our spacecraft at Mars? Learn more in this 60-second video.

students.

Bouncing Radio Waves Off Titan's Lakes

How does a spacecraft study the mysterious lake on Saturn's moon Titan without ever touching down on the surface?

Explore More

  • Facts & Figures: About the DSN
  • Interactive: DSN Now
  • Downloads: DSN Posters
  • Multimedia: NASA Deep Space Network: Celebrating 50 Years of Communication and Discovery
K-12 Resources
Education Resources
Lesson Plans
Student Projects
Teachable Moments
Collections
Internships
JPL Internships
Explore Programs & Apply
Internships FAQ
News & Events
All Education News
All Education Events
About
JPL Education
K-12 Education
Higher Education
Informal Education
NASA OSTEM
Get the Latest from JPL
Follow JPL Education
More from JPL
About JPL
JPL News
Missions
Images
Virtual Tour
Careers
About JPL
JPL News
Missions
Images
Virtual Tour
Careers
Related NASA Education Sites
Space Place
Climate Kids
Kids' Club
Space Math
Universe of Learning
STEMonstrations
Basics of Spaceflight
NASA’s Eyes Interactives
NASA
Caltech
Privacy
Image Policy
FAQ
Feedback
Version: v3.1.0 - 409b2d2
Site Managers:David Seidel, Ota Lutz
Site Editor:Kim Orr