Cov txheej txheem:

Kev Ntsuas Siab Zoo Cov Ntaub Ntawv Hauv Chaw Siv Kev Siv Multimeter/Arduino/pfodApp: 10 Cov Kauj Ruam (nrog Duab)
Kev Ntsuas Siab Zoo Cov Ntaub Ntawv Hauv Chaw Siv Kev Siv Multimeter/Arduino/pfodApp: 10 Cov Kauj Ruam (nrog Duab)

Video: Kev Ntsuas Siab Zoo Cov Ntaub Ntawv Hauv Chaw Siv Kev Siv Multimeter/Arduino/pfodApp: 10 Cov Kauj Ruam (nrog Duab)

Video: Kev Ntsuas Siab Zoo Cov Ntaub Ntawv Hauv Chaw Siv Kev Siv Multimeter/Arduino/pfodApp: 10 Cov Kauj Ruam (nrog Duab)
Video: Zoo Siab Nrog Koj - Paj Tsua Thoj [ Official MV ] Nkauj Tawm Tshiab 2022 2024, Hlis ntuj nqeg
Anonim
Kev Raug Siab Tshaj Tawm Cov Ntaub Ntawv Ruaj Ntseg Siv Multimeter/Arduino/pfodApp
Kev Raug Siab Tshaj Tawm Cov Ntaub Ntawv Ruaj Ntseg Siv Multimeter/Arduino/pfodApp
Kev Raug Siab Tshaj Tawm Cov Ntaub Ntawv Ruaj Ntseg Siv Multimeter/Arduino/pfodApp
Kev Raug Siab Tshaj Tawm Cov Ntaub Ntawv Ruaj Ntseg Siv Multimeter/Arduino/pfodApp
Kev Raug Rho Tawm Cov Ntaub Ntawv Ruaj Ntseg Siv Multimeter/Arduino/pfodApp
Kev Raug Rho Tawm Cov Ntaub Ntawv Ruaj Ntseg Siv Multimeter/Arduino/pfodApp

Hloov kho zaum 26th Plaub Hlis 2017 Hloov kho Circuit thiab board rau siv nrog 4000ZC USB meters.

Tsis xav tau Android coding

Cov lus qhia no qhia koj li cas nkag mus rau ntau yam kev ntsuas qhov tseeb los ntawm koj li Arduino thiab tseem xa lawv mus deb rau kev nkag mus thiab phiaj xwm. Txog Kev Ceev Cov Ntaub Ntawv Ceev (2000 qauv/sec) pom qhov kev teeb tsa no, Cov Chaw Siv Cov Ntaub Ntawv Siv Hluav Taws Xob Kev Kub Ceev Siv Arduino/GL AR150/Android/pfodApp

AtoD hloov pauv ua rau Arduino qhov tsis zoo, feem ntau yog +/- 10% thiab ntau qhov txwv, feem ntau 0 txog 5V DC volts nkaus xwb. Siv lub voj voog yooj yim thiab tsev qiv ntawv, koj tuaj yeem pub koj Arduino nrog qhov ntsuas qhov ntsuas qhov ntsuas qhov ntsuas los ntawm lub tshuab ntsuas ntau nrog qhov sib cais qhov muag pom RS232. Muaj cov kev ntsuas muaj rau koj daim duab kos cia koj tswj cov txiaj ntsig raws li qhov muaj txiaj ntsig. Cov ntawv qhia no tseem suav nrog xa kev ntsuas mus deb, ntawm WiFi, Bluetooth, Bluetooth Tsawg Zog lossis SMS, rau hauv xov tooj ntawm tes rau tso saib, txiav tawm thiab phiaj xwm siv pfodApp.

Cov lus qhia no siv Arduino Mega2560 5V pawg thawj coj uas koj tuaj yeem ua ke nrog ntau yam kev sib txuas lus tiv thaiv, Ethernet, WiFi, Bluetooth V2 (classic), Bluetooth LE lossis SMS. Lub kho vajtse interface thiab tsev qiv ntawv nthuav tawm ntawm no tuaj yeem siv nrog 3.3V Arduino cov laug cam sib xws. Ib yam li Mega2560 koj tuaj yeem siv ntau yam ntawm lwm cov laug cam xws li UNO nrog thiab Ehternet daim thaiv, ESP8266 lub hauv paus pawg thawj coj (sawv ib leeg), pawg thawj coj nrog Bluetooth tsis muaj zog, zoo li Arduino 101, lossis cov laug cam uas txuas rau kev sib txuas lus sub-system siv SPI xws li RedBear BLE shield thiab Adafrut's Bluefruit SPI boards. pfodDesignerV2 txhawb nqa txhua qhov ntawm cov rooj sib tham no thiab yuav tsim cov cai rau lawv. Qhov txwv tsis pub muaj yog tias koj yuav tsum muaj Hardware Serial pub dawb los txuas rau Multimeter RS232 daim ntaub thaiv no.

Cov kab hluav taws xob thiab cov lej nthuav tawm ntawm no ua haujlwm nrog tus lej multimeter. Kev npaj muaj, pheej yig, ib qho yog Tekpower TP4000ZC, tseem paub tias yog Digitek TD-4000ZC. Multimeters uas ua haujlwm nrog cov kab ke no thiab tsev qiv ntawv suav nrog Digitek DT-4000ZC, Digitech QM1538, Digitech QM1537, Digitek DT-9062, Digitek INO2513, Digitech QM1462, PeakTech 3330, Tenma 72-7745, Uni-Trend UT30A, Uni-Trend UT30E, -Trend UT60E, Voltcraft VC 820, Voltcraft VC 840

Kauj ruam 1:

Qhov kev qhia no muaj ob ntu:

Thawj ntu suav nrog kev kho vajtse cuam tshuam rau lub multimeter thiab lub tsev qiv ntawv code siv Arduino Mega. Yog tias koj tsuas xav tau qhov ntsuas hauv koj Arduino qhov no yog txhua yam koj xav tau.

Qhov thib ob suav nrog xa qhov ntsuas mus rau lub xov tooj ntawm tes hauv Android rau kev tso saib, txiav thiab phiaj xwm. Hauv qhov piv txwv no peb yuav siv daim ntaub thaiv Bluetooth thiab tsim cov duab kos yooj yim siv pfodDesignerV2, tab sis koj tseem tuaj yeem tsim cov cai rau WiFi, Ethernet, Bluetooth Tsawg Zog thiab SMS txuas siv pfodDesignerV2. Lub tsev qiv ntawv multimeter tom qab ntawd ntxiv rau qhov kos duab pib kom ua tiav cov cai. Tsis muaj Android coding yuav tsum tau ua kom pom, nkag mus thiab npaj cov ntawv nyeem. Txhua yam yog tswj los ntawm koj tus lej Arduino.

Txoj haujlwm no tseem muaj nyob online ntawm www.pfod.com.au

Txog rau lub taub hau nyob deb ntawm lub multimeter, saib cov lus qhia no, Arduino Cov Tsom iav rau Kuv Cov Multimeter los ntawm Alain.

Kauj ruam 2: Multimeter

Lub Multimeter
Lub Multimeter

Cov ntsuas ntsuas siv hauv qhov kev qhia no yog qhov pheej yig (~ US40) Tekpower TP4000ZC (tseem paub tias yog Digitek DT-4000ZC) thiab Digitech QM1538 qub, uas nws tsis muag lawm. Ob lub ntsuas no zoo ib yam nkaus thiab siv tib lub RS232 kev ntsuas ntsuas.

Tekpower TP4000ZC: -DC Voltage: 400mV/4/40/400V ± 0.5%+5, 600V ± 0.8%AC Voltage: 4/40/400V ± 0.8%+5, 400mV/600V ± 1.2%+ 5DC Tam sim no: 400/4000μA ± 2.0%+5, 40/400mA ± 1.5%+5, 4/10A ± 2%+5AC Tam sim no: 400/4000μA ± 2.5%+3, 40/400mA ± 2%+5, 4 /10A ± 2.5%+5Resistance: 400Ω/4/40/400kΩ/4MΩ ± 1%+5, 40MΩ ± 2%+5Capacitance: 40nF ± 3.5%+10, 400nF/4/40μF ± 3%+5, 100μF ± 3.5% +5Frequency: 10Hz -10MHz ± 0.1% +5Duty Cycle: 0.1%-99.9%± 2.5% +5 Kub: 0oC - +40oC ± 3oC, -50oC - +200oC ± 0.75%± 3oC, +200oC - +750oC ± 1.5% ± 3oC, Kev daws teeb meem 0.1oC ntawm suav nrog cov ntsuas cua thermocouple.

Multimeter's RS232 kev sib txuas tsuas yog ib txoj hauv kev thiab koj tsis tuaj yeem hloov pauv lub multimeter qhov chaw nyob deb, yog li koj yuav tsum xaiv tus kheej hom kev ntsuas. Txawm li cas los xij lub ntsuas hluav taws xob yog qhov pib-pib thiab qhov Voltage thiab Tam sim no teeb tsa ua ob qho AC thiab DC.

Kauj Ruam 3: RS232 Interface Hardware

RS232 Interface Hardware
RS232 Interface Hardware
RS232 Interface Hardware
RS232 Interface Hardware
RS232 Interface Hardware
RS232 Interface Hardware

Muaj ob qhov cuam tshuam. Tus tshiab Digitek DT-4000ZC thiab Tekpower TP40000ZC meters tuaj nrog USB cable. Thaum lub hnub nyoog Digitek QM1538 tau muab RS232 9pin D txuas cable. Qhov saum toj no Circuit (pdf version) qhia yuav ua li cas txuas ntau lub meter 'opto coupler los tsav Arduino RX tus lej txuas. Nco tseg: Lub voj voog no tau hloov kho ntxiv rau lwm qhov tiv thaiv tiv thaiv, R2, rau Digitek DT-4000ZC thiab Tekpower TP40000ZC meters. Cov tshuaj tiv thaiv no tsis suav nrog ntawm 9pin D txuas lub rooj tsavxwm qhia saum toj no.

Digitek DT-4000ZC thiab Tekpower TP40000ZC

Txog Digitek DT-4000ZC thiab Tekpower TP40000ZC, koj xav tau 3.5mm suab cable txiv neej rau txiv neej, tso suab lossis mono yuav ua, thiab lub hli 3.5 hli.

Digitek QM1538

Rau cov laus Digitek QM1538, koj xav tau 9pin D qhov ntsawb. Qhov 9pin D txuas tau muaj cov pins uas yuav tsis ntsaws rau hauv daim ntawv pov thawj. Tsuas yog txiav tawm kab ntawm 4 tus pin kom koj tuaj yeem txuas qhov txuas mus rau lub rooj tsavxwm, vim tias Circuit Court tsuas yog siv tus pin hauv kab thib ob ntawm 5 tus pin. Cov ceg txhim kho qhov twg khoov kom cia lub txuas txuas ncaj thiab txuas tau ruaj ntseg rau daim ntawv pov thawj tiv thaiv siv 2 ntu epoxy kua nplaum ("Araldite") Tus pin txuas tus qauv yog qhia saum toj no los ntawm lub xaib no. Lub 10K resistor uas tau teeb tsa sab hauv qhov txuas ntawm cov khoom siv RS232 txuas (txuas ntawm tus pin 2 thiab 3) tsis xav tau rau txoj haujlwm no.

Txuas lub teeb liab mus rau tus pin Arduino RX

Lub voj voog no yuav ua haujlwm rau ob qho 5V thiab 3.3V Arduino cov laug cam. Ntawm no peb tab tom siv Mega2560 (5V) Arduino thiab teeb tsa lub Circuit Court ntawm daim ntawv pov thawj raws li tau hais los saum no.

Ib txoj hlua ya tau siv los txuas TP1 ntawm daim thaiv rau Serial1 RX, tus pin D19, ntawm Mega2560.

