Cov txheej txheem:
- Kauj Ruam 1: Yam Koj Xav Tau
- Kauj Ruam 2: Ua PCB
- Kauj Ruam 3: Cov Khoom Siv Hluav Taws Xob
- Kauj ruam 4: Programming ESP8266
- Kauj Ruam 5: Ua Case
- Kauj Ruam 6: Yuav Siv Li Cas
- Kauj ruam 7: Serial Data Forwarding
- Kauj Ruam 8: Txuas rau Router
- Kauj Ruam 9: Serial Port hla Internet
- Kauj Ruam 10: Siv WiFi ncaj qha rau hauv koj qhov program
Video: Serial Port Over WiFi: 10 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Kev sib txuas lus cov ntaub ntawv ntawm cov khoom siv hluav taws xob yog qhov tsis yooj yim sua hauv ntau txoj haujlwm hluav taws xob thiab coj ntau qhov zoo rau koj txoj haujlwm piv txwv li txuas koj lub microcontroller rau PC thiab saib xyuas cov ntaub ntawv ntawm cov yeeb yuj loj loj siv me me monochrome LCD. Thaum tham txog kev txuas lub cuab yeej rau PC, txoj kev pom tseeb tshaj plaws ntawm kev sib txuas lus yog USB chaw nres nkoj. Tab sis xa cov ntaub ntawv hla USB xav tau ntau txoj haujlwm. Lwm txoj hauv kev yooj yim yog Serial Port (aka COM) thiab RS232 raws tu qauv uas tsuas xav tau cov hluav taws xob me me hloov pauv hluav taws xob ntau ntau thiab ua haujlwm me ntsis. Yog li kuv tau ua RSS232-TTL UART adapter thiab luam tawm ntawm no los siv hauv txhua qhov ntawm kuv cov phiaj xwm. Tab sis kuv ntsib teeb meem tshiab, niam tshiab thiab lub khoos phis tawj tsis muaj chaw nres nkoj COM. Tom qab ntawd kuv txiav txim siab los ua USB-TTL UART adapter siv nto npe FT232 IC rau kuv cov phiaj xwm. Nws ua haujlwm tau zoo heev, tab sis cov xov hlau ntev los ntawm cov cuab yeej rau PC ua rau kuv ntxhov siab. Puas yog nws muaj peev xwm muaj qhov chaw nres nkoj hauv huab cua zoo li nas nas thiab keyboard? Tau kawg, nws tuaj yeem ua tiav siv qhov zoo nkauj WiFi module ESP8266, thiab los ntawm kev siv WiFi koj tsis tas yuav ua dongle koj tus kheej thiab koj tseem tuaj yeem muaj chaw nres nkoj txuas hauv is taws nem. Wow, Kuv tsuas xav tau lub chaw nres nkoj tsis muaj xov tooj, tam sim no kuv tseem muaj chaw nres nkoj txuas hauv lub vev xaib. Qhov ntawd zoo siab heev.
Cov vis dis aus qhia kev tswj hwm E-pov tseg CNC (3D tshuab luam ntawv) siv cov cuab yeej no.
Kuv xav qhia txoj haujlwm no nrog koj. Yog tias koj nyiam nws, ua raws kuv.
Kauj Ruam 1: Yam Koj Xav Tau
- 1x ESP8266-01 tus qauv
- 1x 78L05 tus tswj hluav taws xob
- 1x LF33CV qhov ntsuas hluav taws xob
- 1 x BC547 transistor
- 3x 100uF electrolyte capacitor
- 1 x 100nF MKT capacitor
- 1 x 4.7K resistor
- 6 x 10K resistors
- 1x 1 N4148 diode
- 2x Cov khawm me me
- 8x Poj niam tus pin headers
- 1x Fais fab txuas (poj niam)
- 1x Fais fab txuas (txiv neej)
- 1x 3.5mm lub tso suab lub suab txuas (txiv neej)
- Qee cov xov hlau
- Qee pawg tooj liab
- PCB ua cov cuab yeej (ntawv txhuam, ntawv ci, tshuab luam ntawv laser, PCB cov ntawv, acetone, ferric chloride etchant, ntim yas, thiab lwm yam)
- Cov cuab yeej soldering (hlau, xaim, flux, xaim txiav, thiab lwm yam)
- Qee daim npav yas uas siv tsis tau thiab kua nplaum los ua rooj plaub
Kauj Ruam 2: Ua PCB
Luam cov ntawv PCB nrog lub tshuab luam ntawv laser ntawm daim ntawv A4 ci ntsa iab yam tsis tau ntsuas. Txiav ib co ntawv tooj liab, tshem nws nrog cov ntawv xuab zeb, nchuav qee cov acetone rau ntawm lub rooj tsavxwm, muab cov ntawv luam tawm rau nws thiab nias lawv li 10 vib nas this thiab tos kom nws qhuav. Tshem tawm cov ntawv, yog tias muaj qee qhov uas cov kab hluav taws xob tsis cuam tshuam zoo kho lawv nrog daim npav CD. Tom qab ntawd tsau lub rooj tsavxwm hauv ferric chloride etchant thiab tos kom tsis pom qhov tooj liab tuaj yeem pom. Ntxuav lub rooj tsavxwm nrog dej, qhuav thiab tshem nws nrog cov ntawv xuab zeb, tom qab ntawd tho qhov. Muaj ntau Cov Lus Qhia los qhia koj yuav ua li cas thiaj ua tau PCB.
Kauj Ruam 3: Cov Khoom Siv Hluav Taws Xob
Cheebtsam cov khoom siv raws li cov ntawv ntawm lub rooj tsavxwm thiab daim duab qhia chaw. Pom qhov kev taw qhia ntawm cov tswj hluav taws xob, transistor, diode, thiab electrolyte capacitors. Muaj ntau Cov Lus Qhia los qhia koj yuav ua li cas thiaj li yuav siv tau. Daim ntawv ceeb toom tias anode nyob ntawm qhov nruab nrab ntawm lub zog txuas thaum txuas nws mus rau lub rooj tsavxwm. Txuas 3.5 hli lub suab txuas rau RX, TX thiab GND lub dav hlau ntawm lub rooj tsavxwm raws li nws daim duab. Solder poj niam tus pin headers rau qhov chaw ntawm ESP8266 module.
Kauj ruam 4: Programming ESP8266
Tshawb xyuas lub vev xaib no kom pom qhov muag ESP8266 nrog Arduino. Koj tuaj yeem pom cov ntawv muaj txiaj ntsig. Kuv flashed nws siv kuv li USB-TTL UART adapter thiab lub rooj tsav xwm me uas kuv tau ua rau nyem thiab ntsuas ESP8266-01 (Yog tias koj xav ua nws, rub nws cov ntawv los ntawm cov kauj ruam no thiab ua rau koj ESP8266 flasher). Rub tawm cov lej hauv qab no thiab nyem koj li ESP8266. Tom qab ntawd muab nws tso rau hauv nws qhov chaw ntawm koj lub rooj tsavxwm. LF33CV tus tswj hluav taws xob tiv thaiv kev txuas ESP8266 tus qauv hauv qhov tsis raug.
Kauj Ruam 5: Ua Case
Kuv tshem qee daim npav yas uas tsis muaj txiaj ntsig nrog cov ntawv xuab zeb thiab ua rooj plaub rau cov cuab yeej no los ntawm kev lo lawv ua ke. Tsis txhob hnov qab ua qhov rau txias LF33CV.
Kauj Ruam 6: Yuav Siv Li Cas
Kuv tso ob lub txuas rau lub hwj chim (ib tug txiv neej thiab ib tug poj niam) kom muaj peev xwm tso tau cov cuab yeej no yooj yim ntawm AC cov khoom tso tawm thiab cov teeb uas yuav tsum txuas rau lub chaw nres nkoj txuas, yog li koj tsis tau npaj lwm lub zog siv rau lub cuab yeej no. Raws li LF33CV cov ntaub ntawv, koj tuaj yeem siv lub tshuab ntaus ntawv no los ntawm 3.5VDC txog 18VDC.
Txuas 3.5mm lub suab txuas mus rau qhov chaw nres nkoj txuas ntawm lub hom phiaj ntaus ntawv, thiab txiv neej lub zog txuas rau lub zog hluav taws xob ntawm lub hom phiaj ntaus ntawv. Plug AC adapter tso rau hauv "Serial Port hla WiFi" DC cov khoom txuas txuas.
Hauv koj lub PC txuas rau "dihavSerialPort_XXXXXX" nkag mus siv, ntaus IP chaw nyob hauv hom nkag hom yog "192.168.4.1".
Rub tawm Windows daim ntawv thov Kuv rub tawm ntawm no, thiab ua nws ntawm koj lub PC. Ntaus ntaus IP, xaiv tus nqi baud, nres me ntsis, cov ntaub ntawv me me, sib npaug thiab nyem "Txuas" khawm. Nyem "Tso cai nkag mus" khawm ntawm "Windows Security Alert" window. Koj tuaj yeem xa cov ntaub ntawv los ntawm kev ntaus nws mus rau hauv lub npov hauv qab no "Disconnect" khawm li ASCII, hex lossis decimal thiab nias ntsig txog "Xa XXX" khawm. Xa thiab tau txais cov ntaub ntawv yuav tshwm nyob rau hauv rau lub thawv hauv qab no "Xa XXX" khawm.
Muaj qhov HTML-based interface uas ua rau nws muaj peev xwm nkag mus rau qhov chaw nres nkoj hauv lub vev xaib ntawm txhua lub OS. Txhawm rau nkag mus rau nws ntaus "192.168.4.1" hauv qhov chaw nyob ntawm koj tus browser browser thiab ntaus nkag.
Kauj ruam 7: Serial Data Forwarding
Hauv ntau daim ntawv thov, muaj software uas yuav tsum txuas rau lub cuab yeej ntawm chaw nres nkoj txuas. Txhawm rau ua qhov no tuaj yeem rub tawm com0com thiab nruab nws hauv koj lub PC. Tsim ib khub ntawm cov chaw nres nkoj virtual xaiv ib qho ntawm lawv ua qhov chaw nres nkoj hauv "dihav SerialPort hla WiFi" software thiab xaiv lwm qhov hauv software uas tswj hwm koj lub cuab yeej. Txhawm rau tsim kev sib txuas nias lub pob txuas.
Kauj Ruam 8: Txuas rau Router
Koj tseem tuaj yeem txuas cov cuab yeej no rau lub router tsis siv nws ua qhov chaw nkag. Txhawm rau ua qhov no tsuas yog xaub mus rau nplooj ntawv teeb tsa lub cuab yeej los ntawm kev ntaus "192.168.4.1/set" rau hauv qhov chaw nyob ntawm koj tus browser. Ntawm nplooj ntawv no, koj tuaj yeem hloov lub npe ntaus ntawv, nkag mus rau lo lus zais thiab qhia lub router koj xav kom lub cuab yeej no txuas nrog los ntawm kev ntaus nws lub npe thiab tus password. Nws raug pom zoo kom muab tus IP chaw nyob zoo rau lub cuab yeej no yog tias koj xav kom nws txuas nws mus rau lub router. Txhawm rau nrhiav seb yuav ua li cas no tsuas yog tshawb hauv internet rau "Muab tus IP zoo li qub". Nco ntsoov tias yog koj txuas lub cuab yeej no rau lub router, IP chaw nyob tsis yog "192.168.4.1" ntxiv lawm. Txhawm rau rov pib dua txhua qhov kev teeb tsa tuav "Rov Pib Dua Passwords" khawm ntawm lub cuab yeej li 2 vib nas this.
Kauj Ruam 9: Serial Port hla Internet
Tam sim no peb tau mus txog qhov txaus siab. Txhawm rau nkag mus rau qhov chaw nres nkoj hauv internet tshawb hauv is taws nem rau "IP xa mus" kom paub yuav ua li cas. Tom qab ntawd xa cov chaw nres nkoj 80 thiab 2321 ntawm lub cuab yeej koj tau ua hauv internet. Kev muab tus IP zoo li qub rau lub cuab yeej no yuav pab koj ntau hauv theem no. Tshawb nrhiav "Kuv IP" hauv Google, koj tuaj yeem pom koj tus IP nyob rau sab saum toj ntawm cov txiaj ntsig tshawb fawb. Nws yog IP chaw nyob uas koj yuav tsum siv nws txhawm rau nkag mus rau qhov chaw nres nkoj hauv internet.
Kauj Ruam 10: Siv WiFi ncaj qha rau hauv koj qhov program
Yog tias koj xav ua qhov program uas txuas ncaj qha rau lub cuab yeej no yam tsis tau siv software rub tawm los ntawm kauj ruam 6, siv cov txheej txheem hauv qab no, Kuv tau ua rau lub cuab yeej no.
- Txhua yog byte.
- Baud tus nqi ntawm chaw nres nkoj 2321 yog tus lej 4-byte uas tseem ceeb tshaj byte yuav xa ua ntej.
-
Txuas:
-
HTTP (Chaw Nkag 80):
- Thov: POST con
- bdrt = #### & dbt =#& sbt =#& prty =#
- Teb: OK lossis ER
-
Chaw nres nkoj 2321:
- Thov: [1] [bdrt] [bdrt] [bdrt] [bdrt] [dbt] [sbt] [prty]
- Teb: [0] lossis [1]
-
-
Txiav txuas:
-
HTTP (Chaw Nkag 80):
- Xav tau: Tau txais dis
- Teb: OK
-
Chaw nres nkoj 2321:
- Thov: [2]
- Teb: [1]
-
-
Tau Txais Cov Ntaub Ntawv:
-
HTTP (Chaw Nkag 80):
- Thov: Tau txais rec
- Teb: OK … cov ntaub ntawv (hex) … lossis ER
-
Chaw nres nkoj 2321:
Cov ntaub ntawv bytes yuav raug xa mus rau lub server tsim hauv PC ntawm chaw nres nkoj 2321
-
-
Xa Cov Ntaub Ntawv:
-
HTTP (Chaw Nkag 80):
- Thov: POST snd
- … Cov ntaub ntawv (hex)…
- Teb: OK lossis ER
-
Chaw nres nkoj 2321:
- Thov: [3] [cov ntaub ntawv (max255)]… cov ntaub ntawv…
- Teb: [0] lossis [1]
-
-
Kuaj Kev Sib Txuas:
-
Chaw nres nkoj 2321:
- Thov: [4]
- Teb: [44]
-
Pom zoo:
Kho Mac Lilypad USB Serial Port/Driver Qhov Teeb Meem: 10 Kauj Ruam (nrog Duab)
Kho Mac Lilypad USB Serial Port/Driver Qhov Teeb Meem: Raws li xyoo 2016, koj lub Mac muaj hnub nyoog qis dua 2 xyoos? Puas yog koj nyuam qhuav hloov kho rau OS tshiab tshaj plaws (Yosemite lossis lwm yam tshiab dua)? Puas yog koj Lilypad USBs/MP3s tsis ua haujlwm ntxiv lawm? nyeem yuav qhia koj li cas kuv kho kuv Lilypad USBs.Qhov yuam kev kuv ntsib yog cuam tshuam nrog
Ua SAMD21-based Boards USB Port Into a Hardware Serial Port !: 3 Cov Kauj Ruam
Ua SAMD21-based Boards USB Port Into a Hardware Serial Port!: Nws yog tus txheej txheem niaj hnub no los siv Arduino (lossis lwm yam sib xws) board USB chaw nres nkoj raws li qhov chaw nyob. Qhov no muaj txiaj ntsig zoo rau kev debugging, xa thiab txais cov ntaub ntawv los ntawm peb cov laug cam uas kuv nyiam
Txuas txuas ntau lub ntsej muag rau ib qho ARDUINO UNO SERIAL PORT: 4 Cov Kauj Ruam
Kev sib txuas ntau lub ntsej muag rau ib qho ARDUINO UNO SERIAL PORT: Hauv qhov kev qhia no, peb yuav nthuav dav ib qho Arduino UNO UART (Rx/Tx) qhov chaw nres nkoj kom ntau Atlas sensors tuaj yeem txuas nrog. Kev nthuav dav tau ua tiav siv 8: 1 Serial Port Expander board. Arduino qhov chaw nres nkoj tau txuas rau qhov nthuav dav tom qab
UChip - Serial Over IR!: 4 Kauj Ruam
UChip-Serial Over IR!: Kev sib txuas lus wireless tau dhau los ua qhov tseem ceeb hauv peb cov haujlwm niaj hnub no thiab tham txog wireless, thawj qhov uas los rau kuv lub siab yog Wi-nkaus lossis BT, tab sis tuav Wi-nkaus lossis BT kev sib txuas lus tsis yog ib txoj haujlwm yooj yim thiab siv ntau ntawm
Saib Serial Monitor Over Bluetooth: 4 Cov Kauj Ruam
Saib Serial Monitor Over Bluetooth: Txoj haujlwm no siv HC -05 Bluetooth module los hloov qhov kev sib txuas ib txwm siv los saib lub tshuab saib. Cov khoom siv: Arduino - https://amzn.to/2DLjxR2 Breadboard - https://amzn.to /2RYqiSK Jumper xov hlau - https://amzn.to/2RYqiSK H