Lesson .
.Coding a Radio Message for Space
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.
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.
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.
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.
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.
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
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.
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.
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?
- 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?
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?
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?
- 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?
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?
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.
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
Explore More
Educator Guides & Resources
Student Activities
Explore More
Lesson Last Updated: Oct. 11, 2024