SQM (Sky Quality Meter.)

It is an instrument used to measure light pollution in the sky. It is mostly used by space scientist for observing stars and planets in the sky.

As I had some interest in observing stars and planets during night, I planned to make this instrument.

I also planned to obtain readings of light pollution in my city (hosur), by connecting these devices in my friends home and reporting the details in a website.. For trial purpose. I have made 2 modals to check the working..

Components needed for this Device are:

  • Maskduino(My own creation of arduion)
  • ESP32
  • LCD (My own fabricated LCD)
  • Humidity and Temperature sensor.

This is “MASKduino”

The board size is -> Length = 78.232mm -> Width = 84.074mm

1st Test..

This is a trail. where I used

  • TSL2561
  • OLED display (SSD1306)

Here is the video…

Here is the Code…

#include<SPI.h>        
#include<Wire.h>
#include<SparkFunTSL2561.h>            //this are Libraies needed to installed in your Arduino IDE
#include<Adafruit_SSD1306.h>

#define Screen_wd 128                  // Declaring Dimensions for the OLED
#define Screen_ht 64

#define MOSI 9
#define CLK 10
#define DC 11                          // Connection for the OLED
#define CS 12
#define RESET 13

Adafruit_SSD1306 display(Screen_wd, Screen_ht, MOSI,CLK, DC, RESET, CS);

SFE_TSL2561 light;                       // Initizing TSL2561

bool gain;
unsigned int ms;

double Lux;
float mag_parsec2;


void setup() {

  Serial.begin(9600);                       // declaring Serial Monitor 
  light.begin();                            // declaring TSL sensor
  display.begin(SSD1306_SWITCHCAPVCC);      // declaring OLED

  unsigned char ID;

  if(light.getID(ID)){
    Serial.print("The ID: ");                 // this loop for Indicating TSL2561 is working or not  
    Serial.println(ID,HEX);
    }
  else{
    Serial.println(" ERROR ");
    }

   gain = 0;

   unsigned char time = 2;

   light.setTiming(gain,time,ms);

   light.setPowerUp();

}

void loop() {


   delay(ms);

   unsigned int data0, data1;

   if(light.getData(data0,data1)){

    light.getLux(gain,ms,data0,data1,Lux);

    Serial.print(" The Lux : ");
    Serial.println(Lux);
    mag_parsec2 = log10(Lux/108000)/(-0.4);                    // This Conditions for TSL To obtain Lux and Mag/arsec2

    Serial.print (" The mag/parsec2 : ");
    Serial.println(mag_parsec2);

    Screen();
    TEXT();

   }
}

void Screen(){

  display.display();
  delay(100);                                                   // Display setting begin
  display.clearDisplay();
  delay(100);

  }


void TEXT(){

  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(SSD1306_WHITE);                          // Texts in the OLED
  display.setCursor(10,20);
  display.print("LUX Value : ");
  display.println(Lux);
  display.setTextSize(1);
  display.setCursor(10,35);
  display.print("mag/arsec2 :");
  display.println(mag_parsec2);
  display.display();

  }  

Here is the Connections..

Observations during testing the test Piece…

In this protyping, I used “TSL2561” it is Lux detection sensor. As its range is very short.. like 0.1 Lux to 44,000 Lux but to test the lux of the sky in night to measure the light pollution. I required the range below 0.1 Lux. Hence I need to TSL2591 to make my SQM a perfect one…

With this… I need to telecast this details in my webpage by using ESP32 Module… and I need to work..

To observe the Sky pollution.. This is scale which I used to measure…