ISS Tracking Lamp

28,021

351

103

Introduction: ISS Tracking Lamp

About: Mechanical Engineer / Handmaker machine (often arduino based). I love science, space, physics and lasers! Hope you will enjoy my projects

Most of the time, i'm wondering where is the ISS looking up the sky. To answer this question, i've made a physical object to know exactly where is the ISS in real time.

The ISS Tracking Lamp is a Internet connected lamp which constantly tracks the ISS and displays it location on Earth’s surface (printed in 3D).

Bonus: the lamp also displays the sunny side of Earth with Neopixels!🌎🛰

So, in this Instructables, we are going to see the differents steps to build this lamp based on WEMOS D1 Mini, stepper motor, servo motor, laser and 3D parts.

I build all by myself, except for the 3D printed Earth, which was purchased on Aliexpress.

Software :

CAD & Parts :

  • 3D Printed Earth of 18cm diameter (purchased on Aliexpress : here )
  • 3D printed motor supports - designed with Fusion 360 and printed with Prusa i3 MK2S
  • Copper tube
  • Concrete base, made with The French Vikings

Hardware :

  • Microcontroller : Wemos D1 Mini (wifi antenna integrated)
  • Servo EMAX ES3352 MG
  • Stepper Motor 28byj-48 (with the ULN2003 driver board)
  • 10 NeoPixels LED
  • Laser of 405 nm wavelength
  • Limit Switch
  • 5V 3A Power Supply

Step 1: Modeling Parts in Fusion 360 and Printing

To mount all the hardware, we are going to create the core assembly base on 3D parts. The parts are available on Thingiverse here.

There are 3 parts :

1) The Support Stepper Longitude

This part is made for mounting the stepper motor, the WEMOS, the Neopixels strip and the copper tube

2) The Support Switch

This part is made for mounting the limit switch (use to indicate to the stepper the latitude -0°/-180°). It's screwed on the top of the stepper

3) The Support Servo Latitude

This part is made for mounting the servo motor. The Support Servo is mounted on the stepper motor

All the parts were printed on Prusa I3 MK2S, with black PETG filament

Step 2: Wiring and Assembling

This circuit will have a 5V 3A power input (in order to use the same supply for the stepper driver, the laser, the Neopixels and the WEMOS)

By the following Sketch, we need to solder the power supply directly to the elements above in parallel:

  • Stepper Driver
  • Laser
  • Neopixels strip (NB : there are 10 Neopixels in reality, not 8 as the sketch shows)
  • WEMOS

Next, we need to connect the different elements to the WEMOS :

1) The stepper driver following this list:

  • IN1->D5
  • IN2->D6
  • IN3->D7
  • IN4->D8

2) The servo motor following :

  • Data Servo Pin -> D1

3) The Neopixels strip following :

  • Data Neopixels Pin -> D2

4) The limit switch following :

The two pins of the switch to the GND and D3

Connect the limit switch in a manner that the circuit is opened/broke when we push on the switch (so the circuit is closed when nothing push on it). This is to avoid any wrong lecture due to a voltage peak.

Step 3: Arduino Code - Getting the ISS Position in Real Time

To drive the two motors to reach the position of the ISS, we need to get the position of the ISS in real time :

  • For that first we will use the API from Open Notify Here
  • Then, we need to parse the data to get simple value of the ISS location with the help of Parsing data : ArduinoJson Library (by Benoit Blanchon)
#include <ESP8266WiFi.h
#include <ESP8266HTTPClient.h
#include <ArduinoJson.h

// WiFi Parameters
const char* ssid = "XXXXX"; 
const char* password = "XXXXX";
void setup() {
Serial.begin(115200);
WiFi.begin(ssid,password);
while (WiFi.status()!= WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting...");
    }
}

This program connects the NodeMCU to the WiFi, then connects to the API, get the data and print it to by serial.

void loop() {

if (WiFi.status() == WL_CONNECTED) // Check WiFi Status
	{HTTPClient http;  //Object of class HTTPClient
	http.begin("http://api.open-notify.org/iss-now.json");
	int httpCode = http.GET();   //Check the returning code

if (httpCode >0) { // Parsing
		const size_t bufferSize = JSON_OBJECT_SIZE(2) + JSON_OBJECT_SIZE(3) + 100;
		DynamicJsonBuffer jsonBuffer(bufferSize);
		JsonObject& root = jsonBuffer.parseObject(http.getString());		// Parameters
		const char* message = root["message"];
		const char* lon = root["iss_position"]["longitude"];
		const char* lat = root["iss_position"]["latitude"];		// Output to serial monitor

Serial.print("Message:");
		Serial.println(message);
		Serial.print("Longitude: ");
		Serial.println(lon);
		Serial.print("Latitude: ");
		Serial.println(lat);
	}
	http.end();   //Close connection
}
delay(50000);
}

Step 4: Final Arduino Code

The following Arduino code get the ISS location to move the laser to the right place on the Earth's surface, and the getting the position of the sun to light up the concerned Neopixels to light up the surface of the Earth touch by the sun.

Bonus 1 : When the lamp is switched on, during the phase of initialization, the laser will point the position of the lamp (id : the position where the router is)

Bonus 2 : When the ISS is next to the lamp location (+/- 2° long. and +/-2° lat.), all the Neopixels will gently wink

Step 5: Enjoy Your ISS Tracker

You have made a ISS Tracking Lamp, enjoy!

First Time Author Contest

First Prize in the
First Time Author Contest

Be the First to Share

    Recommendations

    • Battery Powered Contest

      Battery Powered Contest
    • Plywood Challenge

      Plywood Challenge
    • Plastic Contest

      Plastic Contest

    103 Discussions

    0
    eddinet2012
    eddinet2012

    10 months ago

    Hello Antoine,
    A great Project did you make - very cool!
    i made a small PCB with the same dimension of an Wemos with all the components on one PCB.
    It is better for wireing the components.

    best regards to all!

    20200115_044149.jpg20200115_044224.jpg
    0
    chipK
    chipK

    Reply 7 days ago

    could you publish or send me your work? I am struggling with the build, and your design would be great. What can I do for you?

    0
    antoine.seveau
    antoine.seveau

    Reply 10 months ago

    Wow, that's better and more elegant :)

    0
    joristerpstra
    joristerpstra

    Question 5 months ago

    Hey, amazing project, may I know where you got that lazer from?

    0
    xxiss
    xxiss

    Question 5 months ago

    please link the parts listed to place to buy them

    0
    thecar009
    thecar009

    6 months ago

    Whats does this piece of Code do?

    //Positioning at -179°
    float x_pas_calibration = (motorSteps_360_degres * 1 * 1000 / 360);
    int x_pas_int_calibration = ceil(x_pas_calibration);
    stepper.step(x_pas_int_calibration);
    Position_Longitude_Laser = -179;
    delay(20000);
    }

    0
    antoine.seveau
    antoine.seveau

    Reply 6 months ago

    This piece of code positionned the motor at -179 after it drives back at -180.
    When the motor drives back, it starts from -179° (do a full turn) and stops at -180 (when hitting the switch button). But -180 is not correct because its -179° the real value of the ISS. So just moving the motor 1° back to be as precise i can be

    0
    thecar009
    thecar009

    Reply 6 months ago

    Thank you, for the explanation.

    0
    thecar009
    thecar009

    6 months ago

    Sry but i need some help.
    The cords get tangled up, because the stepper didnt drives back, when it reaches -179.
    Strangely this only happens from the second turn on. On the first turn, its working correct.

    0
    antoine.seveau
    antoine.seveau

    Reply 6 months ago

    I wish i knew the reason, but i dont know why. Did you try to understand whats the difference between the 1st and 2nd turn? Have you extracted the value of "Angle_Longitude" in serial print to see if Angle_Longitude = -179?
    Because the only condition to do a drive back its to Angle_Longitude = -179, if not, no drive back

    0
    thecar009
    thecar009

    Reply 6 months ago

    I have found the Problem.
    The D3 Pin changes correct from High to Low, if the Switch is pushed.
    But after this, when the Switch is no longer pushed, the D3 Pin stays Low.
    It has to be High again. At the moment i didnt know any solution.

    Adding digitalWrite(Switch_Buttee, HIGH); has no effect.

    void move_Longitude_Laser_Angle(int Angle_Longitude) {
    digitalWrite(Switch_Buttee, HIGH);

    Sry, this isnt the Problem.
    If have checked the "Angle_Longitude". It is correct -179.
    But on the second roud, the If Loop isnt correct processed.

    I try to explain what happen, when -179 is called on the second round.

    Line 1 Starting the If Loop with -179
    Line 4 is skipped
    Line 8, 9, 10 continued here
    Line 15 Leaving the If Loop

    Line:
    0 void move_Longitude_Laser_Angle(int Angle_Longitude) {
    1 if (Angle_Longitude == -179){ //If the ISS angle is equal to -179, returning to
    2 -179° by a calibration with the switch (the same in the setup)
    3
    4 stepper.step(-1500);
    5 for(int s=0; s<5000; s++){
    6 Etat_Buttee = digitalRead(Switch_Buttee);
    7 if (Etat_Buttee == LOW){
    8 Serial.println("Button pushed");
    9 Serial.println(Etat_Buttee);
    10 break;
    11 }
    12 stepper.step(-10);
    13 Serial.println("going to switch");
    14 }
    15 stepper.step(-motorSteps_Correction);
    16 Position_Longitude_Laser = -180;
    17 Serial.println("switch reached, Pos. = -180");

    0
    ur-hen
    ur-hen

    11 months ago

    Didnt the cords get tangled up, when the laser is spinning around all day?

    0
    antoine.seveau
    antoine.seveau

    Reply 11 months ago

    Hello, when the ISS longitude is +180°, the stepper motor do a reverse 360° move to the start position (-180°). In that way, the cords is not tangled up ;)

    0
    thecar009
    thecar009

    Reply 7 months ago

    Can you please show me the Part of your Code who did this?
    I think this Part is missing!

    0
    antoine.seveau
    antoine.seveau

    Reply 7 months ago

    void move_Longitude_Laser_Angle(int Angle_Longitude) {
    // IDEE FEATURE : Idee avec les neopixel, récupérer la donnée de localisation où se trouve la lampe, et si l'ISS et dans un rayons de 50km? les neopixels s'anime pour indiquer que l'on peut voir l'ISS dans le ciel
    if (Angle_Longitude == -179){ // If the ISS angle is equal to -179, returning to -179° by a calibration with the switch (the same in the setup)
    stepper.step(-50); // Moving -100 (nearly -10°) steps in first place, if the laser module is after the switch
    for(int s=0; s<5000; s++){
    Etat_Buttee = digitalRead(Switch_Buttee);
    if (Etat_Buttee == LOW){
    break;
    }
    stepper.step(-10);
    }
    stepper.step(-motorSteps_Correction);
    Position_Longitude_Laser = -180;
    //Positioning at -179°
    float x_pas_calibration = (motorSteps_360_degres * 1 * 1000 / 360);
    int x_pas_int_calibration = ceil(x_pas_calibration);
    stepper.step(x_pas_int_calibration);
    Position_Longitude_Laser = -179;
    delay(20000);
    }

    0
    thecar009
    thecar009

    Reply 6 months ago

    Ok thank you. Im asking because this runs only once. On the second round, the stepper didnt drives back. I seems this code didnt get called on the second round.
    And
    stepper.step(-50); // Moving -100 (nearly -10°) steps in first place, if the laser module is after the switch
    is not enough to get back over the switch. I increased it to 2000.
    This works on the first round but not on the second.
    Can you see why?

    0
    kjell-arne.gjerde
    kjell-arne.gjerde

    7 months ago

    Hi, excellent project.
    I have made the thing and it works without modification. I only used a different globe: https://www.thingiverse.com/thing:4046428 and added a 3d printed stand.
    Only problem I see is that sometimes the vertical servo takes a dip, but corrects itself after a while. I have not investigated why, but it would be good if someone correct this and post an updated code.

    IMG_6357.JPGIMG_6360.JPG
    0
    antoine.seveau
    antoine.seveau

    Reply 7 months ago

    oh wow! So happy to see a second Iss tracker Lamp build! Congrats, looks gorgeous

    0
    peter.nemet
    peter.nemet

    7 months ago

    Hello! Does it work with Raspberry pi? Thanks in advance

    0
    antoine.seveau
    antoine.seveau

    Reply 7 months ago

    Hello, i don't use Raspberry Pi, so I can't tell. But if you can control Stepper Motor, and servo motor, you can adapt the code for this µC