Cov txheej txheem:

Hnub So Kho Kom Zoo Nkauj PCB: 3 Cov Kauj Ruam (nrog Duab)
Hnub So Kho Kom Zoo Nkauj PCB: 3 Cov Kauj Ruam (nrog Duab)

Video: Hnub So Kho Kom Zoo Nkauj PCB: 3 Cov Kauj Ruam (nrog Duab)

Video: Hnub So Kho Kom Zoo Nkauj PCB: 3 Cov Kauj Ruam (nrog Duab)
Video: Kho caj kho cev by Celesna Lor 2024, Hlis ntuj nqeg
Anonim
Nyiaj so koobtsheej Ornament PCB
Nyiaj so koobtsheej Ornament PCB
Nyiaj so koobtsheej Ornament PCB
Nyiaj so koobtsheej Ornament PCB
Nyiaj so koobtsheej Ornament PCB
Nyiaj so koobtsheej Ornament PCB

Hav sawv daws!

Nws yog lub sijhawm ntawm lub xyoo thiab lub caij sib pauv khoom plig yuav luag rau peb. Kuv tus kheej txaus siab los ua cov khoom thiab sib koom nrog tsev neeg. Xyoo no kuv txiav txim siab ua cov khoom ua si hnub so siv Atting85 thiab qee qhov WS2812C 2020 LEDs. Cov paj ntoo yog kwv yees li 80mm txoj kab uas hla yog li nws yog qhov khoom tsim nyog rau tsob ntoo. Yog tias koj tsis yog tus neeg ntoo koj paub dab tsi, nws ua rau lub rooj zoo nkauj zoo nkauj heev. WS2812C 2020 LEDs yog qhov ci ntsa iab me ntsis buggers yog li tsis txhob txhawj xeeb txog nws tau dhau lawm haha. Kuv tau sim nws ntawm 3.3 volts nrog kev siv tam sim no ntawm 0.013 amps ces rau 5 volts qhov kev siv tam sim no yog 0.023 amps. Koj tuaj yeem ua tau lub hwj chim no nrog 5 volts ncaj qha rau sab nraub qaum lossis hla lub micro USB txuas rau sab nraub qaum. Kuv tuaj yeem ntsaws qhov no rau hauv kuv lub laptop thiab txhawb nws. Kuj tseem muaj qhov kev xaiv nyob sab nraub qaum los txhawb nws nrog lwm lub zog siv hluav taws xob ntawm qhov siab tshaj ntawm 30 volts, tab sis qhov ntawd ntseeg cov ntaub ntawv rau 78L05 5V tus tswj hwm, Kuv yuav tsis thawb nws mus deb.

Thov nyeem tag nrho phau ntawv qhia ua ntej tsim qhov no. Kawm los ntawm kuv qhov ua yuam kev ua rau ntseeg kuv feem ntau ua ntau thiab tuaj yeem faib kuv cov hlaws ntawm kev txawj ntse.

Yog tias koj txaus siab yuav yuav PCB ua ntej lossis tsuas yog PCB nws tus kheej mus ntsib kuv lub khw tindie.

Khoom siv

Cia peb pib nrog txhua yam cuab yeej koj yuav xav tsim ib qho ntawm cov khoom zoo nkauj no koj tus kheej. Qhov no yog ib qho ntawm kuv ob peb txoj haujlwm uas tsis xav tau cov cuab yeej tseem ceeb uas yog qhov zoo rau koj!

Cov cuab yeej

- Cov phom cua sov (cov cuab yeej tseem ceeb)/soldering hlau (kho qhov yuam kev)

- ESD tweezers

- Isopropyl cawv

- SMT stencil (pom zoo heev)

- Cov kab laug sab (Kuv siv Tus Tsawg Temp Lead-Free solder paste muab muag ntawm amazon)

Khoom siv

- x10 WS2812 2020 LEDs

- x1 Attiny85 Microcontroller

- x11 0.1uf 0603 Capacitors

- x1 0.1uf 0402 Capacitor (Koj tuaj yeem khiav tawm nrog 0603 Cap)

- x1 SMD Micro USB txuas

- x1 1.5K Ohm Resistor

- x1 4.7uf 0805 Capacitor

- x1 78L05 5V Tus Tswj

- x1 SOD123 Diode (Kuv siv xaim los hloov qhov no tsis tsim nyog, tab sis kuv tsis hnov qab tshem nws thaum tsim lub rooj tsavxwm)

x2 x2 SOD323 Diodes

- x2 66.5 Ohm Resistors (Koj tseem tuaj yeem siv x2 24 -Ohm resistors ntawm no ib yam, kuv ntseeg tias txhua tus khub yuav ua tau tiag tiag - tsis hais kuv)

Yeem yeem

- x1 24 Ohm Resistor

- x130 Ohm Resistor

(Cov no yog rau qhov faib hluav taws xob yog tias koj xav ntsuas qhov ntsuas hluav taws xob rau lub ntsuas hluav taws xob qis - tsuas yog qhov kev xaiv)

Kauj ruam 1: Sib dhos

Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke

Cov txheej txheem sib dhos yog ncaj ncaj rau pem hauv ntej. Xyuas kom tseeb tias koj tab tom taw qhia qhov raug thiab koj yuav tsum tsis txhob ntsib teeb meem. Koj paub dab tsi, yog tias koj zoo li kuv thiab tsis muaj dab tsi ua haujlwm thawj zaug … tsis muaj dab tsi, kuv muab qee qhov teeb meem daws teeb meem thaum kawg.

Zoo thawj yam ua ntej, koj yuav xav tau cov ntawv sau tam sim no … Kuv tau txuas 1: 1 nplai PCB PDF ntawv yog li koj tuaj yeem tsim nws ntawm koj tus kheej lub tshuab txiav laser. Yog tias koj xav tau ib qho txiav rau koj, xa xov rau kuv kuv yuav ua qhov ntawd ib yam. Txwv tsis pub ua qhov no ntawm tes ua rau koj ib tus neeg txawj ntse bada $$.

Yog tias koj muaj kev paub dhau los ua PCBs qhov no yog qhov uas koj yuav mus tom ntej thiab ruaj ntseg koj lub stencil, kis koj cov tshuaj txhuam hniav bla bla bla koj tau txais. Rau cov uas tsis tau ua qhov no, tsis muaj kev txhawj xeeb, saib youtube video lossis ob. Nco ntsoov tias koj txoj kev sib koom ua ke zoo tshaj plaws ua ntej koj kis koj cov kua nplaum thiab yooj yim peasy txiv qaub nyem.

Ua tib zoo tshem koj cov stencil thiab cia peb pib tso qhov !!

Saib kuv daim duab ua tib zoo kos rau koj, ua nrog kev hlub thiab kev saib xyuas zoo.

Ntshav Ntshav = 0.1uf 0603

Xiav = Diodes

Lime Green = 4.7 uf 0805 (Yuav siv 0603, tej zaum)

Ntshav = Hlau choj

- Paj yeeb = Voltage divider resistors

Liab = WS2812C LEDs (Saib lawv qhov kev taw qhia, qhov tsaus ntuj yuav nyob hauv qab)

- Daj = 78L05 5V tswj 100mA

Koj puas xav paub lwm yam cim xim daj yog rau dab tsi? Koj puas ntseeg? Yog lawm … Nws yog qhov yuam kev lawm! Kuv muab cov av freakin los ntawm kab ntawv kab, sau smack dab nyob hauv nruab nrab OK. VIM LI CAS … Kuv tsis paub.

Kuv digress. Tom qab teev cov mob hnyav rub kuv cov plaub hau tawm, kuv paub kuv qhov yuam kev. Txhawm rau kho nws, Kuv yuav tsum tsis yog tsuas yog laum tawm hauv av los ntawm tab sis laum qhov me me uas tsis txaus ntseeg dhau los ntawm pawg thawj coj thiab txuas lub teeb liab kab nrog xaim me me. Kuv siv qee daim kab xev hluav taws xob ua kua kom ruaj ntseg thiab npog kuv qhov yuam kev. Koj tsis tuaj yeem pom nws zoo heev thaum nws npog ua tsaug.

Kuv tseem yuav kho qhov no yog tias koj yuav lub rooj tsav xwm los ntawm kuv yog li tsis muaj kev txhawj xeeb nyob ntawd.

Kauj ruam 2: Coding

Coding
Coding
Coding
Coding

Yog li ua ntej kuv tsim qhov no kuv xav tias, "Huag me WS2812 LEDs, lawv yuav tsum siv tus lej ib yam li WS2812b's, qhov no yuav yog taug kev hauv lub tiaj ua si!" Tsis raug

Cov no tsis siv sijhawm tib yam li WS2812b LEDs yog li muaj kev kawm nkhaus lossis roob nyob ntawm koj qhov kev nplij siab nrog kev sau npe.

Tom qab me me "Huag $ ntaus" lub sijhawm, Kuv pom blog no los ntawm Josh Levin. Yog li qw rau nws kom pab kuv paub qhov no. Kuv siv tus lej tseem ceeb ntawm nws cov cai thiab hloov kho nws kom ua haujlwm nrog cov laug cam no. Txheeb nws lub blog yog tias koj xav nkag siab tias txoj cai no ua haujlwm li cas. Cov cai kuv tshaj tawm ua rau zaj sawv cuam tshuam. Nws tuaj yeem ua tau yog li ua cov xim ruaj khov yog tias yog koj li.

Ib qho me me yog kuv tsis tuaj yeem txiav txim siab yuav ua li cas dim cov LEDs vim lawv ci tiag tiag. Tej zaum ib tus neeg tuaj yeem tawm lus thiab pab kuv tawm.

#include #define PIXELS 3000 #define PIXEL_PORT PORTB #define PIXEL_DDR DDRB #define PIXEL_BIT 0 #define T1H 700 #define T1L 320 #define T0H 320 #define T0L 700 #define RES 300000 #defineCNC (PSEC) #define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) #define NS_TO_CYCLES (n) ((n) / NS_PER_CYCLE)

inline void sendBit (bool bitVal) {

if (bitVal) {asm volatile ("sbi %[port], %[bit] n / t" ".rept %[onCycles] n / t" "nop / n / t" ".endr / n / t "" cbi %[port], %[bit] n / t "".rept %[offCycles] n / t "" nop / n / t "".endr / n / t ":: [port]" Kuv "(_SFR_IO_ADDR (PIXEL_PORT)), [me ntsis]" Kuv "(PIXEL_BIT), [onCycles]" Kuv "(NS_TO_CYCLES (T1H) - 2), [offCycles]" Kuv "(NS_TO_CYCLES (T1L) - 2));

lwm yam {

asm tsis hloov pauv ("sbi %[port], %[bit] n / t" ".rept %[onCycles] n / t" "nop / n / t" ".endr / n / t" "cbi %[chaw nres nkoj], %[ntsis] n / t "".rept %[offCycles] n / t "" nop / n / t "".endr / n / t ":: [port]" I "(_SFR_IO_ADDR (PIXEL_PORT)), [ntsis] "Kuv" (PIXEL_BIT), [onCycles] "Kuv" (NS_TO_CYCLES (T0H) - 2), [offCycles] "Kuv" (NS_TO_CYCLES (T0L) - 2));

} }

inline void sendByte (unsigned char byte) {rau (unsigned char ntsis = 0; ntsis <8; ntsis ++) {sendBit (bitRead (byte, 7)); byte << = 1; }}

void ledsetup () {

bitSet (PIXEL_DDR, PIXEL_BIT); }

inline void sendPixel (tsis kos npe r, tsis kos npe g, tsis kos npe b) {

xaByte (g); // Neopixel xav kom muaj xim ntsuab ces liab ces xiav xaj xaByte (r); xaByte (b); }

void show () {

_delay_us ((RES / 1000UL) + 1); // Hloov pauv txij li qhov ncua yuav tsum _at_least_ qhov ntev no (luv luv yuav tsis ua haujlwm, ntev dhau tsis muaj teeb meem)}

tsis muaj dabtsis showColor (tsis kos npe r, tsis kos npe g, tsis kos npe b) {

cli (); rau (int p = 0; p

8;

unsigned char kauj ruam = currentPixelHue & 0xff; hloov (theem) {rooj plaub 0: sendPixel (~ kauj ruam, kauj ruam, 0); tawg; rooj plaub 1: sendPixel (0, ~ kauj ruam, kauj ruam); tawg;

rooj plaub 2:

sendPixel (kauj ruam, 0, ~ kauj ruam); tawg; } currentPixelHue+= pixelAdvance; } sei (); qhia (); firstPixelHue += frameAdvance; }}

void teeb tsa () {

ledsetup (); }

void voj () {

rainbowCycle (1000, 10, 10); rov qab; }

Kauj ruam 3: Txhua yam ua tiav

Ua Tiav
Ua Tiav
Ua Tiav
Ua Tiav
Ua Tiav
Ua Tiav

Cia siab tias, txhua yam ua haujlwm ntawm lub sijhawm no tab sis yog tias nws tsis yog, cia ua tiav nrog qee qhov kev daws teeb meem.

1. Pawg thawj coj tsis tau lees paub los ntawm Arduino - xyuas kom koj muaj lub tsev qiv ntawv digispark teeb tsa thiab koj nyeem yuav siv digispark cov laug cam li cas.

2. Code yuav tsis upload - Koj yuav tsum nias upload thiab tom qab ntawd ntsaws rau hauv qhov module rau lub khoos phis tawj, ruam kuv paub, tab sis qhov ntawd yog li cas nws ua haujlwm.

3. Pawg thawj coj tseem tsis ua haujlwm - Xyuas kom tseeb tias koj lub micro -USB cable tso cai rau cov ntaub ntawv nrog rau lub zog, tsis yog txhua lub cable ua. Koj tuaj yeem xav tias kuv xam qhov no tawm ntawm txoj kev nyuaj.

4. Tseem tsis muaj dab tsi - Koj lub diodes tuaj yeem thim rov qab - tshawb xyuas nrog lub ntsuas qhov ntsuas kom raug.

5. Weird flashing LEDs - Tog twg los qhov no yog teeb meem code lossis ib qho ntawm koj lub leds tsis raug zaum ntawm lub teeb liab.

6. Qhov kawg 3 LEDs yog messed - Ah! koj tau khiav mus rau kuv qhov kev tsim yuam kev. Ua kom ntseeg tau tias av hauv av tau raug laum tawm - tshuaj xyuas nrog lub multimeter txuas ntxiv ntawm lub teeb liab thiab hauv av. Tom qab ntawv xyuas kom tseeb tias koj cov hlau xaim tseem raug cais tawm hauv av.

7. Tseem tawg - Kuv ua siab ncaj tawm ntawm kev daws teeb meem, xa xov rau kuv.

Zoo, Kuv vam tias koj tau txaus siab rau Kuv Cov Lus Qhia! Thov tawm lus yog tias koj tau ua.

Zoo tshaj, Nick

Pom zoo: