Cov txheej txheem:

Qib Sensor (siv Ultrasonic): 5 Kauj Ruam
Qib Sensor (siv Ultrasonic): 5 Kauj Ruam

Video: Qib Sensor (siv Ultrasonic): 5 Kauj Ruam

Video: Qib Sensor (siv Ultrasonic): 5 Kauj Ruam
Video: Aroma Diffuser Chav av noo, Suab Sensor Teeb, Hauv Tsev Khoom Siv Hluav Taws Xob Chaw Tsim Tshuaj 2024, Kaum ib hlis
Anonim
Qib Sensor (siv Ultrasonic)
Qib Sensor (siv Ultrasonic)

Liquid Level Sensor kuaj pom cov kua los ntawm qib av. Qhib lub cav (xav tau lub tshuab tsav lub zog tsav) hauv qab tus nqi muab thiab tua nws saum toj no tus nqi muab tom qab ua kua

Nta ntawm qhov system no:

  • Ua haujlwm nrog cov kua (dej, roj thiab lwm yam).
  • Ntau txog 250 cm hauv av deb (tseem siab ntawm lub tank).
  • Kev ntsuas kom raug (txog 2 cm yuam kev) nrog HC-SR04, Ping thiab lwm yam.
  • Lub cev muaj zog tswj cov zis.
  • Calibration (hauv runtime) muaj rau:

    • Hauv av: tuaj yeem ntsuas tau rau txhua lub tank (siab txog 250 cm siab) thaum lub kaw lus ua haujlwm, nrog lub laub khawm.
    • Lub cev tig rau thiab OFF qib: ON thiab OFF qib tuaj yeem teeb tsa nrog muab presets thiab khawm hloov hom.
  • Tsis txwv qhov taw qhia nrog '0 cm'.
  • Ua haujlwm ntawm 5V DC.

Qhov yuav tsum tau tsim:

  1. Arduino (lossis ATMega 328 nrog tus programmer).
  2. HC-SR04 lossis ib qho twg Ultrasonic sensor module.
  3. Presets (20K lossis 10K) - 2 Pc
  4. Txiv neej Header - 6 Pin
  5. Poj niam header 16 Pin
  6. Laub nyem micro hloov
  7. Thawb toggle micro hloov
  8. 10K 1/4 watt resistor
  9. 1N4007 Diode
  10. DC fais fab socket
  11. 220E tus tiv thaiv
  12. Veroboard (lossis Breadboard yog tias koj xav tau)
  13. Txuas cov xov hlau
  14. 16*2 LCD Screen nrog tus pin txiv neej headers txuas
  15. Tsav Tsheb thiab tsav tsheb (yog tias koj xav tau)
  16. Kev paub pib paub paub siv hluav taws xob thiab Arduino li cas

Kauj Ruam 1: Daim duab Circuit Court

Daim duab Circuit Court
Daim duab Circuit Court

Kauj ruam 2: Ua haujlwm

Ua hauj lwm
Ua hauj lwm

Hauv peb lub rooj tsav xwm sensor peb muaj ntu ultrasonic Tx thiab Rx. Lub sensor nyeem qhov deb ntawm theem ntawm cov kua. Tx yog qhov pib 40KHz hais lus, uas xa cov suab paj nruag ntawm 40KHz Ultrasonic suab. Lub sij hawm xa ntawv mem tes thiab lub sij hawm tau txais cov mem tes tau sau tseg rau txhua tus mem tes. Cov mem tes no tau hnov hauv MCU.

MCU sau tseg lub sijhawm sib txawv ntawm thiab tom qab ntawd nws siv lub suab nrawm los xam nrug. MCU yuav tsum tau ntsuas ua ntej kom sau nrug deb ntawm theem hauv av, uas yog thaum lub tank/ntim khoom tsis muaj dab tsi. Qhov sib txawv tau suav thiab yog li peb tau txais qib ntawm cov kua.

Cov qib tau pom hauv 16x2 LCD zaub. Tsis tas li lwm cov ntsiab lus tau qhia hauv kev tshuaj ntsuam.

Muaj ob qhov kev npaj ua ntej rau qhov siab tshaj plaws thiab qhov tsawg kawg tus nqi txwv ntawm lub tshuab hluav taws xob teeb liab. Qhov tshwm sim yog tsim thaum cov kua theem mus txog qhov siab tshaj qhov txwv tau teev tseg. Lub teeb liab rov mus qis dua thaum nws mus txog qis dua qhov txwv qis tshaj los ntawm lwm qhov kev npaj ua ntej.

Kev ntsuas ntsuas hauv av yog ua los ntawm kev hloov pauv, uas xa lub teeb liab mus rau atmega328 nti thiab nws sau cov tam sim no nyob deb thiab teev nws raws li siv hauv paus.

Kauj Ruam 3: Txoj Haujlwm - Arduino

Txoj haujlwm tau ua hauv Arduino. Siv qhov no txhawm rau hlawv rau Atmega328 (lossis ib qho uas koj nyiam).

Qhov kev zov me nyuam muaj nyob ntawm git raws li GPL-3.0.

Cov ntaub ntawv sau ua ke hex twb tau muab rau upload yooj yim siv arduino-builder.

Kev vam khom:

Newping tsev qiv ntawv.

Kauj Ruam 4: Calibration thiab Cov Ntaub Ntawv

Lub vijtsam LCD qhia txog qib tam sim no (sib txawv) los ntawm qib ntsuas.

Ob qhov kev txiav txim siab txiav txim siab sab saud (qib siab kawg) tom qab uas thauj khoom yuav tawm thiab qis dua (qib qis) tom qab uas thauj khoom yuav qhib. Thauj khoom npaj ntawm no yog twj tso kua mis, vim tias cov kab ke no siv tau rau hauv cov twj tso kua mis tsis siv neeg. Plaub lub taub hau yog rau sonic (ping) sensor. Kuv siv HC-SR04. Ib khub ntawm lub taub hau rau lub cav (tus lej digital 9). Yuav tsum muaj tus tsav tsheb sab nraud. Nws siv EEPROM los khaws cov ntaub ntawv ntsuas ntsuas.

Ob qhov kev ntsuas tau muab:

  • LEVEL_CAL
  • MOTOR_TRIGGER_CAL

Kauj Ruam 5: Twj Tswj

Lub rooj tsavxwm muaj 2 nplooj ntawv tshwj xeeb rau lub teeb liab

Ib qho muab 5V teeb liab thaum lub twj tso kua mis yuav tsum tau qhib (thaum cov kua mus rau qis dua preset qis txwv tus nqi) thiab muab 0V teeb liab thaum lub twj tso kua mis yuav tsum tau tso tawm (qib mus dhau qhov txwv qis).

Lub teeb liab raug xa mus rau pawg tswj hwm tswj hwm lub twj tso kua mis AC.

Pom zoo: