Cov txheej txheem:

Fiber-Optic Teeb hauv Canvas Luam: 5 Kauj Ruam
Fiber-Optic Teeb hauv Canvas Luam: 5 Kauj Ruam

Video: Fiber-Optic Teeb hauv Canvas Luam: 5 Kauj Ruam

Video: Fiber-Optic Teeb hauv Canvas Luam: 5 Kauj Ruam
Video: The Fiber Optic Evolution of In-Building Networks 2024, Hlis ntuj nqeg
Anonim
Image
Image
Fiber-Optic Teeb hauv Canvas Luam
Fiber-Optic Teeb hauv Canvas Luam

Txoj haujlwm no ntxiv qhov sib txawv tshwj xeeb ntawm tus qauv canvas luam tawm. Kuv tau teeb tsa hauv 4 hom teeb pom kev sib txawv tab sis koj tuaj yeem yooj yim ntxiv ntxiv. Hom tau hloov pauv txhua lub sijhawm koj qhib nws thiab rov qab siv dua tsis muaj khawm cais kom txo qis kev puas tsuaj rau tus ncej. Cov roj teeb yuav tsum nyob ntev txog 50+ teev ntawm kev siv - Kuv tsis paub tseeb, tab sis kuv tau ua qhov haujlwm zoo ib yam rau ib tus phooj ywg thiab nws siv 5x ntau li ntau lub teeb thiab tau siv sijhawm ntev dua 20+ teev ntawm ib lub roj teeb.

Khoom siv

  • Canvas luam nrog qhov chaw ua haujlwm tau - Kuv xaj kuv li ntawm https://www.easycanvasprints.com vim tias lawv tau tus nqi zoo thiab qhib rov qab. Cov tuab 1.5 "thav duab tau zoo meej thiab muab kuv ntau qhov chaw rau khoov cov kab hluav taws xob fiber ntau. Ntxiv rau koj xav tau daim duab uas muab rau koj 3" los ntawm 8 "ntawm qhov chaw ua haujlwm tau rau lub roj teeb pob thiab microcontroller thiab LED strips
  • LED sawb teeb - Kuv siv qhov chaw nyob WS2812 LED strips. Tsis txhob ntshai, lawv yooj yim heev rau siv nrog FastLED lossis Neopixel cov tsev qiv ntawv! Koj kuj tseem tuaj yeem siv cov txheej txheem LED sawb, koj tsuas yog tsis tuaj yeem tswj hwm txhua ntu teeb ib tus zuj zus yam tsis muaj xov ntxiv.
  • Microcontroller - Kuv siv Arduino Uno tab sis koj tuaj yeem siv ib yam dab tsi rau qhov haujlwm no.
  • Roj teeb pob - Kuv xaj qhov no los ntawm eBay (los ntawm Tuam Tshoj) thiab nws muaj lub npe "6 x 1.5V AA 2A CELL Cov Roj Teeb Roj Teeb"
  • Fiber optic strands - ib zaug ntxiv, xaj los ntawm Tuam Tshoj ntawm eBay - "PMMA Plastic Fiber Optic Cable End Grow Led Light DIY Decor" lossis "PMMA End Glow Fiber Optic Cable rau Star Qab nthab Teeb Khoom". Kuv siv qhov ntau thiab tsawg 1mm thiab 1.5mm, kuv pom zoo kom siv me dua qhov ntawd.
  • On/Off hloov - "SPDT On/On 2 Position Miniature Toggle Switches"
  • Cov koom haum xaim hluav taws xob - Cov no pab ua kom cov kab hluav taws xob sib txuas tau zoo thiab huv si.
  • Ua npuas ncauj pawg thawj coj, cov tub ntxhais txuas txuas hlau, cua sov ntsws tubing

Cov cuab yeej

  • Dremel - siv los zes qhov qhib/tua hloov hauv daim duab duab. Qhov no tuaj yeem ua tiav nrog laum thiab qhov loj me me, tab sis kuv tsis pom zoo qhov ntawd.
  • Soldering hlau - txuas cov xov hlau rau cov hlua LED
  • Phom phom kub - cia txhua kauj ruam ntawm txoj haujlwm no
  • Cov xaws loj xaws - rau poking qhov los ntawm daim ntaub thiab daim txiag ua npuas dej rau lub teeb

Kauj Ruam 1: Ua Npuas Ncauj Board, Roj Teeb Pob thiab On/Off Switch

Ua Npuas Ncauj Board, Roj Teeb Pob thiab On/Off Hloov
Ua Npuas Ncauj Board, Roj Teeb Pob thiab On/Off Hloov
Ua Npuas Ncauj Board, Roj Teeb Pob thiab On/Off Hloov
Ua Npuas Ncauj Board, Roj Teeb Pob thiab On/Off Hloov

Ua ntej ib yam dab tsi ntxiv koj yuav tsum tau xa ib daim ntawv ua npuas dej rau sab nraum qab ntawm daim ntaub canvas. Qhov no muab rau peb lub ntsej muag zoo los txuas txhua yam ntxiv rau thiab pab tuav cov txheej txheem fiber ntau hauv qhov chaw. Tsuas yog siv rab riam los yog lub thawv txiav kom txiav ib daim ntawv ua npuas dej kom raug rau qhov loj thiab muab cov kua nplaum kub tso rau ntawm ntau qhov chaw. Kuv pom zoo siv lub rooj ua npuas dej dub kom nws tsis tso cai kom pom ntshav ntau dhau.

Kuv siv lub dremel me ntsis uas zoo li lub qhov tho me ntsis tab sis ua tau zoo heev rau tshem cov khoom. Nws yog ib qho ntawm cov khoom uas yuav tsum tuaj nrog ib qho dremel. Siv lub tshuab nqus cua tuaj yeem tshem tawm cov ntoo sawdust los ntawm dremel.

Kub nplaum txhua yam hauv qhov chaw. Xyuas kom tseeb tias lub roj teeb tau txuas nrog zoo heev vim tias nws xav tau lub zog me ntsis los ntxig/tshem lub roj teeb thiab koj tsis xav kom lub roj teeb tuav mus qhov twg.

Kauj Ruam 2: Microcontroller thiab Circuit

Microcontroller thiab Circuit
Microcontroller thiab Circuit
Microcontroller thiab Circuit
Microcontroller thiab Circuit
Microcontroller thiab Circuit
Microcontroller thiab Circuit

Kuv tso lub hwj chim hloov ua ntej Arduino UNO yog li thaum koj hloov qhov hloov pauv tom qab ntawd tsis muaj dab tsi siv lub zog los ntawm cov roj teeb pob. Qhov no yuav tsum pab cov roj teeb kom ntev li ntev tau thaum qhov haujlwm tsis qhib. Cov laug cam Arduino tsis zoo ntawm kev tswj hwm lub hwj chim - lawv siv ntau qhov tam sim no yog tias lawv tau qhib txawm tias lawv tsis nquag ua dab tsi.

Txuas qhov kawg ntawm lub roj teeb pob rau hauv VIN (qhov hluav taws xob nkag) ntawm lub microcontroller kom nws siv tus tswj hwm lub ntsuas hluav taws xob built-in kom tau txais qhov hluav taws xob nqes mus rau 5V nws xav tau. Yog tias peb tau siv hluav taws xob ntau dua peb yuav xav tau siv peb tus kheej qhov ntsuas hluav taws xob rau lawv, tab sis UNO yuav tsum muaj peev xwm tuav tau 5 LEDs.

Kuv siv cov tshuaj tiv thaiv nruab nrab ntawm cov ntaub ntawv tso tawm thiab cov hlua LED kom du tawm lub teeb liab - yam tsis muaj tus tiv thaiv koj tuaj yeem tau txais qhov ua kom pom tseeb ntawm cov pixels. Qhov loj ntawm tus tiv thaiv tsis muaj teeb meem tiag tiag, txhua yam ntawm 50Ω txog 400Ω yuav tsum ua haujlwm.

Kauj Ruam 3: Fiber-optic Teeb

Image
Image
Fiber-optic Teeb
Fiber-optic Teeb
Fiber-optic Teeb
Fiber-optic Teeb

Tom qab qee qhov kev sim thiab yuam kev Kuv thaum kawg pom txoj hauv kev zoo kom tau txais cov ntaub ntawv fiber optic los ntawm daim ntaub.

  1. Siv rab koob xaws loj tshaj plaws uas koj yuav tsum khawb ib lub qhov los ntawm lub hauv ntej ntawm daim ntaub thiab daim txiag ua npuas ncauj. Kuv pom zoo kom txhuam txhua lub qhov koj xav tau thaum pib yog li koj tuaj yeem ntxeev nws thiab pom qhov twg koj tuaj yeem/tsis tuaj yeem tso koj lub koom haum txuas kab txuas
  2. Siv ib rab koob ntawm lub qhov ntswg thiab tuav cov hlua fiber ntau tsawg dua li ib centimeter los ntawm qhov kawg
  3. Poke cov xov paj fiber ntau los ntawm lub qhov uas koj ua nrog rab koob
  4. Ua txoj hlua los ntawm ntau cov yas yas rau qhov uas nws ntev me ntsis dua li qhov tsim nyog - peb yuav txiav nws tom qab
  5. Nrog koj cov kua nplaum kub ntawm qhov ntsuas kub qis (yog tias nws muaj qhov kev xaiv ntawd) tso cov kua nplaum kub tso rau ntawm cov kab hluav taws xob kho qhov muag qhov twg nws pokes los ntawm lub rooj ua npuas ncauj. Ib qho ntxiv, koj tuaj yeem siv cov khoom sib tsoo xiav. Cov kua nplaum kub ua kom deform cov hlua me ntsis tab sis nws tsis zoo li cuam tshuam nrog qhov ua tau zoo ntau dhau
  6. Txiav cov hlua me ntsis kom deb ntawm daim ntaub uas siv cov tshuab txiav hlau.

Txhawm rau ua kom nrawm dua cov txheej txheem koj tuaj yeem txhuam los ntawm ntau cov fibers hauv kab ua ntej ua cov kua nplaum kub. Feem ntau lawv yuav tsum nyob hauv qhov chaw ntawm koj tus kheej.

Ceev faj kom tsis txhob tawg lossis nqaim cov kab hluav taws xob sib txuas ntawm lub rooj - lawv yuav tawg thiab yog tias nws ua rau cov hlua luv dhau ces koj yuav tu siab thiab yuav tsum rov ua dua. Siv lub roj teeb ntim ua lub zog ntsuas kom koj tuaj yeem muaj daim duab thav duab tsawg dua ib nrab ntawm lub rooj.

Vim tias kuv siv lub rooj ua npuas dej dawb hloov xim dub muaj ntau lub teeb ci ntsa iab thaum cov LEDs nyob. Raws li kev kho kuv tau kaw hauv qee cov ntawv ci txhuas ntawm lub teeb thiab daim ntaub.

Siv cov cua sov ua kom sov ua kom txhua pawg ntawm fiber ntau optic strands ua ke.

  1. Txiav cov hlua rau cov pob kom kwv yees li tib qhov ntev
  2. Muab seem los ntawm cov cua sov ntsws tubing
  3. Siv rab phom cua sov los yog cov hlau txuas los txhawm rau nws. Yog tias koj siv cov hlau txuas, tsuas yog cia sab ntawm cov hlau maj mam kov lub raj thiab nws yuav ntsws. Nws yuav tsum tsis txhob yaj cov tubing vim tias nws tau tsim los rau cua sov me ntsis.

Thaum kawg kuv siv cov kua nplaum kub los txuas qhov kawg ntawm pob khoom rau txhua lub teeb ci LED. Kuv siv cov kua nplaum kub ntau kom cov fibers tau txais lub teeb los ntawm txhua qhov liab/ntsuab/xiav diode hauv lub teeb - thaum cov fibers nyob ze rau lub teeb ib qho xim "dawb" (uas yog liab thiab ntsuab thiab xiav) tom qab ntawd qee cov fibers yuav tsuas yog liab thiab qee qhov yuav yog ntsuab, tsis yog txhua yam yog dawb. Qhov no tuaj yeem txhim kho los ntawm kev siv ib daim ntawv lossis lwm yam los nthuav nws, tab sis cov kua nplaum kub ua haujlwm zoo txaus rau kuv.

Kauj ruam 4: Programming

Hauv qhov program no kuv siv threelibraries

FastLED - lub tsev qiv ntawv zoo rau kev tswj WS2812 LED kab txaij (thiab ntau lwm qhov chaw nyob hais lus kab lus LED) -

Arduino Low Power - Kuv tsis paub muaj zog npaum li cas qhov no txuag tau, tab sis nws yooj yim heev rau kev siv thiab yuav tsum pab txuag me ntsis ntawm lub zog ntawm txoj haujlwm uas tsuas yog teeb dawb thiab tom qab ntawd ncua mus ib txhis.

EEPROM - Siv los nyeem/khaws hom tam sim no ntawm txoj haujlwm. Qhov no tso cai rau txoj haujlwm kom nce qib xim txhua lub sijhawm koj qhib nws thiab rov qab qhib, uas tshem tawm qhov xav tau ntawm khawm cais kom hloov hom. Lub tsev qiv ntawv EEPROM tau teeb tsa thaum twg koj nruab Arduino IDE.

Kuv kuj tau siv daim duab kos rau qhov muag teeb uas lwm tus tau teeb tsa. Nws random teeb lub pixel los ntawm lub hauv paus xim mus rau lub ncov xim thiab tom qab ntawd rov qab los. https://gist.github.com/kriegsman/88954aae22b03a66… (nws siv FastLED lub tsev qiv ntawv ib yam)

Kuv kuj tseem siv vMicro plugin rau Visual Studio - qhov no yog qhov hloov kho tshiab ntawm Arduino IDE. Nws muaj tuj ntawm kev ua tiav kev ua tiav tiav thiab qhia txog teeb meem hauv koj cov cai yam tsis tas yuav suav nws. Nws raug nqi $ 15 tab sis nws muaj nqis heev yog tias koj yuav ua ntau dua ib qhov project Arduino, thiab nws yuav yuam koj kom kawm paub txog Visual Studio uas yog qhov haujlwm zoo tshaj plaws.

(Kuv kuj tseem txuas tus lej.ino cov ntaub ntawv vim tias Kev Qhia paub hosting ntawm Github Gist rhuav tshem ntau qhov chaw khoob hauv cov ntawv)

Tus lej Arduino khiav 4 hom xim ntawm Arduino UNO rau qee qhov WS2812B LED sawb teeb siv lub tsev qiv ntawv FastLED

#suav nrog
#suav nrog
#suav nrog
// FastLED teeb
#defineNUM_LEDS4
#definePIN3 // Cov ntaub ntawv tus pin rau LED sawb
CRGB coj [NUM_LEDS];
// Twinkle teeb tsa
#defineBASE_COLORCRGB (2, 2, 2) // Lub hauv paus xim tom qab
#definePEAK_COLORCRGB (255, 255, 255) // Peak xim kom twinkle txog
// Tus lej kom nce xim ntawm txhua lub voj raws li nws tau ci dua:
#defineDELTA_COLOR_UPCRGB (4, 4, 4)
// Tus lej kom txo cov xim los ntawm txhua lub voj raws li nws tau dimmer:
#defineDELTA_COLOR_DOWNCRGB (4, 4, 4)
// Muaj feem ntawm txhua lub pixel pib ci ntsa iab.
// 1 lossis 2 = ob peb lub teeb ci ntsa iab ib zaug.
// 10 = ntau tus pixels ci rau ib lub sijhawm.
#defineCHANCE_OF_TWINKLE2
enum {SteadyDim, GettingBrighter, GettingDimmerAgain};
uint8_t PixelState [NUM_LEDS];
byte runMode;
byte globalBright = 150;
byte globalDelay = 20; // qeeb qeeb rau twinkling
byte chaw nyob = 35; // Chaw nyob kom khaws hom khiav
voidsetup ()
{
FastLED.addLeds (leds, NUM_LEDS);
FastLED.setCorrection (TypicalLEDStrip);
//FastLED.setMaxPowerInVoltsAndMilliamps(5, maxMilliamps);
FastLED.setBrightness (thoob ntiaj teb Bright);
// Tau txais hom los khiav
runMode = EEPROM.read (chaw nyob);
// Ua kom qhov kev ua tau zoo los ntawm 1
EEPROM.write (chaw nyob, runMode + 1);
}
voidloop ()
{
hloov (runMode)
{
// Khoom dawb
case1: fill_solid (leds, NUM_LEDS, CRGB:: Dawb);
FastLED.show ();
DelayForever ();
tawg;
// Twinkle qeeb me ntsis
case2: FastLED.setBrightness (255);
ntiaj tebDelay = 10;
TwinkleMapPixels ();
tawg;
// Twinkle sai
rooj plaub 3: FastLED.setBrightness (150);
ntiaj tebDelay = 2;
TwinkleMapPixels ();
tawg;
// Zaj sawv
rooj plaub 4:
RunRainbow ();
tawg;
// Qhov ntsuas tawm ntawm qhov ntau, rov pib dua nws mus rau 2 thiab tom qab ntawd khiav hom 1.
// Thaum lub arduino rov pib dua nws yuav khiav hom 2, tab sis tam sim no khiav hom 1
neej ntawd hais:
EEPROM.write (chaw nyob, 2);
runMode = 1;
tawg;
}
}
voidRunRainbow ()
{
peb *c;
uint16_t kuv, j;
thaum (muaj tseeb)
{
rau (j = 0; j <256; j ++) {// 1 lub voj voog ntawm txhua xim ntawm lub log
rau (kuv = 0; kuv <NUM_LEDS; kuv ++) {
c = Log (((i * 256 / NUM_LEDS) + j) & 255);
setPixel (i, *c, *(c + 1), *(c + 2));
}
FastLED.show ();
ncua (globalDelay);
}
}
}
byte * Log (byte WheelPos) {
zoo li qub byte c [3];
yog (WheelPos <85) {
c [0] = WheelPos * 3;
c [1] = 255 - WheelPos * 3;
c [2] = 0;
}
elseif (WheelPos <170) {
WheelPos -= 85;
c [0] = 255 - WheelPos * 3;
c [1] = 0;
c [2] = WheelPos * 3;
}
lwm tus {
WheelPos -= 170;
c [0] = 0;
c [1] = WheelPos * 3;
c [2] = 255 - WheelPos * 3;
}
rov c;
}
voidTwinkleMapPixels ()
{
InitPixelStates ();
thaum (muaj tseeb)
{
rau (uint16_t kuv = 0; kuv <NUM_LEDS; kuv ++) {
yog (PixelState == SteadyDim) {
// cov pixels tam sim no: SteadyDim
// yog li peb xaiv txiav txim siab ua kom nws pib ci ntsa iab
yog (random8 () <CHANCE_OF_TWINKLE) {
PixelState = Tau txais qhov kaj;
}
}
elseif (PixelState == GettingBrighter) {
// cov pixels tam sim no: Tau TxaisBrighter
// yog li yog tias nws yog lub ncov xim, hloov nws kom tau dimmer dua
yog (leds > = PEAK_COLOR) {
PixelState = GettingDimmerAgain;
}
lwm tus {
// txwv tsis pub, cia li ua kom nws ci ntsa iab:
leds += DELTA_COLOR_UP;
}
}
lwm {{tau dimmer dua
// cov pixels tam sim no: Tau txais DimmerAgain
// yog li yog tias nws rov qab los rau xim xim, hloov nws mus rau qhov tsaus ntuj
yog (leds <= BASE_COLOR) {
leds = BASE_COLOR; // rov pib dua rau lub hauv paus xim tseeb, yog tias peb hla dhau
PixelState [kuv] = SteadyDim;
}
lwm tus {
// txwv tsis pub, cia li ua kom nws dim:
leds -= DELTA_COLOR_DOWN;
}
}
}
FastLED.show ();
FastLED.delay (thoob ntiaj teb Delay);
}
}
voidInitPixelStates ()
{
memset (PixelState, sizeof (PixelState), SteadyDim); // pib txhua lub pixels rau SteadyDim.
fill_solid (leds, NUM_LEDS, BASE_COLOR);
}
voidDelayForever ()
{
thaum (muaj tseeb)
{
ncua (100);
LowPower.powerDown (SLEEP_FOREVER, ADC_OFF, BOD_OFF);
}
}
voidshowStrip () {
FastLED.show ();
}
voidsetPixel (int Pixel, byte liab, byte ntsuab, byte xiav) {
// FastLED
leds [Pixel].r = liab;
leds [Pixel].g = ntsuab;
leds [Pixel].b = xiav;
}

saib rawFiberOptic_ClemsonPic.ino tuav nrog ❤ los ntawm GitHub

Kauj Ruam 5: Cov Khoom Kawg

Khoom Kawg
Khoom Kawg
Khoom Kawg
Khoom Kawg
Khoom Kawg
Khoom Kawg

Ta-dab! Kuv vam tias Cov Lus Qhia no txhawb lwm tus los ua lawv tus kheej txoj haujlwm zoo sib xws. Nws yeej tsis nyuaj ua thiab kuv xav tsis thoob tias tsis muaj leej twg tau ua nws thiab sau cov lus qhia ntxaws txog nws tseem.

Pom zoo: