Cov txheej txheem:
- Kauj Ruam 1: Sib sau Cov Khoom Siv thiab Cov Cuab Yeej
- Kauj ruam 2: Npav, Drilling thiab Routing
- Kauj Ruam 3: Cov Tub Rog Ntau Dhau, Txiav thiab Tshem Tawm
- Kauj ruam 4: Txhim kho
- Kauj Ruam 5: Kov Kawg
Video: 132 Pixel Clock: 5 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Kuv muaj, ntev li ntev tau kuv tuaj yeem nco tau kev xav los ntawm LEDs thiab sijhawm. Hauv txoj haujlwm no kuv tau tsim lub moos ntsa loj uas qhia lub sijhawm tam sim no siv 132 neopixel LEDs teeb tsa thiab ci ntsa iab los ntawm lub rooj ntoo. Nws qhov sib piv sib piv digital nrog Tus lej pixel rau txhua teev, feeb thiab thib ob.
Nov yog qhov haujlwm loj tshaj plaws uas kuv tau ua rau hnub no, Kuv pib xav txog nws 6 lub hlis dhau los thiab lub tswv yim maj mam tuaj ua ke. Kuv zoo siab heev nrog qhov tshwm sim thiab kuv tos ntsoov yuav qhia nws rau koj.
Kauj Ruam 1: Sib sau Cov Khoom Siv thiab Cov Cuab Yeej
Cheebtsam
Qhov haujlwm no tau tsim los ntawm cheep hobby board los ntawm kuv lub khw DIY hauv zos. Lub rooj tsav xwm ntsuas 850mm dav los ntawm 500mm siab thiab 18mm tob.
Cov LEDs siv hauv txoj haujlwm no yog 5050 WS2812b teeb tsa ntawm cov PCBs ncig uas muaj kwv yees li 9 hli txoj kab uas hla nrog cov ntaub qhwv sab nraub qaum.
Kuv tab tom siv Arduino Pro Mini sib xws micro tswj. Nws yog 5V 16 MHZ version. Kuv tau xaiv qhov no vim nws muaj cov qauv tsim tau zoo tshaj plaws, luam me me taw thiab txhua qhov chaw nres nkoj nessary ntxiv rau qee qhov seem rau kev hloov kho yav tom ntej. Nws kuj yog 5 volt yog li kuv tuaj yeem siv ib qho khoom siv hluav taws xob rau LEDs, Micro controller thiab RTC
Lub sijhawm khaws cia tau saib xyuas los ntawm RTC (Lub Sijhawm Sijhawm Sijhawm) tus qauv uas nta DS3231 nti. Cov nti no yog qhov tseeb heev yog li lub sijhawm yuav tsum tsis txhob dhau ntau dhau.
Kuj siv:
Hlau. Cov laug thiab cov kua nplaum kub.
Cov Cuab Yeej:
Lub zog laum thiab cov khoom siv ntoo (10mm thiab 5mm)
Soldering hlau
Kub kua nplaum phom
hlau snipps
Dremel thiab plunge router accessories
Kauj ruam 2: Npav, Drilling thiab Routing
Drilling
- Siv txoj hlua nqaim nrhiav qhov chaw nruab nrab ntawm pawg thawj coj los ntawm kev kos kab los ntawm cov ces kaum sib txawv.
- Kos 3 lub voj voos siv ib txoj hlua thiab ib tus cwj mem. Sab nrauv feem ntau yuav tsum yog txog 20mm los ntawm ntug ntawm pawg thawj coj saib nrog lwm 2 kab txav los ntawm 15mm los ntawm kab kawg.
- Kuv siv lub ntsej muag lub ntsej muag luam ntawv los pab kuv kos tawm cov haujlwm ntawm txhua feeb thiab vib nas this ntawm kab 2 sab nraud thiab teev nyob rau kab sab hauv.
- Laum 10mm qhov kwv yees li 5mm tob rau txhua teev, feeb thiab thib ob.
- Siv 5mm laum los ua qhov txawm tias lub rooj tsavxwm rau teev, feeb thiab thib ob.
Txoj kev
Txawm hais tias cov kauj ruam no tsis tsim nyog nws yuav tso cai rau lub moos kom haum rau hauv cov phab ntsa.
- Siv lub router thiab lub voj voos qhia txoj hauv kev xaim xaim hluav taws xob hauv pawg thawj coj saib
- Txheeb tawm thiab taug txoj hauv kev rau RTC thiab Micro Controller kom nyob.
- Ib txoj hauv kev los ntawm cov kab sab nraud mus rau qhov chaw rau cov xov hlau
Kauj Ruam 3: Cov Tub Rog Ntau Dhau, Txiav thiab Tshem Tawm
Qhov tom ntej no yog qhov yooj yim dua hais dua li ua. Kuv cov lus qhia yuav ceeb toom kom maj nws. sim thiab nrhiav cov kab ke thiab nkag mus rau hauv kev sib dhos.
Txhua qhov LED xav tau 5 volts hauv, 5 volts tawm, Cov ntaub ntawv hauv, Cov ntaub ntawv tawm, Hauv av thiab hauv av tawm. suav nrog lub zog rau lub micro tswj thiab RTC nws tshaj 400 xov hlau, txhua qhov stripped thiab soldered ntawm ob qho kawg.
Cov xim xiav uas muaj xim daj muaj txiaj ntsig zoo rau theem no.
- Kuv pib los ntawm kev tso 2 LEDs hauv lawv lub qhov rau ib sab kom ua haujlwm ntev ntawm cov xaim xav tau txuas rau ib leeg.
- Siv daim 1 ntawm cov hlau raws li phau ntawv qhia Kuv txiav 60 ntawm txhua cov xim hlau.
- Sawb 2mm ntawm kev tua los ntawm qhov xaus ntawm txhua lub xaim thiab tin lawv nrog cov laug.
- Siv lub tshuab raj me me los txhuam rau ntawm txhua daim ntaub los ntawm LED.
- Muab cov xaim txuas rau cov LEDs los ua ob txoj hlua ntawm 60 rau feeb thiab vib nas this thiab ib txoj hlua ntawm 12 rau teev. Kuv siv xaim liab rau 5V, daj rau cov ntaub ntawv thiab xiav rau hauv av.
- Saib xyuas txuas txhua Cov Ntaub Ntawv Tawm (DOUT) rau Cov Ntaub Ntawv Hauv (DIN) ntawm LED tom ntej
- Qhov kawg coj hauv txhua txoj saw hlau tsis xav tau cov ntaub ntawv tawm xov hlau.
Thaum tag nrho cov saw hlau tau ua tiav nws yog lub tswv yim zoo los sim lawv ua ntej txhim kho lawv. Kuv siv kuv li Arduino UNO thiab Adafruit NeoPixel Strand Test kom paub meej tias txhua LED tau ua haujlwm.
Cov kab xaim ntev dua rau txhua txoj hlua rau 5V, Hauv av thiab Cov Ntaub Ntawv hauv.
Txog tam sim no yuav tsum muaj tsib 5v xov hlau, peb Cov Ntaub Ntawv xov tooj txuas nrog rau Arduino Pro Mini thiab 5 Cov xov hlau hauv av.
Sawb 5mm los ntawm qhov xaus ntawm 5v cov xov hlau thiab txuas lawv txhua tus ua ke thiab rov ua dua rau hauv av Cov xov hlau.
Tom qab ua tiav peb txoj hlua txuas 5V xaim rau RAW tus pin ntawm Arduino Pro Mini thiab tseem mus rau VCC tus pin rau RTC. Ib qho xov hlau hauv av rau GND ntawm Arduino Pro Mini thiab RTC thiab tom qab ntawd 2 lub xov hlau ntxiv:
SCL los ntawm RTC mus rau A5 ntawm Pro Mini
SDA los ntawm RTC mus rau A4 ntawm Pro Mini
Cov ntaub ntawv kab los ntawm LEDs yuav tsum txuas rau:
- Thib Ob - Digital Pin 3.
- Feeb - DigitalPin 4
- Teev Sijhawm - DigitalPin 5
Kauj ruam 4: Txhim kho
Thaum soldered, txhim kho cov LEDs hauv lawv lub qhov yuav tsum ncaj nraim rau tom hauv ntej. Cov LEDs yuav tsum tau teeb tsa kom cov ntaub ntawv sau ib puag ncig tiv thaiv Clockwise thaum saib nws los ntawm sab nraub qaum raws li txoj cai tau teeb tsa pem hauv ntej.
Kuv siv me me ntawm cov kua nplaum kub los tuav lawv li kuv xav kom tuaj yeem hloov pauv ib qho LED yog tias nws tsis ua tiav yav tom ntej.
Kuv kuj siv cov kua nplaum kub los khaws txhua cov xov hlau kom huv thiab huv si thiab kho lub qhov txuas txuas rau lub rooj tsavxwm.
Muaj ntau tus lej ntawm arduino pro mini programming cov lus qhia muaj. Kuv siv sab nraud USB rau cov txheej txheem hloov pauv mus thauj cov cai no mus rau Arduino:
Txoj cai no tseem yuav teev sijhawm ntawm RTC rau lub sijhawm uas nws tau suav sau. yog li nws qhov tseem ceeb tsuas yog hut lub pob upload kom nws ua raws thiab uploads sai li sai tau.
Ntau ntawm cov cai no tau qiv los ntawm NeoPixel Ring Clock los ntawm Andy Doro. Qee qhov los ntawm Adafruit NeoPixel Strand Test thiab qee qhov kuv muab tso ua ke.
Koj yuav tsum tau teeb tsa ob peb lub tsev qiv ntawv. Lawv muaj los ntawm Tus Thawj Saib Xyuas Tsev Qiv Ntawv ntawm Arduino software.
Adafruit NeoPixel rau ws2812b LEDs
Hlau rau tham nrog RTC hla I2C (qhov no tau tsim ua raws li tus qauv)
thiab RTClib kom paub tias yuav nug dab tsi rau RTC
/********************************************************** ***************************NeoPixel Ring Clock los ntawm Andy Doro ([email protected]) https://andydoro.com/ringclock/ ******************************************************************* **********************************
Kho dua keeb kwm
Hnub Tim Dab Tsi
20140320 AFD Thawj daim ntawv 20160105 AFD Faded arcs 20160916 AFD Trinket tau tshaj 20170727 AFD ntxiv STARTPIXEL rau 3D enclosure, qhov pib hloov pauv, ntxiv tsis siv neeg DST txhawb 20180424 AFD siv DST library https://github.com/andydoro/DST_RTC *
/ suav nrog lub tsev qiv ntawv code:
#ncig #ncig
#suav nrog
// txhais pins
#define SECPIN 3 #define MINPIN 4 #define HOUPIN 5
#define BRIGHTNESS 20 // teeb tsa qhov ci ci tshaj plaws
#feem r 10
#define g 10 #define b 10 RTC_DS3231 rtc; // Tsim lub moos yam khoom
Adafruit_NeoPixel stripS = Adafruit_NeoPixel (60, SECPIN, NEO_GRB + NEO_KHZ800); // strip khoom
Adafruit_NeoPixel stripM = Adafruit_NeoPixel (60, MINPIN, NEO_GRB + NEO_KHZ800); // strip object Adafruit_NeoPixel stripH = Adafruit_NeoPixel (24, HOUPIN, NEO_GRB + NEO_KHZ800); // strip object byte pixelColorRed, pixelColorGreen, pixelColorBlue; // tuav xim qhov tseem ceeb
void teeb tsa () {
Hlau.begin (); // Pib I2C rtc.begin (); // pib moos
Serial.begin (9600);
// teeb tsa pinmodes pinMode (SECPIN, OUTPUT); tus pinMode (MINPIN, OUTPUT); tus pinMode (HOUPIN, OUTPUT);
yog (rtc.lostPower ()) {
Serial.println ("RTC poob lub zog, cia teem sijhawm!"); // kab ntawv hauv qab no teeb tsa RTC rau hnub & sijhawm cov duab no tau suav ua rtc.adjust (DateTime (F (_ DATE_), F (_ TIME_)))); // Cov kab no teeb tsa RTC nrog hnub tim & sijhawm qhia meej, piv txwv li teeb tsa // Lub Ib Hlis 21, 2014 thaum 3 teev sawv ntxov koj yuav hu: // rtc.adjust (DateTime (2014, 1, 21, 3, 0, 0)); }
stripS.begin ();
stripM.begin (); stripH.begin (); //strip.show (); // Pib tag nrho cov pixels rau 'tawm'
// pib ua ntu zus
ncua (500);
colorWipeS (stripS. Color (0, g, 0), 5); // Xiav ximWipeM (stripM. Color (r, 0, 0), 5); // Xiav ximWipeH (stripH. Color (0, 0, b), 50); Xiav
ncua (1000);
DateTime theTime = rtc.now (); // siv rau hauv tus account DST byte secondval = theTime.second (); // tau txais vib nas this byte minuteval = theTime.minute (); // tau feeb feeb intvalval = theTime.hour (); teev = teev % % 12; // Lub moos no yog 12 teev, yog 13-23, hloov mus rau 0-11`
rau (uint16_t i = 0; i <secondval; i ++) {stripS.setPixelColor (i, 0, 0, b); stripS.show (); ncua (5); }
rau (uint16_t kuv = 0; kuv <minuteval; kuv ++) {stripM.setPixelColor (i, 0, g, 0); stripM.show (); ncua (5); }
rau (uint16_t i = 0; i <hourval; i ++) {stripH.setPixelColor (i, r, 0, 0); stripH.show (); ncua (5); }
}
void voj () {
// tau sijhawm
DateTime theTime = rtc.now (); // coj mus rau hauv tus account DST
byte secondval = theTime.second (); // tau txais vib nas this
byte minuteval = theTime.minute (); // tau feeb feeb intvalval = theTime.hour (); // tau txais cov teev hourval = teev % % 12; // Lub moos no yog 12 teev, yog 13-23, hloov mus rau 0-11`
stripS.setPixelColor (thib ob, 0, 0, 20); stripS.show (); ncua (10); yog (secondval == 59) {rau (uint8_t i = stripS.numPixels (); i> 0; i--) {stripS.setPixelColor (i, 0, g, 0); stripS.show (); ncua (16);}}
stripM.setPixelColor (minuteval, 0, g, 0);
stripM.show (); ncua (10); yog (secondval == 59 && minuteval == 59) {rau (uint8_t kuv = stripM.numPixels (); i> 0; i--) {stripM.setPixelColor (i, r, 0, 0); stripM.show (); ncua (16);}}
stripH.setPixelColor (teev, r, 0, 0);
stripH.show (); ncua (10); yog (secondval == 59 && minuteval == 59 && hourval == 11) {rau (uint8_t i = stripH.numPixels (); i> 0; i--) {stripH.setPixelColor (i, 0, 0, b); stripH.show (); ncua (83);}} // rau kev debugging Serial.print (teev, DEC); Serial.print (':'); Serial.print (minuteval, DEC); Serial.print (':'); Serial.println (thib ob, DEC); }
// Sau cov dots ib qho tom qab ib qho nrog xim
void colorWipeS (uint32_t c, uint8_t tos) {rau (uint16_t kuv = 0; kuv <stripS.numPixels (); i ++) {stripS.setPixelColor (i, c); stripS.show (); ncua (tos); }}
void colorWipeM (uint32_t c, uint8_t tos) {
rau (uint16_t kuv = 0; kuv <stripM.numPixels (); kuv ++) {stripM.setPixelColor (i, c); stripM.show (); ncua (tos); }}
void colorWipeH (uint32_t c, uint8_t tos) {
rau (uint16_t i = 0; i <stripH.numPixels (); i ++) {stripH.setPixelColor (i, c); stripH.show (); ncua (tos); }}
Kauj Ruam 5: Kov Kawg
Txhua yam uas yuav tsum tau tawm tam sim no yog txhawm rau txhim kho RTC thiab Micro Controller hauv qhov chaw so.
Kuv tau teeb tsa RTC lub roj teeb ib sab yog li kuv tuaj yeem hloov lub roj teeb tau yooj yim yog xav tau.
Txuas lub 5v xov hlau mus rau + sab ntawm lub txuas thiab hauv av mus rau - sab
Hwj chim nws!
Kuv muaj kuv txuas nrog lub txhab nyiaj USB roj teeb tab sis USB lub xov tooj charger yuav ua haujlwm ib yam nkaus.
Nco tseg:
Qhov ci ntawm LEDs tau teeb tsa hauv txoj cai. Nws tau teeb tsa qis kom ua rau qhov kos tam sim no qis. Thaum ci ntsa iab nrog txhua lub teeb ci LED nws tuaj yeem kos ze li 8 amps. Nrog kev teeb tsa tam sim no nws tsawg dua 1.
Runner Up hauv Kev Sib Tw Clocks
Pom zoo:
Kev Tsim Qauv Duab Duab/Duab Duab Duab: 4 Kauj Ruam
Kev Tsim Qauv Duab Duab/Duab Duab Duab: Nyob zoo txhua tus, Hauv qhov kev qhia no, Kuv yuav qhia koj cov txheej txheem ntawm yuav ua li cas thiaj tsim 3D qauv siv cov duab digital. Cov txheej txheem hu ua Photogrammetry, tseem hu ua Image-Based Modeling (IBM). Tshwj xeeb, hom txheej txheem no tau siv los rov ua dua
Cov Duab Duab Duab thiab Cov Duab 1: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Cubes thiab Cov Duab 1: Thaum sim nrog qee cov ntoo ntoo thiab cov duab los qhia, kuv pom ob peb txoj hauv kev los ua cov voos thiab lwm yam duab los ntawm cov khoom siv yooj yim. Los ntawm kev muab cov no los ua Cov Ntawv Qhia, Kuv vam tias yuav txhawb nqa kev ua si thiab kev kawm. Kev hloov pauv ntawm qhov kev qhia no
Yuav Ua Li Cas Thiaj Li Tshem Tawm Lub Computer Nrog Cov Kauj Ruam Yooj Yim thiab Duab: 13 Kauj Ruam (nrog Duab)
Yuav Tsum Tshem Tawm Lub Khoos Phis Tawj Li Cas Nrog Cov Kauj Ruam Yooj Yim thiab Duab: Nov yog cov lus qhia txog yuav ua li cas tshem lub PC. Feem ntau ntawm cov khoom siv yooj yim yog hloov pauv thiab tshem tawm tau yooj yim. Txawm li cas los xij nws yog ib qho tseem ceeb uas koj tau koom nrog nws. Qhov no yuav pab tiv thaiv koj kom tsis txhob poob ib feem, thiab tseem ua rau kev rov ua dua tshiab
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: Nov yog txoj hauv kev yooj yim heev thiab tus nqi qis mus rau cov duab thav duab digital - nrog qhov zoo ntawm kev ntxiv /tshem cov duab hla WiFi ntawm 'nyem thiab luag' siv (pub dawb) xa cov ntaub ntawv . Nws tuaj yeem siv tau los ntawm qhov me me £ 4.50 Pi Zero. Koj tseem tuaj yeem hloov pauv
Neo Pixel LED Daim Duab Duab: 6 Kauj Ruam (nrog Duab)
Neo Pixel LED Daim Duab Duab: Nyob zoo dua! Kuv tau ua txoj haujlwm no tshwj xeeb rau "xim ntawm zaj sawv" kev sib tw. Yog tias koj nyiam nws thov pov npav rau kuv hauv kev sib tw. Yog li kuv txiav txim siab ua qhov haujlwm sai thiab yooj yim rau kev sib tw. Nws yog neo-pixel L