Cov txheej txheem:

Arduino Remote/Wireless Programming thiab Power Bank Homemade: 12 Cov Kauj Ruam (nrog Duab)
Arduino Remote/Wireless Programming thiab Power Bank Homemade: 12 Cov Kauj Ruam (nrog Duab)

Video: Arduino Remote/Wireless Programming thiab Power Bank Homemade: 12 Cov Kauj Ruam (nrog Duab)

Video: Arduino Remote/Wireless Programming thiab Power Bank Homemade: 12 Cov Kauj Ruam (nrog Duab)
Video: The Procedure "Entry Point Not Found Dynamic Link Library" Error Fixing In Windows 10 / 11 / 7 2024, Kaum ib hlis
Anonim
Image
Image
Cheeb Tsam Ntxiv
Cheeb Tsam Ntxiv

Teeb meem.

Kuv tsim cov duab kos ze rau PC thiab kuv siv usb thiab ntu rau "debug" hauv qhov no kuv tsim qhov lib rau DHT12, Kuv xa ib qho version ntawm github ntawm lub tsev qiv ntawv.

Tab sis tuaj txog qhov teeb meem: "thaum ntsuas kub qis dua 0 tus nqi nyeem tsis raug".

Tam sim no kuv yuav tsum ntsuas qhov teeb meem ntawm kuv lub freezer (: P) thiab kuv tsis xav rov sau dua daim duab thiab siv WIFI rau qhov xwm txheej yooj yim zoo li ntawd.

Yog li tsis muaj qhov sau dua tshiab kuv xav tau txuas ntxiv cov phiaj xwm zoo li yav dhau los, tab sis kuv Arduino yuav tsum mus ntawm kuv lub freezer.

Kuv xav tau 2 yam, ib qho yog roj teeb, tab sis kuv tsis paub muaj pes tsawg qhov kev ntsuas kuv yuav tsum ua yog li kuv xav tau lub roj teeb rov tau, thiab lub adapter ua haujlwm nrog microcontroller nyob deb, zoo li Bluetooth.

Xa mus rau kuv lub vev xaib rau kev hloov kho tshiab

Kauj Ruam 1: Cheeb Tsam Ntxiv

Cheeb Tsam Ntxiv
Cheeb Tsam Ntxiv
Cheeb Tsam Ntxiv
Cheeb Tsam Ntxiv

Rau kev sib txuas hauv tej thaj chaw deb Kuv yuav siv:

  1. Bluetooth adapter zoo li:

    1. HC-05 (tsuas yog ib feem sim)
    2. SPP C (eBay) (Yog tias koj tshawb nrhiav koj tuaj yeem pom nws ntawm 1.5 $)
    3. 0.1uf Capacitor (rau HC-05).

Txog lub zog hluav taws xob kuv yuav siv (koj tuaj yeem siv lub roj teeb 9v yooj yim rau arduino tab sis Nws tsis tuaj yeem them rov qab thiab kuv tsis paub ntsuas ntau npaum li cas kuv xav tau) lub pob hluav taws xob me me:

  1. TP4056 Lithium roj teeb Charger Module (eBay)
  2. 0.9V-5V rau 5V DC-DC USB Voltage Converter Step Up Booster Power Supply Module (eBay), Nws tsuas muaj 600mha ntawm cov zis, Yog tias koj xav tau qee yam tshaj lij> 1A koj yuav tsum mus ntawm no (Digi-key)
  3. 18560 Tus tuav roj teeb (Digi-Key) (SparkFun)
  4. 18560 Roj Teeb (SparkFun) (Digi-Key) yuav los ntawm no, Kuv tsim lub roj teeb muaj peev xwm ntsuas thiab kuv pom tias feem ntau ntawm 18650 roj teeb ntawm lub net muaj peev xwm dag (lub roj teeb ntawm kev xeem yog 4500mha tshaj tawm thiab 1100mha tiag)
  5. 2 txoj haujlwm hloov pauv (eBay)

Yog tias koj xav tau txhua yam hauv ib tus qauv koj tuaj yeem saib ntawm no (Digi-key)

Kauj Ruam 2: Lub Hwj Huam Siv Hluav Taws Xob (yooj yim Power Bank lossis UPS)

Lub Hwj Huam (Lub Hwj Huam Lub Hwj Huam yooj yim lossis UPS)
Lub Hwj Huam (Lub Hwj Huam Lub Hwj Huam yooj yim lossis UPS)
Lub Hwj Huam (Lub Hwj Huam Lub Hwj Huam yooj yim lossis UPS)
Lub Hwj Huam (Lub Hwj Huam Lub Hwj Huam yooj yim lossis UPS)
Lub Hwj Huam (Lub Hwj Huam Lub Hwj Huam yooj yim lossis UPS)
Lub Hwj Huam (Lub Hwj Huam Lub Hwj Huam yooj yim lossis UPS)

Hauv kuv chav kuaj kuv muaj ntau yam cuab yeej (yuav los tsim ib yam dab tsi) tab sis kuv xav tias me ntsis thaum muaj xwm ceev them nyiaj usb fais fab/pob roj teeb tau siv tau, yog li nrog 2 yam khoom siv yooj yim peb yuav tsim ib qho.

Kuv yuav TP4056 Lithium Battery Charger Module los tsim kuv lub hnub ci lub zog hluav taws xob chaw nres tsheb.

Thiab kuv muaj 5 qib nce tus qauv usb kom rov ua kuv lub xov tooj nrog ntau lub roj teeb, Nws hloov pauv hluav taws xob los ntawm 0.9-5v mus rau 5v tas li.

Hauv cov phiaj xwm kev sib txuas koj tuaj yeem pom tias peb yuav tsum ntxiv qhov hloov pauv ua ntej nce qib vim tias kom tau 5v Nws ntws tsis tu ncua tam sim no.

Nws tuaj yeem siv los ua lub txhab nyiaj hluav taws xob lossis UPS, lub roj teeb rov tuaj yeem rov ua tau thiab muab hluav taws xob rau tib lub sijhawm.

Kev sib txuas yog yooj yim, TP4056 cov roj teeb tso tawm mus rau roj teeb, TPR056 cov zis tawm mus rau nce qib usb module, ntawm cov xov tooj zoo yuav tsum ntxiv 2 txoj haujlwm hloov.

Kauj Ruam 3: Power Bank: ntawm Kev Ua Haujlwm

Image
Image

Cov vis dis aus tsawg kawg ntawm kev siv tus qauv ntawm lub txhab nyiaj no/UPS.

Kauj Ruam 4: Kev Txuas Hluav Taws Xob

Txuas Bluetooth Adapter rau Arduino los siv ua Kev Sib Txuas
Txuas Bluetooth Adapter rau Arduino los siv ua Kev Sib Txuas

Txhawm rau tsim qhov kev sib txuas nyob deb uas tsis muaj USB cable Kuv xav siv bluetooth module raws li kis dhau qhov pov tseg.

Tshaj li peb yuav tsum txuas thiab program Nws nrog peb Arduino. Cov phiaj xwm kev sib txuas yog rau kev ua haujlwm bluetooth adapter

Hauv kuv chav kuaj kuv muaj 2 tus qauv HC-05 thiab SPP C.

Tab sis kuv siv HC-05 ua wireless txuas ntawm kuv tus CNC router, tab sis tus nqi qis SPP C Nws txaus.

Feem ntau kuv siv 115200 baud tus nqi rau kis tau tus mob, yog li kuv teeb tsa kuv tus qauv bluetooth rau tus nqi ntawd.

Kauj Ruam 5: Kho Tus Qauv Bluetooth: HC-05 Clone

Rau HC-05 Kuv siv tus lej ntawd los teeb tsa rau kuv cnc.

Serial tso zis baud tus nqi yog teeb tsa ntawm no:

#define SERIAL_SPEED 115200

Bluetooth kev sib txuas lus baud tus nqi ntawm no:

#define BLUETOOTH_SPEED 38400

Thawj zaug koj yuav tsum teeb tsa teeb tsa bluetooth rau 9600 rau HC-06 cov khoom siv, 38400 rau HC-05 khoom siv.

Tshaj li teeb tsa bluetooth baudrate kom teeb tsa:

#define SET_BLUETOOTH_SPEED 115200

Koj tuaj yeem teeb lub npe ntaus ntawv tshiab:

#define BT_NAME "TEST-Reef"

Tab sis HC bluetooth module yog huv heev thiab tus qauv, tab sis cov cai ntawd tsis ua haujlwm ntawm SPPC.

Kauj Ruam 6: Kho Tus Qauv Bluetooth: HC-05 (zs-040)

Cov qauv no txawv ntawm lwm qhov, kev sib txuas zoo ib yam.

Ua ntej koj yuav tsum tau them sai sai rau yog tias muaj lub khawm (kom mus rau kev teeb tsa hom nias lub pob ntawd tsis yog tab sis tus pin siab 9 ntawm daim duab). Thaum coj ntsais qeeb (txhua 2 vib nas this) koj nyob rau hauv hom kev teeb tsa, hom teeb tsa tso rau ntawm 38400 baudrate, yog li koj yuav tsum tso cov lej thiab software txuas mus rau lub suab ntawd. Tshaj li ntxig cov lus txib no:

AT

AT+ORGL AT+POLAR = 1, 0 AT+NAME = Test-Reef AT+UART = 115200, 0, 0 AT+INIT

Them sai sai ATèORGL rov pib dua lub cuab yeej.

AT+INIT tuaj yeem muab Yuam Kev (17) tab sis tsis txhob txhawj Nws txhais tau tias Nws twb tau nyob hauv hom ntawd lawm.

Kauj Ruam 7: Kho Tus Qauv Bluetooth: SPP C

Cov cai rau SPP C tsis zoo li HC-05, tab sis qhov txiaj ntsig tseem zoo ib yam.

Serial tso zis baud tus nqi yog teeb tsa ntawm no:

#define SERIAL_SPEED 115200

Bluetooth kev sib txuas lus baud tus nqi ntawm no:

#define BLUETOOTH_SPEED 38400

Thawj zaug koj yuav tsum teeb tsa teeb tsa bluetooth rau 9600 rau HC-06 cov khoom siv, 38400 rau HC-05 khoom siv.

Tshaj li teeb tsa bluetooth baudrate kom teeb tsa:

#define SET_BLUETOOTH_SPEED 115200

Koj tuaj yeem teeb lub npe ntaus ntawv tshiab:

#define BT_NAME "TEST-Reef"

Kauj Ruam 8: Txuas Bluetooth Adapter rau Arduino Siv Ua Kev Sib Txuas

Txuas Bluetooth Adapter rau Arduino los siv ua Kev Sib Txuas
Txuas Bluetooth Adapter rau Arduino los siv ua Kev Sib Txuas
Txuas Bluetooth Adapter rau Arduino los siv ua Kev Sib Txuas
Txuas Bluetooth Adapter rau Arduino los siv ua Kev Sib Txuas

Rau HC05 qhov tsuas yog qhov yuav tsum tau nco yog qhov ntev ceg (+) ntawm lub capacitor mus pib dua, qhov tsis zoo mus rau DTR (lossis MCU-INT lossis Xeev) ntawm bluetooth adapter, koj tuaj yeem siv tau 0.1uf ceramic capacitor.

Kuv tsis tau sim HC-05 ua tus programmer tab sis tsuas yog hloov pauv ntawm USB cable rau kev sib txuas lus txuas, yog li kuv yuav qhia SPP-C module.

SPP-C module hauv kuv rooj plaub tsis ua haujlwm yog tias kuv ntxiv lub capacitor, tab sis ua haujlwm zoo yam tsis muaj: D.

Rx ntawm bluetooth adapter mus txuas rau tx ntawm microcontrollor, thiab tx rau rx, dua li koj yuav tsum txuas VCC thiab GND thiab DTR lossis MCU-INT lossis Lub Xeev ntawm bluetooth adapter kom rov pib dua microcontroller.

Rau kev ruaj ntseg zoo Nws yog qhov zoo uas ua qhov faib hluav taws xob piv rau RX bluetooth tus pin zoo li hauv daim duab vim tias hloov hluav taws xob yog 3.3v tsis yog 5v.

Kauj Ruam 9: Kos Duab Yooj Yim thiab Tshaj Tawm ntawm USB

Kuv tsim cov duab yooj yim heev rau upload, Nws tsuas yog sau tus lej zuj zus ntawm cov lej txhua 1500 milliseconds.

Hauv cov vis dis aus yog qhia cov qauv siv ntawm USB cable.

Kauj Ruam 10: Tib Yam Duab Sketch Upload Ntawm Bluetooth

Image
Image

Hauv cov vis dis aus no cov duab kos yav dhau los rub tawm ntawm Bluetooth tsis hloov pauv tus lej.

Kauj Ruam 11: Xeem Tiag

Kev Xeem Tiag
Kev Xeem Tiag
Kev Xeem Tiag
Kev Xeem Tiag
Kev Xeem Tiag
Kev Xeem Tiag

Tam sim no kuv xav tau lus teb los ntawm lub tub yees.

Los ntawm qhov tob ntawm lub tub yees, nyob ze cov hnyuv, qhov ntsuas qhov deb qhia kuv tias (damn) muaj kab laum ntawm kuv lub tsev qiv ntawv DHT12 thaum mus qis dua 0.

Kauj ruam 12: Ua tsaug

Kab ntawm DHT12 lib tam sim no tsau.

Pom zoo: