Cov txheej txheem:

HC-12 Qhov Chaw Ua Haujlwm Huab Cua Ntev Ntev Ntev thiab DHT Sensors: 9 Kauj Ruam
HC-12 Qhov Chaw Ua Haujlwm Huab Cua Ntev Ntev Ntev thiab DHT Sensors: 9 Kauj Ruam

Video: HC-12 Qhov Chaw Ua Haujlwm Huab Cua Ntev Ntev Ntev thiab DHT Sensors: 9 Kauj Ruam

Video: HC-12 Qhov Chaw Ua Haujlwm Huab Cua Ntev Ntev Ntev thiab DHT Sensors: 9 Kauj Ruam
Video: Huab Vwj & Celesna Lor- Qhov Tawv Tawv-Nkauj Tawm Tshiab 2024, Hlis ntuj nqeg
Anonim
HC-12 Ntev Ntau Qhov Chaw Nyob Huab Cua Huab Cua thiab DHT Sensors
HC-12 Ntev Ntau Qhov Chaw Nyob Huab Cua Huab Cua thiab DHT Sensors

Hauv qhov kev qhia no peb yuav kawm paub yuav ua li cas thiaj ua lub chaw nres tsheb huab cua nyob deb deb siv ob lub dht sensors, HC12 modules thiab I2C LCD Display.

Saib Video!

Kauj ruam 1: Yam Koj Yuav Tsum Tau

Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
  • 2X HC-12 Module
  • I2C LCD Zaub 4X20
  • 2 DHT sensors (Hauv peb qhov haujlwm peb siv DHT11, DHT22)
  • 2X Arduino UNO (lossis lwm yam Arduino)
  • Cov qhob cij
  • Jumper xov hlau
  • Visuino software: Rub tawm Visuino

Kauj ruam 2: Circuit - Sender

Circuit - Sender
Circuit - Sender
  • Txuas HC-12 tus pin [VCC] rau Arduino tus pin [5V]
  • Txuas HC-12 tus pin [GND] rau Arduino tus pin [GND]
  • Txuas HC-12 tus pin [TX] rau Arduino tus pin [RX]
  • Txuas HC-12 tus pin [RX] rau Arduino tus pin [TX]
  • Txuas DHT22 (lossis lwm yam DHT sensor) tus pin Tawm rau Arduino Digital tus pin 3
  • Txuas DHT22 tus pin VCC (+) rau Arduino tus pin 5V
  • Txuas DHT22 tus pin GND (-) rau Arduino tus pin GND

Nco tseg: Nco ntsoov tias koj txuas tus Arduino tus pin [RX] thaum koj tso tus lej hauv Visuino, thiab tom qab nws tau rub tawm rov txuas nws dua.

Kauj Ruam 3: Circuit -Receiver

Circuit Court - Txais
Circuit Court - Txais
  • Txuas HC-12 tus pin [VCC] rau Arduino tus pin [5V]
  • Txuas HC-12 tus pin [GND] rau Arduino tus pin [GND]
  • Txuas HC-12 tus pin [TX] rau Arduino tus pin [RX]
  • Txuas HC-12 tus pin [RX] rau Arduino tus pin [TX]
  • Txuas LCD Zaub pin [VCC] rau Arduino tus pin [5V]
  • Txuas LCD Zaub pin [GND] rau Arduino tus pin [GND]
  • Txuas LCD Display pin [SDA] rau Arduino tus pin [SDA]
  • Txuas LCD Display pin [SCL] rau Arduino tus pin [SCL]
  • Txuas DHT11 (lossis lwm yam DHT sensor) tus pin Tawm rau Arduino Digital tus pin 2
  • Txuas DHT11 tus pin VCC (+) rau Arduino tus pin 5V
  • Txuas DHT11 tus pin GND (-) rau Arduino tus pin GND

Nco tseg: Nco ntsoov tias koj txuas tus Arduino tus pin [RX] thaum koj tso tus lej hauv Visuino, thiab tom qab nws tau rub tawm rov txuas nws dua.

Kauj Ruam 4: Pib Visuino, thiab Xaiv Arduino UNO Board Type

Pib Visuino, thiab Xaiv Arduino UNO Board Type
Pib Visuino, thiab Xaiv Arduino UNO Board Type
Pib Visuino, thiab Xaiv Arduino UNO Board Type
Pib Visuino, thiab Xaiv Arduino UNO Board Type

Visuino: https://www.visuino.eu tseem yuav tsum tau teeb tsa. Rub tawm Dawb version lossis sau npe rau Kev Sim Dawb.

Pib Visuino raws li pom hauv thawj daim duab Nyem rau ntawm "Cov cuab yeej" khawm ntawm Arduino tivthaiv (Daim Duab 1) hauv Visuino Thaum qhov kev sib tham tshwm, xaiv "Arduino UNO" raws li qhia hauv daim duab 2

Kauj Ruam 5: Tus Neeg Xa - hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam

Sender - hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
Sender - hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
Sender - hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
Sender - hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
Sender - hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
Sender - hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
Sender - hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
Sender - hauv Visuino Ntxiv, Teeb & Txuas Cheeb Tsam
  • Ntxiv "Pulse Generator" tivthaiv thiab hauv cov khoom qhov rai teeb tsa zaus rau 5Hz
  • Ntxiv "Vaum thiab Ntsuas Kub DHT11/21/22/AM2301" tivthaiv, thiab hauv lub qhov rai qhov khoom xaiv hom, hauv peb kis nws DHT22
  • Ntxiv "Analog To Analog Array" thiab hauv cov khoom qhov rai teeb tsa Input Pins rau 2
  • Ntxiv "Pob" cov khoom tiv thaiv, ob npaug nias rau nws thiab hauv Elements window drag "Analog Array" mus rau sab laug, tom qab ntawd kaw Elements window.
  • Txuas PulseGenerator1 tus pin tawm rau HumidityThermometer1 tus pin moos thiab pob ntawv 1 tus pin moos
  • Txuas HumidityThermometer1 tus pin Sensor rau Arduino Digital tus pin 3
  • Txuas HumidityThermometer1 tus pin Kub rau AnalogToAnalogArray1 tus pin [0] thiab tus pin Clock
  • Txuas HumidityThermometer1 tus pin Vaum rau AnalogToAnalogArray1 tus pin [1] thiab tus pin Clock
  • Txuas AnalogToAnalogArray1 rau Pob 1> Analog Array1 tus pin Hauv
  • Txuas Packet1 Pin Out rau Arduino Serial [0] pin In

Kauj Ruam 6: Tus Txais - hauv Visuino Ntxiv & Teeb Khoom

Txais - hauv Visuino Ntxiv & Teeb Khoom
Txais - hauv Visuino Ntxiv & Teeb Khoom
Txais - hauv Visuino Ntxiv & Teeb Khoom
Txais - hauv Visuino Ntxiv & Teeb Khoom
Txais - hauv Visuino Ntxiv & Teeb Khoom
Txais - hauv Visuino Ntxiv & Teeb Khoom
Txais - hauv Visuino Ntxiv & Teeb Khoom
Txais - hauv Visuino Ntxiv & Teeb Khoom
  • Ntxiv "Pulse Generator" tivthaiv thiab hauv cov khoom qhov rai teeb tsa zaus rau 5
  • Ntxiv "Vaum thiab Ntsuas Kub DHT11/21/22/AM2301" tivthaiv thiab hauv cov khoom qhov rai teeb tsa Hom (Hauv Peb Cov Ntaub Ntawv nws DHT11)
  • Ntxiv "Liquid Crystal Display (LCD) - I2C" tivthaiv thiab hauv cov khoom qhov rai teeb tsa Kab rau 20, Kab rau 4
  • Ob npaug nyem rau ntawm "LiquidCrystalDisplay1" thiab hauv Elements window luag "Text Field" mus rau sab laug, thiab hauv cov khoom qhov rai teeb tsa dav rau 20
  • Hauv Elements window Drag lwm qhov "Text Field" mus rau sab laug thiab hauv cov khoom vaj khoom tsev teeb tsa Kab rau 1 thiab dav txog 20
  • Hauv Elements window Drag lwm qhov "Text Field" mus rau sab laug thiab hauv cov khoom vaj khoom tsev teeb tsa Kab rau 2 thiab dav txog 20
  • Hauv Elements window Drag lwm qhov "Text Field" mus rau sab laug thiab hauv cov khoom vaj khoom tsev teeb tsa Kab rau 3 thiab dav txog 20
  • Kaw lub Elements window

Ntxiv 4X "Cov Qauv Ntawv" cov ntawv tivthaiv thiab rau txhua tus hauv lub qhov rai qhov khoom teeb tsa Cov Ntawv rau: %0 %1

  • Ob npaug nias rau ntawm "FormattedText1" thiab hauv Elements window drag "Text Element" mus rau sab laug thiab hauv lub qhov rai khoom teeb tsa tus nqi pib rau: Sab hauv TEMP: Hauv Elements window kuj Drag "Elements Analog" mus rau sab laug thiab hauv lub ntsej muag lub ntsej muag teeb tsa qhov tseeb rau 2 Kaw lub Elements Window
  • Ob npaug nias rau ntawm "FormattedText2" thiab hauv Elements window drag "Text Element" mus rau sab laug thiab hauv lub qhov rai khoom teeb tsa tus nqi pib rau: Sab hauv HUM: Hauv Elements window kuj Drag "Elements Analog" mus rau sab laug thiab hauv lub ntsej muag lub ntsej muag teeb tsa Precision rau 2 Kaw Qhov Elements Window
  • Ob npaug nias rau ntawm "FormattedText3" thiab hauv Elements window drag "Text Element" mus rau sab laug thiab hauv lub qhov rai khoom teeb tsa tus nqi pib rau: Tawm TEMP: Hauv Elements window kuj Drag "Analog Element" mus rau sab laug thiab hauv lub qhov rai khoom teeb tsa Precision rau 2

    Kaw lub Elements Window

  • Ob npaug nyem rau ntawm "FormattedText4" thiab hauv Elements window drag "Text Element" mus rau sab laug thiab hauv lub qhov rai khoom teeb tsa tus nqi pib rau: Tawm HUM: Hauv Elements window kuj Drag "Elements Analog" mus rau sab laug thiab hauv lub ntsej muag lub ntsej muag teeb tsa Precision rau 2 Kaw Cov Elements Window
  • Ntxiv "Unpacket" tivthaiv
  • Nyem ob npaug rau ntawm Unpacket1 thiab hauv Elements window dragAnalog Array mus rau sab laug Kaw Elements window Kaw Elements window
  • Ntxiv "Analog Array To Analog" tivthaiv thiab hauv cov khoom vaj khoom tsev teeb tsa Pins rau 2

Kauj Ruam 7: Tus Txais - hauv Visuino Connect Components

Txais - hauv Visuino Txuas Cov Khoom Siv
Txais - hauv Visuino Txuas Cov Khoom Siv
Txais - hauv Visuino Txuas Cov Khoom Siv
Txais - hauv Visuino Txuas Cov Khoom Siv
Txais - hauv Visuino Txuas Cov Khoom Siv
Txais - hauv Visuino Txuas Cov Khoom Siv
Txais - hauv Visuino Txuas Cov Khoom Siv
Txais - hauv Visuino Txuas Cov Khoom Siv
  • Txuas "PulseGenerator1" pin Out to "HumidityThermometer1" pin Clock
  • Txuas "HumidityThermometer1" Pin Sensor rau Arduino Digital tus pin 2
  • Txuas "HumidityThermometer1" tus pin Kub rau "FormattedText1"> Analog Element1 pin In, thiab Pin Clock
  • Txuas "HumidityThermometer1" tus pin Vaum rau "FormattedText2"> Analog Element1 pin In, thiab Pin Clock
  • Txuas Arduino Serial [0] tus pin Tawm rau "Unpacket1" tus pin Hauv
  • Txuas "Unpacket1"> AnalogArray1pin Tawm rau "AnalogArrayToAnalog1" tus pin Hauv
  • Txuas "AnalogArrayToAnalog1" pin [0] rau "FormattedText3"> Analog Element1 pin In, thiab Pin Clock
  • Txuas "AnalogArrayToAnalog1" pin [1] mus rau "FormattedText4"> Analog Element1 pin In, thiab Pin Clock
  • Txuas "FormattedText1" pin Out to "LiquidCrystalDisplay1"> Text Field1 Pin In
  • Txuas "FormattedText2" pin Out to "LiquidCrystalDisplay1"> Text Field2 Pin In
  • Txuas "FormattedText3" tus pin tawm mus rau "LiquidCrystalDisplay1"> Text Field3 Pin In
  • Txuas "FormattedText4" pin Out to "LiquidCrystalDisplay1"> Text Field4 Pin In
  • Txuas "LiquidCrystalDisplay1" tus pin I2C Tawm rau Arduino tus pin I2C Hauv

Kauj Ruam 8: Tsim, Ua Ke, thiab Tshaj Tawm Arduino Code

Tsim, Sau, thiab Tso Tawm Arduino Code
Tsim, Sau, thiab Tso Tawm Arduino Code

Rau ob qho tib si Sender thiab Receiver:

Hauv Visuino, hauv qab nyem rau ntawm "Tsim" Tab, xyuas kom tseeb tias qhov chaw nres nkoj raug xaiv, tom qab ntawd nyem rau ntawm "Compile/Build and Upload" khawm.

Tseem ceeb heev! Nco ntsoov tias thaum koj tab tom tso tus lej uas Pin RX ntawm Arduino raug kaw thiab tom qab rub tawm txuas nws rov qab.

Kauj ruam 9: Ua si

Yog tias koj siv zog ob qho tib si Arduino UNO cov qauv, Cov Zaub ntawm tus txais yuav pib qhia qhov kub thiab txias ntawm ob qho tib si. Koj tuaj yeem tso tus neeg xa tawm sab nraud thiab koj yuav tuaj yeem saib xyuas Sab Hauv thiab Sab Nraud Kub.

Nrog koj zoo siab! Koj tau ua tiav koj txoj haujlwm nrog Visuino. Kuj txuas nrog yog Visuino qhov haujlwm, uas kuv tau tsim rau Cov Lus Qhia no, koj tuaj yeem rub nws thiab qhib nws hauv Visuino:

Pom zoo: