AstroForge: Build a Mini Satellite That Recycles Space Junk!
Meet Forge — a miniature Arduino Mega satellite that detects floating debris, grabs it with a robotic claw, figures out what it's made of, sorts it into the right bin, "recycles" it into a brand-new panel, and installs that panel onto another satellite — completely on its own.
♻️ Say hi to Forge, your space recycling satellite!
What Is a Space Debris Recycling Satellite, Anyway?
Real space agencies worry a lot about space junk — old rocket parts and broken satellite pieces zooming around Earth. AstroForge imagines a clever solution: a satellite that doesn't just collect debris, but figures out what it's made of, sorts it, and turns it into brand-new spacecraft parts. Forge brings this whole idea to life on a desktop scale using an Arduino Mega to run six connected systems at once.
What You'll Need
This is a big build with six connected systems, so gather everything before you start!
Arduino Mega 2560
Needed for its extra pins and multiple hardware serial ports.
Ultrasonic Sensor (HC-SR04)
Detects floating debris approaching the satellite.
SG90 Servos (Capture Claw)
Reach out and grip a piece of debris.
TCS3200 Color Sensor
Visually checks each debris piece's color.
RC522 RFID Reader + Tags
Each debris piece carries a tag identifying its material.
SG90 Servo (Sorting Chute)
Directs debris into the correct recycling bin.
SG90 Servo (Panel Dispenser)
Releases a "recycled" panel once enough material is collected.
SG90 Servos (Installer Arm)
Picks up the new panel and installs it on a second mini satellite.
0.96" I2C OLED Display
Shows live status through every stage.
NeoPixel Ring or Strip
Glows different colors for each material and stage.
HC-05 Bluetooth Module
Sends live counts and status to a phone.
Small Buzzer
Beeps for captures, sorts, and completed panels.
Mini Satellite Models (x2)
One acts as AstroForge, one as the satellite receiving the new part.
Jumper Wires + Breadboard
Connects every sensor, servo, and module.
The Circuit Diagram
Six servos, a color sensor, an RFID reader, an ultrasonic sensor, NeoPixels, an OLED, and Bluetooth — all coordinated by one Arduino Mega.
Step-by-Step Build Instructions
We'll build each of AstroForge's six systems one at a time, then bring them together. Work with an adult on wiring and RFID tagging!
Build the AstroForge body and mount the ultrasonic sensor
Assemble a small satellite-shaped body to hold the Arduino Mega, with the ultrasonic sensor facing outward to detect approaching debris.
Build the capture claw
Mount the shoulder servo so it can swing out toward detected debris, with the gripper servo and a small pincer at the end to grab it.
💡 Tip: Make your "debris" pieces from lightweight craft foam so the claw can grip them easily.Set up material identification
Mount the TCS3200 color sensor near the claw, and stick an RFID tag to each debris piece — one tag ID per material type (like aluminum, steel, or composite).
Build the sorting chute and recycling bins
Mount the sorting servo with a small chute that can tilt toward one of three labeled bins, matching each material type.
Build the recycling chamber and panel dispenser
Create a small "chamber" box where sorted debris collects. Once a bin reaches its target count, the dispenser servo releases a pre-made panel piece, representing the recycled result.
Build the installer arm and second satellite
Mount the two installer arm servos so they can pick up the new panel from the dispenser and attach it (with a magnet or snap-fit) onto a second mini satellite model.
Add the OLED, NeoPixels, buzzer, and Bluetooth
Mount the OLED for live status text, the NeoPixel ring for colorful status glows, the buzzer for sound alerts, and the HC-05 for sending data to your phone.
Wire everything and test
Double-check every connection against the circuit diagram, upload the code, place a tagged debris piece near the sensor, and watch AstroForge run its full mission!
The Arduino Code
This code needs the Servo, MFRC522, Adafruit_NeoPixel, Wire, and Adafruit_SSD1306 libraries. Copy it in, add your own RFID tag IDs, then click Upload (select "Arduino Mega 2560" as your board).
// 🛰️♻️🤖 AstroForge — Arduino Mega Space Debris Recycling Satellite Project // Detects, captures, sorts, recycles, and installs debris as a new panel #include <Servo.h> #include <SPI.h> #include <MFRC522.h> #include <Adafruit_NeoPixel.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> // ---- Ultrasonic debris detector ---- const int trigPin = 22, echoPin = 23; const int detectRangeCM = 15; // ---- Capture claw ---- Servo clawShoulder, clawGripper; // ---- Color sensor ---- const int s0 = 24, s1 = 25, s2 = 26, s3 = 27, colorOut = 28; // ---- RFID material tags ---- #define RFID_SS 53 #define RFID_RST 49 MFRC522 rfid(RFID_SS, RFID_RST); // ---- Sorting + dispensing ---- Servo sortChute, dispenser; const int binAluminum = 30, binSteel = 90, binComposite = 150; // ---- Installer arm ---- Servo installShoulder, installGripper; // ---- NeoPixel + buzzer ---- #define NEOPIXEL_PIN 10 #define NUM_PIXELS 12 Adafruit_NeoPixel pixels(NUM_PIXELS, NEOPIXEL_PIN, NEO_GRB + NEO_KHZ800); const int buzzerPin = 11; // ---- OLED ---- Adafruit_SSD1306 display(128, 64, &Wire, -1); // ---- Material counters ---- int aluminumCount = 0, steelCount = 0, compositeCount = 0; const int recycleThreshold = 3; void setup() { pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(s0, OUTPUT); pinMode(s1, OUTPUT); pinMode(s2, OUTPUT); pinMode(s3, OUTPUT); pinMode(colorOut, INPUT); pinMode(buzzerPin, OUTPUT); digitalWrite(s0, HIGH); digitalWrite(s1, LOW); clawShoulder.attach(3); clawGripper.attach(5); sortChute.attach(6); dispenser.attach(7); installShoulder.attach(8); installGripper.attach(9); clawShoulder.write(0); clawGripper.write(0); sortChute.write(90); dispenser.write(0); installShoulder.write(0); installGripper.write(0); SPI.begin(); rfid.PCD_Init(); pixels.begin(); display.begin(SSD1306_SWITCHCAPVCC, 0x3C); Serial1.begin(9600); // Bluetooth (HC-05) on Mega's Serial1 showStatus("AstroForge Online"); } void loop() { long distance = readDistanceCM(); if (distance > 0 && distance < detectRangeCM) { showStatus("Debris Detected!"); captureDebris(); if (rfid.PICC_IsNewCardPresent() && rfid.PICC_ReadCardSerial()) { String material = identifyMaterial(); sortDebris(material); checkRecycling(material); rfid.PICC_HaltA(); } } sendTelemetry(); delay(200); } // Reaches out with the claw and grips the debris void captureDebris() { clawShoulder.write(90); delay(500); clawGripper.write(60); delay(400); clawShoulder.write(0); delay(500); tone(buzzerPin, 1200, 150); } // Looks up the material type from the debris piece's RFID tag String identifyMaterial() { byte id = rfid.uid.uidByte[0]; if (id == 0x11) return "Aluminum"; if (id == 0x22) return "Steel"; return "Composite"; } // Tilts the chute to the correct bin and releases the debris void sortDebris(String material) { showStatus("Sorting: " + material); if (material == "Aluminum") { sortChute.write(binAluminum); setPixels(0, 200, 255); } else if (material == "Steel") { sortChute.write(binSteel); setPixels(255, 180, 0); } else { sortChute.write(binComposite); setPixels(150, 80, 255); } delay(500); clawGripper.write(0); // release debris into the bin delay(400); } // Counts sorted material and triggers recycling once enough is collected void checkRecycling(String material) { if (material == "Aluminum") aluminumCount++; else if (material == "Steel") steelCount++; else compositeCount++; if (aluminumCount >= recycleThreshold || steelCount >= recycleThreshold || compositeCount >= recycleThreshold) { recycleAndInstall(); aluminumCount = 0; steelCount = 0; compositeCount = 0; } } // Forges a new panel, then installs it on the second satellite void recycleAndInstall() { showStatus("Recycling..."); rainbowChase(); dispenser.write(90); // release the new panel delay(500); dispenser.write(0); tone(buzzerPin, 1800, 300); showStatus("Installing Panel..."); installGripper.write(60); // pick up the new panel delay(400); installShoulder.write(90); // swing to the second satellite delay(500); installGripper.write(0); // attach the panel delay(400); installShoulder.write(0); // return to rest showStatus("Panel Installed!"); Serial1.println("New panel recycled and installed!"); } // Sets all NeoPixels to one color void setPixels(int r, int g, int b) { for (int i = 0; i < NUM_PIXELS; i++) pixels.setPixelColor(i, pixels.Color(r, g, b)); pixels.show(); } // A rainbow chase animation played during recycling void rainbowChase() { for (int j = 0; j < 2; j++) { for (int i = 0; i < NUM_PIXELS; i++) { pixels.clear(); pixels.setPixelColor(i, pixels.Color(255, 180, 0)); pixels.show(); delay(60); } } } // Sends live status to the phone over Bluetooth void sendTelemetry() { Serial1.print("Al:"); Serial1.print(aluminumCount); Serial1.print(" St:"); Serial1.print(steelCount); Serial1.print(" Co:"); Serial1.println(compositeCount); } // Measures distance using the ultrasonic sensor long readDistanceCM() { digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); long duration = pulseIn(echoPin, HIGH, 20000); return duration * 0.034 / 2; } // Updates the OLED with the current mission status void showStatus(String msg) { display.clearDisplay(); display.setTextSize(1); display.setTextColor(SSD1306_WHITE); display.setCursor(0, 25); display.println(msg); display.display(); }
How Does AstroForge Actually Work?
Here are the big robotics ideas hiding inside this project:
Identifying Material with RFID
Instead of trying to detect real metal electronically, each debris piece carries an RFID tag that simply tells AstroForge what it's "made of" — a clever simplification of a hard real-world sensing problem.
Counting Toward a Goal
checkRecycling() tracks how many of each material have been collected, and only triggers the recycling sequence once a threshold is reached — just like a real recycling plant waiting for a full batch.
NeoPixels for Instant Feedback
Each material gets its own glow color, and a special rainbow chase plays during recycling — giving anyone watching an instant, colorful sense of what stage AstroForge is in.
A Second Serial Port for Bluetooth
The Arduino Mega has extra hardware serial ports, so Serial1 can talk to the Bluetooth module while the normal Serial port stays free for debugging on your computer — something a regular Uno can't do as easily.
🧑🔬 Safety First!
- Build with an adult, especially when wiring the RFID reader, NeoPixels, and multiple servos.
- Use only lightweight craft materials for "debris" — this is a mechanical and educational demo, not a real space system.
- Keep fingers clear of the claw and installer arm while powered on.
- NeoPixels can be very bright at full brightness — consider lowering brightness in code, especially for younger builders.
- Never test this project near a real electrical hazard, water, or open flame.
Frequently Asked Questions
Why does this project need an Arduino Mega instead of an Uno?
With six servos, a color sensor, an RFID reader, NeoPixels, an OLED, and Bluetooth all running together, this project needs more pins and a second hardware serial port than an Uno provides — exactly what the Mega offers.
Do I really need real metal detection?
No — professional metal detection circuits are complex and not very beginner-friendly. Using RFID tags to represent each material is a common, effective simplification used in many educational robotics projects.
What if I don't have exactly three materials?
You can add more if conditions in identifyMaterial() and sortDebris(), plus more bin angles and NeoPixel colors, to support as many material types as you like.
What age group is this project good for?
Because it combines six coordinated systems on an Arduino Mega, this is an advanced project best suited for kids around age 12+ working closely with an adult, and makes a fantastic science fair centerpiece.

Comments
Post a Comment