Cov txheej txheem:

Keycoder rau Xauv Hluav Taws Xob: 4 Kauj Ruam
Keycoder rau Xauv Hluav Taws Xob: 4 Kauj Ruam

Video: Keycoder rau Xauv Hluav Taws Xob: 4 Kauj Ruam

Video: Keycoder rau Xauv Hluav Taws Xob: 4 Kauj Ruam
Video: Rau Siab Kawm Ntawd Maiv Twm & Me Nyuam Kub (Tub Hmoov) New Song 2023-2024 2024, Kaum ib hlis
Anonim
Keycoder rau Xauv Hluav Taws Xob
Keycoder rau Xauv Hluav Taws Xob

Nov yog qhov yooj yim programable 4 khawm ua ke code.

interface module thiab zoo li no tuaj yeem siv rau ntawm cov phiaj xwm uas yuav tsum muaj kev tswj lub qhov rooj tsis muaj qhov tseem ceeb. Tsuas yog PCB los tsim lub teeb liab xav tau los pib lub tshuab ntsuas phoo tau qhia, lub tshuab xauv raug tso rau tus neeg siv.

PCB siv kev sib xyaw ua ke ntawm qhov saum npoo thiab dhau los ntawm cov khoom sib xyaw uas txhua yam muaj, npaj tau zoo thiab siv cov hlau zoo yuav tsum tau txhawm rau txhawm rau txhim kho SMT cov khoom. Txhawm rau kom yooj yim ntawm kev tsim kho DIP's tau teeb tsa hauv qhov (socket). Cov ntsia hlau txuas tau siv los txuas 9V roj teeb (5V min txog 15V max), thiab tso tawm.

Kuv tsim PCB txheej txheem siv Eagle Cad thiab qhov no tau tsim ntawm OSH Park.

Khoom siv

Daim Ntawv Teev Npe

3 × 10k Resistor 1206

2 × 20k Resistor 1206

4 × SWITCH SPST-NO

1 × 3 Txoj Kev PCB Terminal Thaiv 2.54mm suab

1 × 2 Txoj Kev PCB Terminal Thaiv 2.54mm suab

2 × 16 tus pin IC Socket xaiv tau

1 × 14 tus pin IC Socket xaiv tau

1 × 8 tus pin IC Socket xaiv tau

1 × PCB 2 txheej board

2 × 47k Resistor 1206

1 × 10n Capacitor 1206

1 × 100n Capacitor 1206

2 × BSS123 NFET SOT23

2 × CD4027 Dual JF Flip Flop 16DIP

1 × CD4081 Quad 2 cov tswv yim THIAB 14DIP

1 × 555 Timer 8DIP

1 × LED RED 3 hli

16x Terminal pins 2.54mm nrug

Kauj Ruam 1: Kev piav qhia Circuit

Kev piav qhia Circuit
Kev piav qhia Circuit
Kev piav qhia Circuit
Kev piav qhia Circuit
Kev piav qhia Circuit
Kev piav qhia Circuit

Lub voj voog tau pom los ntawm kev siv CMOS lub rooj vag logic, lub sijhawm timer thiab ib txhais tes ntawm cov khoom sib cais.

Lub hauv paus tseem ceeb yog JK flip flop uas plaub tau siv, qhov no xav tau CD4027 uas muaj ob lub flip flops, yog li ob qho no yuav tsum tau ua.

CD4027 muaj nrog 16 tus pin hauv DIP thiab SMD, tus pin tawm thiab kev ua haujlwm yog tib yam tsis hais txog ntawm pob.

Cov lus tseeb qhia txog lub xeev kev ua haujlwm.

LH = Kev hloov pauv qis mus rau siab, HL = Siab mus rau qhov hloov pauv qis, NC = Tsis hloov pauv, X = Tsis quav ntsej.

Txog rau daim ntawv thov no S thiab R cov tswv yim yog ob qho tib si qis vim li no hauv peb kab kawg ntawm kab lus tseeb tuaj yeem tsis quav ntsej.

Yog li, lub xeev tso tawm ntawm Flip Flop (FF), yuav txiav txim siab los ntawm qib siab ntawm J lossis K cov tswv yim thaum lub moos (CLK), nyob ntawm ntug kev nce (LH).

Txhua ntawm thawj peb tus yuam sij ntawm cov keyboard tau txuas rau J cov tswv yim ntawm FF uas pom lub xeev tseem ceeb, nrog tus yuam sij tsis-nias lub tswv yim qis (lub neej ntawd raug rub qis los ntawm tus tiv thaiv), thaum tus yuam sij nias J cov lus nkag mus siab thaum CLK hloov LH. Qhov ua rau Q cov zis tawm mus siab.

Qhov thib ob FF raug kaw los ntawm kev sib koom ua ke ntawm lub xeev yav dhau los 1 FF thiab CLK ntawm lub rooj vag THIAB.

CD4081 quad 2 cov tswv yim THIAB muaj nrog 14 tus pin hauv DIP thiab SMD, tus pin tawm thiab kev ua haujlwm yog tib yam tsis hais txog pob

Yog tias 1st FF qhov kev tso tawm tau siab dua 2nd FF qhov kev tso tawm yuav nce siab thaum lub moos, yog tias tus lej thib ob raug nias.

3rd FF raug kaw los ntawm 2nd THIAB rooj vag (ntawm 2nd FF qhov tso tawm), thiab CLK.

K cov tswv yim ntawm txhua FF's txuas nrog ua ke ntawm tus lej 4, nias qhov no muab qib siab uas nyob rau LH tom ntej ntawm cov tswv yim CLK ua rau Q tso tawm qis thiab rov pib dua txhua FF's. Yog tias tus yuam sij tsis tau nias lub tswv yim tau tuav qis (lub neej ntawd raug rub qis los ntawm tus tiv thaiv).

Ntxiv nrog rau kev rov pib dua phau ntawv muab los ntawm tus yuam sij thib 4, lub zog rov pib dua (POR), yog muab los ntawm lub capacitor/resistor (CR), network tsim los ntawm tus neeg siv hluav taws xob hla qhov hloov 4 thiab rub tawm qis ntawm K inputs.

Thaum lub zog siv los ntawm CR lub network muab HL mem tes rau K cov tswv yim thiab nrog J cov tswv yim txhua tus rub qis los ntawm tus tiv thaiv (J = L, K = H), Q cov txiaj ntsig tau qis tag nrho.

Qhov kev tso tawm ntawm FF thib 3 txuas nrog ib qho ntawm 2 input EXOR, lwm qhov nkag tau txuas nrog POR network.

Ib lub qhov rooj EXOR muaj tab sis lawv qhov siab tshaj plaws ua haujlwm yog 5.5V, uas yog qhov qis kawg ntawm CMOS kev ua haujlwm hluav taws xob. Hauv txhua qhov xwm txheej lub hom phiaj yog ua haujlwm ntawm 9V

Txog qhov kawg no, EXOR siv cov neeg tawm tsam, NFET's thiab 3rd THIAB rooj vag tau tsim.

Qhov tsim tawm ntawm EXOR rooj vag CLK ntawm 4th THIAB lub rooj vag mus rau cov tswv yim ntawm 4th FF yog J = H thiab K = LH toggles cov zis ntawm FF. Thaum Q = L lub ntsuas phoo tau teeb tsa, thaum Q = H lub xauv tsis tau teeb tsa.

Lub moos tau tsim los siv lub 555 timer teeb tsa hauv hom Astable..

Kauj ruam 2: Sib dhos

Los ua ke
Los ua ke

Txuas cov khoom siv saum npoo ua ntej, qhov no tiv thaiv kev thaiv cov khoom no los ntawm qhov loj dua los ntawm cov khoom sib dhos thiab nyob rau theem no lub rooj tsavxwm yog tiaj tus uas yooj yim rau kev sib dhos.

Tom ntej solder IC qhov nyob tshwj tsis yog haum IC ncaj qha rau lub rooj tsavxwm.

Txawm li cas los xij, IC qhov nyob tuaj yeem ua kom yooj yim debug thiab hloov pauv thaum muaj teeb meem.

Ua kom haum cov davhlau ya nyob twg tshwj tsis yog siv cov xaim txuas.

Cov davhlau ya nyob twg thaiv yog qhov kawg kom tau muag thaum lawv zaum siab dua lwm yam khoom.

Kauj ruam 3: Kev ua haujlwm

Qhov xwm txheej seb puas tau teeb tsa chav lossis tsis tau teeb tsa los ntawm LED, qhov no tuaj yeem txuas ntxiv saum toj no lossis nyob deb ntawm lub rooj tsav xwm tseem ceeb raws li qhov xav tau.

LED nyob twj ywm thaum teeb. (tseem yog lub zog ua neej nyob).

Kev teeb tsa thiab teeb tsa tsis ua tiav yog ua tiav los ntawm kev nkag mus rau 4-khawm ua ke, txoj cai raug hloov ntawm LED qhia tias lub kaw lus tau teeb tsa thiab cov cai raug yog tua lub LED.

Ib txoj cai tsis raug cai siv rov pib dua rau hauv lub system xav tau cov lej ua ntu zus kom rov nkag los thaum pib.

Txoj cai xav tau yog teeb tsa los ntawm cov neeg dhia dhia (tso cai rau hloov pauv tau yooj yim), lossis txuas (cov lej nyuaj, hloov pauv tau yooj yim).

Hard coding negates lub davhlau ya nyob twg posts simplifying kev tsim kho, tab sis ua rau hloov cov cai yooj yim dua

Cov kev sib txuas tau teeb tsa ua pawg ntawm ob hauv 4 x 4 matrix.

Cov kab ntawv sib txuam nrog qhov hloov pauv sib xws, ib kem ntawm ib qho kev hloov.

Kab ntawv sib haum nrog kev hloov pauv ntawm 1 txog 4.

Coj S1 ua piv txwv.

Hauv qab S1 muaj 4 qhov txuas hauv kab ntawv sib thooj, yog tias qhov txuas thib 1 tau ua nws muab qhov no ua lub pob thib 1 hauv kab ntawv ua ntu zus, Yog tias qhov txuas thib ob tau ua nws muab S1 ua lub khawm thib ob hauv ntu thiab lwm yam.

Tib txoj kev siv tau rau txhua lub khawm.

Kauj ruam 4: Troubleshooting

Teeb meem tuaj yeem tshwm sim thiab yog tias lawv ua li cas lawv tuaj yeem daws tau.

Thawj qhov ua yog saib kom pom tseeb.

IC nyob hauv qhov chaw tsis raug, kev qhia tsis raug lossis tus pin tsis tau siv los yog siv tsis zoo, tsis pom qhov ntsaws lossis khoov tus pin.

Cheebtsam hauv txoj haujlwm tsis raug, tus nqi tsis raug, kev qhia tsis raug lossis kev siv tshuaj tsis zoo.

Solder txuas, Muab cov khoom siv hluav taws xob tsis zoo rau cov khoom siv, muab cov khoom hloov pauv, qhov tsis raug.

Txawm tias PCB tuaj yeem muaj qhov qhib lossis luv luv (s)

Tsis txhob qhia koj tus kheej nws tsis tuaj yeem yog qhov teeb meem tshwj xeeb yam tsis muaj kev txheeb xyuas nws

Pom zoo: