tsamba_banner

Nkhani

Mfundo ndi kuzindikira kwa infrared remote control transmitter

Zambiri mwachidule:

1 Mfundo yotumizira ma infrared sign transmitter

2 Kulumikizana pakati pa ma infrared signal transmitter ndi wolandila

3 Chitsanzo chogwiritsa ntchito ma infrared transmitter

 

1 Mfundo yotumizira ma infrared sign transmitter

Choyamba ndi chipangizo chomwe chimatulutsa chizindikiro cha infrared, chomwe nthawi zambiri chimawoneka motere:

dfhd (1)

Kutalika kwa diode ya infrared pachithunzichi ndi 3mm, ndipo inayo ndi 5mm.

Iwo ali ofanana ndendende ndi ma LED otulutsa kuwala, kotero kuti zikhomo zazitali zimalumikizidwa ndi mtengo wabwino, ndipo winayo amalumikizidwa ndi mtengo woyipa.

Njira yosavuta yoyendetsera galimoto ndikuwonjezera 1k yoletsa malire panjira yabwino 3.3v, kenako ndikulumikiza ma elekitirodi olakwika ku IO ya wowongolera yaying'ono.Monga momwe zilili pansipa:

dfhd (2)

2 Kulumikizana pakati pa ma infrared signal transmitter ndi wolandila

Nditanena zimenezi, ndikufunika kukonza zolakwika m’nkhani yotsatira ndi inu.

dfhd (3)

Pa chithunzi pamwambapa, zikunenedwa kuti milingo ya siginecha ya transmitter ndi wolandila ndi yosiyana.Izi ndizofanana ndi zomwe zazunguliridwa m'mabokosi ofiira ndi a buluu mu chithunzi pamwambapa.

M'malo mwake, mu mawonekedwe enieni, gawo la buluu la transmitter silosavuta kwambiri la 0.56ms.M'malo mwake, ndi 0.56ms pwm wave wa 38kHz.

Yeniyeni yoyezedwa waveform ili motere:

dfhd (4)

Tsatanetsatane wa mawonekedwe a mawonekedwe amtundu wa wave wave wa transmitter pachithunzichi ndi motere:

dfhd (5)

Zitha kuwoneka kuti ma frequency a square wave wave ndi 38kHz.

Nachi chidule: kulumikizana pakati pa transmitter ndi wolandila wa infrared remote control:

Pamene transmitter imatulutsa 38kHz square wave, wolandila amakhala wotsika, apo ayi wolandila amakhala wokwera.

3 Chitsanzo chogwiritsa ntchito ma infrared transmitter

Tsopano tiyeni tipitirire ku machitidwe a mapulogalamu.

Malinga ndi mawu oyamba apitawa, tikudziwa kuti kuti tizindikire ntchito ya chowongolera chakutali cha infrared, choyamba tiyenera kuzindikira ntchito ziwiri zofunika:

1 38kHz square wave kutulutsa

2 Yang'anirani mafunde a 38kHz kuti muyatse ndi kuzimitsa panthawi yomwe mukufuna

Yoyamba ndi 38kHz square wave output.Timangogwiritsa ntchito pwm wave kuti tipange.Apa, tiyenera kugwiritsa ntchito pwm ntchito ya timer.Ndikugwiritsa ntchito chipangizo champhamvu chochepa cha STM32L011F4P6 pano.

Choyamba gwiritsani ntchito chida chopangira ma code cube kuti mupange code:

Chiyambi kodi:

Ndiye pali ntchito yoyatsa kapena kuzimitsa mafunde a pwm molingana ndi malamulo a coding, omwe amatsatiridwa pogwiritsa ntchito kusokoneza kwa timer, ndikusintha kutalika kwa nthawi yomwe mafunde a pwm amayatsidwa kapena kuzimitsidwa posintha nthawi yofika yotsatira. sokoneza:

Palinso zambiri za data yosungidwa yomwe siiikidwa apa.Ngati mukufuna ma code owonjezera, ndinu olandiridwa kusiya uthenga, ndipo ndikupatsani code yatsatanetsatane posachedwa.


Nthawi yotumiza: Feb-24-2022