Cov txheej txheem:

Lub Suab Tswj HDMI Hloov: 5 Kauj Ruam
Lub Suab Tswj HDMI Hloov: 5 Kauj Ruam

Video: Lub Suab Tswj HDMI Hloov: 5 Kauj Ruam

Video: Lub Suab Tswj HDMI Hloov: 5 Kauj Ruam
Video: Yuav ua li cas txhaj tshuaj tiv thaiv rau cov hluas? 2024, Kaum ib hlis
Anonim
Lub Suab Tswj HDMI Hloov
Lub Suab Tswj HDMI Hloov

Koj ua dab tsi thaum koj lub TV muaj 3 HDMI inputs tab sis koj muaj 4 (lossis ntau dua) cov cuab yeej uas koj xav txuas? Zoo, muaj ntau ntawm kev mus txog tom qab TV thiab pauv cov xov tooj. Qhov no tau txais qub qub zoo nkauj heev.

Yog li thawj qhov kuv tau ua yog yuav qhov hloov HDMI (https://goo.gl/6xtzUp). Qhov no hais txog qhov teeb meem ntawm kev sib pauv cov xov tooj nyob ib puag ncig, tab sis koj tseem yuav tsum tau mus txog tom qab lub TV teeb tsa los thawb khawm Xaiv ntawm qhov hloov pauv.

Kuv xav tau qee txoj hauv kev los tswj lub HDMI hloov chaw nyob deb, tsis tas yuav siv lub cev mus rau qhov hloov pauv. Kuv tau ua si ib puag ncig nrog wifi-txuas microcontrollers, zoo li Particle Photon thiab Digistump Oak, thiab xav tias nws yuav yog txoj haujlwm lom zem los ua HDMI hloov lub suab tswj.

Lub tswv yim ntawm no yog los cuam tshuam Particle Photon mus rau HDMI hloov, thiab tom qab ntawd tswj Photon ntawm Alexa. Ib qho ntxiv, ib qho ntawm cov khoom siv yog Chromecast thiab kuv xav kom lub zog nws tsuas yog thaum nws xav tau thiab tso nws tawm ntawm txhua lub sijhawm. Yog tias koj tsis muaj Chromecast nws yuav tsum yooj yim los txiav txim siab qhov twg ntawm cov phiaj xwm los hloov lossis tawm mus.

Cov ntaub ntawv xav tau:

  • Amazon Alexa ntaus ntawv (piv txwv li Echo Dot)
  • Particle.io Photon
  • Hloov HDMI
  • P-channel MOSFET
  • DC-DC fais fab mov (https://goo.gl/mtSngM tab sis pom cov lus hauv qab no)
  • 12VDC phab ntsa wart
  • 10k ohm ¼ watt resistor (los ntawm kuv qhov chaw tso rau hauv)
  • USB hom A poj niam txuas (los ntawm kuv qhov chaw tso rau hauv)
  • Perfboard, xaim, kab laug sab, thiab lwm yam (los ntawm kuv qhov chaw tso rau hauv)

Cov Cuab Yeej:

  • Soldering hlau thiab accessories
  • Hlau stripper thiab cutter
  • Multimeter

Cov kev pabcuam:

  • Amazon tus tsim tawm tus account
  • IFTTT tus account (https://ifttt.com)
  • Tus account Particle.io

Txhawm rau ua kom txoj haujlwm no kuv siv 12VDC phab ntsa wart uas pub DC-DC hloov pauv teeb tsa rau 5VDC. Koj tseem tuaj yeem siv 5VDC phab ntsa wart ncaj qha tab sis tshuaj xyuas cov ntaub ntawv hauv Photon cov ntaub ntawv hais txog kev muab lub zog.

Qhov no yuav tsis yog kev qhia yuav ua li cas teeb tsa Alexa, IFTTT lossis Particle, thiab kuv yuav hais ntau ntau cov ntsiab lus hais txog kev siv lawv txij li lawv tau teev tseg zoo nyob rau lwm qhov (thiab, ncaj ncees, kuv tau hnov qab ntau cov ntsiab lus!). Yog tias koj tsis tau ua haujlwm nrog cov thev naus laus zis yav dhau los koj yuav xav nyeem qee cov ntaub ntawv thiab tshuaj xyuas qee qhov kev qhia ua ntej mus.

Kauj ruam 1: Qhib Nws

Qhib Nws
Qhib Nws
Qhib Nws
Qhib Nws

Kuv pib los ntawm kev sib nrug HDMI hloov mus saib dab tsi sab hauv.

Kuv tau tshawb xyuas lub rooj tsav xwm hauv Circuit nrog lub multimeter thiab txiav txim siab tias:

  • nws tau siv los ntawm 5VDC los ntawm cov khoom siv txuas nrog,
  • khawm Xaiv ua haujlwm los ntawm rub kab rau hauv av, thiab
  • txhua LED muaj txog 2V poob hla nws thaum pom kev.

Feem ntau ntawm ib qho ntawm LEDs tau ua haujlwm txhua lub sijhawm. Yog li los ntawm kev txuas cov LED anodes rau Photon analog pins, Kuv tuaj yeem txiav txim siab qhov twg yog teeb, thiab yog li, qhov twg HDMI cov tswv yim tam sim no tau hloov mus rau qhov chaw nres nkoj tso tawm.

Txhawm rau ua raws li nias lub pob Xaiv Kuv tuaj yeem rub ib ceg ntawm Xaiv tus pin rau hauv av. Qhov no ua rau HDMI hloov mus rau txoj hauv kev sib txawv cov tswv yim rau cov zis.

Toggling Xaiv Hloov thiab tshuaj xyuas cov LEDs los txiav txim siab qhov tshwm sim tsuas yog qhov kuv xav tau los tswj lub HDMI hloov mus deb.

Kauj Ruam 2: Txhim Kho HDMI Hloov

Txuas lub xov tooj ntawm tes mus rau HDMI
Txuas lub xov tooj ntawm tes mus rau HDMI
Txuas lub xov tooj ntawm tes mus rau HDMI
Txuas lub xov tooj ntawm tes mus rau HDMI

Txhawm rau saib xyuas LEDs, Kuv tau siv cov hlau lead rau anode ntawm txhua LED.

Txhawm rau hloov pauv HDMI, Kuv tau siv cov hlau lead mus rau sab siab ntawm Xaiv khawm.

Kuv kuj tau siv cov hlau lead rau hauv av yooj yim. Qhov no tshwm sim los rau sab qis ntawm Xaiv khawm tab sis lwm qhov chaw yuav tau ua haujlwm ib yam.

Thaum kawg, Kuv tau xaum lub qhov los ntawm rooj plaub, xaim xov hlau hla lub qhov thiab muab HDMI hloov rov qab ua ke.

Kauj Ruam 3: Xaim Cov Particle Photon

Txhim Kho Cov Particle Photon
Txhim Kho Cov Particle Photon
Txhim Kho Cov Particle Photon
Txhim Kho Cov Particle Photon
Txhim Kho Cov Particle Photon
Txhim Kho Cov Particle Photon

Kuv siv qee qhov perfboard los teeb tsa Photon thiab tom qab ntawd txuas lub LED coj mus rau A0, A1, thiab A2 ntawm Photon, Xaiv lub pob rau D6, thiab hauv av rau hauv av. Txhawm rau tswj lub zog rau Chromecast dongle, Kuv tau ntxiv p-type MOSFET ua qhov hloov pauv, uas pub lub zog tawm los ntawm USB hom A poj niam txuas. MOSFET lub rooj vag tus pin tseem muaj 10K ohm rub tawm tus tiv thaiv.

Kuj tseem muaj lub laub khawm uas rub D1 rau hauv av, tab sis nws tsis siv rau ib yam dab tsi tam sim no.

Txhawm rau ua kom lub zog Photon, Kuv tau siv DC-DC hloov pauv txij li Photon cov ntaub ntawv (https://goo.gl/MdwMp1) muaj qee cov lus ceeb toom txog kev ua kom lub zog ua kom luv.

Ib qho ntxiv, nco ntsoov tias Photon raug xaiv 3.3V ib feem yog li nws yuav zoo li txaus ntshai txuas nws mus rau 5V ib feem. Tab sis cov ntawv hais tias cov koob digital (zoo li D6 uas kuv tab tom siv) yog 5V-kam rau ua. Raws li tau sau tseg saum toj no, qhov poob qis ntawm cov LEDs nyob ib puag ncig 2V yog li tsis muaj teeb meem nyob ntawd.

Daim duab kawg qhia pom cov cuab yeej ua tiav. Pom tseeb kuv yuav tsum tau muab qhov no tso rau hauv ib lub thawv project lossis rooj plaub ntawm qee yam, tab sis qhov ntawd yuav yog txoj haujlwm yav tom ntej.

Kauj Ruam 4: Program Photon

Program rau Photon
Program rau Photon

Yog tias tsim nyog, ua raws Daim Ntawv Qhia Particle thiab teeb tsa koj li Photon (https://docs.particle.io/guide/getting-started/start/photon/). Tom qab ntawd, pib qhov Particle Web IDE (https://build.particle.io), tsim daim ntawv thov tshiab, muab tshuaj txhuam rau hauv kab ntawv hdmiswitch.ino txuas thiab nyem koj li Photon.

Kuv tab tom sau ntau cov ntsiab lus ntawm no tab sis yog tias koj tshiab rau Photon, Lub Vev Xaib Particle muaj qee cov ntaub ntawv zoo.

Kuv tau suav nrog hdmiswitch_tester.py Python xeem ntawv uas koj tuaj yeem siv los cuam tshuam nrog Photon thiab ua haujlwm hloov pauv. Ua ntej, koj yuav tsum hloov kho cov ntawv xeem txhawm rau ntxiv koj li Photon ntaus ID thiab Particle nkag tau token qhov tseem ceeb. Tom qab ntawd, los ntawm kab hais kom ua, khiav nab hab sej hdmiswitch_tester.py XXX, qhov twg XXX yog tivo, dvd lossis chromecast, hloov ntawm cov khoom siv. Tivo thiab DVD player tau kawg yuav tsum tau txhawb kom thiaj li hloov mus rau lawv. Khiav nab hab sej hdmiswitch_tester.py -pab saib seb qhov hais kom ua syntax yog dab tsi. Tsab ntawv no yuav tsum ua haujlwm ntawm Windows, Linux thiab Mac, thiab koj yuav tsum muaj Python 2.7 teeb tsa.

Kuv muaj Chromecast txuas rau qhov hloov chaw nres nkoj 1, DVD player ntawm chaw nres nkoj 2 thiab Tivo ntawm chaw nres nkoj 3. Koj tuaj yeem hloov kho cov ntawv sau kom haum rau koj cov cuab yeej tshwj xeeb.

Muaj qee qhov qeeb thaum hloov mus rau Chromecast vim nws yuav tsum muaj zog, thiab qhov no yuav siv sijhawm li 30 vib nas this.

Kauj Ruam 5: Teeb Alexa thiab IFTTT

Teeb Alexa thiab IFTTT
Teeb Alexa thiab IFTTT

Thaum txhua yam ua haujlwm nrog cov ntawv xeem nab nab, koj paub tias Photon tab tom sib txuas lus kom raug raws li Kev Pabcuam Huab Cua. Cov kauj ruam tom ntej yog teeb tsa txoj hauv kev rau Alexa kom muab cov lus txib tib yam li cov ntawv xeem. Qhov no tuaj yeem ua tiav los ntawm kev tsim IFTTT app uas koom nrog Alexa thiab Particle cov kev pabcuam huab.

Nkag mus rau IFTTT thiab teeb tsa 3 daim ntawv thov siv cov screenshots no ua lus qhia. Kuv 3 nqe lus yog "chromecast", "dvd player" thiab "tivo", tab sis koj tuaj yeem hloov kho txhua yam uas koj xav tau. Tsuas yog nco ntsoov ua qhov hloov pauv tsim nyog rau hdmiswitch.ino code.

Cov vis dis aus qhia txog HDMI hloov pauv hauv kev nqis tes ua. Tam sim no kuv tuaj yeem hais kom Alexa hloov lub TV los ntawm Tivo rau DVD player rau Chromecast. Nco ntsoov tias Alexa qee zaum tsis nkag siab qhov kev thov yog li kuv yuav tau hloov cov lus txhais ua qee yam yooj yim rau nws nkag siab. Kuv kuj tau hloov pauv qhov luv HDMI cable los ntawm kev hloov mus rau TV nrog ntev dua yog li qhov kev hloov pauv tsis yog cia li ntsaws rau tom qab.

Thiab qhov ntawd tsuas yog muaj rau nws. Kuv hla dhau qee cov ntsiab lus yog li thov tshaj tawm cov lus nug uas koj muaj thiab kuv yuav ua qhov zoo tshaj los teb lawv. Kuv vam tias koj pom txoj haujlwm no nthuav thiab muaj txiaj ntsig!

Pom zoo: