Inhoudsopgave:

Draagbaar weerstation voor nachtelijke hemelwaarnemers - Ajarnpa
Draagbaar weerstation voor nachtelijke hemelwaarnemers - Ajarnpa

Video: Draagbaar weerstation voor nachtelijke hemelwaarnemers - Ajarnpa

Video: Draagbaar weerstation voor nachtelijke hemelwaarnemers - Ajarnpa
Video: Nov 5th, 2023 Podcast: Winter is Coming. Apps Not Paying Drivers! 2024, Juli-
Anonim
Draagbaar weerstation voor waarnemers van de nachtelijke hemel
Draagbaar weerstation voor waarnemers van de nachtelijke hemel

Lichtvervuiling is een van de vele problemen in de wereld. Om dat probleem op te lossen, moeten we weten hoeveel de nachtelijke hemel vervuild is met kunstlicht. Veel studenten met leraren in de wereld proberen lichtvervuiling te meten met dure sensoren. Ik besloot mijn draagbare luxmeter te veranderen (voor meer kijk op het vorige instructables-project Portable Luxmeter) naar een weerstation met een TSL2591-sensor. Deze sensor is gevoelig genoeg om nachtvervuiling te meten. Ook voeg ik HTU21D toe voor temperatuur- en vochtigheidsmeting.

Stap 1: Wat is nachtvervuiling en hoe het meet?

Wat is nachtvervuiling en hoe het meet?
Wat is nachtvervuiling en hoe het meet?

Nachtvervuiling is licht van lampen, auto's, huizen, enorme lcd-panelen in de stad en elk licht gemaakt door de mens. Dat licht noemt kunstmatig. Voor waarnemers is kunstlicht het grootste probleem om sterren vanuit de stad te zien, en ze moeten buiten de stad gaan. Voor de mens is hoge lichtvervuiling schadelijk. En ook voor bomen, gras en dieren.

Voor het controleren van lichtvervuiling van uw plaats, kunt u hier de lichtvervuilingskaart bekijken

Het is slechts een model en de werkelijke waarden kunnen variëren. Daarom heb ik die luxmeter gemaakt.

Voor het meten van lichtvervuiling meet ik alleen lux en bereken ik magnitude/arsec2.

Ik kan berekenen van lux tot candela per suqare meter:

1 cd/m2 = 1 lux

Magnitude per vierkante boogseconde (mag/arcsec2) beschrijft de achtergrond van de nachtelijke hemel (het noemt oppervlaktehelderheid).

Meer op wiki: Oppervlaktehelderheid

Voor het berekenen van cd/m2 naar mag/arcsec2 is de formule:

[waarde in mag/arcsec2] = Log10([waarde in cd/m2]/108000)/-0,4

unihedron.com/projects/darksky/magconv.php

Stap 2: Stuklijst

stuklijst
stuklijst

Voor dit project heb je nodig:

1. WEMOS D1 Mini of een andere microcontroller

(Ik gebruik wemos, omdat het de kleinste is, met usb-poort, kun je Arduino Nano proberen)

WEMOS D1 MINI (Yanwen Economische Luchtpost)

WEMOS D1 MINI (AliExpress standaard verzending)

WEMOS D1 MINI 10 pcs (China Post Geregistreerde Luchtpost-gratis Bezorging)

usb-kabel voor het programmeren en uploaden van code naar wemos

2. TSL2591-sensor

TSL2591 (Yanwen Economische Luchtpost)

TSL2591 (China Post Geregistreerde Luchtpost)

TSL2591 (China Post Geregistreerde Luchtpost)

3. HTU21D temperatuur- en vochtigheidssensor

HTU21D (Cainiao Super Economy)

HTU21D (Yanwen Economische Luchtpost - gratis verzending)

4. OLED-display 0,96 (128 x 64)

OLED-scherm

OLED-scherm

OLED-scherm

5. 18650 batterij

18650 lithium-ionbatterij

18650 lithium-ionbatterij

batterij 18650 houder

6. TP4056 oplaadmodule

tp4056

tp4056

7. schakelknoppen of dip-jumper

schakelaar rode dip

swtichers, veel anders

8. breadboard- en dupont-kabels

klein broodplankje

breadboard kit

9. geval, ik maak van hout + tape

rode plakband

Prusa 3D-printer, ik hoop dat ik een behuizing van plastic zal maken: D

Stap 3: Circuit

Stroomkring
Stroomkring

Circuit is vrij eenvoudig:

Sluit alle i2c-modules (TSL2591, OLED, HTU21D) aan op SCL- en SDA-pinnen op wemos (SDA -> D2, SCL -> D1).

Voed ze met 3,3 V van wemos.

Sluit de pluspool van de batterij aan op de 5V-pin op wemos en de batterij + pin op de tp4056-oplaadmodule op de pluspool op de batterij.

Verbind alle gronden met elkaar.

Stap 4: HTU21D-sensor

HTU21D-sensor
HTU21D-sensor

Ik koop een nieuwe temperatuursensor, die met een nauwkeurigheid van 0,3 °C meet!

Dingen die je moet weten over deze sensor (van sparkfun):

  • Gebruikt de I2C-interface
  • Typische vochtigheidsnauwkeurigheid van ±2%
  • Typische temperatuurnauwkeurigheid van ±0,3 °C
  • Werkt van 0 tot 100% luchtvochtigheid, maar deze sensor wordt niet aanbevolen voor ruwe omgevingen waar hij in contact kan komen met water (zoals regen).
  • 3.3V-sensor - gebruik inline logische niveauconverters of 10k-weerstanden om 5V-signalen te beperken
  • Er kan slechts één HTU21D-sensor tegelijk op de I2C-bus zitten

Mijn samenvatting: het is een goede sensor, want hij meet met een nauwkeurigheid van 0,3 °C en zowel temperatuur als vochtigheid. Voors is I2C-interferentie en nadelen 3.3V, maar dat maakt in mijn geval niet uit.

Stap 5: TSL2591

TSL2591
TSL2591

Deze sensor is goed voor het meten van nachtelijke hemelvervuiling vanwege zijn gevoeligheid (tot 188 micro lux!).

1. zijn diodes met mogelijke ir en volledige maat. Ik gebruik het niet.

2. spanningsregelaar van 5V tot 3,3 V

Chipspecificaties (van adafruit):

  • Benadert de reactie van het menselijk oog
  • Extreem breed dynamisch bereik 1 tot 600, 000, 000 Counts
  • Lux-bereik: 188 uLux-gevoeligheid, tot 88.000 Lux-ingangsmetingen.
  • Temperatuurbereik: -30 tot 80 *C
  • Spanningsbereik: 3,3-5V in ingebouwde regelaar
  • Interface: I2C
  • Dit bord/chip gebruikt I2C 7-bit adres 0x29 (vast)
  • Afmetingen: 19 mm x 16 mm x 1 mm /.75 "x.63" x.04 "Gewicht: 1,1 g
  • 2 diodes voor het meten van beide - IR en volledig spectrum

Samenvatting:

188 uLux is perfect, ook I2C-communicatie is eenvoudig. Misschien kan het probleem worden opgelost I2C-adres (0x29). Ook aan boord is de regelaar goed en mogelijk om in de winter (vorst) sensor te gebruiken.

Stap 6: Coderen

Je hebt deze bibliotheken nodig (ik voeg ze toe aan één zipbestand):

  • Adafruit-GFX-Bibliotheek-master
  • adafruit_gfx_library_master
  • Adafruit_HTU21DF_Bibliotheek-master
  • Adafruit_Sensor-master
  • Adafruit_TSL2591_Bibliotheek-master

Code: je kunt de mijne gebruiken of je eigen maken. Vergeet niet de maximale integratietijd (600 MS) en de versterking op max (GAIN_MAX) in te stellen voor de nachtelijke hemelmeting.

Als je mijn code probeert te gebruiken, download dan het ino-bestand. Wanneer ik mijn code kopieer van instructable, is er iets mis met bibliotheken

Ik gebruik het laden van de afbeelding van de maan gewoon voor de lol. Je kunt elke gebruiken, gebruik gewoon deze pagina voor get array:

javl.github.io/image2cpp/

//https://lastminuteengineers.com/oled-display-arduino-tutorial///https://javl.github.io/image2cpp/ // mcd to magnitude https://unihedron.com/projects/darksky/magconv.php… // De HD44780 is een controller voor op karakters gebaseerde liquid crystal displays (LCD's). https://unihedron.com/projects/darksky/magconv.php… #include

#erbij betrekken

#include #include #include "Adafruit_HTU21DF.h" #include "Adafruit_TSL2591.h" int counter; // OLED-display TWI-adres #define OLED_ADDR 0x3C Adafruit_SSD1306 display (-1); // - 1 voor herstartweergave met herstartknop op arduino-bord Adafruit_HTU21DF htu = Adafruit_HTU21DF (); Adafruit_TSL2591 tsl = Adafruit_TSL2591(2591); // geef een nummer door voor de sensor-ID (voor later gebruik) uint32_t lum; uint16_t ir, vol; int ulux; vlotter lux; vlottertemperatuur; zweven rel_hum; zweven mag_arcsec2; // visual mags/arcsecond² [waarde in mag/arcsec2] = Log10([waarde in cd/m2]/108000)/-0.4 // symbolen // graden voor Celsius const unsigned char degree PROGMEM = { 0xe, 0x11, 0x11, 0x11, 0xe, 0x0, 0x0, 0x0 }; // exponent 2 const unsigned char exponent PROGMEM = {0xe, 0x1b, 0x3, 0x6, 0xc, 0x18, 0x1f, 0x0}; // 'moon_logo', 128x64px const unsigned char intro PROGMEM = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0,x 0xff, 0xff, 0xff, 0xc0, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xff, 0xfd, 0xff, 0xff, 0x, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x03, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0,x 0xfc, 0x07, 0xff, 0xe0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x07, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0x77, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,, 0x80, 0x1f, 0xbe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x1f, 0xcc, 0xff, 0xff, 0x8f, 0x 0xff, 0xff, 0x 0x, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x3f, 0xc0, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf00, 0xfe,3, 0xc0, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x3f, 0xe0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x3f, 0x80, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x3,, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x3f, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,, 0xff, 0xff, 0xf0, 0x00, 0x3f, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x ff, 0xff, 0xf0, 0x00, 0x3f, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0,ff, 0xff, 0,ff 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0,x 0xe0, 0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x60, 0xff, 0xff, 0xff, 0xff, 0xff, 0x 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x 0xc, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x07, 0xff, 0x, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x18, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0ff, 0x38, 0, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x48, 0x7f, 0xff, 0xff, 0xff, 0xc0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x80, 0x3f, 0xff, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xc4, 0x1f, 0xff, 0xff, 0xfc, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x60, 0x0f, 0xff, 0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0,ff, 0xff, 0, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf0, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x01, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x43, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x4f, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0,ff, 0xff, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x5f, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x03,, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x01, 0xff, 0xff, 0xb7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,, 0xff, 0xff, 0xf8, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x03, 0xff, 0xff,, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x01, 0x0f, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,, 0xfc, 0x01, 0xfe, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff,, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x 00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x01, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x 0x7f, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x1f, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff,, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0,x 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0x 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; void setup() { // htu21d htu.begin(); // tsl2591 sensor_t-sensor; tsl.getSensor(&sensor); tsl.setGain(TSL2591_GAIN_MAX); // MAX, HOOG MED, LAAG, tsl.setTiming (TSL2591_INTEGRATIONTIME_600MS); // 100MS, 200 MS, 300MS, 400MS, 500MS, 600MS // setup voor oled-displayweergave.begin (SSD1306_SWITCHCAPVCC, OLED_ADDR); display.clearDisplay(); weergave.weergave(); display.drawBitmap (0, 0, intro, 128, 64, WIT); weergave.weergave(); vertraging (1000); display.setTextSize(1); display.setTextColor(WIT); display.setFont(&FreeSerif9pt7b); display.clearDisplay(); } void loop() { lux = 0; ulux =0; mag_arcsec2=0; temperatuur=0; rel_hum=0; vertraging (100); lum = tsl.getFullLuminosity(); ir = lum >> 16; vol = lum & 0xFFFF; vertraging (100); lux = tsl.calculateLux(full, ir); // lichtintensiteit in microlux ulux= lux*1000000; als (ulux<0) {ulux=0; } mag_arcsec2 = log10(lux/108000)/-0.4; //(log((ulux/108000)) /(-0.4) temp = htu.readTemperature(); rel_hum = htu.readHumidity(); display_values();} void display_values() {//display.drawPixel(120, 50, WIT); display.clearDisplay(); display.setCursor(1, 15); display.print(temp); display.drawBitmap(42, 2, degree, 8, 5, WIT); display.setCursor(50, 15); display.print("C"); display.setCursor(70, 15); display.print(rel_hum); display.setCursor(114, 15); display.print("%"); display.drawLine(1, 20, 127, 20, WIT); display.drawLine(67, 1, 67, 20, WIT); display.setCursor(1, 35); display.print("ulux ="); display.setCursor(50, 35); display.print(ulux); display.setCursor(1, 55); display.print("mag/arsec"); display.drawBitmap(70, 45, exponent, 8, 8, WIT); display. setCursor(83, 55); display.print(mag_arcsec2); display.display();}

Stap 7: Binnen

Binnenkant
Binnenkant
Binnenkant
Binnenkant

Ik maak een eigen case en ik gebruik breadboard met dupont-kabels zoals je kunt zien.

Ik gebruik de TP4056 voor het opladen van de batterij met een usb-kabel (swtich dip jumper nodig).

Voor in- en uitschakelen gebruik ik dip jumper.

Voor daglicht toont TSL2591 0 en mag/arcsec2 is nan.

Voor nachtelijke hemel moet TSL2591 van 0 tot 1000000 microlux (ulux) en overeenkomstige mag/arcsec2 tonen

(ca. 14 tot 22 mag/arsec2).

Voor volle maan heb ik 50k ulux gemeten, wat 0,05 lux is.

Aanbevolen: