ESP32 Projects
Start a build
Markdown

ESP Satellite Tracking for ESP32

An ESP32 display project involving E-paper display, SD card.

ESP32ArduinoUnrated
Parts and source

Before you start

Check the exact E-paper display, SD card configuration against the upstream wiring or parts list.

Upstream README

ESP satellite tracking

Using a ESP8266/ESP32 to fetch the satellite pass info from n2yo website using API and display the parameters on the E-Paper display.

Images

fetching logo | passes

Hardware used

  1. ESP32 Dev Board.
  2. 1.54 inch B/W E-paper display from waveshare.

Steps for getting n2yo API KEY

  1. Register on n2yo.com
  2. Grab your API key
  3. API Documentation can be found here

Software required

  1. Download and install Arduino IDE.
  2. Arduino core for ESP8266 or ESP32 depending on which microcontroller you are using. Installation guide for ESP8266 and ESP32.

Required libraries

  1. GxEPD2 library for driving 1.54 inch B/W E-Paper Display.
  2. ArduinoJSON library for parsing JSON data.
  3. Adafruit RTCLib to convert EPOCH time to Local Time.
  4. Adafruit GFX library for fonts and graphics.

Note : All the above libraries can be installed from Arduino library manager.

Code Tweaks

1. Board

The code was written for ESP32, If you are using ESP8266 then replace the following lines

#include<WiFi.h>
GxEPD2_BW<GxEPD2_154, GxEPD2_154::HEIGHT> display(GxEPD2_154(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4));

with

#include<ESP8266WiFi.h>
GxEPD2_BW<GxEPD2_154, GxEPD2_154::HEIGHT> display(GxEPD2_154(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4));

I'm using a B/W 1.54 inch E-paper display. if you are using other display's make sure to change the above line with your display supported constructor from the examples found in GxEPD2 library.

Variables

Replace the NORAD ID of the satellite that you want to track. list can be found here

#define Satellite_ID 27607 // SO-50

Enter your GPS co-ordinates and altitude

float Observer_Lat = 17.7227;
float Observer_Lon = 79.1518;
#define Altitude 0

Number of days pass prediction data you want to fetch from n2yo

#define Days 1

Enter your API key and WiFi information here

String API_KEY = "PASTE N2YO API KEY HERE";
String IFTTT_API_KEY = "PASTE IFTTT WEBHOOKS API KEY HERE";
String IFTTT_EVENT_NAME = "PASTE IFTTT WEBHOOKS TRIGGER NAME HERE";
#define SSID "YOUR WIFI NAME/SSID"
#define Password "YOUR WIFI PASSWORD"

If you want to track multiple satellites then put the NORAD ID's of satellites in below array

const int satellites_count = 5; // count should be matched with below list


String satellites_list[satellites_count] = {
  "44829", //ISS
  "27607", //SO 50
  "43017", //AO 91
  "24278", //FO 29
  "40967", //AO 85
};

Make below variable to true to enable single satellite tracking and false to track multiple satellites i.e satellites list

boolean single_satellite = false;

Credits

This code uses Open Source components. I am thankful to these developers for their contributions to open source. Kudos to each and every dev.

To-Do

  1. Store the passes for next 'x' days in the SD Card. So we no longer need to connect to wifi all the time.
  2. Servos to adjust antenna Azimuth and Elevation. Additional microcontroller may be needed so this will be a seperate unit.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT License