Cov txheej txheem:
- Kauj Ruam 1: Cov Cheeb Tsam Yuav Tsum Tau
- Kauj ruam 2: Schematic Daim duab
- Kauj Ruam 3: Nkag Siab Lub Circuit Court
- Kauj Ruam 4: Xam Zaus thiab Voltage
- Kauj ruam 5: Arduino Code
- Kauj Ruam 6: Xaus
Video: Lub Hwj Huam Mov Zis thiab Kev Ntsuas Hluav Taws Xob Siv Arduino: 6 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Taw qhia:
Lub hom phiaj ntawm txoj haujlwm no yog ntsuas ntsuas zaus thiab qhov hluav taws xob, uas yog nruab nrab ntawm 220 txog 240 Volts thiab 50Hz ntawm no hauv Is Nrias teb. Kuv siv Arduino txhawm rau ntes lub teeb liab thiab suav qhov zaus thiab qhov hluav taws xob, koj tuaj yeem siv lwm yam microcontroller lossis pawg thawj coj uas koj muaj. Lub Circuit Court xav tau ib feem me me ntawm cov khoom siv thiab yog qhov raug rau txhua lub hom phiaj ua haujlwm.
Kauj Ruam 1: Cov Cheeb Tsam Yuav Tsum Tau
- Arduino Ib
- TSI LM358
- Kauj ruam qis transformer (220V rau 12V)
-
Capacitors:
- 0.1 ua
- 2 x1fv
-
Resistors:
- 3x1 kwm
- 2 x 100 kOhm
- 1.5k hmo
- 3.3k hmo
- 6.8k hmo
- 3 x 1N4148 diode
- Mov ci Board thiab Jumper xaim (xaiv tau)
Kauj ruam 2: Schematic Daim duab
Hauv qhov Circuit Court saum toj no, lub tshuab hluav taws xob thawj zaug txuas nrog lub zog hluav taws xob thiab thawj qhov txuas nrog peb lub ntsuas ntsuas
Kauj Ruam 3: Nkag Siab Lub Circuit Court
Raws li qhov ua haujlwm tau zoo, qhov Circuit no tuaj yeem faib ua plaub ntu:
A: Zero Hla Hla Ntes Circuit Court
Lub voj voog no tsim tawm 5V square mem tes thaum twg sinewave mus los ntawm qhov zoo mus rau qhov tsis zoo. Resistor R1 ua ke nrog D1 thiab D2 txwv cov khoom siv hluav taws xob viav vias ntawm qhov sib txuas ntawm diode rau -0.6V txog +5.6V (piv txwv tias diode rau pem hauv ntej kom muaj zog yog 0.6V). Tsis tas li ntawd, koj tuaj yeem nce qhov input voltage ntau ntawm Circuit Court los ntawm kev nce tus nqi R1.
Tus tiv thaiv R2 thiab R3 tsim qhov faib hluav taws xob txhawm rau txwv qhov tsis zoo qhov viav vias mus rau -0.24Volts raws li kev siv hluav taws xob ntau hom LM358 txwv rau -0.3Volts.
Tus tiv thaiv R4, R5, capacitor C1 thiab op-amp (ntawm no siv los ua tus sib piv) tsim Schmitt Trigger Circuit qhov twg resistor R4 thiab R5 teeb tsa hysteresis ntawm kev nkag mus +49.5mV saum toj saud. Cov txiaj ntsig ntawm Schmitt Trigger tau pub rau Arduino PIN2 rau kev ua ntxiv.
B: Kev rho tawm thiab qhov hluav taws xob nqis qis
Raws li lub npe qhia qhov no cais tawm thiab nqis qis dua qhov kwv yees li 12Vrms. Cov hluav taws xob qis qis tau ntxiv rau cov khoom siv hluav taws xob.
C: Peak Detector Circuit
Qhov Circuit Court no txiav txim siab qhov siab tshaj qhov siab tshaj ntawm cov teeb liab nkag mus. Resistor faib R6 thiab R7 txo qhov hluav taws xob nkag los ntawm qhov tseem ceeb ntawm 0.23 (12Vrms raug txo qis rau 2.76Vrms). Lub diode D3 tsuas yog ua haujlwm ib nrab ntawm lub teeb liab. Qhov hluav taws xob hla C2 nce mus txog qhov siab tshaj ntawm qhov hloov pauv lub teeb liab, uas yog pub rau Arduino analog pin A0 txhawm rau suav ntxiv qhov hluav taws xob.
Ib qho ntxiv, koj tuaj yeem hloov qhov Circuit Court no nrog qhov ntsuas qhov siab tshaj qhov ntsuas hluav taws xob zoo li cov hais hauv no. Tab sis rau kuv lub hom phiaj ua qauv qhia, cov lus hais los saum toj no yuav txaus.
D: Arduino
Hauv ntu no, Arduino ntes cov plaub fab uas tsim los ntawm Schmitt Trigger Circuit thiab nyeem cov hluav taws xob sib piv los ntawm qhov ntsuas hluav taws xob siab tshaj. Cov ntaub ntawv tau ua tiav txuas ntxiv txhawm rau txiav txim siab lub sijhawm (li qhov zaus) ntawm cov mem tes square (uas yog sib npaug rau tus neeg siv lub sijhawm AC) thiab qhov hluav taws xob ntawm cov khoom siv.
Kauj Ruam 4: Xam Zaus thiab Voltage
Xam qhov zaus:
Nrog kev pab los ntawm Arduino, peb tuaj yeem ntsuas lub sijhawm T ntawm lub teeb liab. Cov xwm txheej nthwv dej pulses los ntawm qhov ntsuas hla-hla tau pub rau tus pin 2, los ntawm qhov ntawd peb tuaj yeem ntsuas lub sijhawm sijhawm ntawm txhua qhov mem tes. Peb tuaj yeem siv Arduino tus timer sab hauv (tshwj xeeb Timer1) los xam lub sijhawm nyob nruab nrab ntawm ob qho nce ntawm ntug kev ntawm lub plawv mem tes nrog kev pab cuam tshuam. Lub sijhawm ua haujlwm nce ntxiv los ntawm 1 rau lub voj voog moos (tsis muaj prescaler = 1) thiab tus nqi raug khaws cia hauv npe TCNT1. Li no lub 16Mhz moos nce lub txee los ntawm 16 txhua txhua microsecond. Zoo ib yam rau prescaler = 8 lub sijhawm tau nce ntxiv los ntawm 2 txhua txhua microsecond. Yog li lub sijhawm sijhawm nruab nrab ntawm ob qho nce ntxiv
T = (TCNT1 tus nqi) / sijhawm siv rau txhua qhov suav
Qhov twg, sijhawm siv rau txhua suav = prescaler / (Arduino moos ceev (16MHz)
Li no, zaus f = 1 / T = (Arduino moos ceev (16MHz) / (Prescaler * TCNT! Tus nqi)
Li no lub sijhawm ntsuas (Hz) tau muab los ntawm = (Arduino moos ceev (16MHz)) / prescaler
thiab zaus ntawm lub teeb liab yog muab los ntawm = (Arduino moos ceev
Raws li, peb tuaj yeem xam zaus f los ntawm kev sib raug zoo f = 1/T.
Xam qhov hluav taws xob:
Onboard ADC ntawm Arduino muaj kev daws teeb meem ntawm 10 khoom (qhov muaj txiaj ntsig zoo = 2^10 = 1024), rov qab qhov txiaj ntsig hauv thaj tsam 0-1023. Txhawm rau suav qhov sib piv analog voltage V peb yuav tsum siv cov hauv qab no sib piv
V = (ADC Nyeem Ntawv) * 5/1023
Txhawm rau xam qhov hluav taws xob muab hluav taws xob Vs (rms) peb yuav tsum coj mus rau hauv tus account Transformer Ratio, Resistor divider R6R7 thiab lub ncov ntsuas pom hluav taws xob. Peb tuaj yeem yooj yim ua ke sib txawv ntau yam/piv raws li:
Transformer piv = 12/230 = 0.052
Resistor divider = R7/(R6 + R7) = 0.23
Ntawm qhov ntsuas hluav taws xob siab tshaj = 1.414
Vs (rms) = V/(1.414*0.052*0.23) = (ADC Nyeem)*0.289
Nws yuav tsum raug sau tseg tias tus nqi no nyob deb ntawm tus nqi tiag tiag, feem ntau yog los ntawm kev ua yuam kev hauv qhov piv txwv hloov pauv thiab lub diode rau pem hauv ntej qhov hluav taws xob poob. Ib txoj hauv kev los hla qhov no yog txiav txim siab qhov teeb meem tom qab sib dhos lub Circuit Court. Qhov ntawd yog los ntawm kev ntsuas qhov ntsuas hluav taws xob thiab qhov hluav taws xob hla lub capacitor C2 cais nrog lub ntsuas hluav taws xob, tom qab ntawd suav Vs (rms) raws li hauv qab no:
Vs (rms) = ((Muab Voltage *5)/(Voltage hla C2 *1023)) *(ADC Nyeem)
hauv kuv rooj plaub, Vs (rms) = 0.33*(ADC Nyeem Ntawv)
Kauj ruam 5: Arduino Code
#define volt_in A0 // analog voltage nyeem tus pin
volatile uint16_t t_period; uint16_t ADC_value = 0; ntab volt, freq; void isr () {t_period = TCNT1; // khaws TCNT1 tus nqi hauv t_period TCNT1 = 0; // pib dua Timer1 ADC_value = analogRead (volt_in); // nyeem analog voltage} ntab get_freq () {uint16_t timer = t_period; yog (timer == 0) rov qab 0; // kom tsis txhob faib los ntawm xoom lwm qhov rov qab 16000000.0/(8UL*timer); // zaus muab los ntawm f = clk_freq/(prescaler*lub sijhawm ua haujlwm)} tsis muaj teeb tsa () {TCCR1A = 0; TCCR1B = ntsis (CS11); // teem prescaler rau 8 TCNT1 = 0; // pib dua Timer1 tus nqi TIMSK1 = ntsis (TOIE1); // pab Timer1 txeej cuam tshuam EIFR | = me ntsis (INTF0); // tshem tawm INT0 cuam tshuam tus chij Serial.begin (9600); } void loop () {attachInterrupt (0, isr, RISING); // pab kom cuam tshuam sab nraud (INT0) ncua (1000); detachInterrupt (0); freq = tau_freq (); qhov = ADC_value*0.33; Txoj hlua buf; buf += Txoj hlua (freq, 3); buf += F ("Hz / t"); buf += Txoj hlua (volt); buf += F ("Volts"); Serial.println (buf); }
Kauj Ruam 6: Xaus
Koj tuaj yeem sib sau ua ke hauv kab ntawv hauv kab ntawv thiab hloov kho tus lej thiab ntxiv SD Card los khaws cov ntaub ntawv, uas tom qab tuaj yeem tshuaj xyuas. Ib qho piv txwv yog, koj tuaj yeem txheeb xyuas qhov hluav taws xob thiab zaus ntawm lub sijhawm ua haujlwm siab.
Lub Circuit Court kuv tau teeb tsa hauv lub khob cij siv LM324 (quad opamp) hloov LM358 (dual opamp) vim tias kuv tsis muaj IC nyob rau lub sijhawm ntawd thiab kaw lub tebchaws vim tias COVID-19 muaj thoob qhov txhia chaw ua rau nws nyuaj rau kuv kom tau txais IC tshiab. Txawm li cas los xij, nws yuav tsis cuam tshuam rau kev ua haujlwm ntawm Circuit.
Ua siab zoo los tawm tswv yim hauv qab no rau ib qho lus qhia thiab lus nug.
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
Yuav Ntsuas Li Cas Ntsuas Kev Siv Lub Hwj Chim ntawm Kev Sib Txuas Lus Wireless hauv Era ntawm Kev Siv Hluav Taws Xob?: 6 Cov Kauj Ruam
Yuav Ua Li Cas Ntsuas Kom Tau Txais Kev Siv Lub Hwj Huam ntawm Kev Sib Txuas Lus Wireless hauv Era ntawm Kev Siv Hluav Taws Xob? Feem ntau IoT nodes yuav tsum tau siv lub roj teeb. Tsuas yog los ntawm kev ntsuas ntsuas lub zog siv ntawm lub wireless wireless peb tuaj yeem kwv yees kwv yees ntau npaum li cas roj teeb kuv
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
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