Cov txheej txheem:

Charlieplexing Xmas Ntoo: 7 Kauj Ruam (nrog Duab)
Charlieplexing Xmas Ntoo: 7 Kauj Ruam (nrog Duab)

Video: Charlieplexing Xmas Ntoo: 7 Kauj Ruam (nrog Duab)

Video: Charlieplexing Xmas Ntoo: 7 Kauj Ruam (nrog Duab)
Video: 20 MOMENTS YOU WOULDN'T BELIEVE IF NOT FILMED 2024, Kaum ib hlis
Anonim
Image
Image
Charlieplexing Xmas Tsob Ntoo
Charlieplexing Xmas Tsob Ntoo

Xmas los thiab peb xav tau qee yam khoom siv tshiab.

Xmas kho vajtse yuav tsum ntsuab + dawb + liab + ntsais muag.

Yog li PCB yog ntsuab + dawb, tom qab ntawd ntxiv qee qhov ntsais LEDs thiab peb tau ua tiav. Kuv muaj ntau "Txoj Cai Sab Pom Sab Pom Liab Clear Ultra bright SMD 0806 LEDs" (1206 ua haujlwm ib yam nkaus), tom qab ntawd peb muaj yuav luag txhua yam.

Kauj ruam 1: Schematic

Schematic
Schematic

OK, peb muaj lub tswv yim. lub kaus mom peb xav tau tom ntej yog qee qhov schematics.

Yuav kom muaj peev xwm tuav tau ntau lub LEDs uas tsis yog cov cuab yeej nyuaj, lub tswv yim zoo yog siv charlieplexing. Charlieplexing nyob ze rau cov lej, tab sis nws ua ke kab thiab kab ua ke. Lub tswv yim yog kom muaj 6 tsob ntoo ib sab, tom qab ntawd nrog cov hauv paus ntsiab lus e tuaj yeem siv charlieplexing matrix 5 × 6 lossis 6 × 7. Zoo, nws yog xmas, tom qab ntawd siv loj dua. Kuv txiav txim siab siv matrix ntawm 6 kab thiab 7 kab. Tom qab ntawd peb xav tau MCU nrog yam tsawg kawg 7 GPIO pins txhua qhov muaj peev xwm ua haujlwm tau raws li cov lus tso tawm thiab tawm tswv yim (lossis lub xeev thib 3). Ib qho uas pheej yig tshaj yog PIC16F15323.

Peb muaj cov pins dawb, tom qab ntawd piv txwv siv A/D hloov pauv rau qee qhov haujlwm thiab tso ib qho coj mus rau saum.

OK, tom qab ntawd schematic nyob ntawm qhov chaw.

Tshooj tom ntej yog txiav txim siab, yuav npaj pawg thawj coj saib li cas.

Kauj Ruam 2: Pawg Thawj Coj

Pawg Thawj Coj
Pawg Thawj Coj
Pawg Thawj Coj
Pawg Thawj Coj

Kuv lub tswv yim yog, kom muaj pawg thawj coj saib, uas tuaj yeem siv tau 6 ×. Ib lub rooj tsavxwm rau txhua kab ntawv.

Cia peb xav tias, peb muaj 2 lub rooj tsavxwm ib sab, peb tuaj yeem muaj ob kab ntawm ib lub rooj tsavxwm, ib sab pub LEDs los ntawm sab saum toj mus rau sab xis, thib ob ntawm nqes mus rau saum. Peb yuav tsum muaj qhov chaw, qhov uas peb faib ob qhov pub. Txog kev faib cov kab PCB peb muaj ob txoj kev xaiv ib txwm muaj.

  • Peb tuaj yeem siv riam thiab txiav txoj haujlwm sib koom tes (koj yuav tsum raug, txwv tsis pub koj yuav ua rau pawg thawj coj puas tsuaj)
  • Lossis peb tuaj yeem laum tawm hla hla kev sib tshuam (hu ua "hla")

Kuv nyiam xyaum tawm. Nws yog qhov yooj yim dua thiab pom tsawg dua.

Peb kuj yuav tsum tau noj kab, tab sis peb yuav tsum xaiv kom raug uas yog pub los ntawm kab ntawv. Kuv txiav txim siab los siv PCB soldering hlws ris. Uas yog ib qho yooj yim thiab yuav luag dawb xwb. Tom qab ntawd ntawm txhua lub rooj tsavxwm, uas sawv cev rau ib kab lus peb muaj ib qho "kev sib tshuam" Jx thiab ib qho "ntawm" Vx uas sawv cev rau pawg tshwj xeeb x. Nws txhais tau tias, ntawm lub rooj tsavxwm 1 peb yuav tsum tau muab tshuaj txhuam "txuas" J1 thiab tshem tawm "hla" V1. Ib qho kev zam me me yog pawg 6, uas yuav tsum tau noj ob kab thiab tom qab ntawd muaj ob qho "sib tshuam" J6 thiab J6 '.

Ntu kawg yog tsim "pawg" pawg thawj coj, uas yuav muaj MCU thiab seem ntawm cov khoom siv hluav taws xob. Pawg thawj coj no yog qhov yooj yim uas tsis muaj lub luag haujlwm tshwj xeeb.

Kauj Ruam 3: PCB xaj

Kev txiav txim PCB
Kev txiav txim PCB
Kev txiav txim PCB
Kev txiav txim PCB

Kuv siv kev tsim khoom hauv Suav teb rau kev xaj khoom.

Ib qho ntawm qhov nrawm dua thiab xis rau kuv yog AllPCB. Lawv muaj cov txheej txheem xaj khoom yooj yim. Ntawm nplooj ntawv thawj nkag qhov ntev. Rau lub rooj tsav xwm loj no yog 85 × 100 mm, xaiv kom muaj nuj nqis (tsis txhob hnov qab, tias koj xav tau 3 daim rau ib tsob ntoo), khaws 2 txheej thiab khaws 1, 6 hli tuab. Nyem nqe lus tam sim no thiab tom qab ntawd koj yuav tau txais tus nqi suav nrog khoom xa tuaj.

Koj tuaj yeem hloov kho xim xim, tab sis ntsuab yog xim zoo tshaj plaws rau tsob ntoo thiab dawb yog qhov zoo tshaj plaws rau kev ua daus.

Sau koj tus email chaw nyob thiab nyem "Ntxiv rau lub tawb nqa khoom".

Koj yuav raug nug txog "gerber file". Qhov ntawd tau txuas nrog charlieplex7_85x100_brd.zip cov ntawv, tom qab ntawd rub nws. Xaiv koj qhov chaw nyob, nyiam txoj kev them nyiaj thiab ua kom tiav.

Kauj Ruam 4: Npaj PCB thiab Cov Cuab Yeej Cuab Yeej

Npaj PCB thiab Cov Cuab Yeej Cuab Yeej
Npaj PCB thiab Cov Cuab Yeej Cuab Yeej
Npaj PCB thiab Cov Cuab Yeej Cuab Yeej
Npaj PCB thiab Cov Cuab Yeej Cuab Yeej
Npaj PCB thiab Cov Cuab Yeej Cuab Yeej
Npaj PCB thiab Cov Cuab Yeej Cuab Yeej
Npaj PCB thiab Cov Cuab Yeej Cuab Yeej
Npaj PCB thiab Cov Cuab Yeej Cuab Yeej

Hauv ob peb hnub koj tuaj yeem cia siab tias pob nrog PCBs.

Ua ntej tshaj plaws peb yuav tsum faib cov laug cam. Lawv txuas nrog siv cov choj me. Kom yooj yim xaj ntawm no txuas nrog peb ntu ua ke. Kuv tab tom siv txiab, uas yog nrawm, tab sis siv JLC rab chais pom ua txiav kom du dua.

Thaum txiav tiav, npaj daim ntawv twg uas yuav siv rau kab twg. Ceev faj, thaum xaiv cov laug cam rau kab 3 thiab 6. Cov laug cam 3 thiab 6 yuav tsum muaj nyob rau sab nraum qab xaim ntxiv rau sab saum toj ntsia LED. Cov laug cam nrog cov xov hlau ntxiv no yog ib qho nrog cov snowman thiab cov duab tswb.

Cov kauj ruam tom ntej yog laum tawm cov vias thiab cov kab sib txuas.

Tom qab ntawd txhuam tag nrho cov SMD LEDs, cov txheej txheem tiv thaiv thiab lwm yam khoom siv hluav taws xob rau rau rau kab laug sab thiab ib lub rooj tsav xwm hauv paus.

Kauj Ruam 5: Solder Ua Ke

Solder Ua Ke
Solder Ua Ke
Solder Ua Ke
Solder Ua Ke

Thaum tag nrho cov khoom siv hluav taws xob SMD raug muab muag, nws yog lub sijhawm, los ua cov laug cam ua ke.

Thawj kauj ruam yog laug tag nrho rau rau kab laug sab rau lub hauv paus. Pib nrog cov ntsiab lus me me ntawm ib sab (piv txwv li sab saum toj nkaus xwb). cov laug cam. Cov laug cam ua tib zoo, tsom mus rau muab cov laug cam ze rau nruab nrab tab sis ze, los tsim hexagon nyob nruab nrab.

Thaum tag nrho rau lub rooj sib tham tau txuas rau lub hauv paus pawg thawj coj, siv ib qho khoom seem uas tsis muaj lub hauv paus ua tus tuav. Kos lub rooj tsav khoom seem no nyob rau sab saum toj ntawm cov laug cam, nws yuav txhim kho kab laug sab hauv txoj haujlwm xav tau thiab nrug deb. Nws ua rau txhua qhov kev tsim kho ruaj khov thiab nws yooj yim dua los txhuam txog peb kab hauv qab ntawm cov laug cam. Thaum ua tiav, rov qab sab laug ntawm cov laug cam, rov txuas sab saum toj mus rau lub xeev kawg thiab tsis txhob hnov qab ob txoj xov ntxiv rau sab saum toj LED.

Tom qab ntawd tshem tawm pab pawg tswj hwm seem thiab ua kom tiav ntawm txhua kab.

Kauj ruam kawg yog THT sab saum toj teeb tsa LED. Txiav tawm cov xov hluav taws xob ntawm cov LED no, hom ua kom haum rau sab nraum qab ntawm cov laug cam thiab muab nws tso rau hauv txoj haujlwm nrog cathode ntawm lub rooj tsavxwm 3 thiab anode ntawm lub rooj tsavxwm 6.

Qhov ntawd yog txhua yam los ntawm qhov pom ntawm qhov muag.

Kauj ruam 6: Software

Software
Software
Software
Software
Software
Software

Software yog ib qho yooj yim heev.

Kuv tau npaj piv txwv yooj yim, uas siv cov rooj ib txwm siv rau Microchip PIC MCUs. Lub software siv ib lub sijhawm rau cuam tshuam taug kev los ntawm LEDs thiab tso cov thav duab khaws cia hauv "video" RAM.

Txoj haujlwm tseem ceeb tsuas yog saib rau kauj ruam tom ntej. Hloov cov ntaub ntawv hauv "video" RAM thiab muab kab ntawv txuas ntxiv rau nws.

Nws kuj nyeem tus nqi los ntawm DA hloov pauv thiab siv nws rau lub sijhawm txuas ntxiv.

Koj tuaj yeem rub tawm qhov chaws thiab hloov kho nws, lossis koj tuaj yeem rub cov ntawv hex nkaus xwb thiab siv nws zoo li nws yog.

Kuv tab tom siv PICkit3 rau kev ua haujlwm ntawm HEX rau tus txheej txheem.

HEX cov ntaub ntawv tau teeb tsa kom ua tiav tsob ntoo Christmas siv rau lub qhov 0.1 lub qhov (socket) X1. Nws tsis tas yuav tsum tau siv cov txuas txuas ntawm no. Siv cov xov hlau ncaj qha xa nrog PICkit 3 nrog tus pin ntawm ob sab.

Pawg thawj coj muaj tib daim duab peb sab cim rau tus pin 1 ua PICkit3. Thaum ua haujlwm, txheeb xyuas, cov hlau uas cim los ntawm daim duab peb sab ntawm ib PICkit3 nyob hauv qhov cim ntawm lub rooj tsavxwm.

Kuv tab tom siv MPLAB IPE (Ib puag ncig Kev Ua Haujlwm Ib puag ncig) rau kev ua haujlwm.

Ua ntej pib lub cajmeem, tsis txhob hnov qab pab txhawb lub zog ntawm lub rooj tsavxwm los ntawm cov cuab yeej. Qhov kev xaiv ntawd muaj nyob ntawm "Power" tab ntawm IPE.

Tom qab lub cajmeem, cov cuab yeej yuav ua kom lub rooj tsavxwm muaj zog, tom qab ntawd koj tuaj yeem tshawb xyuas qhov tshwm sim ncaj qha.

Kauj Ruam 7: Kev ua tiav

Image
Image
Kev ua tiav
Kev ua tiav
Kev ua tiav
Kev ua tiav

Qhov kawg yog teeb tsa lub roj teeb pob raws li sawv ntsug.

Kuv siv 3 × AA lub roj teeb tuav. Tus tuav no feem ntau muaj ob lub qhov rau ob lub M3 ntsia hlau. Lub hauv paus pawg thawj coj muaj qhov zoo ib yam, tom qab ntawd teeb tsa tau yooj yim los ntawm kev siv ob lub M3 × 12 ntsia hlau thiab cov txiv ntseej.

Ua ntej mounting, solder fais fab hlau rau hauv paus board thiab rau lub roj teeb tuav.

Thiab qhov ntawd yog txhua yam. Plug peb lub roj teeb thiab txaus siab rau.

Pom zoo: