With this project you always know when you can observe the International Space Station in the sky: An OLED display shows you the time and duration of the next pass, and as soon as the ISS rises above the horizon, an LED signals that it's time to go out.
The ISS orbits the Earth every 90 minutes - not always directly above your head, but you still have several opportunities every day to observe its overflight. The best time to do this is early in the morning or late in the evening at dusk. Here the ISS is illuminated by the sun and the sky is still/already dark enough to be seen with the naked eye.
How the ISS Tracker worksThe main building block for this project is the API of open-notify.org - a free service that calculates when the ISS will be visible in the sky at your location. For this you need your coordinates and optionally the altitude of your location above sea level.
You will request the next flight times of the ISS from the API and build a timer with it. The OLED display will show the next observation time. As soon as the ISS rises above the horizon, an animated space station will appear on your display for the duration of the flight and an LED will light up.
When the ISS has disappeared again, the LED turns off and the display shows you the next pass.
The design of the projectIt only takes a few minutes to set up your ISS tracker. First connect your OLED display: GND to ground and VCC to plus. Then take care of the communication via I2C. Connect the display pin SCK to D1 on your ESP8266 and pin SDA to pin D2.
Connect the anode of the LED to pin D6 and the cathode to pin D5. From here, connect it to ground using a suitable resistor (e.g. 330 Ohm).
Installing your ESP8266 and including the librariesIf you have not yet installed your ESP8266 in the Arduno IDE, read this tutorial first.
To install the required libraries open the IDE and click to the "Sketch" menu and then Include Library > Manage Libraries.
Important adjustments in the sketchIn order to run the sketch you have to personalize it:
Wifi credentials
Enter your own Wifi credentials (SSID & password).
const char* ssid = "YOUR SSID";
const char* password = "YOUR WIFI PASSWORD";
The coordinates of your location
To calculate when the ISS will appear above your head or at least be visible at your location, you need its coordinates. If you do not know your coordinates, you can find them on latlong.net.
Besides latitude and longitude, the height above sea level also plays a role in the calculation. The higher you are, the earlier and longer you can observe ISS during its overflight. However, this setting is optional - if you do not specify an altitude yourself, the API simply calculates with 100 meters.
const float latitude = 00.00;
const float longitude = 00.00;
const float myAltitude = 100.00;
You'll find the constants for your Wifi credentials and coordinates at the beginning of the sketch.
Time zone
All dates are retrieved and calculated in Coordinated Universal Time (UTC). In line 148 of the sketch you can enter your deviation from UTC. In this example +7200 seconds (2 hours) is the deviation for Central European Summer Time. This is important to show the right time on the display.
DateTime time = riseTime + 7200;
Have fun! We appreciate your feedback. :)
Comments