Cov txheej txheem:

Ob Lub Hlau (DMX) Kev Sib Tham Nrog Vijtsam thiab Khawm: 5 Cov Kauj Ruam (nrog Duab)
Ob Lub Hlau (DMX) Kev Sib Tham Nrog Vijtsam thiab Khawm: 5 Cov Kauj Ruam (nrog Duab)

Video: Ob Lub Hlau (DMX) Kev Sib Tham Nrog Vijtsam thiab Khawm: 5 Cov Kauj Ruam (nrog Duab)

Video: Ob Lub Hlau (DMX) Kev Sib Tham Nrog Vijtsam thiab Khawm: 5 Cov Kauj Ruam (nrog Duab)
Video: Python! Reading and Writing JSON Files 2024, Kaum ib hlis
Anonim
Ob Hlau (DMX) Interface Nrog Screen thiab Nyees khawm
Ob Hlau (DMX) Interface Nrog Screen thiab Nyees khawm

DMX yog cov txheej txheem siv los tswj cov teeb pom kev zoo thiab cov teebmeem tshwj xeeb. Txhua lub cuab yeej muaj nws tus kheej channel (s) uas nws teb rau. Cov channel no yog cov neeg siv xaiv tau los ntawm DIP hloov lossis cov zaub nrog cov nyees khawm.

Muaj ntau txoj hauv kev xaiv qhov chaw nyob tab sis feem ntau yog siv nrog DIP hloov lossis nrog cov zaub nrog khawm. Thaum siv DIP hloov koj xav tau 9 tus pin (8 rau qhov chaw nyob thiab ib qho rau hom).

Ib qho kev xaiv uas zoo li me ntsis thiab muab rau koj xaiv ntau dua yog los ntawm kev siv 7 ntu ntu thiab qee cov nyees khawm. Txoj kev no siv 12 tus pin rau cov zaub, 4 rau cov nyees khawm thiab koj yuav xav tau qee qhov xwm txheej coj ib yam nkaus. Qhov no txhais tau tias koj yuav luag tsis muaj tus pin sab laug thaum siv arduino Uno / mini lossis qee yam zoo sib xws.

Txhawm rau daws qhov teeb meem no kuv tsim tus qauv uas siv lub digital interface los tswj 4 tus lej 7-ntu zaub, 4 nyees khawm thiab 3 qhov xwm txheej coj thiab tsuas yog siv 2 tus lej digital thiab 2 tus pin rau 5V thiab hauv av. Dhau li koj txuag pins tus qauv no yog digital ib yam, qhov no txhais tau tias koj tuaj yeem qhia nws yuav tso tawm dab tsi thiab tus qauv yuav nco qab. Tus qauv saib xyuas dimming cov zaub ib yam nkaus.

Tau kawg qhov qauv no tuaj yeem siv rau txhua yam uas koj xav tau thiab tsis txwv rau siv nrog DMX teeb tsa!

Kauj Ruam 1: Yam Koj Xav Tau

Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau

Qhov tseem ceeb ntawm cov qauv no yog TM1637 uas yog tus qauv rau kev tsav tsheb coj. Nrog lub microcontroller zoo li Arduino koj tuaj yeem xa bytes los qhia seb qhov twg yog qhov qhib rau. Cov qauv no tseem tuaj yeem ua rau lub teeb ci nrog PWM teeb liab. Nws tsis muaj peev xwm ua kom leds sib cais. Txhua lub Cheebtsam tau muab tso rau ntawm PCB kev cai tab sis koj tuaj yeem siv daim ntawv qhia zaub mov lossis daim ntawv tiv thaiv ib yam.

Yog tias koj xav ua cov khoom raws li daim duab no yog yam koj yuav xav tau:

1 x PCB rau tus qauv interface

Yog tias koj siv qhov txuas no koj tau txais koj thawj 10 lub pcb dawb thiab koj txhawb nqa kuv cov haujlwm tshiab.

1 x 0.56 4 digit display (red) common anode 12 pins

1 x TM1637 DIP

1 x tus pinheader ncaj lossis 90 degrees (4 tus pin)

3 x 3mm coj, liab, txiv kab ntxwv thiab ntsuab.

4 x tactile pushbutton 2 pins

ntxiv rau ntu koj xav tau qee yam cuab yeej siv rau kev sib dhos:

  • cam khwb cia hlau
  • solder nrog flux
  • plier los txiav cov hlau lead

Kauj Ruam 2: Tau txais PCB

Tau txais PCB
Tau txais PCB

Cov ntaub ntawv aegle thiab cov ntaub ntawv gerber tau suav nrog hauv cov kauj ruam no. Kuv xaj kuv cov PCBs ntawm no:

www.pcbway.com/setinvite.aspx?inviteid=993…

Nrog qhov txuas no koj tuaj yeem tau txais koj tus qauv tsim thawj zaug rau 10 pcb dawb los sim, koj pab kuv ib yam thiab vim tias kuv tau txais luv nqi luv thaum koj siv qhov txuas no los xaj.

Cov ntaub ntawv gerber tau tsim los ntawm PCBways thiab tig tawm zoo nkauj. Kuv xaj 10 daim nrog cov xim xiav thiab ntawv dawb.

Hloov chaw ntawm kev siv PCB koj tuaj yeem muab tag nrho txhua qhov rau protoboard ib yam.

Kauj ruam 3: Sib dhos

Los ua ke
Los ua ke

Sib sau ua ke cov qauv no tsis yog qhov nyuaj yog tias koj muaj qee qhov txuj ci sib dhos. Ua ntej tshem tawm 4 tus pin los ntawm tus pinheader strip yog tias koj tsis tau ua. Muab lawv tso rau hauv qhov chaw tom ntej, Kuv pib nrog tus pinheaders vim tias lawv zoo li poob thaum upside down. Tom ntej no kuv tau siv cov LEDs, cov hlau lead luv (sab tsis zoo) nyob ntawm sab xis, uas yog cim, cov tshiab ntawm PCB yuav muaj - kos npe. Tom qab cov LEDs kuv tau siv 4 lub khawm tsis sib xws, dua li TM1637 nti. Tus Pin 1 yog nyob rau sab saud sab saud thiab cim nrog tus lej. Qhov kawg uas kuv tau siv yog cov zaub, lub qhov yog nruj heev yog li nws yuav siv sijhawm me ntsis.

Tom qab tag nrho cov khoom raug muab tso rau hauv qhov chaw, Kuv tau txiav txhua txoj hauv kev thiab tshawb xyuas qhov ua tsis raug.

Kauj ruam 4: Xeem thiab Code

Xeem thiab Code
Xeem thiab Code

Tom qab koj ua tiav kev sib dhos nws yog lub sijhawm los ntsuas tus qauv. Txuas 5V rau microcontrollers 5V, GND rau GND. CLK thiab DIO pins tuaj yeem txhais hauv software tab sis lub neej ntawd yog tus pin 2 rau CLK thiab tus pin 3 rau DIO.

Rub tawm cov cai thiab xa nws mus rau koj Arduino. Txoj cai no yuav ua haujlwm ntawm lwm lub microcontrollers ib yam nkaus tab sis tseem tsis tau sim.

Tus lej Arduino tau teeb tsa los hloov kho lub vijtsam thiab nyeem cov nyees khawm txhua 200ms. Qhov no ua tiav kom CPU tuaj yeem siv rau lwm txoj haujlwm. Kev hloov chaw nyob yog ua tiav siv khawm nce thiab nqis, qhov chaw nyob yuav tau txais kev cawmdim tom qab 2 vib nas this. Qhov chaw nyob tau khaws cia hauv EEPROM thiab tau teeb tsa hauv kev teeb tsa. Qhov chaw nyob raug khaws cia hauv EEPROM txawm tias lub hwj chim raug kaw.

Cov xwm txheej leds tuaj yeem tswj tau los ntawm kev xa ib byte mus rau tus qauv rau 8 leds. Ntawm PCB tsuas yog 3 lub leds txuas nrog tab sis cov cai tso cai rau 8. Tus lej yuav raug txhim kho yav tom ntej kom hloov pauv cov leds rau thiab tawm yooj yim dua.

Cov nyees khawm tau txuas nrog ua lub hauv paus ntawm lub keyboard thiab qhov siab tshaj ntawm 16 khawm tuaj yeem siv tau. multipress tsis tau txhawb nqa tam sim no tab sis qhov no yuav raug ntxiv yav tom ntej yog tias ua tau.

Tam sim no kuv tab tom ua haujlwm ntawm lub tsev qiv ntawv los ua kom siv cov txheej txheem interface no yooj yim dua tab sis qhov no yuav siv sijhawm me ntsis.

Kauj Ruam 5: Txhim Kho Kom Ua

Kev Txhim Kho Kom Ua
Kev Txhim Kho Kom Ua

Tom qab kuv xaj thiab sim PCB kuv pom qee qhov kev txhim kho me me, yog tias koj muaj qee qhov kev txhim kho lossis kab thov thov tso lawv rau hauv cov lus. Thov piav qhia nws ib yam vim tias kuv nyiam kawm paub yuav ua li cas kuv tuaj yeem txhim kho kuv cov phiaj xwm!

Tam sim no qhov no yog kev txhim kho kuv tab tom ua haujlwm:

  • Ntxiv lub capacitor me me rau lub rooj tsav xwm rau kev ruaj ntseg hluav taws xob
  • Ntxiv ib daim paib rau kev coj ncaj ncees
  • Siv qhov loj dua rau cov zaub
  • Sau phau ntawv pub dawb rau cov cai kom siv nws yooj yim dua
  • Sau cov cai kom qhib thiab tawm leds yooj yim dua

Kuv nkag mus rau qhov kev sib tw glow nrog cov lus qhia no, yog tias koj nyiam nws Kuv thov pov npav rau kuv:)

Qee lub sij hawm kuv muaj PCB tso ib puag ncig, yog tias koj xav tau PCB liab qab Kuv muag lawv rau € 4, - ib thooj. Kuv muaj qee qhov ua tiav ib yam uas koj tuaj yeem yuav rau € 10. tus nqi thauj khoom tsis suav nrog (nkoj los ntawm Netherlands). Xa lus rau kuv yog tias koj xav tau ib qho, Kuv yuav muaj qee qhov tso tseg!

Pom zoo: