Cov txheej txheem:
- Khoom siv
- Kauj ruam 1: Schematics
- Kauj Ruam 2: Luam Ntawv Case
- Kauj Ruam 3: Sib dhos Lub Hau
- Kauj Ruam 4: Sib Sau Lub Hauv Paus Loj
- Kauj ruam 5: Programming Arduino
- Kauj Ruam 6: Xeem Txhua Yam Ua Haujlwm
- Kauj Ruam 7: Kawm Taw Qhia Cov Ntawv Qhia
- Kauj Ruam 8: Siv Serial Interface
- Kauj ruam 9: Ua tiav
Video: Me V/A Meter Nrog INA219: 9 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Nkees ntawm kev rov ua dua koj lub ntsuas cua thaum koj xav ntsuas ob qhov hluav taws xob thiab tam sim no ntawm txoj haujlwm me me? Me V/A meter yog lub cuab yeej koj xav tau!
Tsis muaj dab tsi tshiab txog INA219 sab siab tam sim no sensor. Muaj ntau txoj haujlwm zoo nyob rau ntawd uas siv nws lub peev xwm los ntsuas ob qho tam sim no thiab qhov hluav taws xob ntawm kev thauj khoom. Kuv tau txais kev tshoov siab los ntawm youtuber Julian Ilett thiab nws "10 Minute Arduino Project - INA219 Tam Sim No Sensor" video. Tab sis kuv xav tau lub ntsuas ntsuas me me nrog qhov sib piv yooj yim thiab rooj plaub luam tawm 3D - yog li kuv txiav txim siab ua qhov ntawd rau kuv tus kheej.
Txog INA219 sensor:
INA219 tuaj yeem ntsuas ± 3.2A nrog kev daws teeb meem 0.1mA. Nws ua qhov no los ntawm kev ntsuas qhov ntsuas hluav taws xob poob qis dua 0.1 ohm resistor ntawm PCB. Yog li lub ntsuas hluav taws xob yuav tshaj tawm qhov hluav taws xob me me poob qis tab sis tsuas yog 320 mV hauv qhov xwm txheej phem tshaj (3.2A). Raws li qhov piv txwv ntawm 100 mA qhov poob tsuas yog 10 mV. Yog tias koj xav tau, nws tuaj yeem hloov pauv tus tiv thaiv kom tau txais ntau dua lossis kev daws teeb meem. Nyob rau tib lub sijhawm tus ntsuas kuj tseem ntsuas lub tsheb npav voltage nrog kev daws teeb meem ntawm 4 mV. Hauv kuv qhov kev paub qhov ntsuas hluav taws xob tau raug heev. Qhov tseeb ntawm kev nyeem tam sim no nyob ntawm qhov kev tawm tsam tiag tiag ntawm koj tus tiv thaiv. Lawv feem ntau nrog 1% ua siab ntev (tab sis tsis paub tseeb tias koj yuav tsum ntseeg qhov pheej yig eBay boards). Kuv ntseeg tias nws yuav tsum tuaj yeem ntsuas cov txiaj ntsig yog tias koj paub qhov tseeb ntawm tus tiv thaiv. Tab sis kuv tsis tau khawb ntxiv rau qhov ntawd vim tias qhov tseeb tau zoo txaus rau kuv cov kev xav tau. Lub ntsuas ntsuas muaj qhov sib txawv nce ntxiv - cov no yuav tsis cuam tshuam rau kev daws teeb meem tab sis pab txo suab nrov hauv qib qis.
Nta ntawm Tiny V/A Meter:
-
Yuav tuaj yeem siv hluav taws xob los ntawm USB lossis los ntawm lub hwj chim nkag.
- Thaum muab los ntawm USB cov khoom siv hluav taws xob tuaj yeem yog 0 - 26V. Tsuas yog xau tam sim no ntawm lub ntsuas pa cuam tshuam rau lub zog nkag. Zoo yog tias koj xav txheeb xyuas lub peev xwm ntawm lub roj teeb.
- Thaum muab los ntawm lub zog tawm tswv yim qhov no tuaj yeem yog los ntawm 4 - 15V. (Cov kev txwv ntawm cov tswj hluav taws xob arduino).
- Xaiv cov tswv yim raug kuaj pom ntawm khau raj lossis hloov pauv thiab yuav tso tawm kab lus rau tus neeg siv.
- Muaj peev xwm tso tawm qhov hluav taws xob, tam sim no, lub zog & mAh ib txhij.
- mAh tuaj yeem rov pib dua.
- Ib lub pob interface nrog luv / ntev nias.
- Xaiv INA219 qib: 26V / 3.2A, 26V / 1A lossis 16V / 0.4A.
- Xaiv tus nqi piv txwv 100, 200, 500 lossis 1000 ms.
- Pab kom/lov tes taw sensor pw tsaug zog kom qis dua tam sim no hauv lub sensor.
- Cov chaw tau khaws cia hauv EEPROM thiab rov ua haujlwm ntawm khau raj
-
Serial interface
- Luam tawm cov txiaj ntsig ntawm cov ntawv. Yuav siv tau rau kev txiav ntoo.
- Hloov chaw nrog cov lus txib
Khoom siv
1x Arduino Nano - Piv txwv Arduino Nano eBay
1x INA219 sensor board - INA219 ntshav sensor board eBay piv txwv
1x OLED 0.96 "I2C 128X64 4 -pin - OLED 0.96" Xiav I2C eBay piv txwv
1x TTP223 Capacitive Touch Switch - TTP223 Capacative kov khawm PCB eBay piv txwv
1x Poj Niam Lub Hwj Huam Muab Jack Socket Mount - Poj Niam Lub Hwj Huam Jack qhov mount eBay piv txwv
1x Txiv neej Lub Hwj Huam Muab Jack - Txiv neej Lub Hwj Huam Jack nrog cov ntsia hlau txuas eBay piv txwv lossis Txiv neej Lub Hwj Huam Jack nrog Push terminals eBay piv txwv
1x Swb Hloov 2 Txoj Haujlwm 6 Tus Pin - Swb hloov 6 tus pin eBay piv txwv
Hlau
1x 5 tus pin txiv neej txuas (xaiv tau) - 2.54 tus txiv neej tus pin headers eBay piv txwv
1x 5 tus pin poj niam txuas (xaiv tau) - Dupont txuas teeb tsa eBay piv txwv lossis 2.54 5 tus pin ib kab txuas eBay piv txwv
Thaum tshav kub kub ntsws raj (yeem)
Cov Cuab Yeej:
Cov hlau hlau
3D tshuab luam ntawv (yog tias koj xav tau cov ntawv luam tawm 3D)
Phom phom
Kauj ruam 1: Schematics
Kuv tau ua ob qho qauv ntawm kab lus. Ib txwm thiab daim duab raws ib qho. Cov kev sib txuas zoo ib yam yog li koj tuaj yeem siv txhua yam koj xav tau.
Nqe lus piav qhia
Cov zaub OLED thiab INA219 lub cim xeeb ob qho tib si siv I2C yog li lawv xav tau SDA thiab SCL txuas nrog A4 thiab A5.
Cov txiaj ntsig ntawm Capacitive kov sensor peb yuav txuas rau D2 rau kev nkag mus.
Tus swb swb muaj 6 tus pin - ob kab ntawm 3 tus pin. Ib kab yuav raug siv los txuas lub zog nkag mus rau Vin ntawm Arduino. Lwm kab yuav txuas D6 rau hauv av. Los ntawm kev siv sab hauv rub tawm ntawm D6 Arduino yuav tuaj yeem pom seb nws puas txuas nrog lub zog ntawm Vin.
Thaum kawg peb txoj hauv kev txuas qhov zoo ntawm lub hwj chim nkag (poj niam lub zog txuas) los ntawm INA219 mus rau qhov tso tawm tau zoo (txiv neej lub zog txuas). Qhov no yog li cas lub ntsuas cua tuaj yeem ntsuas qhov ntws tam sim no los ntawm nws.
Kauj Ruam 2: Luam Ntawv Case
Cov ntaub ntawv muaj lub thawv thiab lub hau. Ob leeg yuav tsum yooj yim luam thiab feem ntau cov tshuab luam ntawv tuaj yeem luam tawm yam tsis muaj kev txhawb nqa. Tab sis koj tuaj yeem ntxiv kev txhawb nqa yog tias koj xav tau.
Thaum ua tiav ob ntu snaps ua ke. Yog tias koj ceev faj heev koj yuav tuaj yeem qhib nws dua. Tab sis ob lub caij nplooj ntoo hlav xauv me ntsis thiab tuaj yeem tawg yog tias koj tsis ceev faj.
Tsis muaj 3D tshuab luam ntawv?
Yog tias koj tsis muaj kev nkag mus rau lub tshuab luam ntawv 3D Kuv paub tseeb tias nws tuaj yeem ua lwm rooj plaub. Koj tuaj yeem yuav cov phiaj xwm phiaj xwm/lub thawv yas lossis txhuas. Lossis koj tuaj yeem ua qee yam ntawm koj tus kheej los ntawm ntoo lossis duab los qhia. Muaj tswv yim!
Kauj Ruam 3: Sib dhos Lub Hau
Lub hau tuav lub vijtsam OLED thiab khawm khawm kov tau. Cov kab xaim hluav taws xob ntawm cov khoom ua ntej muab lawv tso rau hauv qhov chaw nrog rab yaj phom. Ceev faj ntawm lub vijtsam OLED - qee zaum lub iav tau ntsia askew ntawm PCB. Yog li kho qhov ntawd ua ntej gluing nws hauv qhov chaw. Yog tias koj muaj 5 tus pin txuas ntxiv ntxiv rau cov xov hlau. Yog tias koj tsis ua nws tseem tuaj yeem xaim lub vijtsam & khawm ncaj qha rau Arduino - tab sis nws nyuaj me ntsis los ua haujlwm nrog.
Kauj Ruam 4: Sib Sau Lub Hauv Paus Loj
Mount Poj niam lub hwj chim txuas thiab lub swb swb thiab ntsia lawv rau hauv qhov chaw. Yog tias koj tsis tuaj yeem pom cov ntsia hlau me me uas haum rau qhov hloov pauv koj tuaj yeem tsuas yog muab lo rau nws. Kuv xav tias kuv tau txais kuv los ntawm lub qub DVD tsav kuv tau sib nrug:)
Tshem cov pins thiab cov khoom sib txuas los ntawm INA219 (yog teeb tsa) tsis muaj chaw txaus rau qhov ntawd hauv lub thawv. Tom qab ntawd ua tiav xaim Arduino thiab INA219 ua ntej muab tso rau hauv qhov chaw hauv lub thawv. Ib zaug ntxiv ntxiv 5 tus pin txuas yog tias koj muaj nws - lossis tsuas yog xaim nws ncaj qha rau lub hau.
Tom qab ntawd ua kom tiav cov kab hluav taws xob hloov thiab lub hwj chim txuas. Ntawm qhov swb hloov cov kab hluav taws xob txuas rau ob lub pins ze rau tus poj niam lub zog txuas ntawm ob kab. Txoj kev no koj tuaj yeem xaub qhov hloov mus rau USB kom xaiv USB lub zog. Thiab xaub qhov hloov mus rau cov tswv yim rau lub zog nkag. Yooj yim nco!
Tsis txhob kaw rooj plaub! Nws yog qhov zoo tshaj los sim tias txhua yam ua haujlwm ua ntej.
Kauj ruam 5: Programming Arduino
Yog tias koj tsis tau muaj Arduino IDE teeb tsa tau nws los ntawm arduino.cc
Koj kuj yuav tsum teeb tsa ob lub tsev qiv ntawv U8g2 thiab Adafruit INA219. Ob leeg muaj nyob hauv tus thawj tswj tsev qiv ntawv. Txog Adafruit INA219 xyuas kom tseeb tias koj tau txais version 1.0.5 - cov kho tshiab uas xav tau cov tsev qiv ntawv ntxiv thiab flash nco, tab sis tsis muab kev ua haujlwm ntxiv rau lub sijhawm no.
Tom ntej no tau txais qhov chaws txuas nrog hauv Cov Lus Qhia (Tiny-VA-Meter.ino thiab FlashMem.h) lossis tau txais qhov hloov tshiab kawg los ntawm kuv GitHub Tiny-VA-Meter Git. Tam sim no qhib Tiny-VA-Meter.ino nrog Arduino IDE.
Txuas lub Tiny V/A Meter rau koj lub khoos phis tawj nrog USB cable.
Los ntawm cov cuab yeej xaiv Pawg Thawj Coj: "Arduino Nano", Tus Txheej Txheem: "ATmega328P" thiab qhov chaw nres nkoj raug. Koj yuav xav hloov tus txheej txheem rau "ATmega328P (Qub bootloader qub)" nyob ntawm koj li arduino. Yog tias koj muaj kev sib txuas lus yuam kev sim qhov ntawd.
Ntaus lub pob upload thiab tos kom txog thaum nws ua tiav.
Kauj Ruam 6: Xeem Txhua Yam Ua Haujlwm
Ua ntej kaw rooj plaub nws yog lub tswv yim zoo los xyuas tias txhua yam txuas nrog raug. Koj tuaj yeem ua raws cov theem no txhawm rau txheeb xyuas txhua yam khoom:
1. Los ntawm USB lub zog Cov Zaub yuav tsum teeb thiab tso saib cov ntawv nyeem (tsis hais txog txoj haujlwm swb qhov twg).
2. Txheeb xyuas tias koj tuaj yeem hloov cov ntawv qhia zaub mov los ntawm kev nyem lub pob.
3. Siv lub zog rau lub tswv yim thiab xyuas seb lub ntsuas ntsuas ntsuas qhov ntsuas qhov tseeb.
4. Sim hloov qhov hloov pauv swb thiab txheeb xyuas tias lub ntsuas ntsuas pom cov lus sib txawv.
5. Tam sim no koj tuaj yeem sim teeb lub swb hloov mus rau lub hwj chim nkag thiab txiav USB. Lub 'meter' tseem yuav ua haujlwm.
6. Thaum kawg koj yuav tsum tuaj yeem txuas lub nra lossis khoom siv mus rau qhov tso tawm thiab xyuas tias lub ntsuas cua tau nyeem qhov kos tam sim no.
Yog tias tag nrho cov theem no tau ua tiav koj lub ntsuas yuav tsum ua haujlwm zoo! Koj tuaj yeem khawm lub hau tam sim no!
Kauj Ruam 7: Kawm Taw Qhia Cov Ntawv Qhia
Thaum pib lub ntsuas 'meter' yuav pib los ntawm kev qhia cov khoom siv tau ntau nyob ntawm seb txoj haujlwm ntawm swb: "Cov tswv yim ntau: 0-26V 3.2A" lossis "input input: 4-15V 3.2A". Cov lus tsuas yog qhia rau ob peb feeb xwb, tab sis koj tuaj yeem hla nrog nias luv. Yog tias qhov swb hloov pauv tom qab khau raj cov lus tshiab yuav tshwm dua rau ob peb feeb.
Hauv qhov luv luv koj mus los ntawm kev nias luv thiab xaiv los ntawm nias ntev (1 sec).
Lub ntsuas ntsuas muaj 3 nplooj ntawv tseem ceeb: V/A zaub, V/A/W/Ah zaub & teeb tsa. Nias luv ntawm lub pob yuav dhia ntawm cov nplooj ntawv no.
Ntawm V/A/W/Ah nplooj ntawv koj tuaj yeem rov pib dua mAh nrog nias ntev.
Ntawm nplooj ntawv teeb tsa koj tuaj yeem nkag mus rau qhov chaw nrog nias ntev. Tam sim no koj tuaj yeem rov taug dua ntawm cov chaw sib txawv nrog nias luv. Cov teeb tsa muaj yog "Sensor range", "Refresh rate" & "Sensor sleep". Koj toggle txhua qhov teeb tsa los ntawm nias ntev. Thaum taug kev dhau qhov teeb tsa zaum kawg lub ntsuas yuav rov qab mus rau V/A zaub zaub.
Kauj Ruam 8: Siv Serial Interface
Thaum txuas nrog PC nrog USB koj tuaj yeem siv Arduino Serial Monitor (lossis lwm lub davhlau ya nyob twg) los tham nrog Tiny V/A Meter. Nws siv baudrate 115200.
Nrog xaiv tus nqi ntsuas tus ntsuas 'meter' yuav xa txhua qhov kev nyeem hla cov ntawv thiab koj tuaj yeem nyeem tau yooj yim hauv lub davhlau ya nyob twg.
Tab sis koj tseem tuaj yeem hloov pauv teeb tsa ntawm Tiny V/A Meter nrog cov lus txib. Nco ntsoov xaiv "Newline" raws li kab xaus.
Ib qho lus txib tsis raug yuav tso saib cov ntawv qhia zaub mov pab:
Cov lus txib:- rov pib dua (rov pib dua mAh)
- nyeem (Teb nrog cov txiaj ntsig kawg)
- cav x (Pib tx ntawm sampels - x tuaj yeem qhib lossis tawm)
- pw x (INA219 pw ntawm cov qauv - x tuaj yeem qhib lossis tawm)
- rov ua dua x (Teeb lub vijtsam & tus lej rov ua dua tshiab. x tuaj yeem yog 100, 200, 500 lossis 1000)
- ntau x (Teeb INA219 ntau yam. x tuaj yeem yog 0 rau 3.2A, 1 rau 1A lossis 2 rau 0.4A)
Piv txwv li hom "refresh 1000" txhawm rau hloov tus nqi piv rau 1 sec. Lossis ntaus "txiav tawm" kom tsis siv neeg xa cov txiaj ntsig. Lub ntsuas yuav teb nrog "OK" yog ua tiav.
Kauj ruam 9: Ua tiav
Tam sim no siv nws los ntsuas qee yam lom zem:)
Kuv tau sim ntxiv tag nrho cov yam ntxwv uas kuv pom muaj txiaj ntsig. Tab sis xav tias dawb los ua koj tus kheej hloov kho. Thiab thov qhia yog tias koj tuaj yeem ua qee qhov kev txhim kho zoo rau Tiny V/A Meter!
Hloov kho 14/06-2020: Hloov tus tsav tsheb thiab ntxiv cov yam ntxwv ntxiv! Tsis tau them los ntawm phau ntawv qhia no - tab sis koj tuaj yeem tshawb xyuas nws ntawm kuv GitHub.
Pom zoo:
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Ua Si Cov Khoom Ua Si Ua Tau Zoo!: 7 Cov Kauj Ruam (nrog Duab)
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Siv Hluav Taws Xob Ua Tau Zoo!: Qho khoom ua si hloov pauv qhib txoj hauv kev tshiab thiab kev daws teeb meem kom tso cai rau menyuam yaus uas muaj lub cev muaj peev xwm txwv lossis kev xiam oos qhab kev loj hlob los cuam tshuam nrog cov khoom ua si ntawm nws tus kheej. Hauv ntau qhov xwm txheej, cov menyuam yaus uas xav tau cov khoom ua si hloov pauv tsis tuaj yeem nkag mus
Tsawg Ohmic Resistance Meter Nrog INA219 Tam Sim No: 5 Cov Kauj Ruam
Tsawg Ohmic Resistance Meter Nrog INA219 Tam Sim No: Qhov no yog tus nqi qis milliohm meter uas tuaj yeem tso ua ke los ntawm kev siv 2X INA219 tus ntsuas tam sim no, Arduino nano, 2X16 LCD zaub, 150 Ohms load resistor thiab yooj yim arduino code uas lub tsev qiv ntawv tuaj yeem pom online . Qhov kev zoo nkauj ntawm txoj haujlwm no tsis muaj ua ntej
Cov Duab Duab Duab thiab Cov Duab 1: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Cubes thiab Cov Duab 1: Thaum sim nrog qee cov ntoo ntoo thiab cov duab los qhia, kuv pom ob peb txoj hauv kev los ua cov voos thiab lwm yam duab los ntawm cov khoom siv yooj yim. Los ntawm kev muab cov no los ua Cov Ntawv Qhia, Kuv vam tias yuav txhawb nqa kev ua si thiab kev kawm. Kev hloov pauv ntawm qhov kev qhia no
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: Nov yog txoj hauv kev yooj yim heev thiab tus nqi qis mus rau cov duab thav duab digital - nrog qhov zoo ntawm kev ntxiv /tshem cov duab hla WiFi ntawm 'nyem thiab luag' siv (pub dawb) xa cov ntaub ntawv . Nws tuaj yeem siv tau los ntawm qhov me me £ 4.50 Pi Zero. Koj tseem tuaj yeem hloov pauv
Rov Qab Siv Cov Duab Duab Nrog Virtual Asistent: 7 Cov Kauj Ruam (nrog Duab)
Rov Qab Siv Cov Duab Duab Nrog Virtual Asistent: Nyob zoo txhua tus! Cov lus qhia no tau yug los ntawm lub laptop faib ua ib nrab, yuav los ntawm ib tus phooj ywg. Thawj qhov kev sim ntawm txoj haujlwm no yog kuv Lego Digital Photo Frame, txawm li cas los xij, yog ib tus neeg mob siab rau Siri thiab Google Tam sim no, Kuv txiav txim siab coj nws mus rau qhov tshiab