Cov txheej txheem:

Pwm2pwm: 4 Steps
Pwm2pwm: 4 Steps

Video: Pwm2pwm: 4 Steps

Video: Pwm2pwm: 4 Steps
Video: How to Geotag Thermal Images and Videos - Saving GPS info as metadata and text using VuIR 2024, Kaum ib hlis
Anonim
Pwm2 pwm
Pwm2 pwm

Hloov cov tswv yim PWM teeb liab mus rau lwm qhov PWM teeb liab tso tawm nrog Encoder.

Txoj haujlwm no yug thaum kuv yuav kuv thawj lub tshuab txiav laser. Nws tsis yooj yim los teeb lub PWM zog, thawj zaug, raws li cov khoom koj xav txiav. Yog li kuv xav tsim lub cuab yeej me me los hloov lub zog thaum ua tiav.

Kauj Ruam 1: Sau Cov Npe

Componets Cov Npe
Componets Cov Npe

Rau qhov haujlwm no koj xav tau:

  • 1 x Oled zaub, hauv kuv rooj plaub I2C
  • 1 x Arduino, hauv kuv rooj plaub arduino mini pro rau qhov me me.
  • 1 x Trimmer nrog khawm.
  • 3 x 10k resistor, 2 rau rub-up ntawm lub trimmer thiab ib qho rau rub tawm.

Hauv daim duab ntawm cov kauj ruam no koj pom lwm tus Arduino mini pro, hu ua laser, vim tias kuv tau sim qhov kev txawj ntawm lub laser tswj (pwm hauv teeb liab) nrog Arduino no.

Kauj ruam 2: Kev sib txuas

Kev sib txuas
Kev sib txuas
Kev sib txuas
Kev sib txuas

Nco ntsoov txuas 3 tus tiv thaiv, rub tawm thiab rub tawm, hauv cov txheej txheem no.

Thawj thawj zaug, kuv pom zoo kom koj txuas qhov thib ob Arduino (hu ua laser hauv qib ua ntej) los ntsuas yog tias cov cai thiab kev sib txuas ua haujlwm ib yam nkaus.

Yog tias koj paub ntau dua nrog cov duab pom, qhib pwmTOpwm.svg.

Kauj ruam 3: Arduino Sketch

Arduino Sketch
Arduino Sketch
Arduino Sketch
Arduino Sketch

Koj tuaj yeem luam kuv cov cai yooj yim los ntawm GitHub nplooj ntawv:

Cov txuj ci tseem ceeb ntawm txoj cai no yog kev koom ua ke ntawm "pulseIn" hais kom ua, cov ntaub ntawv ntxiv:

Thaum koj sim ntsuas PWM teeb liab nkag mus rau Microcontroller koj yuav tsum suav ntev npaum li cas lub teeb liab nyob (lossis qis) nyob rau lub sijhawm. Koj tuaj yeem siv qhov hais kom ua "pulseIn".

Yog tias koj sim ua lub ntsiab lus mem tesIn koj tuaj yeem pom qee yam tsis ruaj khov.

Txhawm rau kho qhov teeb meem no peb yuav tsum siv lub lim nruab nrab, hauv kuv qhov xwm txheej nthuav dav txav nruab nrab (EMA).

Koj tuaj yeem sim qhov txias thiab lim tau yooj yim nrog qhov piv txwv no:

Tsis txhob txhawj xeeb, lub lim dej twb tau koom ua ke hauv cov cai: p.

Yog tias koj siv Arduino thib ob (laser) koj tuaj yeem tso rau hauv qhov arduino qhov piv txwv no:

Kauj Ruam 4: PCB

PCB
PCB

Kuv xav sau ib lub PCB rau txoj haujlwm no, nrog KiCad, thiab qhia tawm.

Yog tias kuv hloov pauv rau PCB kuv yuav qhia lawv ntawm GitHub nplooj ntawv.

Pom zoo: