Cov txheej txheem:

Acoustic DISDRO Meter: Raspebbery Pi Open Weather Station (Ntu 2): 4 Kauj Ruam (nrog Duab)
Acoustic DISDRO Meter: Raspebbery Pi Open Weather Station (Ntu 2): 4 Kauj Ruam (nrog Duab)

Video: Acoustic DISDRO Meter: Raspebbery Pi Open Weather Station (Ntu 2): 4 Kauj Ruam (nrog Duab)

Video: Acoustic DISDRO Meter: Raspebbery Pi Open Weather Station (Ntu 2): 4 Kauj Ruam (nrog Duab)
Video: DISDRO METER 2024, Kaum ib hlis
Anonim
Acoustic DISDRO Meter: Raspebbery Pi Open Weather Station (Ntu 2)
Acoustic DISDRO Meter: Raspebbery Pi Open Weather Station (Ntu 2)

DISDRO sawv cev rau kev faib cov tee. Cov cuab yeej sau qhov loj ntawm txhua qhov poob nrog lub sijhawm thwj cim. Cov ntaub ntawv muaj txiaj ntsig zoo rau ntau yam kev thov, suav nrog kev tshawb fawb huab cua (huab cua) thiab kev ua liaj ua teb. Yog tias qhov disdro yog qhov tseeb, nws tuaj yeem ntsuas tag nrho cov dej nag, zoo li ntsuas cua nag. Nws kuj tseem tuaj yeem siv ua lub ntsuas cua nag yooj yim.

DISDRO kuj tseem muaj txiaj ntsig hauv kev xam tus nqi nag, zoo li lwm lub tshuab ntsuas dej nag hauv computer (Ultrasonic Rain Gauge thiab tipping brackets)

Kuv txiav txim siab los tsim DISDRO no, vim tias kuv Ultrasonic Rain Gauge nyob rau theem no tsis raug rau thawj ib lossis ob hli los nag vim nws lub hauv paus tsis zoo ib yam thiab vim nws tuaj yeem lom zem.

Kauj Ruam 1: Yam Koj Yuav Tsum Tau

Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi

1) Raspberry pi, sai li sai tau, kuv siv raspberry pi 3

2) Pawg mov ci

3) Ntau cov jumper cables (20 yuav ua) thiab ob peb metres ntawm cov kab hluav taws xob nyias los ntawm koj tus PI mus rau DISDRO

4) MCP3008 ADC (Analog rau digital hloov pauv, lwm ADCs tuaj yeem ua tau).

5) Ib qho Piezo Electrical Eliment

6) CD qub

7) Carpenters Riam

8) Superglue

9) PLASTIK 70 (Optinal)

10) Python kev txawj ntse (Kuv yuav muab piv txwv tsab ntawv)

Feem ntau ntawm cov khoom no yuav tsum muaj los ntawm eBay. Cov neeg Asmeskas Qab Teb tuaj yeem siv Communica,

Kauj ruam 2: Tsim Koj Cov Khoos Phis Tawj

Tsim Koj Cov Khoos Phis Tawj
Tsim Koj Cov Khoos Phis Tawj
Tsim Koj Cov Khoos Phis Tawj
Tsim Koj Cov Khoos Phis Tawj

Tshem cov ntawv ci los ntawm cov txheej acrylic ntawm CD. Muab lub piezo tso rau tom qab ntawm daim CD. Pem hauv ntej ntawm CD yuav siv los mloog nag. Cov kab xiav (Teeb liab) yuav tsum txuas nrog rau channel 0 ntawm MCP3008, liab thiab dub yuav tsum txuas nrog 3.3 volt thiab hauv av feem.

Koj tuaj yeem siv cov txheej txheem zoo (Plastik 70) txhawm rau tiv thaiv dej hauv ntej ntawm CD thiab piezo. Tsis txhob tsuag nws rau sab nraum qab ntawm cd thiab piezo qhov twg cov xov hlau thiab tej hub txuas. Yog tias cov tshuaj txau txau cov piezo yuav tsis ua kom zoo.

Kauj Ruam 3: Tsim Koj Li Circuit Court rau PI, MCP3008 thiab Piezo Connection

Image
Image
Tsim Koj Li Circuit Court rau PI, MCP3008 thiab Piezo Connection
Tsim Koj Li Circuit Court rau PI, MCP3008 thiab Piezo Connection
Tsim Koj Li Circuit Court rau PI, MCP3008 thiab Piezo Connection
Tsim Koj Li Circuit Court rau PI, MCP3008 thiab Piezo Connection

Muaj ntau tus kws qhia ntawv txuas rau MCP3008 thiab Raspberry PI. Kuv siv Adafruit qhia thawj zaug:

Khoos phis tawj SPIT Txhawm rau siv kho vajtse SPI thawj zaug kom ntseeg tau tias koj tau qhib SPI siv cov cuab yeej raspi-teeb tsa (lossis mus rau koj lub desktop, Cov Ntawv Thov (Pib) Menue, Nyiam, Raspberry Pi Kev teeb tsa, cuam tshuam). Nco ntsoov teb yog rau ob qho uas ua rau SPI interface thiab thauj khoom SPI kernel module, tom qab ntawd rov pib dua Pi. Tam sim no xaim MCP3008 rau Raspberry Pi raws li hauv qab no:

MCP3008 VDD rau Raspberry Pi 3.3V

MCP3008 VREF rau Raspberry Pi 3.3V

MCP3008 AGND rau Raspberry Pi GND

MCP3008 DGND rau Raspberry Pi GND

MCP3008 CLK rau Raspberry Pi SCLK

MCP3008 DOUT rau Raspberry Pi MISO

MCP3008 DIN rau Raspberry Pi MOSI

MCP3008 CS/SHDN rau Raspberry Pi CE0

Tam sim no qhov kev siv tam sim no tuaj yeem siv rau ntau lub ntsuas hluav taws xob sib piv siv 3.3 volt input, suav nrog peb Piezo Electical Eliment.

Txuas lub Piezo Eliment Red cable (Volts in) mus rau PI 3.3 volts, hauv av rau hauv av thiab Piezo Output (Xiav) rau CH0 (Channel xoom) ntawm MCP3008.

Yog tias koj tsuas muaj cov khoom siv hluav taws xob piezo nrog cov kab liab thiab dub (tsis muaj pawg thawj coj saib), txuas cov kab liab liab rau channel 0 ntawm MCP 3008 thiab dub rau GND. Kuj txuas 1 Meg Ohms resistor ntawm MCP3008 channel 0 thiab hauv av (Lub Piezo thiab Resistor tau txuas nrog ua ke). Tus tiv thaiv yuav tiv thaiv MCP 3008 los ntawm qhov tam sim no thiab qhov siab tshaj qhov tsim los ntawm piezo.

Kuv kuj tau sim lub piezo nrog lub bitscope micro hauv daim vis dis aus. Txawm li cas los xij qhov no tsis tsim nyog.

Kauj ruam 4: Software

Kuv tau sau tsab ntawv yooj yim siv GPIOZERO lub tsev qiv ntawv rau MCP3008. Nws yog txuas nrog.

Nco ntsoov tias SPI tau qhib (Cov Ntawv Thov (Pib) Menue, Nyiam, Raspberry Pi Kev teeb tsa, cuam tshuam lossis sudo raspi-teeb tsa)

Khiav tsab ntawv, tso qee qhov tee thiab pom tias cov txiaj ntsig yog dab tsi. koj yuav tau hloov kho qhov pib hauv Python Code.

Pom zoo: