Skip to content

Project to measure the quality of the night sky by analyzing light pollution and various environmental parameters

Notifications You must be signed in to change notification settings

Persie0/Sky-Quality-Meter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sky Quality Meter (SQM)

Overview

The Sky Quality Meter (SQM) project is designed to measure the quality of the night sky by analyzing light pollution and various environmental parameters. It consists of two main components:

  • Flask Backend: A Python-based server application that processes and visualizes the data collected from sensors.
  • ESP32 Firmware: A microcontroller-based software that reads sensor data and communicates with the server.

Documentation

English & German Documentation

Features

  • Measures light pollution and other environmental factors using multiple sensors.
  • Sends sensor data via Wi-Fi to a Flask-based server.
  • Displays real-time data on a web interface.
  • Stores measurement data in ASCII format for further analysis.
  • Can activate an additional seeing measurement device if conditions are suitable.
  • Uses power-saving techniques to extend operational life.

Getting Started

Prerequisites

  • Python 3.8+
  • ESP32 microcontroller
  • PlatformIO for firmware development
  • Required Python packages (Flask, requests, etc.)

Installation

Backend (Flask Server)

  1. Navigate to the flask-backend directory:
    cd flask-backend
  2. Create a virtual environment and activate it:
    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install dependencies:
    pip install -r requirements.txt
  4. Run the server:
    python app.py

ESP32 Firmware

  1. Install PlatformIO:
    pip install platformio
    or via the VS Code Extention
  2. Navigate to the firmware directory:
    cd esp32
  3. Compile and upload the firmware:
    pio run --target upload

Usage

  • The Flask web interface is accessible via the local IP of the server.
  • The ESP32 periodically sends sensor data, which can be visualized on the web interface.
  • Data logs are stored in the backend/data directory.

Troubleshooting

  • If the ESP32 is not connecting, check Wi-Fi credentials in wifi.cpp.
  • If the web server fails to start, ensure all dependencies are installed.
  • For detailed debugging, check docs/troubleshooting.md.

License

This project is licensed under the GNU General Public License v3.0.

Acknowledgments

  • Developed as part of a diploma thesis at HTL Hollabrunn.
  • Special thanks to Dipl.-Ing. Dr. Anton Bergauer and Dipl.-Ing. Josef Reisinger for their guidance.

About

Project to measure the quality of the night sky by analyzing light pollution and various environmental parameters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published