Cov txheej txheem:
- Kauj ruam 1: Hauv paus
- Kauj Ruam 2: Ntsuas 0-5V
- Kauj Ruam 3: Ntsuas Qhov Siab Tshaj 5V
- Kauj Ruam 4: Tsim Lub Vev Xaib Divider
- Kauj Ruam 5: Nyeem Qhov Voltage
Video: Kev Ntsuas Hluav Taws Xob Siv Arduino: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Kev ntsuas qhov hluav taws xob yog qhov yooj yim heev siv ib qho microcontroller piv rau kev ntsuas tam sim no. Ntsuas qhov ntsuas hluav taws xob dhau los ua qhov tsim nyog yog tias koj ua haujlwm nrog roj teeb lossis koj xav ua koj tus kheej lub zog hloov kho. Txawm hais tias txoj hauv kev no siv rau ib qho uC tab sis hauv qhov kev qhia no, peb yuav kawm paub ntsuas qhov ntsuas hluav taws xob siv Arduino li cas.
Muaj cov ntsuas hluav taws xob muaj nyob hauv khw. Tab sis koj puas xav tau lawv tiag? Cia peb paub!
Kauj ruam 1: Hauv paus
Lub microcontroller tsis tuaj yeem nkag siab analog voltage ncaj qha. Tias yog vim li cas peb yuav tsum siv Analog to Digital Converter lossis ADC luv luv. Atmega328 uas yog lub hlwb ntawm Arduino Uno muaj 6 channel (cim ua A0 txog A5), 10-ntsis ADC. Qhov no txhais tau tias nws yuav qhia cov tswv yim hluav taws xob los ntawm 0 txog 5V rau hauv qhov tseem ceeb ntawm 0 rau (2^10-1) piv txwv li sib npaug rau 1023 uas muab kev daws teeb meem ntawm 4.9mV rau ib chav. 0 yuav sib haum rau 0V, 1 txog 4.9mv, 2 txog 9.8mV thiab ntxiv mus txog 1023.
Kauj Ruam 2: Ntsuas 0-5V
Ua ntej, peb yuav pom yuav ntsuas qhov ntsuas hluav taws xob nrog qhov siab tshaj plaws ntawm 5V li cas. Qhov no yooj yim heev vim tsis xav tau kev hloov kho tshwj xeeb. Txhawm rau ntsuas qhov sib txawv ntawm qhov sib txawv, peb yuav siv lub zog ntsuas uas nws tus pin nruab nrab txuas nrog ib qho ntawm 6 txoj hauv kev. Tam sim no peb yuav sau cov cai los nyeem qhov muaj txiaj ntsig los ntawm ADC thiab hloov lawv rov qab los rau hauv kev siv hluav taws xob nyeem tau zoo.
Nyeem analog pin A0
tus nqi = analogRead (A0);
Tam sim no, qhov sib txawv 'tus nqi' muaj tus nqi nruab nrab ntawm 0 txog 1023 nyob ntawm qhov hluav taws xob.
voltage = tus nqi * 5.0/1023;
Tus nqi tau txais tam sim no suav nrog kev daws teeb meem (5/1023 = 4.9mV ib chav) kom tau txais qhov hluav taws xob tiag.
Thiab thaum kawg, tso saib qhov ntsuas hluav taws xob ntawm Serial monitor.
Serial.print ("Voltage =");
Serial.println (qhov hluav taws xob);
Kauj Ruam 3: Ntsuas Qhov Siab Tshaj 5V
Tab sis qhov teeb meem tshwm sim thaum ntsuas qhov ntsuas hluav taws xob ntau dua 5 volts. Qhov no tuaj yeem daws tau siv qhov hluav taws xob faib hluav taws xob hluav taws xob uas muaj 2 tus tiv thaiv txuas nrog hauv kab ntawv raws li qhia. Ib qhov kawg ntawm cov kab txuas no txuas nrog qhov ntsuas hluav taws xob kom ntsuas (Vm) thiab lwm qhov kawg rau hauv av. Ib qho hluav taws xob (V1) sib npaug rau qhov ntsuas hluav taws xob yuav tshwm ntawm qhov sib txuas ntawm ob tus tiv thaiv. Qhov txuas no tuaj yeem txuas nrog tus pin analog ntawm Arduino. Qhov hluav taws xob tuaj yeem pom tawm siv cov qauv no.
V1 = Vm * (R2/(R1+R2))
Qhov hluav taws xob V1 yog ntsuas los ntawm Arduino.
Kauj Ruam 4: Tsim Lub Vev Xaib Divider
Tam sim no txhawm rau tsim qhov faib hluav taws xob no, peb thawj zaug yuav tsum paub qhov tseem ceeb ntawm cov neeg tawm tsam. Ua raws cov theem no txhawm rau xam tus nqi ntawm cov neeg tawm tsam.
- Txiav txim siab qhov siab tshaj plaws uas yuav raug ntsuas.
- Txiav txim siab qhov tsim nyog thiab tus nqi rau R1 hauv kilo-ohm ntau.
- Siv cov mis, xam R2.
- Yog tias tus nqi R2 tsis yog (lossis ze rau) tus qauv tus nqi, hloov R1 thiab rov ua cov kauj ruam saum toj no.
- Txij li Arduino tuaj yeem tswj tau qhov siab tshaj ntawm 5V, V1 = 5V.
Piv txwv, Cia qhov ntsuas siab tshaj plaws (Vm) los ntsuas yog 12V thiab R1 = 47 kilo-ohms. Tom qab ntawd siv cov mis R2 tawm los kom sib npaug rau 33k.
Tam sim no, Tsim kom muaj hluav taws xob faib hluav taws xob siv cov resistors no.
Nrog rau kev teeb tsa no, peb tam sim no muaj qhov txwv qis thiab qis dua. Rau Vm = 12V peb tau txais V1 = 5V thiab rau Vm = 0V peb tau txais V1 = 0V. Ntawd yog, rau 0 txog 12V ntawm Vm, yuav muaj qhov sib npaug ntawm 0 txog 5V ntawm V1 uas tom qab ntawd tuaj yeem pub rau hauv Arduino zoo li ua ntej.
Kauj Ruam 5: Nyeem Qhov Voltage
Nrog kev hloov kho me ntsis hauv cov cai, tam sim no peb tuaj yeem ntsuas 0 txog 12V.
Tus nqi analog tau nyeem zoo li ua ntej. Tom qab ntawd, siv tib lub mis uas tau hais yav dhau los, qhov ntsuas hluav taws xob ntawm 0 thiab 12V raug ntsuas.
tus nqi = analogRead (A0);
voltage = tus nqi * (5.0/1023) * ((R1 + R2)/R2);
Qhov feem ntau muaj Voltage Sensor Modules tsis muaj dab tsi tab sis tsuas yog hluav taws xob faib hluav taws xob. Cov no tau ntsuas rau 0 txog 25V nrog 30 kiloohm thiab 7.5 kilo-ohm resistors.
Yog li, Vim li cas thiaj yuav, thaum koj tuaj yeem DIY!
Ua tsaug rau koj ua kom txog thaum kawg. Kuv vam tias qhov kev qhia no yuav tau pab koj.
Sau npe yuav mus rau kuv tus YouTube channel rau ntau qhov haujlwm yav tom ntej thiab qhia. Ua tsaug ib zaug ntxiv!
Pom zoo:
Cov Hluav Taws Xob Hluav Taws Xob Hluav Taws Xob Hluav Taws Xob Igniter: 6 Kauj Ruam (nrog Duab)
Cov Hluav Taws Xob Bluetooth Hluav Taws Xob Igniter: Puas yog nws zoo rau taws ntau dua ib lub foob pob hluav taws tib lub sijhawm? Lossis txawm tias muaj kev nyab xeeb nyob deb rau qhov phom sij txaus ntshai. Hauv qhov haujlwm no kuv yuav qhia koj yuav tsim lub Circuit Court uas tuaj yeem ua tau li cas nrog kev pab ntawm Bluetooth ua haujlwm
Yuav Ua Li Cas Tswj DC Gear Motor los ntawm Kev Siv 160A Txhuam Cov Hluav Taws Xob Hluav Taws Xob Hluav Taws Xob thiab Servo Tester: 3 Cov Kauj Ruam
Yuav Ua Li Cas Tswj DC Gear Motor los ntawm Kev Siv 160A Txhuam Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Kev Pabcuam Servo: Kev Qhia Tshwj Xeeb: Voltage: 2-3S Lipo lossis 6-9 NiMH Nruam tam sim no: 35A Tam sim no tawg: 160A BEC: 5V / 1A, tawm qauv: 1. pem hauv ntej & thim rov qab; 2. mus &nres; 3. rau pem hauv ntej & nres & thim rov qab: 34g Loj: 42*28*17mm
Ib Leeg Hluav Taws Xob Hluav Taws Xob / Hluav Taws Xob Hluav Taws Xob: 6 Cov Kauj Ruam
Ib Leeg Hluav Taws Xob Hluav Taws Xob Hluav Taws Xob / Hluav Taws Xob Hluav Taws Xob: Hauv qhov haujlwm no peb tab tom ua kom muaj Ib lub kauj induction lub cev Muaj zog, thiab ntau yam piav qhia ntxiv, cov qauv ntawm lub tshuab hluav taws xob no tau siv ntau yam khoom siv tam sim no. Peb lub cav tsis muaj lub zog loj, nws yog ntau ntxiv txog kev ua haujlwm
Cov Hluav Taws Xob Hluav Taws Xob: Qhib Cov Khoom Siv Hluav Taws Xob Kawm: 8 Kauj Ruam (nrog Duab)
Cov Hluav Taws Xob Hluav Taws Xob: Qhib Cov Khoom Siv Hluav Taws Xob Hluav Taws Xob: Kev kawm thiab kev lag luam hauv tsev yog dej nyab nrog cov khoom siv hluav taws xob hloov pauv 'kev kawm' cov qauv tsim los qhia menyuam thiab cov neeg laus lub ntsiab lus STEM thiab STEAM. Cov khoom lag luam xws li LittleBits lossis Snapcircuits zoo li ua rau txhua qhov khoom plig hnub so qhia lossis niam txiv blog
Yuav Ua Li Cas Siv Cov Hluav Taws Xob Hluav Taws Xob Hluav Taws Xob Hluav Taws Xob Module: 6 Kauj Ruam
Yuav Ua Li Cas Siv Cov Hluav Taws Xob Hluav Taws Xob Hluav Taws Xob Hluav Taws Xob Module: Nco tseg thiab ceev faj: CFL muaj cov mercury uas yog cov khoom phom sij, yog li nws yuav tsum tau ua raws li feem ntau CFL cov teeb, hluav taws xob hluav taws xob tau ua haujlwm zoo thiab tseem siv tau, tsuas yog lub teeb mus tsis zoo. CFL Circuit Court ntawm 18-24 Watts yog