Nco tseg txog Software Serial: Thaum xub thawj daim ntaub thaiv no tau ua khub nrog UNO siv Software Serial ntawm tus pin 10, 11. Txawm li cas los xij thaum ua ke nrog Bluetooth Shield ntawm Serial ntawm 9600baud, qee qhov tau txais bytes tau ploj lawm. Tsiv RS232 mus rau Hardware Serial txuas tau daws qhov teeb meem no. Yog li kom ntseeg tau cov chaw taws teeb tso tawm thiab txiav tawm, yog tias koj siv daim thaiv kev sib txuas lus uas txuas ntawm kab ntawv txuas, koj xav tau ib lub rooj tsavxwm nrog ob lossis ntau lub Khoos Phis Tawj xws li Mega2560. Lwm txoj hauv kev yog UNO nrog thiab Ehternet daim thaiv, ESP8266 lub hauv paus pawg thawj coj (sawv ib leeg), pawg thawj coj nrog Bluetooth Tsis tshua muaj zog zoo li Anduino 101 lossis cov laug cam uas txuas rau kev sib txuas lus sib txuas siv SPI xws li RedBear BLE ntaub thaiv npog thiab Adafrut's Bluefruit SPI cov laug cam. pfodDesignerV2 txhawb nqa tag nrho cov laug cam no thiab yuav tsim cov cai rau lawv.

Kauj Ruam 4: PfodVC820MultimeterParser Library

Tekpower TP4000ZC thiab tus lej ntawm lwm cov mulimeter tsis xa qhov ntsuas ntawm RS232 raws li ASCII cov ntawv, theej nws xa 14 bytes nrog cov khoom teeb tsa nyob ntawm ntu twg ntawm cov duab LCD uas tau teeb. Tus lej ntawm 14 bytes tau piav qhia hauv pdf no. Lub tsev qiv ntawv pfodVC820MeterParser.zip txiav txim siab cov bytes no rau hauv cov ntawv xov thiab ntab. (VC820 hais txog ib ntawm cov ntsuas uas siv qhov kev ntsuas no.) Kuj pom QtDMM rau Windows, Mac thiab Linux khoos phis tawj software uas ua haujlwm ntau ntau ntawm cov ntsuas.

Muaj qhov piv txwv tsawg kawg, MeterParserExample.ino, ntawm kev siv lub tsev qiv ntawv pfodVC820MeterParser. Txuas lub ntsuas mus rau 2400baud qhov txuas txuas thiab tom qab ntawd hu haveReading () txhua lub voj los ua cov bytes. haveReading () yuav rov qab muaj tseeb thaum muaj qhov ua tiav nyeem tshiab parsed. Tom qab ntawd koj tuaj yeem hu rau getAsFloat () kom tau txais tus nqi (ntsuas) raws li ntab lossis getAtStr () kom tau txais kev nyeem nrog ntsuas rau kev luam ntawv thiab txiav cav. Muaj lwm txoj hauv kev txhawm rau nkag mus rau hom kev ntsuas, getTypeAsStr () thiab getTypeAsUnicode (), ntxiv rau lwm txoj hauv kev siv hluav taws xob.

#suav nrog "pfodVC820MeterParser.h" pfodVC820MeterParser meter; // void teeb () {Serial.begin (74880); Serial1.begin (2400); meter.connect (& Serial1); } ntab nyeem ntawv; void loop () {yog (meter.haveReading ()) {nyeem ntawv = meter.getAsFloat (); // siv qhov no rau Arduino cov lej Serial.print ("Nyeem nrog cov chav:"); Serial.print (meter.getDigits ()); Serial.print (meter.getScalingAsStr ()); Serial.print (meter.getTypeAsStr ()); Serial.print (F ("= raws li ntab luam tawm (6 tus lej):")); Serial.println (nyeem ntawv, 6); Serial.println ("Sijhawm (sec) thiab Nyeem raws li txoj hlua rau kev txiav"); Serial.print (((ntab) millis ())/1000.0); Serial.print (", ntu,"); Serial.print (meter.getAsStr ()); Serial.print (','); Serial.println (meter.getTypeAsStr ()); }}

Nrog lub ntsuas ntsuas ntawm Deg C thiab siv cov ntsuas ntsuas cua sov, qhov piv txwv piv txwv muab qhov tso tawm no ntawm Arduino IDE cov ntawv xov xwm.

Nyeem nrog cov chav: 25.7C = raws li ntab luam tawm (6 tus lej): 25.700000Time (vib nas this) thiab Nyeem raws li txoj hlua rau logging 2.40, sec, 25.7, C

Kauj Ruam 5: Ntu 2 - Cov Chaw Taws Teeb, Logging thiab Plotting

Ib feem ntawm qhov kev qhia qhia txog yuav ua li cas tso saib deb, nkag mus thiab sau cov ntsuas ntsuas ntawm koj lub xov tooj ntawm tes. pfodApp yog siv los tswj cov zaub, txiav thiab phiaj xwm ntawm koj lub xov tooj ntawm tes. Tsis xav tau Android programming. Tag nrho cov lus qhia, txiav tawm thiab phiaj xwm raug tswj hwm tag nrho los ntawm koj daim duab Arduino. PfodDesignerV2 app pub dawb pub koj tsim koj li Android ntawv qhia zaub mov thiab daim ntawv thiab tom qab ntawd tsim cov duab kos Arduino rau koj.

pfodApp txhawb nqa ntau hom kev sib txuas, Ethernet, WiFi, Bluetooth V2 (classic), Bluetooth LE lossis SMS. Qhov kev qhia no siv Arduino 101 (Bluetooth Tsawg Zog) rau cov ntaub ntawv nkag thiab phiaj xwm. Lwm lub Bluetooth Low Energy boards kuj tseem txhawb nqa. Cov ntawv qhia no siv SMS txuas rau pfodApp. Koj tuaj yeem siv pfodDesignerV2 ntxiv cov ntaub ntawv nkag mus thiab kos duab rau tus piv txwv SMS ntawd. pfodDesignerV2 kuj tseem muaj kev xaiv los tsim Arduino code rau Bluetooth V2 (classic) daim thaiv los txuas rau pfodApp.

Txog qhov piv txwv no peb yuav siv Iteadstudio Bluetooth Shield V2.2 uas txuas rau Arduino Mega2560 ntawm 9600baud txuas txuas. Siv cov dawb pfodDesignerV2 app peb teeb tsa cov ntawv qhia yooj yim uas tsuas muaj daim ntawv lo qhia lub ntsuas ntsuas thiab ib lub pob kom qhib kab ntawv. Nplooj ntawv no muaj tus lej pfodDesignerV2 qhia. Thaum peb muaj cov duab kos yooj yim, peb yuav hloov kho nws ntxiv cov ntsuas ntsuas ntsuas thiab xa cov ntsuas 'meter' thiab cov ntaub ntawv rau logging thiab kos duab.

Tsim Cov Ntawv Qhia

Hauv ntu no peb yuav tsim cov ntawv qhia zaub mov Android/pfodApp uas yuav tso saib lub ntsuas ntsuas thiab lub pob kom qhib kab ntawv ntawm kev nyeem. Kev nyeem ntawv tseem raug khaws tseg rau hauv cov ntawv ntawm Android mobile

Kauj Ruam 6: Ntxiv Daim Ntawv Cim

Ntxiv daim ntawv lo
Ntxiv daim ntawv lo
Ntxiv daim ntawv lo
Ntxiv daim ntawv lo
Ntxiv daim ntawv lo
Ntxiv daim ntawv lo

Nruab qhov dawb pfodDesignerV2 thiab pib cov ntawv qhia zaub mov tshiab.

Lub hom phiaj tsis raug yog Serial ntawm 9600baud uas yog qhov xav tau rau Iteadstudio Bluetooth Shield V2.2. Yog tias koj txuas nrog siv Bluetooth Tsawg Zog Ntaus lossis Wifi lossis SMS ces nyem rau ntawm Hom Phiaj los hloov qhov xaiv.

Txhawm rau ntxiv daim ntawv lo kom pom lub ntsuas 'meter', nyem rau ntawm Add Menu Item and select scroll down to select Label.

Xaiv qhov loj me thiab xim haum. Tawm Hauv Cov Ntawv raws li Cov Ntawv raws li peb yuav hloov kho cov cai tsim los hloov qhov no nrog lub ntsuas ntsuas tom qab. Ntawm no peb tau teeb tsa font loj rau +7, font xim rau Liab thiab tom qab rau Nyiaj.

Rov qab mus rau Editing Menu_1 screen thiab teeb tsa Lub Sij Hawm Hloov Tshiab 1 vib nas this. Qhov yuav ua pfodApp rov thov cov ntawv qhia zaub mov txog ib pliag thib ob los tso saib cov ntawv nyeem tshiab kawg hauv Daim Ntawv Cim.

Kauj Ruam 7: Ntxiv Kab Lus Khawm

Ntxiv Daim Ntawv Teev Npe
Ntxiv Daim Ntawv Teev Npe
Ntxiv Daim Ntawv Teev Npe
Ntxiv Daim Ntawv Teev Npe
Ntxiv Daim Ntawv Teev Npe
Ntxiv Daim Ntawv Teev Npe
Ntxiv Daim Ntawv Teev Npe
Ntxiv Daim Ntawv Teev Npe

Nyem rau Ntxiv Cov Ntawv Qhia Khoom Ntxiv kom ntxiv Daim Ntawv Npe.

Kho cov kab ntawv ntawm Kab Lus Khawm rau qee yam uas haum, piv txwv li tsuas yog "Daim duab" thiab xaiv qhov loj me thiab xim.

Tom qab ntawv nyem rau ntawm "Chart" khawm kom qhib cov phiaj xwm kev tshuaj ntsuam. Tsuas yog yuav muaj ib lub tswv yim thiaj li nyem rau hauv Edit Plot 2 thiab Edit Plot 3 nyees khawm thiab nqes mus thiab nyem rau ntawm Hide Plot rau txhua tus ntawm lawv.

Kho daim ntawv lo daim ntawv rau qee yam uas haum, xws li "Multimeter". Tsis tas yuav hloov ib qho ntawm lwm qhov chaw teeb tsa raws li peb yuav hloov kho cov duab kos kom xa cov ntawv y-axis sib txawv nyob ntawm qhov teeb tsa multimeter.

Thaum kawg rov qab mus rau Editing Menu_1 thiab Hloov Kho Kom sai, qhov no teeb tsa cov ntawv hauv qab ntawm cov ntawv qhia zaub mov thiab tag nrho cov ntawv qhia tom qab xim. Ntawm no peb tau teeb tsa kom sai rau "Remote Multimeter" nrog font loj +3 thiab xim tom qab Silver.

Tam sim no koj tuaj yeem rov qab mus rau Editing Menu_1 thiab nyem Preview Menu txhawm rau saib ua ntej cov ntawv tsim.

Yog tias koj tsis nyiam qhov tsim koj tuaj yeem hloov nws ua ntej koj tsim cov cai. Yog tias koj xav tau qhov chaw tawm Daim Ntawv Cim los ntawm lub pob koj tuaj yeem ntxiv qee cov ntawv dawb paug raws li tau piav qhia ntawm no. Ntxiv Daim Ntawv Teev Npe thiab Logging Cov Ntaub Ntawv Yuav Ua Li Cas Zaub/Plot Arduino Cov Ntaub Ntawv ntawm Android yog lwm qhov kev qhia ntawm pfodDesignerV2/pfodApp datalogging thiab kos duab.

Kauj Ruam 8: Tsim Arduino Sketch

Tsim Arduino Sketch
Tsim Arduino Sketch
Tsim Arduino Sketch
Tsim Arduino Sketch

Txhawm rau tsim cov cai Arduino uas yuav tso tawm cov zaub mov no hauv pfodApp, rov qab mus rau Editing Menu_1 screen thiab nqes mus thiab nyem rau Generate Code khawm.

Nyem rau "Sau Code rau ua ntawv" khawm kom tso tawm Arduino kos duab rau /pfodAppRawData/pfodDesignerV2.txt cov ntaub ntawv ntawm koj lub xov tooj. Tom qab ntawd tawm ntawm pfodDesignerV2. Hloov pfodDesignerV2.txt cov ntaub ntawv mus rau koj lub PC siv USB txuas lossis hloov daim ntawv thov app, zoo li wifi xa cov ntaub ntawv xa mus. Ib daim qauv ntawm cov duab kos uas tsim tawm nyob ntawm no, pfodDesignerV2_meter.txt

Thawb cov duab kos rau hauv koj Arduino IDE thiab teeb tsa koj lub Uno (lossis Mega) pawg thawj coj. Tom qab ntawd ntxiv Iteadstudio Bluetooth Shield V2.2. Nruab pfodApp ntawm koj lub xov tooj ntawm tes Android thiab tsim kom muaj kev sib txuas Bluetooth tshiab muaj npe, piv txwv li, Multimeter. Saib pfodAppForAndroidGettingStarted.pdf seb yuav tsim kev sib txuas tshiab li cas. Tom qab ntawd thaum koj siv pfodApp qhib Multimeter kev sib txuas koj yuav pom koj cov ntawv tsim.

Qhib Daim Phiaj Xwm tsis tso saib dab tsi txaus nyiam vim tias peb tsis tau ntxiv rau hauv multimeter kho vajtse/software.

Kauj Ruam 9: Ntxiv Multimeter

Ntxiv Multimeter
Ntxiv Multimeter
Ntxiv Multimeter
Ntxiv Multimeter
Ntxiv Multimeter
Ntxiv Multimeter

Peb yuav hloov kho cov duab kos uas tsim los ntxiv rau qhov ntsuas qhov ntsuas sib txawv thiab xa nws cov ntaub ntawv mus rau koj lub xov tooj hauv. Daim duab hloov pauv tiav yog nyob ntawm no, pfod_meter.ino

Cov kev hloov kho no ntxiv cov ntsuas ntsuas multimeter thiab 5sec timer. Yog tias tsis muaj kev nyeem ntawv tshiab siv tau nyob rau lub sijhawm ntawd daim duab kos nres xa cov ntaub ntawv thiab hloov kho Android/pfodApp zaub rau “- - -“. Raws li lub ntsuas 'meter' kev xaiv tau hloov pauv daim ntawv daim ntawv hloov kho, tab sis koj yuav tsum tau tawm ntawm daim ntawv thiab rov xaiv nws kom pom cov ntawv tshiab. Ntawm qhov tod tes, ntsuas lub ntsuas ntsuas tau hloov kho tshiab txhua ob. Thaum kawg pfodApp ua haujlwm Unicode los ntawm lub hauv paus yog li thaum pom lub ntsuas ntsuas nyeem txoj hauv kev getTypeAsUnicode () tau siv los rov qab Unicode rau ohms, Ω, thiab degsC, ℃ rau lub ntsuas ntsuas ntsuas.

Cov kab ntawv khawm qhia txog hloov kho daim ntawv ntawm kev nyeem:-

Cov ntaub ntawv hauv kab ntawv, hauv CSV hom ntawv, kuj tseem khaws cia rau hauv ib daim ntawv rau hauv koj lub xov tooj ntawm tes hauv qab /pfodAppRawData/Mulitmeter.txt rau tom qab hloov mus rau koj lub khoos phis tawj thiab ntshuam rau hauv daim ntawv nthuav qhia ntxiv rau kev suav thiab kos duab.

Kauj Ruam 10: Cov Qauv Hloov Kho Hauv Zaum

  1. Rub tawm lub tsev qiv ntawv pfodVC820MeterParser.zip thiab tom qab ntawd qhib Arduino IDE thiab nyem rau hauv Sketch → suav nrog Lub Tsev Qiv Ntawv → Ntxiv.zip ntxiv lub tsev qiv ntawv no rau koj IDE.
  2. Ntxiv lub tsev qiv ntawv pfodVC820MeterParser rau qhov kos duab. Nyem rau Sketch → Xws li Lub Tsev Qiv → pfodVC820MeterParser. Qhov no yuav ntxiv cov lus suav nrog nyob rau sab saum toj ntawm daim duab.
  3. Kho kom raug pfodParser_codeGenerated parser ("V1"); rau pfodParser_codeGenerated parser (""); Qhov no xiam cov ntawv qhia zaub mov caching hauv pfodApp yog li koj cov ntawv hloov pauv yuav tshwm. Koj tuaj yeem rov qab mus rau "V3" thaum koj tau ua tiav txhua yam koj hloov pauv kom rov qhib cov ntawv qhia zaub mov.
  4. Ntxiv cov kab no los tsim cov khoom siv rau software software thiab multimeter. pfodVC820MeterParser meter;
  5. Qhov kawg ntawm kev teeb tsa () ntxiv Serial1.begin (2400); meter.connect (& Serial1);
  6. Saum toj no lub voj () ntxiv unsigned ntev validReadingTimer = 0; const unsigned ntev VALID_READINGS_TIMEOUT = 5000; // 5secs bool haveValidReadings = muaj tseeb; // teeb tsa kom muaj tseeb thaum muaj qhov nyeem tau raug siv rau kev ntsuasType = meter. NO_READING; thiab nyob rau sab saum toj ntawm lub voj () ntxiv yog (meter.haveReading ()) {yog (meter.isValid ()) {validReadingTimer = millis (); haveValidReadings = muaj tseeb; } int tshiabType = meter.getType (); yog (ntsuasType! = tshiabType) {// tso tawm cov ntaub ntawv teev npe tshiab parser.print (F ("sec,")); parser.println (meter.getTypeAsStr ()); } xabType = newType; } yog ((millis () - validReadingTimer)> VALID_READINGS_TIMEOUT) {haveValidReadings = cuav; // tsis muaj kev nyeem tshiab siv tau hauv 5 vib nas this dhau los}
  7. Ntxiv rau hauv lub voj hloov parser.print (F ("{= Multimeter | sijhawm (secs) | Plot_1 ~~~ ||}")); nrog parser.print (F ("{= Multimeter | sijhawm (secs) | Meter Nyeem ~~~")); parser.print (meter.getTypeAsStr ()); parser.print (F ("||}"));
  8. Hauv qab ntawm lub voj () hloov sendData (); nrog yog (muajValidReadings) {sendData (); }
  9. Hauv sendData () hloov parser.print (','); parser.print (((ntab) (plot_1_var-plot_1_varMin)) * plot_1_scaling + plot_1_varDisplayMin); nrog parser.print (','); parser.print (meter.getAsStr);
  10. Hauv sendMainMenu () hloov parser.print (F ("~ Label")); nrog parser.print ('~'); yog (muajValidReadings) {parser.print (meter.getDigits ()); parser.print (meter.getScalingAsStr ()); parser.print (meter.getTypeAsUnicode ()); } lwm {parser.print (F (" - - -")); }
  11. Hauv sendMainMenuUpdate () ntxiv parser.print (F ("|! A")); parser.print ('~'); yog (muajValidReadings) {parser.print (meter.getDigits ()); parser.print (meter.getScalingAsStr ()); parser.print (meter.getTypeAsUnicode ()); } lwm {parser.print (F (" - - -")); } Txhawm rau hloov kho kev nyeem ntawv thaum siv cov ntawv qhia zaub mov caching.

Xaus

Cov ntawv qhia no tau qhia yuav ua li cas txuas tus ntsuas ntsuas pheej yig rau Arduino Mega2560 ntawm RS232. Ntau lwm cov laug cam kuj tau txhawb nqa. PfodVC820MeterParserlibrary parses cov ntaub ntawv multimeter rau hauv ntab rau Arduino suav thiab cov hlua rau zaub thiab txiav tawm. pfodDesignerV2 tau siv los tsim cov duab kos yooj yim los tso saib cov ntawv nyeem ntau thiab qhia cov phiaj xwm ntawm qhov tseem ceeb hauv Android mobile siv pfodApp. Tsis xav tau Android programming. Txog qhov kev kos duab yooj yim no tau siv ntau ntxiv thiab kos duab zaum kawg qhia txog kev nyeem ntawv tam sim no ntawm koj lub xov tooj ntawm tes nrog rau phiaj xwm kev nyeem thiab txiav lawv mus rau hauv cov ntawv ntawm koj lub xov tooj rau siv tom qab.

Pom zoo: