Taula de continguts:

Estació meteorològica portàtil per a observadors del cel nocturn: 7 passos (amb imatges)
Estació meteorològica portàtil per a observadors del cel nocturn: 7 passos (amb imatges)

Vídeo: Estació meteorològica portàtil per a observadors del cel nocturn: 7 passos (amb imatges)

Vídeo: Estació meteorològica portàtil per a observadors del cel nocturn: 7 passos (amb imatges)
Vídeo: Часть 2. Аудиокнига Джона Бьюкена «Тридцать девять шагов» (гл. 6–10) 2024, Juliol
Anonim
Estació meteorològica portàtil per a observadors del cel nocturn
Estació meteorològica portàtil per a observadors del cel nocturn

La contaminació lumínica és un dels molts problemes del món. Per solucionar aquest problema, hem de saber quant està contaminat el cel nocturn amb llum artificial. Molts estudiants amb professors del món intenten mesurar la contaminació lumínica amb sensors cars. Vaig decidir canviar el meu luxímetre portàtil (per a més comprovació del projecte de Luxmetre portàtil instructables anterior) a l'estació meteorològica amb sensor TSL2591. Aquest sensor és prou sensible per mesurar la contaminació nocturna. A més, afegeixo HTU21D per mesurar la temperatura i la humitat.

Pas 1: què és la contaminació nocturna i com es mesura

Què és la contaminació nocturna i com es mesura
Què és la contaminació nocturna i com es mesura

La contaminació nocturna és la llum de les làmpades, els cotxes, les cases, els enormes panells LCD de la ciutat i totes les llums fetes per humans. Aquella llum anomenada artificial. Per als observadors, la llum artificial és el principal problema per veure les estrelles de la ciutat i han de sortir de la ciutat. Per als humans, la contaminació lumínica elevada és perjudicial. I també per a arbres, herbes i animals.

Per comprovar la contaminació lumínica del vostre lloc, podeu veure aquí lightpollutionmap

Només és model i els valors reals poden variar. Per això vaig crear aquest luxòmetre.

Per mesurar la contaminació lumínica, només mesuro lux i calculo la magnitud / arsec2.

Puc calcular de lux a candela per suqare metres:

1 cd / m2 = 1 lux

La magnitud per segon d'arc quadrat (mag / arcsec2) descriu el fons del cel nocturn (s'anomena brillantor superficial).

Més informació a wiki: Brillantor superficial

Per calcular cd / m2 a mag / arcsec2 és la fórmula:

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

unihedron.com/projects/darksky/magconv.php

Pas 2: llista de material

BOM
BOM

Per a aquest projecte necessiteu:

1. WEMOS D1 Mini o qualsevol microcontrolador

(Jo faig servir wemos, perquè és el més petit, amb port USB, podeu provar Arduino Nano)

WEMOS D1 MINI (Yanwen Economic Air Mail)

WEMOS D1 MINI (enviament estàndard AliExpress)

WEMOS D1 MINI 10 unitats (correu aeri registrat de la Xina - enviament gratuït)

cable USB per programar i penjar codi a wemos

2. Sensor TSL2591

TSL2591 (Yanwen Economic Air Mail)

TSL2591 (correu aeri registrat de la Xina)

TSL2591 (correu aeri registrat de la Xina)

3. Sensor de temperatura i humitat HTU21D

HTU21D (Cainiao Super Economy)

HTU21D (Yanwen Economic Air Mail - enviament gratuït)

4. Pantalla OLED 0,96 (128 x 64)

Pantalla OLED

Pantalla OLED

Pantalla OLED

5. 18650 bateria

Bateria de ions de liti 18650

Bateria de ions de liti 18650

porta bateria 18650

6. Mòdul de càrrega TP4056

tp4056

tp4056

7. canvieu els botons o el pont

swtich bany vermell

swtichers, molt diferents

8. cables de taulers i dupont

tauleta de pa petit

kit de taulers de pa

9. caixa, la creo a partir de fusta + cinta

cinta vermella

Impressora 3D Prusa, espero fer-ne una funda de plàstic: D

Pas 3: Circuit

Circuit
Circuit

El circuit és força senzill:

Connecteu tots els mòduls i2c (TSL2591, OLED, HTU21D) als pins SCL i SDA dels wemos (SDA -> D2, SCL -> D1).

Alimenteu-los amb 3,3 V de wemos.

Connecteu el terminal més de la bateria al pin de 5V del wemos i la bateria + el pin del mòdul de càrrega tp4056 al terminal plus de la bateria.

Connecteu tots els terrenys.

Pas 4: sensor HTU21D

Sensor HTU21D
Sensor HTU21D

Compro un sensor de temperatura nou, que mesura amb precisió 0,3 ° C.

Coses que heu de saber sobre aquest sensor (de sparkfun):

  • Utilitza la interfície I2C
  • Precisió d'humitat típica del ± 2%
  • Precisió de temperatura típica de ± 0,3 ° C
  • Funciona entre el 0 i el 100% d’humitat, però aquest sensor no es recomana en entorns difícils on puguin entrar en contacte amb l’aigua (com ara la pluja).
  • Sensor de 3,3 V: utilitzeu convertidors de nivell lògic en línia o resistències de 10 k per limitar els senyals de 5 V.
  • Només un sensor HTU21D pot residir al bus I2C alhora

El meu resum: és un bon sensor, ja que mesura amb precisió 0,3 ° C i ambdues - temperatura i humitat. Els avantatges són la interferència I2C i els contra 3.3V, però no importa en el meu cas.

Pas 5: TSL2591

TSL2591
TSL2591

Aquest sensor és bo per mesurar la contaminació del cel nocturn a causa de la seva sensibilitat (fins a 188 micro lux!).

1. són díodes amb possible ir i mesura completa. No l’utilitzo.

2. regulador de tensió de 5V a 3,3 V

Especificacions del xip (d'Adafruit):

  • Resposta aproximada de l’ull humà
  • Rang dinàmic extremadament ampli d'1 a 600, 000, 000 recompte
  • Rang de Lux: sensibilitat de 188 uLux, fins a 88.000 mesures d’entrada de Lux.
  • Rang de temperatura: -30 a 80 * C
  • Rang de tensió: 3.3-5V al regulador de bord
  • Interfície: I2C
  • Aquesta placa / xip utilitza l'adreça I2C de 7 bits 0x29 (fixa)
  • Dimensions: 19 mm x 16 mm x 1 mm /.75 "x.63" x. 04 "Pes: 1,1 g
  • 2 díodes per mesurar tots dos: IR i espectre complet

Resum:

188 uLux és perfecte, també la comunicació I2C és senzilla. Potser es pot solucionar el problema de l’adreça I2C (0x29). El regulador a bord també és bo i és possible utilitzar el sensor durant l’hivern (gelades).

Pas 6: Codi

Necessiteu aquestes biblioteques (les afegeixo a un fitxer zip):

  • Adafruit-GFX-Library-master
  • adafruit_gfx_library_master
  • Adafruit_HTU21DF_Library-master
  • Adafruit_Sensor-master
  • Adafruit_TSL2591_Library-master

Codi: podeu utilitzar el meu o crear-ne un de propi. No us oblideu d’establir el temps màxim d’integració (600 MS) i guanyar al màxim (GAIN_MAX) per a la mesura del cel nocturn.

Si intenteu utilitzar el meu codi, descarregueu el fitxer ino. Quan copio el codi que es pot instruir, hi ha un problema amb les biblioteques

Utilitzo la imatge de càrrega de la lluna només per divertir-me. Podeu utilitzar qualsevol, només cal que utilitzeu aquesta pàgina per obtenir la matriu:

javl.github.io/image2cpp/

//https://lastminuteengineers.com/oled-display-arduino-tutorial///https://javl.github.io/image2cpp/ // mcd a magnitud https://unihedron.com/projects/darksky/magconv.php … // L'HD44780 és un controlador per a pantalles de cristall líquid (LCD) basades en caràcters. https://unihedron.com/projects/darksky/magconv.php… #include

#incloure

#include #include #include "Adafruit_HTU21DF.h" #include "Adafruit_TSL2591.h" int counter; // Adreça TWI de pantalla OLED #define OLED_ADDR 0x3C Adafruit_SSD1306 display (-1); // - 1 per reiniciar la visualització amb el botó de reinici a la placa arduino Adafruit_HTU21DF htu = Adafruit_HTU21DF (); Adafruit_TSL2591 tsl = Adafruit_TSL2591 (2591); // introduïu un número per a l'identificador del sensor (per al vostre ús posterior) uint32_t lum; uint16_t ir, complet; int ulux; lux flotant; temperatura de flotació; flotador rel_hum; flotador mag_arcsec2; // visuals mags / arcsecond² [valor en mag / arcsec2] = Log10 ([valor en cd / m2] / 108000) / - 0,4 // símbols // grau per 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, 0x0f, 0x 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 0xff, 0xff, 0xff, 0xc0, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xff, 0xfd, 0xff, 0xff, 0xff 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x03, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 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, 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, 0xff, 0xff, 0x80, 0x1f, 0xbe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x1f, 0xcc, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x3f, 0xc0, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,, 0xc0, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x3f, 0xe0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x3f, 0x80, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x0x,, 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, 0xff, 0xff, 0xff, 0xff, 0xff 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 0xe0, 0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x60, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xc, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x07, 0xff, 0xff, 0xff 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x18, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x38, 0x38, 0x 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 0xff, 0xff, 0xc0, 0xc4, 0x1f, 0xff, 0xff, 0xfc, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x60, 0x0f, 0xff, 0xff, 0xff, 0xff 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf0, 0xe3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf, 0xf, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x01, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 0x43, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x4f, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff 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, 0x0x, 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, 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, 0xff, 0xfc, 0x01, 0x0f, 0x3f, 0xff, 0xff, 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, 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, 1 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x01, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfx, 0xf00, 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, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x03, 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, 0xff, 0xff}; void setup () {// htu21d htu.begin (); // tsl2591 sensor_t sensor; tsl.getSensor (& sensor); tsl.setGain (TSL2591_GAIN_MAX); // MAX, HIGH MED, LOW, tsl.setTiming (TSL2591_INTEGRATIONTIME_600MS); // 100MS, 200 MS, 300MS, 400MS, 500MS, 600MS // configuració per a pantalla oled display.begin (SSD1306_SWITCHCAPVCC, OLED_ADDR); display.clearDisplay (); display.display (); display.drawBitmap (0, 0, introducció, 128, 64, BLANC); display.display (); retard (1000); display.setTextSize (1); display.setTextColor (BLANC); display.setFont (& FreeSerif9pt7b); display.clearDisplay (); } bucle buit () {lux = 0; ulux = 0; mag_arcsec2 = 0; temp = 0; rel_hum = 0; retard (100); lum = tsl.getFullLuminosity (); ir = lum >> 16; complet = lum & 0xFFFF; retard (100); lux = tsl.calculateLux (complet, ir); // light intensiti in microlux ulux = lux * 1000000; if (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, BLANC); display.clearDisplay (); display.setCursor (1, 15); display.print (temp); display.drawBitmap (42, 2, grau, 8, 5, BLANC); 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, BLANC); display.drawLine (67, 1, 67, 20, WHITE); 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, WHITE); display. setCursor (83, 55); display.print (mag_arcsec2); display.display ();}

Pas 7: dins

Dins
Dins
Dins
Dins

Crec funda pròpia i faig servir taulers de suport amb cables dupont com podeu veure.

Faig servir el TP4056 per carregar la bateria amb un cable USB (necessito swtich dip jumper).

Per activar / desactivar faig servir dip jumper.

A la llum del dia, TSL2591 mostra 0 i mag / arcsec2 és nan.

Per al cel nocturn, TSL2591 hauria de mostrar de 0 a 1000.000 microlux (ulux) i el mag / arcsec2 corresponent

(ca. 14 a 22 mag / arsec2).

Per fullMoon he mesurat 50 k ulux, que són 0,05 lux.

Recomanat: