Cov txheej txheem:

Minidot 2 - Holoclock: 6 Kauj Ruam
Minidot 2 - Holoclock: 6 Kauj Ruam

Video: Minidot 2 - Holoclock: 6 Kauj Ruam

Video: Minidot 2 - Holoclock: 6 Kauj Ruam
Video: Видео-обзор коллиматорных прицелов Delta Optical MiniDot HD 24 и HD 26 2024, Hlis ntuj nqeg
Anonim
Minidot 2 - Holoclock
Minidot 2 - Holoclock
Minidot 2 - Holoclock
Minidot 2 - Holoclock

Zoo tej zaum holoclock yog qhov tsis raug me ntsis…. Nws siv holographic dispersion zaj duab xis nyob rau sab xub ntiag kom muab qhov tob me ntsis. Qhov yooj yim cov lus qhia no yog hloov tshiab rau kuv yav dhau los Minidot nyob ntawm no: https://www.instructables.com/id /EEGLXQCSKIEP2876EE/thiab rov siv ntau txoj cai thiab kev siv hluav taws xob los ntawm kuv Microdot nyob ntawm no: https://www.instructables.com/id/EWM2OIT78OERWHR38Z/EagleCAD cov ntaub ntawv thiab Sourceboost code tau suav nrog hauv cov ntawv zip txuas nrog vim li cas? Minidot yav dhau los yog qhov nyuaj dhau, los ntawm Microdot Kuv tau kawm paub yuav ua li cas RTC ntawm PIC siv tsuas yog 32.768 siv lead ua thiab tsis tas yuav siv tshwj xeeb RTC nti. Tsis tas li kuv xav kom tshem ntawm cov zaub nti los ntawm Minidot yav dhau los. Yog li tam sim no tsuas muaj lub zog tswj hwm nti thiab PIC16F88…. Tsuas yog ob daim ntawv. Qhov lwm qhov laj thawj rau kev hloov tshiab yog kuv Minidot tau txais qhov tsis txaus ntseeg me ntsis vim yog cais pawg tswj hwm hloov thiab kuv xav tau qhov muag ploj ntawm cov qauv teev raws li zoo li qee yam ntawm ib puag ncig lub teeb pom kev zoo kom dim cov zaub thaum hmo ntuj. Lwm qhov Minidot tau kho qhov ci, thiab ua kom pom chav nyob hmo ntuj. Qhov cuab yeej tau tsim nrog kev pab ntawm EagleCad software pob thiab Sourceboost compiler. Koj yuav tsum muaj qee qhov kev paub nrog hluav taws xob thiab kev tsim cov phiaj xwm PIC los pib txoj haujlwm no. Thov nco ntsoov qhov no tsis yog kev qhia paub ntawm cov khoom siv hluav taws xob lossis PIC, yog li thov khaws cov lus nug cuam tshuam nrog Miniclock tsim. Xa mus rau cov lus qhia saum toj no lossis ntau lwm yam kev qhia ntawm lub xaib no rau cov lus qhia txog kev siv EagleCad lossis kev tsim PICs. Yog li ntawm no nws yog….. Minidot 2, Holoclock …… lossis Minidot Cov Tiam Tom Ntej ………….

Kauj ruam 1: Circuit Court

Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit

Lub voj voog no yooj yim heev rau Microdot. Nco tseg cov charlieplex array zoo ib yam … tsuas yog ob peb tus pin tau raug txav mus.

Ib qho 20Mhz siv lead ua tau ntxiv rau Microdot Circuit kom moos PIC nrawm dua, qhov no tso cai rau cov kab ntawv kom raug txheeb xyuas sai dua thiab ua rau siv qhov ua kom pom kev qis. Lub teeb pom kev tsis pom kev yog qhov tseem ceeb heev kom tau txais tus qauv ntoo khaub lig ploj thiab ib puag ncig lub teeb ua haujlwm kom ua haujlwm. Qhov no yuav tsis yooj yim sua nrog Microdot, vim tias lub moos qeeb qeeb vim qee qhov kev tshuaj ntsuam mus los yuav tsum tau siv kom dim. Saib ntu tom ntej rau kev piav qhia ntawm Dimming kev ua haujlwm. Lwm yam uas yuav tsum nco ntsoov yog kev siv MCP1252 tus nqi tswj lub twj tso kua mis kom muab 5V, kuv nyiam tshaj nti tam sim no. Yog tias koj hloov kho lub Circuit koj tuaj yeem siv lub qub qub 7805 …… Kuv tsuas muaj tus lej ntawm cov ntawv yooj yim no dai ncig. Tam sim no kuv tau hloov cov hloov pauv mus rau pem hauv ntej, txuag fiddling ncig lub moos tom qab lub zog tso tawm kom rov pib lub sijhawm thiab tam sim no txhua yam tsuas yog ib qho PCB…. Tsis muaj teeb meem cabling. Kuj tseem ceeb yog suav nrog LDR. Qhov no tau siv hauv qhov faib hluav taws xob uas tau hnov los ntawm A/D tus pin ntawm PIC. Thaum PIC hnov lub teeb pom kev ib puag ncig qis (piv txwv li hmo ntuj) lub teeb pom kev zoo ua kom lub ntsej muag charlieplex tsaus rau ntau lub voj voog ntau dua li thaum lub teeb qib siab. Kuv nrhiav tsis tau lub cim LDR hauv Eaglecad lub tsev qiv ntawv, yog li kuv tsuas yog siv lub cim LED….. tsis txhob dag nws yog LDR. Saib daim duab tseeb ntawm PCB hauv qab no. Ib yam uas yuav tsum nco ntsoov thaum siv ntau xim LEDs hauv kab lus charliplex. Koj yuav tsum tau ua kom ntseeg tau tias qhov hluav taws xob rau pem hauv ntej ntawm LEDs ntau dua lossis tsawg dua qub. Yog tias tsis yog, txoj kev taug tam sim no yuav tshwm sim thiab ntau lub LEDs yuav ci. Yog li siv 5mm lossis siab dua LEDs rau kev teeb tsa no yuav tsis ua haujlwm vim feem ntau yog qhov sib txawv ntawm LEDs ntsuab/xiav thiab LED liab/daj. Hauv qhov no kuv siv 1206 SMD leds thiab ua haujlwm tau zoo ntsuab/xiav LEDs tshwj xeeb. Lub zog hluav taws xob rau pem hauv ntej tsis yog qhov teeb meem ntawm no. Yog tias koj xav siv kev sib xyaw ntawm ntsuab/xiav thiab liab/daj siab zog LEDs hauv cov kab lus charlieplex koj yuav xav tau cais cov xim sib txawv rau hauv ob qhov charliplex arrays. Muaj ntau qhov kev piav qhia ntawm charlieplexing uas tuaj yeem raug googled …… Kuv yuav tsis mus rau hauv cov ntsiab lus ntawm no. Kuv yuav tso nws rau koj ua qee qhov kev tshawb fawb. (Nias lub cim me 'i' nyob rau ntawm kaum ntawm daim duab hauv qab no kom pom qhov loj dua)

Kauj Ruam 2: Dimming Algorithm - Charliplexed Pulse Width Modulation

Dimming Algorithm - Charliplexed Pulse Width Modulation
Dimming Algorithm - Charliplexed Pulse Width Modulation

Raws li tau hais ua ntej, Kuv xav kom muaj qhov sib txawv ntawm tus qauv rau lub sijhawm ploj mus zoo dua li tsis txav los ntawm ib tus qauv mus rau lwm qhov. Saib cov vis dis aus rau kev ua qauv qhia. Hauv nruab nrab yog lub moos Minidot tshiab, ntawm sab xis yog Minidot laus dua. Pom zoo npaum li cas tus tshiab yog qhov zoo dua. (FYI lwm cov lus hauv keeb kwm yav dhau yog kuv Minicray supercomputer xwm txheej zaub thiab kuv tau ntes Nebulon particle uas ua rau Minicray hauv qhov chaw tiv thaiv sib nqus sib nqus. Saib ntawm no: https://www.youtube.com/embed/bRupDulR4ME rau kev ua qauv qhia ntawm lub tsev kaw neeg hauv lub tsev kho mob) Yog tias koj saib hauv cov cai, qhib cov ntawv display.c. Nco tseg muaj plaub ntu rau kev teeb tsa lub tris/chaw nres nkoj qhov tseem ceeb txhawm rau teeb tsa ib qho tshwj xeeb thiab ob ntu (ib qho ntau dua li Microdot code) rau kev txiav txim siab uas LEDs yuav tsum tau teeb rau ib qho qauv tshwj xeeb ntawm LEDs.eg:

// LED1 LED2 LED3… unsigned char LEDS_PORTA [31] = {0x10, 0x00, 0x00,… unsigned char LEDS_TRISA [31] = {0xef, 0xff, 0xff,… unsigned char LEDS_PORTB [31] = {0x00, 0x02, 0x04, … Unsigned char LEDS_TRISB [31] = {0xfd, 0xf9, 0xf9,… unsigned char nLedsA [30]; unsigned char nLedsB [30];Ua kom pom kev pom LED1 piv txwv li, koj yuav tsum teeb tsa TRIS sau npe TRISA: B = 0xef: 0xfd thiab PORT sau npe PORTA: B = 0x10: 0x00 thiab ntxiv rau. Yog tias koj sau tawm qhov tris qhov tseem ceeb hauv binary koj yuav nco ntsoov tias nyob rau ib lub sijhawm, tsuas muaj ob qhov kev tso tawm kom qhib. Lwm tus tau teeb tsa rau Tri-state (yog li TRIS sau npe). Qhov no yog lub hauv paus rau charlieplexing. Koj kuj tseem yuav nco ntsoov tias ib qhov tso tawm ib txwm muaj zaj lus '1' thiab lwm qhov ib txwm muaj qhov laj thawj '0' …. Cov lus qhia uas tig mus rau qhov twg LED nyob nruab nrab ntawm ob kab ntawv tso tawm no. Tus nqi kawg hauv qhov chaw nres nkoj/tris arrays yog qhov tsis muaj nuj nqis qhib rau tsis muaj LED nyob rau hauv Microdot, qhov hloov tshiab_display muaj nuj nqi hloov mus tas li los ntawm lwm qhov array (nLeds ) kom pom tias qhov tshwj xeeb LED no yuav tsum tau teeb. Yog tias yog, tom qab ntawd qhov sib piv tris/chaw nres nkoj tau teeb tsa thiab LED teeb pom kev zoo rau lub sijhawm. Txwv tsis pub tus nqi tsis raug xa mus rau PICs TRIS/PORT cov npe thiab tsis muaj LED tau teeb rau ib ntus. Thaum ua tiav nrawm txaus qhov no muab tus qauv. Tus so ntawm txoj haujlwm yuav nyeem ib ntus RTC qhov tseem ceeb thiab ua tus qauv zoo ib yam nyob hauv cov kab ntawv ntawd…. Thiab yog li cov zaub hloov pauv. Ua kom muaj qhov ua kom pom kev tsis zoo, qhov no tau txuas ntxiv me ntsis kom tom qab 30 LEDs tau teeb pom kev zoo (lossis tsis) tom qab ntawd lub sijhawm ntxiv yuav siv rau kev xa qhov tsis muaj txiaj ntsig yog tias cov zaub yuav tsum dim ….. rau qhov ci tag nrho ces tsis muaj sijhawm ntxiv yuav siv. Thaum rov ua dua yog tias muaj ntau lub sijhawm null rau cov teeb pom kev zoo LEDs, cov zaub yuav ploj. Qhov ua tau zoo no yog qhov sib txuam ua ke ntawm qhov sib txawv ntawm qhov ntsuas ….. lossis vim hais tias kho vajtse tau teeb tsa hauv qhov charlieplex arragement, tom qab ntawd charlieplexed mem tes dav tes taws los piav. Qhov duab thib ob hauv qab no qhia qhov teeb tsa yooj yim rau qhov no. Kuv hu qhov no ua daim duab thav duab. Thawj 30 lub sijhawm rau tus thav duab tau siv los hla cov LEDs….. thiab tus lej sib txawv ntawm lub sijhawm ntxiv txhais tias yuav ua li cas dim ntawm cov zaub. Lub voj voog no rov ua dua. Lub sijhawm tsis muaj nuj nqis ntau txhais tau tias siv sijhawm tsawg dua rau LED kom nyob ntawm ib tus ncej (vim tias muaj pes tsawg lub sijhawm nce). Nco tseg cov kab ntsug tsis txhais hais tias qib siab. Lub xeev tiag tiag ntawm tus pin mus rau LEDs sib txawv nyob ntawm nws qhov chaw nyob hauv cov kab lus charlieplex….. hauv daim duab nws tsuas yog txhais rau lossis tawm. tus nqi. Raws li cov LEDs tau dimmer, lawv yuav pib flicker hauv lwm lo lus. Yog li txoj kev no muaj txiaj ntsig tsuas yog rau qhov ua tau. Rau lub moos, nws tau ua tiav. Kev ua haujlwm hu ua sib quas ntus uas nyeem A/D hloov pauv ntawm PIC thiab teeb tsa qib ci ci no. Yog tias koj nyeem cov cai, nws tseem kuaj xyuas seb LED nyob ze LDR nyob rau, thiab tsis ua ib qib teeb tsa yog li ntawd, qhov no tso cov zaub tsis tau npaj txhij txog thaum lub qauv hloov.

Kauj Ruam 3: Dimming Algorithm - Hla Fade Effect thiab Ob Qhov Tsis Taus

Dimming Algorithm - Hla Fade Effect thiab Ob Zaug
Dimming Algorithm - Hla Fade Effect thiab Ob Zaug

Kev hloov pauv ntawm ib tus qauv thiab tom ntej yog yav tas los tam sim ntawd. Txog rau lub moos no kuv xav qhia ib qho qauv zuj zus zuj zus hauv qhov ci thiab cov qauv tom ntej no maj mam nce ntxiv … piv txwv li tus ntoo khaub lig ploj mus.

Kuv tsis tas yuav tsum muaj tus kheej LEDs los tswj ntawm qhov sib txawv ci ntsa iab kom ua kom ploj mus. Tsuas yog xav tau thawj tus qauv ntawm ib qho ci ci thiab thib ob ntawm qhov ci qis. Tom qab ntawv lub sijhawm luv luv kuv yuav txo qhov ci ntawm thawj me ntsis, thiab nce qhov thib ob…..this yuav txuas ntxiv mus txog thaum tus qauv thib ob zoo li tag nrho. Tom qab ntawd lub moos yuav tos txog tus qauv tom ntej vim yog qhia thiab yuav muaj lwm txoj kev hloov pauv. Yog li kuv xav tau khaws ob tus qauv. Ib qho tam sim no tau nthuav tawm thiab tus qauv thib ob uas tab tom yuav nthuav tawm. Cov no nyob hauv arrays nLedsA thiab nLedsB. (nco ntsoov tsis muaj dab tsi ua nrog cov chaw nres nkoj hauv qhov no). Qhov no yog ob chav tsis. Qhov hloov tshiab_display () ua haujlwm tau hloov pauv mus rau lub voj voog hla yim ntas thiab qhia tus lej ntawm tus thav duab los ntawm thawj kab, tom qab ntawd lwm qhov. Hloov tus naj npawb ntawm cov thav duab faib rau txhua qhov tsis nyob hauv yim qhov kev hloov pauv tau piav qhia tias qhov ci ntawm txhua tus qauv yuav zoo li cas. Thaum peb ua tiav kev caij tsheb kauj vab nruab nrab ntawm qhov tsis sib xws peb hloov lub 'tso saib' thiab 'tso saib tom ntej' tsis nyob ib puag ncig, yog li cov qauv tsim muaj nuj nqi yuav tom qab ntawv tsuas yog rau 'tom ntej tso saib' tsis. Daim duab hauv qab no qhia qhov kev cia siab. Koj yuav tsum muaj peev xwm pom tias kev hloov pauv yuav siv 64 scan ntas. Hauv daim duab, cov ntawv me me qhia pom daim duab thaij duab los ntawm nplooj ntawv dhau los ua haujlwm zoo. Ib lo lus ntawm tus nqi tshiab. Txhua yam no yuav tsum tau ua sai heev. Tam sim no peb muaj ob qib kev suav ntxiv, ib qho rau qhov pom kev ib puag ncig dimmness thiab ib qho rau yim lub voj voos mus siv ua kev hloov pauv ntawm ob qhov tsis. Yog li cov cai no yuav tsum tau sau ua ke, tab sis zoo txaus hauv 'C'.

Kauj Ruam 4: Kev tsim kho - PCB

Kev tsim kho - PCB
Kev tsim kho - PCB
Kev tsim kho - PCB
Kev tsim kho - PCB

Qhov no yog qhov yooj yim heev. Tsuas yog ob tog PCB nrog qee cov khoom SMD nyob rau sab saum toj. Thov txim yog tias koj dhau los ntawm tus neeg, tab sis nws yooj yim dua los ua SMD cov phiaj xwm…. Tsis muaj qhov los laum. Koj yuav tsum muaj tes khov kho, ntsuas qhov ntsuas qhov ntsuas qhov kub thiab kom pom kev ntau thiab nthuav kom ua tau yooj yim dua.

Tib qho uas tau ceeb toom hauv kev tsim kho PCB yog suav nrog qhov txuas rau kev teeb tsa lub PIC. Qhov no txuas rau ICSP pins ntawm PIC thiab koj yuav xav tau ICSP programmer. Ib zaug ntxiv kuv tau siv yooj yim rau kuv lub junkbox txuas. Koj tuaj yeem tshem qhov no thiab tsuas yog txuas cov xov hlau rau cov ntaub qhwv yog tias koj nyiam. Xwb, yog tias koj tsuas muaj tus kws tsim khoom tso rau hauv, koj tuaj yeem ua lub taub hau uas ntsaws rau hauv koj lub qhov (socket) thiab tom qab ntawd muab lub qhov ntawd txuas rau ICSP tas. Yog tias koj ua qhov no, tom qab ntawd tshem tawm Rx thiab txuas Ry uas tsuas yog xoom ohm txuas (Kuv tsuas yog siv lub tshuab ziab khaub ncaws). Qhov no yuav tshem tawm qhov seem ntawm lub zog hluav taws xob los ntawm PIC yog li nws tsis cuam tshuam nrog lub cajmeem. Ib tus kws sau xov xwm tsuas yog siv ICSP pins zoo li tus ICSP programmer, tsis muaj khawv koob koom nrog tiag. Koj kuj yuav tsum ua qhov no yog qhov ua yuam kev koj tau hnov qab tso qhov kev ncua sijhawm ua ntej RTC pib. Rau 16F88 ICSP lub tshuab pins zoo ib yam li cov pins xav tau rau 32.768kHz siv lead ua rau RTC …… yog tias T1 sab nraud oscillator (piv txwv li RTC) ua ntej ICSP tuaj yeem pib nws ua haujlwm, tom qab ntawd lub program yuav ua tsis tiav. Feem ntau yog tias muaj kev rov pib dua ntawm tus pin MCLR thiab muaj kev ncua, tom qab ntawv ICSP tuaj yeem xa mus rau cov pins no thiab cov phiaj xwm tuaj yeem pib ua haujlwm tau zoo. Txawm li cas los xij los ntawm kev cais lub zog rau PIC tus ICSP tus programmer (lossis tus kws sau nrog lub taub hau) tuaj yeem tswj lub zog rau lub cuab yeej thiab yuam lub program. Lwm yam uas yuav tsum nco ntsoov yog cov ntaub qhwv siv lead ua ntawm PCB tau xub tsim los rau SMD muaju. Kuv tsis tuaj yeem tos qee qhov xa mus yog li 32.768kHz saib siv lead ua tau muab muag rau sab saum toj raws li tau qhia, thiab 20MHz siv lead ua tau txuas los ntawm kev khawb ob peb lub qhov hauv lub pawm, poking siv lead ua hauv qab thiab muab tso rau hauv saum Koj tuaj yeem pom cov pins tsuas yog rau sab xis ntawm PIC16F88.

Kauj Ruam 5: Holographic Film thiab Vaj Tsev

Holographic Film thiab Vaj Tsev
Holographic Film thiab Vaj Tsev
Holographic Film thiab Vaj Tsev
Holographic Film thiab Vaj Tsev
Holographic Film thiab Vaj Tsev
Holographic Film thiab Vaj Tsev

Kev tsim kho zaum kawg tsuas yog muab PCB tso rau hauv rooj plaub thiab tom qab kev teeb tsa nws nrog lub dob ntawm cov kua nplaum kub. Peb qhov tso cai nkag mus rau microswitches los ntawm sab xub ntiag.

Qhov tseem ceeb ntawm lub moos no yog siv holographic diffuser zaj duab xis. Nov yog zaj yeeb yaj kiab tshwj xeeb kuv tau dag ib puag ncig uas muab qhov tob zoo rau lub cuab yeej. Koj tuaj yeem siv daim ntawv taug qab yooj yim (uas kuv xav txav PCB mus rau sab xub ntiag), lossis lwm yam diffuser zoo li cov uas siv hauv cov teeb pom kev zoo. Kev paub txog, tsuas yog qhov nws yuav tsum tau ua yog tso cai rau koj kom sib txawv ntawm cov naj npawb ntawm cov teeb pom kev zoo LEDs, lossis lwm tus suav tus lej los qhia lub sijhawm yuav nyuaj. Kuv siv cov khoom siv holographic dispersion los ntawm Physical Optics Coorporation (www.poc.com) nrog 30 degree ncig kev sib faib, supercomputer xwm txheej tso tawm pom nyob rau lwm qhov hauv kev qhia siv zaj duab xis nrog 15x60degree elliptical dispersion. Koj tuaj yeem siv qee daim kab xev kaw kom zais qhov ci ci sab hauv thaum nruab hnub kom tau txais qhov zoo dua qub. Koj tuaj yeem txawm tawm ntawm cov zaub kom meej thiab qhia rau tib neeg pom sab hauv ib yam li kuv tau ua. Qhov sawv ntsug yog ob qho khoom ntawm txhuas 'L' bar nrog me ntsis txaws tawm hauv qab kom tso cai rau khoov. Nco tseg hauv cov duab no ntxiv teeb pom kev zoo ntxiv yog li koj tuaj yeem pom cov npog npog thiab lwm yam hauv chav nyob ib txwm muaj teeb pom kev zoo, cov LEDs tau tshaj tawm, txawm tias nyob nruab hnub.

Kauj Ruam 6: Software thiab Cov Neeg Siv Khoom Siv

Kev ua haujlwm ntawm lub cuab yeej yog yooj yim heev, tsis muaj cov qauv tshwj xeeb lossis cov khoom zoo nkauj. Qhov tsuas yog nws ua yog tso saib lub sijhawm.

Txhawm rau teem sijhawm ua ntej nias SW1. Cov cuab yeej yuav nyem tag nrho cov LEDs ob peb zaug thiab tom qab ntawd 10s teev cov pab pawg ntawm LEDs SW3 yuav nce cov pab pawg xaiv SW2 yuav txav mus rau pab pawg tom ntej ntawm LEDs, txhua lub sijhawm ntsais tag nrho LEDs hauv pab pawg luv luv. Cov cai tau sau rau Sourceboost 'C' compiler version 6.70. Tus lej RTC nyob hauv t1rtc.c/h cov ntaub ntawv, thiab muaj kev cuam tshuam cuam tshuam ntawm T1 timer ntawm PIC. Lub T1 timer tau teeb tsa los cuam tshuam txhua 1 thib ob. Ntawm txhua ob, qhov sib txawv rau lub sijhawm tau nce ntxiv. Tsis tas li tus zuam timer tau suav txhua txhua ob zaug nrog rau lub sijhawm. Qhov no yog siv los txiav txim siab thaum yuav hloov pauv cov zaub. Kev cuam tshuam kev ua haujlwm kuj tseem siv T0 lub sijhawm cuam tshuam los ua kom cov zaub tshiab, hu rau lub luag haujlwm hauv display.c Cov ntaub ntawv display.h/display.c muaj cov haujlwm los hloov kho cov duab thiab qhia lub sijhawm Cov ntaub ntawv tswj.c/h muaj ua haujlwm los teeb tsa lub sijhawm thiab nyeem cov hloov Cov ntaub ntawv holoclock.c/h yog lub ntsiab lus tseem ceeb thiab pib ua haujlwm.

Pom zoo: