ISS Tracking Lamp

29,974

368

110

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

    • Unusual Uses Contest

      Unusual Uses Contest
    • Tiny Things Speed Challenge

      Tiny Things Speed Challenge
    • Made with Math Contest

      Made with Math Contest

    110 Comments

    0
    eddinet2012
    eddinet2012

    1 year 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 12 months 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
    eddinet2012
    eddinet2012

    Reply 11 months ago

    Hi,
    you can get a PCB or the whole PCB with Components !

    Where did you came from?

    Br
    Robert

    0
    chipK
    chipK

    Reply 11 months ago

    my replies seem to be disappearing.
    I would like the obtain the bare board without componets; how can I do that? do you have an email?

    0
    chipK
    chipK

    Reply 11 months ago

    USA here. Where can I get the PCB?

    0
    eddinet2012
    eddinet2012

    Reply 11 months ago

    Hi,

    i
    I can send the working PCB without firmware and you can flash it yourself!

    or i send you the PCB with the components or without the components.

    br
    Robert

    0
    chipK
    chipK

    Reply 11 months ago

    my email address is ckigar@hexnut.us
    please provide pricing and details

    0
    chipK
    chipK

    Reply 11 months ago

    I would prefer the PCB without the components. I have already acquired all of them (the arduino, controller, etc.) Wiring them all up is messier that I'd like so I would like to use the PCB.
    What can I do for you? Paypal? How can we do this?
    My email is ckigar@hexnut.us
    Let's move this discussion to email.

    0
    antoine.seveau
    antoine.seveau

    Reply 1 year ago

    Wow, that's better and more elegant :)

    0
    joristerpstra
    joristerpstra

    Question 1 year ago

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

    0
    xxiss
    xxiss

    Question 1 year ago

    please link the parts listed to place to buy them

    0
    thecar009
    thecar009

    1 year 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 1 year 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 1 year ago

    Thank you, for the explanation.

    0
    thecar009
    thecar009

    1 year 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 1 year 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 1 year 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

    1 year ago

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

    0
    antoine.seveau
    antoine.seveau

    Reply 1 year 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 ;)