Cov txheej txheem:

Adafruit SI1145 UV/Pom Lub Teeb/Infrared Sensor - Arduino thiab LCD: 4 Kauj Ruam
Adafruit SI1145 UV/Pom Lub Teeb/Infrared Sensor - Arduino thiab LCD: 4 Kauj Ruam

Video: Adafruit SI1145 UV/Pom Lub Teeb/Infrared Sensor - Arduino thiab LCD: 4 Kauj Ruam

Video: Adafruit SI1145 UV/Pom Lub Teeb/Infrared Sensor - Arduino thiab LCD: 4 Kauj Ruam
Video: Цифровой датчик ультрафиолета, UV Index на Si1145 2024, Cuaj hlis
Anonim
Image
Image

Txoj haujlwm no siv Adafruit SI1145 UV/Pom Pom Lub Teeb/Infrared sensor los xam qhov ntsuas UV tam sim no. UV tsis nkag siab ncaj qha. Theej, nws yog xam raws li muaj nuj nqi ntawm pom pom thiab nyeem infrared. Thaum kuv sim nws sab nraum, nws yog qhov tseeb raws li UV nyeem los ntawm weather.com. Kuv pom qhov project nrog lub ntsiab lus "steampunk" - cov cuab yeej uas tus thawj tub rog caij nkoj yuav xav tau thaum UV raug rau ntawm lub lawj yuav xav tau daim ntawv thov lossis rov thov dua tshiab ntawm lub hnub thaiv.

Kev tsim qauv tag nrho tau npaj los koom ua ke nrog Raspberry Pi huab cua chaw nres tsheb. Hmoov tsis zoo, kuv tseem tsis tau ua tiav qhov kev koom ua ke no. Kuv yuav hloov kho cov lus qhia no nrog cov ntsiab lus ntxiv thaum qhov tshwm sim.

Kauj Ruam 1: Sau Cov Khoom Uas Tsim Nyog

Kho vajtse/Software Yuav tsum tau

  • Arduino Uno thiab txuas kab rau USB chaw nres nkoj
  • Khoos phis tawj rau program Arduino
  • Adafruit Library rau UV sensor (https://github.com/adafruit/Adafruit_SI1145_Library/)
  • Liquid Crystal display library (https://github.com/arduino/Arduino/tree/master/libraries/LiquidCrystal)
  • LCD zaub. Kuv siv: (https://smile.amazon.com/uxcell-Standard-Character-Backlight-Display/dp/B00EDMMTGY/ref=sr_1_1?ie=UTF8&qid=1481681388&sr=8-1&keywords=lcd+screen+arduino)
  • Adafruit SI1145 sensor rau UV/IR/pom lub teeb (https://www.adafruit.com/products/1777) B
  • Cov qhob cij
  • Txiv neej -rau -txiv neej jumper cables
  • 10k Potentiometer
  • 220 ohm resistor
  • Roj teeb pob (8 AA roj teeb) 6 AA roj teeb

Kauj Ruam 2: Kho Kho Vajtse

Solder UV sensor Txuas Arduino rau USB chaw nres nkoj ntawm lub computer

Txuas LCD zaub rau Arduino

  • LCD RS pin - tus lej digital 12
  • LCD Pab tus pin - tus lej digital 11
  • LCD D4 - tus lej pin 5
  • LCD D5 tus pin - tus lej digital 4
  • LCD D6 tus pin - tus lej digital 3
  • LCD D7 tus pin - tus lej digital 2

Txuas UV sensor module rau Arduino. (Adafruit nplooj ntawv ntawm lub ntsuas suav nrog kev qhia zoo nrog rau cov duab txuas).

  • VIN rau fais fab mov - 5V lossis 3V. Kuv teeb lub ntsuas kom siv 3.3V kom lub 5V tuaj yeem siv los ntawm lub vijtsam LCD
  • GND rau hauv av.
  • SCL ntawm sensor rau SCL ntawm Arduino - tus pin A5.
  • SDA ntawm sensor rau SDA ntawm Arduino - tus pin A4.

Hlau 10k potentiometer rau +5V thiab Hauv av nrog cov zis rau LCD tus pin 3

Hlau 220 ohm resister rau lub zog backlight ntawm cov zaub, tus pin 15 rau 5V thiab Pin 16 rau hauv av.

Kauj Ruam 3: Ntxiv Code rau Arduino Siv UV Nyeem Ntawv

Cov ntawv txuas nrog suav nrog cov cai rau Arduino uas yuav pib lub ntsuas thiab ntsuas UV nyeem.

Kauj Ruam 4: Troubleshooting (yog Xav Tau)

Kuv siv cov roj teeb ntim rau lub zog Arduino vim tias 5V lub zog hloov hluav taws xob muab nws lub zog ntau dhau - cov zaub zoo li tsis zoo.

Koj tuaj yeem pom qhov pib ua haujlwm ntawm lub ntsuas pa los ntawm cov duab hauv Arduino. Kev hloov kho me me hauv cov cai tuaj yeem tso cai rau koj los tshuaj xyuas kev nyeem ntawm cov ntawv tso tawm ib yam. Hloov "lcd.print" mus rau "serial.print."

Txaus siab rau!

Pom zoo: