Cov txheej txheem:

Ntau LED Zaub Module: 6 Cov Kauj Ruam (nrog Duab)
Ntau LED Zaub Module: 6 Cov Kauj Ruam (nrog Duab)

Video: Ntau LED Zaub Module: 6 Cov Kauj Ruam (nrog Duab)

Video: Ntau LED Zaub Module: 6 Cov Kauj Ruam (nrog Duab)
Video: Zoo Siab Nrog Koj - Paj Tsua Thoj [ Official MV ] Nkauj Tawm Tshiab 2022 2024, Kaum ib hlis
Anonim
Image
Image
Ntau LED Zaub Module
Ntau LED Zaub Module
Ntau LED Zaub Module
Ntau LED Zaub Module

Nyob zoo txhua tus, Kuv nyiam ua haujlwm nrog LED qhia nrog 7 ntu lossis nrog dot matrix thiab kuv twb tau ua ntau txoj haujlwm sib txawv nrog lawv.

Txhua lub sijhawm lawv nthuav vim tias muaj qee yam kev ua khawv koob zoo li cas lawv tuaj yeem ua haujlwm vim tias yam koj pom nws yog qhov tsis pom kev zoo!

Cov lus qhia muaj ntau tus pin rau kev sib txuas nrog Arduino (lossis lwm lub microcontroller) thiab cov kev daws teeb meem zoo tshaj plaws yog siv cov thev naus laus zis ntawm cov ntaub ntawv sib tshooj kom txo qis kev siv lawv cov chaw nres nkoj.

Thaum koj ua qhov no, txhua ntu lossis ib qho LED yuav qhib rau ob peb qhov kev tshwm sim (miliseconds lossis tsawg dua), tab sis qhov rov ua dua ntawm qhov ntawd ntau zaus hauv ib pliag tsim qhov tsis pom ntawm cov duab uas koj xav pom.

Rau kuv qhov ntxim nyiam tshaj plaws yog txhim kho cov laj thawj, txoj haujlwm kom paub seb lawv tuaj yeem qhia cov ntaub ntawv raug raws li koj li haujlwm.

Hauv ib qhov haujlwm uas siv cov lus xav tau ntau lub sijhawm los sib sau ua ke txhua yam ntawm lub khob cij nrog ntau lub xov hlau rau kev sib txuas.

Kuv paub muaj ntau qhov sib txawv ntawm kev ua lag luam khiav nrog I2C, nrog txoj hauv kev yooj yim (lossis tsis yog), txhawm rau ua haujlwm rau lawv thiab kuv tau siv lawv ib yam nkaus tab sis kuv nyiam ua haujlwm nrog cov khoom txheem xws li 74HC595 (multiplexer IC) thiab ULN2803 (tsav tsheb) vim tias lawv muab kev tswj hwm koj ntau ntxiv hauv koj qhov haujlwm thiab tseem muaj zog thiab ntseeg tau hauv koj kev siv.

Txhawm rau ua kom yooj yim cov txheej txheem sib dhos Kuv tau tsim LED Dipslay Module rau ntau lub hom phiaj siv cov khoom yooj yim thiab ib txwm muaj hauv Arduino lub ntiaj teb.

Nrog tus qauv no koj tuaj yeem ua haujlwm nrog dot matrix nrog ob xim LEDs hauv ob tus qauv loj (loj dua thiab me dua) thiab tseem koj tuaj yeem tswj 7 Seg x 4 Tus lej tso saib uas muaj ntau heev thiab yooj yim mus nrhiav tau hauv khw.

Thiab koj kuj tseem tuaj yeem ua haujlwm nrog cov qauv no hauv cascade ntawm txoj hauv kev (cov ntaub ntawv sib txawv rau hauv cov lus qhia) lossis ntawm txoj kev paralell (tib cov ntaub ntawv rau hauv cov lus).

Yog li cia saib seb qhov qauv no tuaj yeem ua haujlwm li cas thiab pab koj hauv koj qhov kev txhim kho!

Video (LED Zaub Module)

Yees duab (Dot Matrix Test)

Hais txog, LAGSILVA

Kauj Ruam 1: Cheeb Tsam

Cheebtsam
Cheebtsam
Cheebtsam
Cheebtsam
Cheebtsam
Cheebtsam
Cheebtsam
Cheebtsam

PCB (Luam Circuit Board)

- 74HC595 (03 x)

- ULN2803 (02 x)

- Transistor PNP - BC327 (08 x)

- Resistor 150 Ohms (16 x)

- Resistor 470 Ohms (08 x)

- Capacitor 100 nF (03 x)

- IC Socket 16 tus pin (03 x)

- IC Socket 18 tus pin (02 x)

- Tus pin txuas poj niam - 6 tus pin (8 x)

- Pin headers 90º (01 x)

- Pin headers 180º (01 x)

- Conector Borne KRE 02 tus pin (02 x)

- PCB (01 x) - Raug tsim

Lwm tus

- Arduino Uno R3 / Nano / zoo sib xws

- LED Zaub 04 Digit x 7 Segments - (Common Anode)

- LED Dot Matrix Dual Xim (Ntsuab & Liab) - (Common Anode)

Cov Lus Tseem Ceeb:

  1. Kuv muab cov ntawv teev npe ntawm txhua qhov tseem ceeb tshaj plaws tsuas yog siv tab sis koj yuav tsum txheeb xyuas cov ntaub ntawv ntawm koj tus kheej cov khoom ua ntej siv lawv.
  2. Pawg thawj coj no tau tsim los siv tsuas yog qhia txog COMMON ANODE.

Kauj Ruam 2: Thawj Cov Qauv

Thawj Prototypes
Thawj Prototypes
Thawj Prototypes
Thawj Prototypes
Thawj Prototypes
Thawj Prototypes
Thawj Prototypes
Thawj Prototypes

Kuv thawj tsab ntawv tau ua tiav ntawm lub khob cij los kuaj qhov Circuit Court.

Tom qab ntawd kuv tau ua lwm qhov qauv siv lub rooj tsav xwm thoob ntiaj teb zoo li koj tuaj yeem pom hauv cov duab.

Cov pawg no zoo txaus los tsim cov ntawv ceev tab sis koj paub tias tseem khaws ntau cov xov hlau.

Nws yog qhov kev daws teeb meem tab sis tsis zoo li piv nrog qhov kawg tsim PCB (xiav ib qho).

Kuv tsis zoo nrog kev siv tshuaj yaj yeeb vim tias kuv tsis muaj kev paub txaus nrog cov txheej txheem no tab sis txawm tias qhov no kuv tau txais txiaj ntsig zoo nrog ob qho kev paub dhau los thiab tseem ceeb dua: Kuv tsis tau hlawv ib qho twg thiab tsis yog kuv txhais tes!

Tej zaum cov txiaj ntsig ntawm kuv pawg thawj coj tom ntej yuav zoo dua vim yog kev coj ua.

Vim qhov no kuv txhawb koj kom sim ua qhov kev paub no vim tias nws yuav zoo rau koj.

Tsuas yog nco ntsoov saib xyuas nrog cov hlau kub thiab sim tsis txhob siv sijhawm ntau dua li ob peb feeb ntawm cov khoom siv kom tsis txhob hlawv nws !!

Thiab thaum kawg, hauv Youtube koj tuaj yeem pom ntau cov yeeb yaj kiab hais txog kev siv tshuaj yaj yeeb uas koj tuaj yeem kawm ua ntej mus rau lub ntiaj teb tiag.

Kauj Ruam 3: PCB Tsim

PCB Tsim
PCB Tsim
PCB Tsim
PCB Tsim
PCB Tsim
PCB Tsim
PCB Tsim
PCB Tsim

Kuv tsim PCB no siv cov software tshwj xeeb los tsim cov txheej txheem ob txheej thiab nws tau tsim ntau qhov sib txawv ua ntej qhov kawg no.

Thaum pib kuv muaj ib qho version rau txhua yam ntawm cov lus thiab tom qab txhua qhov kuv txiav txim siab ua ke txhua yam hauv ib qho xwb.

Lub Hom Phiaj Tsim:

  • Yooj yim thiab muaj txiaj ntsig zoo rau cov qauv.
  • Teeb yooj yim thiab nthuav dav.
  • Muaj peev xwm siv 3 yam sib txawv ntawm cov lus qhia.
  • Qhov dav tshaj plaws ntawm qhov loj teev teev ntawm LED.
  • Qhov siab tshaj plaws ntawm 100 hli kom txo tus nqi tsim khoom ntawm pawg thawj coj saib.
  • Siv cov khoom ib txwm hloov pauv ntawm SMD kom tsis txhob muaj teeb meem ntau thaum lub sijhawm ua cov txheej txheem txheej txheem.
  • Lub rooj tsavxwm yuav tsum tau hloov kho kom txuas nrog lwm cov laug cam hauv cascade.
  • Serial lossis paralell tso tawm rau lwm cov laug cam.
  • Ntau lub laug cam yuav tsum tau tswj los ntawm Arduino nkaus xwb.
  • Tsuas yog 3 xov ntawm cov ntaub ntawv rau Arduino kev sib txuas.
  • Sab nraud 5V fais fab txuas.
  • Ua kom cov khoom siv hluav taws xob muaj zog siv cov transistors thiab cov tsav tsheb (ULN2803) los tswj cov LEDS.

Lus Cim:

Muaj feem xyuam nrog cov khoom kawg no Kuv xav kom koj nyeem kuv lwm Cov Lus Qhia txog cov khoom no:

Siv Shift Register 74HC595 nrog ULN2803, UDN2981 thiab BC327

Kev tsim PCB:

Tom qab ua tiav qhov kev tsim qauv, Kuv xa nws mus rau PCB chaw tsim khoom ntawm Tuam Tshoj tom qab tshawb fawb ntau nrog cov chaw muag khoom sib txawv hauv zej zog thiab hauv ntau lub tebchaws.

Qhov teeb meem tseem ceeb tau cuam tshuam nrog tus nqi ntawm cov laug cam piv rau tus nqi vim tias kuv xav tau ob peb ntawm lawv xwb.

Thaum kawg kuv txiav txim siab muab qhov kev txiav txim tsis tu ncua (tsis yog qhov kev txiav txim nthuav tawm vim tus nqi siab dua) ntawm tsuas yog 10 lub laug cam nrog lub tuam txhab ntawm Tuam Tshoj.

Tom qab tsuas yog 3 hnub cov laug cam tau tsim thiab xa tuaj rau kuv hla lub ntiaj teb hauv ntau dua 4 hnub.

Cov txiaj ntsig tau zoo heev !!

Hauv ib lub lis piam tom qab kev xaj xaj cov laug cam tau nyob hauv kuv txhais tes thiab kuv zoo siab heev nrog qhov ua tau zoo ntawm lawv thiab nrog nrawm nrawm!

Kauj ruam 4: Programming

Programming
Programming
Programming
Programming

Txog rau kev ua haujlwm koj yuav tsum nco ntsoov qee cov ntsiab lus tseem ceeb txog kev tsim kho vajtse thiab hais txog kev hloov pauv npe 74HC595.

Lub luag haujlwm tseem ceeb ntawm 74HC595 yog hloov 8-Bit Serial-In rau hauv 8 Parallel-Out Shift.

Txhua cov ntaub ntawv hauv xov tooj mus rau Tus Pin #14 thiab ntawm txhua lub moos teeb liab cov khoom mus rau nws qhov sib thooj-tawm tus pin (Qa rau Qh).

Yog tias koj txuas ntxiv xa cov ntaub ntawv ntau ntxiv, cov khoom yuav raug tshem tawm ib tus mus rau Pin #9 (Qh ') raws li cov ntawv tso tawm ib zaug ntxiv thiab vim yog qhov ua haujlwm no koj tuaj yeem tso lwm daim txuas rau hauv cascade.

Tseem ceeb:

Hauv txoj haujlwm no peb muaj peb ICs ntawm 74HC595. Thawj ob txoj haujlwm los tswj kab (nrog POSITIVE logic) thiab qhov kawg los tswj kab (nrog NEGATIVE logic vim PNP transistors ua haujlwm).

Lub tswv yim zoo txhais tau tias koj yuav tsum xa lub HIGH qib teeb liab (+5V) los ntawm Arduino thiab Cov laj thawj tsis zoo txhais tau tias koj yuav tsum xa lub teeb liab theem qis (0V).

Dot matrix ntawm LEDs

  1. Thawj yog rau cov txiaj ntsig ntawm cathodes ntawm LED liab (8 x) >> COLUMN RED (1 txog 8).
  2. Qhov thib ob yog rau kev tso tawm L ntawm cathodes ntawm Green LEDs (8 x) >> COLUMN GREEN (1 txog 8).
  3. Qhov kawg yog rau qhov tso tawm ntawm anodes ntawm txhua lub LEDs (08 x Liab & Ntsuab) >> LINES (1 txog 8).

Piv txwv li, yog tias koj xav tig tsuas yog Green LED ntawm kab 1 thiab kab 1 koj yuav tsum xa cov lej hauv qab no raws li cov hauv qab no:

1º) LIS

~ 10000000 (tsuas yog thawj kab tau teeb tsa) - Lub cim ~ yog rov thim tag nrho cov khoom los ntawm 1 txog 0 thiab hloov pauv.

2º) COLUMN Ntsuab

10000000 (tsuas yog thawj kab ntawm Green LED tau teeb tsa)

3º) COLUMN RED

00000000 (txhua kab ntawm Liab LEDs tawm)

Arduino nqe lus:

shiftOut (dataPin, clockPin, LSBFIRST, ~ B10000000); // Tsis zoo logic rau kab

shiftOut (dataPin, clockPin, LSBFIRST, B10000000); // Cov laj thawj zoo rau kab ntsuab

shiftOut (dataPin, clockPin, LSBFIRST, B00000000); // Cov laj thawj zoo rau kab liab

Lus Cim:

Koj tseem tuaj yeem ua ke ob qho tib si LEDs (Ntsuab & Liab) los tsim cov xim YELLOW raws li hauv qab no:

shiftOut (dataPin, clockPin, LSBFIRST, ~ B10000000);

shiftOut (dataPin, clockPin, LSBFIRST, B10000000);

shiftOut (dataPin, clockPin, LSBFIRST, B10000000);

7 Tshooj zaub

Rau cov hom kev qhia no ua ntu zus yog tib yam. Qhov txawv tsuas yog tias koj tsis tas yuav siv Green LEDs.

1º) DIGIT (1 txog 4 ntawm sab laug mus rau sab xis) ~ 10000000 (teeb tus lej #1)

~ 01000000 (teeb tus lej #2)

~ 00100000 (teeb tus lej #3)

~ 00010000 (teeb tus lej #4)

2º) Tsis siv

00000000 (txhua qhov teeb tsa rau xoom)

3º) SEGMENTS (A rau F thiab DP - txheeb xyuas koj cov ntawv teev tseg)

10000000 (teev ntu A)

01000000 (teev ntu B)

00100000 (teeb ntu C)

00010000 (teev ntu D)

00001000 (teeb ntu E)

00000100 (teev ntu F)

00000010 (teeb ntu G)

00000001 (teeb DP)

Arduino piv txwv los teeb Zaub #2 nrog tus lej 3:

shiftOut (dataPin, clockPin, LSBFIRST, ~ B01000000); // Teeb DISPLAY 2 (Tsis zoo logic)

shiftOut (dataPin, clockPin, LSBFIRST, 0); // Teeb cov ntaub ntawv rau xoom (tsis siv)

shiftOut (dataPin, clockPin, LSBFIRST, B11110010); // Teeb ntu A, B, C, D, G)

Thaum kawg, thov ua cov txheej txheem no koj tuaj yeem tswj hwm ib qho LED ntawm koj cov zaub thiab tseem koj tuaj yeem tsim cov cim tshwj xeeb uas koj xav tau.

Kauj ruam 5: Xeem

Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem
Kev Xeem

Nov yog ob qhov haujlwm ua piv txwv ntawm kev ua haujlwm ntawm Display Module.

1) Suav suav suav rov qab (los ntawm 999.9 vib nas this rau xoom)

2) Dot Matrix (Tus lej 0 txog 9 & Cov tsiaj ntawv A txog Z)

3) Digital Clock RTC hauv LED Zaub ntawm 4 Tus lej thiab 7 Ntu

Qhov kawg no yog qhov hloov tshiab ntawm kuv thawj zaug ntawm Digital Clock.

Kauj Ruam 6: Xaus & Cov kauj ruam tom ntej

Xaus & Cov kauj ruam tom ntej
Xaus & Cov kauj ruam tom ntej
Xaus & Cov kauj ruam tom ntej
Xaus & Cov kauj ruam tom ntej

Cov Qauv no yuav muaj txiaj ntsig zoo rau txhua qhov haujlwm yav tom ntej uas xav tau qee qhov LED zaub.

Raws li cov kauj ruam tom ntej kuv yuav sib sau ua ke ntau cov laug cam los ua haujlwm nrog lawv nyob rau hauv hom cascade thiab kuv yuav txhim kho ib lub tsev qiv ntawv dhau los kom yooj yim txawm tias ntau lub program.

Kuv vam tias koj tau txaus siab rau txoj haujlwm no.

Thov, xa koj cov lus pom rau kuv vim qhov no yog qhov tseem ceeb txhawm rau txhim kho txoj haujlwm thiab cov ntaub ntawv ntawm Cov Lus Qhia no.

Hais txog, LAGSILVA

26. Tej zaum 2016

Pom zoo: