Incamake y'ibirimo:
1 Ihame ryikimenyetso cya infragre
2 Kwandikirana hagati ya infragre ya signal yohereza no kwakira
3 Infrared transmitter imikorere yo gushyira mubikorwa urugero
1 Ihame ryikimenyetso cya infragre
Iya mbere ni igikoresho ubwacyo gisohora ibimenyetso bya infragre, muri rusange bisa nkibi:
Diameter ya diode ya infragre ku ishusho ni 3mm, indi ni 5mm.
Birasa neza neza na LED itanga urumuri, bityo pine ndende ihujwe na pole nziza, naho iyindi ihujwe na pole mbi.
Inzira yoroshye yo gutwara ibinyabiziga ni ukongeramo 1k igabanya imipaka irwanya umuhanda mwiza 3.3v, hanyuma ugahuza electrode mbi na IO ya microle microle.Nkuko bigaragara hano hepfo:
2 Kwandikirana hagati ya infragre ya signal yohereza no kwakira
Amaze kuvuga ibyo, nkeneye gukosora amakosa mu kiganiro gikurikira hamwe nawe.
Ku ishusho hejuru, havuzwe ko urwego rwibimenyetso rwa transmitter hamwe nuwakira bitandukanye.Nukuvuga, kimwe nibirimo bizunguruka mumasanduku atukura nubururu mumashusho yavuzwe haruguru.
Mubyukuri, muburyo bwa flimform, igice cyubururu cya transmitter ntabwo cyoroshye urwego rwo hejuru rwa 0.56ms.Ahubwo, ni 0.56ms ya pwm ya 38kHz.
Imiterere nyayo yapimwe niyi ikurikira:
Umuhengeri urambuye kumurongo wamabara igice cya transmitter mumashusho nibi bikurikira:
Birashobora kugaragara ko inshuro ziyi kwaduka kwaduka ari 38kHz.
Dore incamake: inzandiko zandikirwa hagati ya transmitter nuwakira ya infragre ya kure igenzura:
Iyo transmitter isohora 38kHz kare ya kwaduka, iyakira iba mike, naho ubundi iyakira iri hejuru
3 Infrared transmitter imikorere yo gushyira mubikorwa urugero
Noneho reka tujye mumyitozo yo gutangiza gahunda.
Dukurikije intangiriro yabanjirije iyi, tuzi ko kugirango tumenye imikorere ya infragre ya kure, tugomba kubanza kumenya imirimo ibiri yibanze:
1 38kHz kwaduka kwaduka
2 Igenzura 38kHz kwaduka kwaduka kugirango uzimye kandi uzimye mugihe cyifuzwa
Iyambere ni 38kHz kare ya kare isohoka.Gusa dukoresha pwm kumurongo kugirango tubyare.Hano, dukeneye gukoresha imikorere ya pwm yigihe.Nkoresha STM32L011F4P6 chip-power nkeya hano.
Banza ukoreshe kode yububiko ibikoresho artifact cube kugirango ubyare code:
Kode yo gutangiza:
Noneho hariho imikorere yo kuzimya cyangwa kuzimya umuyaga wa pwm ukurikije amategeko ya coding, ashyirwa mubikorwa ukoresheje igihe cyo guhagarika, hanyuma ugahindura uburebure bwigihe umuraba wa pwm ufunguye cyangwa uzimya muguhindura igihe cyo kuza gikurikira guhagarika:
Haracyariho amakuru arambuye yamakuru atazashyirwa hano.Niba ukeneye izindi nkomoko yinkomoko, urahawe ikaze gusiga ubutumwa, kandi nzaguha kode irambuye vuba bishoboka.
Igihe cyo kohereza: Gashyantare-24-2022