Talaan ng mga Nilalaman:

Portable Weather Station para sa Night Sky Observers: 7 Hakbang (na may Mga Larawan)
Portable Weather Station para sa Night Sky Observers: 7 Hakbang (na may Mga Larawan)

Video: Portable Weather Station para sa Night Sky Observers: 7 Hakbang (na may Mga Larawan)

Video: Portable Weather Station para sa Night Sky Observers: 7 Hakbang (na may Mga Larawan)
Video: Words of Cheer for Daily Life | Charles H. Spurgeon | Christian Audiobook 2024, Nobyembre
Anonim
Portable Weather Station para sa Night Sky Observers
Portable Weather Station para sa Night Sky Observers

Ang light polusyon ay isa sa maraming mga problema sa mundo. Para malutas ang problemang iyan, kailangan nating malaman kung magkano ang gabi sa kalangitan na nadumihan ng artipisyal na ilaw. Maraming mag-aaral na may mga guro sa mundo ang sumusubok na sukatin ang light polusyon sa mga mamahaling sensor. Napagpasyahan kong palitan ang aking portable luxmeter (para sa higit pang suriin ang nakaraang proyekto na maaaring turuan ng Portable Luxmeter) sa istasyon ng panahon na may TSL2591 sensor. Ang sensor na ito ay sapat na sensitibo para masukat ang polusyon sa gabi. Gayundin, nagdaragdag ako ng HTU21D para sa sukat ng temperatura at halumigmig.

Hakbang 1: Ano ang Polusyon sa Gabi at Paano Ito Sukatin

Ano ang Polusyon sa Gabi at Paano Ito Sukatin
Ano ang Polusyon sa Gabi at Paano Ito Sukatin

Ang polusyon sa gabi ay ilaw mula sa mga ilawan, kotse, bahay, malaking lcd panel sa lungsod at bawat ilaw na gawa ng tao. Ang ilaw na iyon ay tinatawag na artipisyal. Para sa mga nagmamasid, ang artipisyal na ilaw ay pangunahing problema upang makita ang mga bituin mula sa lungsod, at dapat silang lumabas sa labas ng lungsod. Para sa tao, mapanganib ang mataas na polusyon sa ilaw. At para din sa mga puno, damo at hayop.

Para sa pag-check ng light polusyon ng iyong lugar, makikita mo rito ang lightpollutionmap

Ito ay modelo lamang, at ang mga tunay na halaga ay maaaring magkakaiba. Iyon ang dahilan kung bakit nilikha ko ang luxmeter na iyon.

Para sa pagsukat ng light polusyon, sinusukat ko lamang ang lux at kinakalkula ang lakas / arsec2.

Maaari kong kalkulahin mula lux hanggang candela bawat metro ng suqare:

1 cd / m2 = 1 lux

Ang kalakhan bawat parisukat na arcsecond (mag / arcsec2) ay naglalarawan sa background ng kalangitan sa gabi (tinatawag itong ilaw sa ibabaw).

Higit pa sa wiki: Liwanag ng ibabaw

Para sa pagkalkula ng cd / m2 sa mag / arcsec2 ay pormula:

[halaga sa mag / arcsec2] = Log10 ([halaga sa cd / m2] / 108000) / - 0.4

unihedron.com/projects/darksky/magconv.php

Hakbang 2: BOM

BOM
BOM

Para sa proyektong ito kailangan mo:

1. WEMOS D1 Mini o anumang microcontroller

(Gumagamit ako ng mga wemos, dahil ito ay pinakamaliit, na may usb port, maaari mong subukan ang Arduino Nano)

WEMOS D1 MINI (Yanwen Economic Air Mail)

WEMOS D1 MINI (Karaniwang Pagpapadala ng AliExpress)

WEMOS D1 MINI 10 pcs (China Post Registradong Air Mail - libreng Pagpapadala)

usb cable para sa pag-program at pag-upload ng code sa mga wemos

2. TSL2591 Sensor

TSL2591 (Yanwen Economic Air Mail)

TSL2591 (China Post Rehistradong Air Mail)

TSL2591 (China Post Rehistradong Air Mail)

3. HTU21D temperatura at sensor ng kahalumigmigan

HTU21D (Kainiao Super Economy)

HTU21D (Yanwen Economic Air Mail - libreng pagpapadala)

4. OLED display 0.96 (128 x 64)

OLED display

OLED display

OLED display

5. 18650 na baterya

18650 na baterya ng lithium ion

18650 na baterya ng lithium ion

may hawak ng baterya 18650

6. module ng pagsingil ng TP4056

tp4056

tp4056

7. lumipat ng mga pindutan o isawsaw ang lumulukso

swtich red dip

swticher, maraming magkakaiba

8. breadboard at mga dupont cable

maliit na breadboard

kit ng tinapay

9. kaso, lumilikha ako mula sa kahoy + tape

red tape

Prusa 3D printer, sana ay gawin ko ang kaso mula sa plastic: D

Hakbang 3: Circuit

Circuit
Circuit

Ang circuit ay medyo simple:

Ikonekta ang lahat ng mga module ng i2c (TSL2591, OLED, HTU21D) sa SCL at SDA pin sa wemos (SDA -> D2, SCL -> D1).

Lakasin ang mga ito ng 3.3 V mula sa mga wemos.

Ikonekta ang plus terminal ng baterya sa 5V pin sa mga wemos at baterya + pin sa tp4056 singilin na module upang magdagdag ng terminal sa baterya.

Ikonekta ang lahat ng mga bakuran.

Hakbang 4: Sensor ng HTU21D

HTU21D Sensor
HTU21D Sensor

Bumibili ako ng bagong sensor ng temperatura, na sumusukat sa katumpakan na 0.3 ° C!

Mga bagay na dapat mong malaman tungkol sa sensor na ito (mula sa sparkfun):

  • Gumagamit ng interface ng I2C
  • Karaniwang kahalumigmigan ng kahalumigmigan ng ± 2%
  • Karaniwang katumpakan ng temperatura ng ± 0.3 ° C
  • Nagpapatakbo mula 0 hanggang 100% kahalumigmigan ngunit ang sensor na ito ay hindi inirerekomenda para sa malupit na mga kapaligiran kung saan maaari itong makipag-ugnay sa tubig (tulad ng ulan).
  • 3.3V sensor - gumamit ng mga inline na antas ng converter ng lohika o 10k resistors upang malimitahan ang 5V signal
  • Isang sensor lamang ng HTU21D ang maaaring manirahan sa I2C bus nang paisa-isa

Ang aking buod: ito ay mahusay na sensor, dahil sumusukat ito nang may katumpakan 0.3 ° C at pareho - temperatura at halumigmig. Ang mga kalamangan ay ang pagkagambala ng I2C at kahinaan ng 3.3V, ngunit hindi mahalaga sa aking kaso.

Hakbang 5: TSL2591

TSL2591
TSL2591

Ang sensor na ito ay mabuti para sa pagsukat ng polusyon sa kalangitan sa gabi dahil sa pagiging sensitibo nito (hanggang sa 188 micro lux!).

1. ay mga diode na may posibleng ir at buong sukat. Hindi ko ito ginagamit.

2. boltahe regulator mula 5V hanggang 3.3 V

Mga pagtutukoy ng Chip (mula sa adafruit):

  • Tinatayang Tugon ng mata ng tao
  • Labis na malawak na malawak na saklaw na 1 hanggang 600, 000, 000 na Mga Bilang
  • Saklaw ng Lux: 188 uLux pagiging sensitibo, hanggang sa 88, 000 Mga sukat sa pag-input ng Lux.
  • Saklaw ng temperatura: -30 hanggang 80 * C
  • Saklaw ng boltahe: 3.3-5V papunta sa regulator ng board
  • Interface: I2C
  • Ang board / chip na ito ay gumagamit ng I2C 7-bit address na 0x29 (naayos)
  • Mga Dimensyon: 19mm x 16mm x 1mm /.75 "x.63" x.04 "Timbang: 1.1g
  • 2 diode para sa sukat pareho - IR at Buong spectrum

Buod:

Ang 188 uLux ay perferct, simple rin ang komunikasyon ng I2C. Marahil ay maaaring maayos ang problema sa I2C adress (0x29). Gayundin sa board regulator ay mabuti at posible na gumamit ng sensor sa panahon ng taglamig (frost).

Hakbang 6: Code

Kailangan mo ang mga libraryong ito (idaragdag ko ang mga ito sa isang zip file):

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

Code: maaari mong gamitin ang minahan, o lumikha ng sarili. Huwag kalimutang itakda ang pinakamataas na oras ng pagsasama (600 MS) at makakuha sa max (GAIN_MAX) para sa panukalang langit sa gabi.

Kung susubukan mong gamitin ang aking code, mangyaring mag-download ng ino file. Kapag kinopya ko mula sa itinuro sa aking code, isang bagay na mali sa mga aklatan

Gumagamit ako ng loading image ng moon para lang sa kasiyahan. Maaari kang gumamit ng anuman, gamitin lamang ang pahinang ito para makakuha ng array:

javl.github.io/image2cpp/

//https://lastminuteengineers.com/oled-display-arduino-tutorial///https://javl.github.io/image2cpp/ // mcd sa lakas https://unihedron.com/projects/darksky/magconv.php… // Ang HD44780 ay isang tagontrol para sa mga likidong kristal na batay sa karakter na ipinapakita (LCD). https://unihedron.com/projects/darksky/magconv.php… # isama

# isama

#include #include #include "Adafruit_HTU21DF.h" #include "Adafruit_TSL2591.h" int counter; // OLED display TWI address # tukuyin ang OLED_ADDR 0x3C Adafruit_SSD1306 display (-1); // - 1 para sa pag-restart ng display na may restart button sa arduino board Adafruit_HTU21DF htu = Adafruit_HTU21DF (); Adafruit_TSL2591 tsl = Adafruit_TSL2591 (2591); // pass in a number for the sensor identifier (for your use later) uint32_t lum; uint16_t ir, puno; int ulux; lumutang lux; lumutang temp; float rel_hum; lumutang mag_arcsec2; // visual mags / arcsecond² [halaga sa mag / arcsec2] = Log10 ([halaga sa cd / m2] / 108000) / - 0.4 // simbolo // degree para sa 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, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x0f, 0xff, 0xff, 0xfe, 0x0f, 0xff 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, 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, 0xfe, 0x03, 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 0xfc, 0x07, 0xff, 0x0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x07, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 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, 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, 0x00, 0x3f, 0xc0, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe3, 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, 0xfc, 0x00, 0x3f, 0x80, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x3f, 0xff, 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, 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, 0x3f, 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, 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, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 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, 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, 0xe0, 0x07, 0xff, 0xff 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x18, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff 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, 0x 0 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, 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, 0xff 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, 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, 0x03, 0xff, 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 0xff, 0xff, 0xf8, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x03, 0xff, 0xff, 0xff, 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, 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, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 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 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x01, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00 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, 0xff 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff 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, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x0, 0xff 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, 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 // setup for oled display display.begin (SSD1306_SWITCHCAPVCC, OLED_ADDR); display.clearDisplay (); display.display (); display.drawBitmap (0, 0, intro, 128, 64, WHITE); display.display (); pagkaantala (1000); display.setTextSize (1); display.setTextColor (PUTI); display.setFont (& FreeSerif9pt7b); display.clearDisplay (); } void loop () {lux = 0; ulux = 0; mag_arcsec2 = 0; temp = 0; rel_hum = 0; pagkaantala (100); lum = tsl.getFullLuminosity (); ir = lum >> 16; buong = lum & 0xFFFF; pagkaantala (100); lux = tsl.calculateLux (puno, ir); // light intensiti in microlux ulux = lux * 1000000; kung (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, WHITE); display.clearDisplay (); display.setCursor (1, 15); display.print (temp); display.drawBitmap (42, 2, degree, 8, 5, WHITE); 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, WHITE); 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 ();}

Hakbang 7: Sa Loob

Sa loob
Sa loob
Sa loob
Sa loob

Lumilikha ako ng sariling kaso at gumagamit ako ng breadboard na may mga dupont cable na nakikita mo.

Gumagamit ako ng TP4056 para sa pagsingil ng baterya gamit ang usb cable (kailangan swtich dip jumper).

Para sa pag-on / off ay gumagamit ako ng dip jumper.

Para sa ilaw ng araw, ipinapakita ng TSL2591 ang 0 at ang mag / arcsec2 ay nan.

Para sa night sky dapat magpakita ang TSL2591 mula 0 hanggang 1000 000 microlux (ulux) at kaukulang mag / arcsec2

(cca. 14 hanggang 22 mag / arsec2).

Para sa fullMoon sinukat ko ang 50k ulux na 0.05 lux.

Inirerekumendang: