Cov txheej txheem:

ATTiny 85 Tswj Festive String Lights: 5 Kauj Ruam
ATTiny 85 Tswj Festive String Lights: 5 Kauj Ruam

Video: ATTiny 85 Tswj Festive String Lights: 5 Kauj Ruam

Video: ATTiny 85 Tswj Festive String Lights: 5 Kauj Ruam
Video: Знакомство с Digispark ATtiny85. "Arduino для чайников" 2024, Kaum ib hlis
Anonim
ATTiny 85 Tswj Festive String Teeb
ATTiny 85 Tswj Festive String Teeb
ATTiny 85 Tswj Festive String Teeb
ATTiny 85 Tswj Festive String Teeb
ATTiny 85 Tswj Festive String Teeb
ATTiny 85 Tswj Festive String Teeb

Whilst browsing eBay Kuv hla hla cov hlua ntawm 50 qhov chaw nyob LEDs siv WS2811 nti, thaum kuv tsis xav tias lawv tau tsim tiag tiag los siv ua lub teeb pom kev zoo lawv ua haujlwm tau zoo thiab lawv zoo li tsob ntoo. Nws kuj tseem tuaj yeem hloov cov xim kom tsim nyog rau txhua tus lej ntawm cov hnub so. Raws li nws ze rau Christmas Kuv tau mus nrog ntau thiab liab thiab ntsuab nrog rau qee qhov qauv uas siv ntau xim tsis sib xws thiab tau kawg qhov projectable LED qhov project yuav ua tiav yam tsis muaj zaj sawv.

Tus tswj hwm Micro yog ATTiny 85 thiab muaj 3 khawm uas hloov pauv hom thiab nrawm ntawm cov qauv hauv qhov kuv cia siab tias yog txoj hauv kev ncaj ncees.

Kuv yog tus kiv cua loj ntawm ATTiny85 raws li nws ua haujlwm tau zoo nrog Arduino IDE, nws pheej yig thiab los ntawm kuv qhov kev paub nws yog cov nti uas muaj zog.

Tus nqi tag nrho ib txheej yog tsawg dua £ 15 thiab tuaj yeem ua tiav tau yooj yim nyob rau hnub so nrog tsuas yog cov cuab yeej yooj yim.

Qhov chaw ib ntus xav tau:

  • Arduinouno lossis sib npaug rau kev ua haujlwm ATTiny
  • lub rooj noj mov thiab cov xov hlau txuas rau kev sim thiab ua haujlwm ATTiny
  • soldering hlau thiab solder
  • kub kua nplaum phom

Cov khoom siv rau kev tsim:

Kuv tau suav nrog cov txuas mus rau qee yam ntawm Amazon kom pab txheeb xyuas lawv, nws tsis yog qhov chaw zoo tshaj plaws los yuav lawv thiab koj yuav tsum mus ncig.

  • ATTiny85 ntxiv rau xaiv DIP 8 IC Qhov (https://amzn.to/2RgKpeJ)
  • 1000uF capacitor * (saib sau ntawv)
  • 3 x 1 txog 5 kΩ Rub cov neeg tawm tsam.
  • 1 x 300-500Ω resistor * (saib sau ntawv)
  • 1 daim ntawm pawg thawj coj saib qauv (https://amzn.to/2Rn4YGs)
  • USB rau DC cable (https://amzn.to/2BE2iyP)
  • DC Qhov (txuas) (https://amzn.to/2TUFbHy)
  • Sting ntawm qhov chaw nyob LEDs (https://amzn.to/2Rm1Yds)
  • 3 x momentary laub hloov
  • Lub thawv qhov project (https://amzn.to/2DTeTzA)

3 qhov hloov pauv ib ntus tuaj yeem yog txhua yam uas koj nyiam tab sis koj yuav xav tau kho koj tus qauv kom haum rau koj cov hloov pauv. Kuv muaj qee tus nrog khawm ntev dua thiab 2 ceg uas ua rau lawv haum rau txoj haujlwm no zoo li kuv tuaj yeem tsoo lawv los ntawm lub qhov nyob rau sab saum toj thiab npog kub rau hauv qhov chaw los ntawm hauv qab.

* Qhov no yog theej los ntawm Adafruit NeoPixel Überguide thiab piav qhia qhov xav tau rau lub capacitor thiab resistor.

Ua ntej txuas NeoPixels mus rau txhua lub zog loj (DC "phab ntsa wart" lossis txawm tias muaj roj teeb loj), ntxiv lub capacitor (1000 µF, 6.3V lossis siab dua) hla cov + thiab - cov dav hlau raws li qhia saum toj no. Lub capacitor tsis hloov pauv tam sim no los ntawm kab txaij. Place 300 rau 500 Ohm resistor ntawm Arduino cov ntaub ntawv tso tawm tus pin thiab cov tswv yim rau thawj NeoPixel. Tus tiv thaiv yuav tsum yog qhov kawg ntawm cov xov hlau ze rau NeoPixel (s), tsis yog lub microcontroller. Qee cov khoom twb tau suav nrog cov tshuaj tiv thaiv no … yog tias koj tsis paub meej, ntxiv ib qho … tsis muaj kev phom sij hauv ob npaug!

Lwm yam uas yuav tsum nco ntsoov:

Kev siv hluav taws xob ib txwm yog txhua yam uas koj xav tau xav txog nrog cov chaw nyob LEDs. Txhawm rau txiav txim siab npaum li cas lub zog koj yuav xav tau tsuas yog siv tus lej ntawm LEDs hauv koj cov array thiab lub sijhawm nws los ntawm 60 raws li txhua LED tuaj yeem kos 60ma

Qhov no yog txoj hlua ntawm 50 li 50X60 yog 3000 lossis 3 amps thaum qhov no muaj zog heev nws tsim nyog nco ntsoov tias lawv tsuas yog siv ntau npaum li ntawd yog tias nyob rau qhov ci tag nrho ntawm 3 xim. Koj tuaj yeem npaj koj cov cai kom zam qhov no lossis siv setBrightness () hais kom txwv nws. hauv kev sim Kuv tau pom kuv teeb tsa ua haujlwm tau zoo ntawm 2 amp fais fab mov.

Kuv xav pom zoo kom nyeem Adafruit NeoPixel Überguide (https://learn.adafruit.com/adafruit-neopixel-uber…) raws li nws tau piav qhia txhua yam hauv ntau yam kom ntxaws tshaj qhov kuv ua tau.

Kauj ruam 1: Drilling

Drilling
Drilling
Drilling
Drilling
Drilling
Drilling

Drilling

Muaj ob peb qhov rau dill rau hauv lub thawv phiaj xwm.

  • 1x 8mm nyob tom qab rau lub qhov (socket)
  • 3x 2.5mm qhov nyob rau hauv pem hauv ntej rau 3 coj ntawm LEDs lossis 1 lub qhov uas loj txaus rau txhua 3 tus coj kom tawm los.
  • 3x 3.5mm nyob rau sab saum toj rau cov nyees khawm

Nws yog qhov zoo tshaj plaws rau kev sim 8mm qhov tab sis raws li lub thawv ntawm cov yas mos nws yooj yim rau laum thiab yuav tsum tsis txhob muab teeb meem

Kauj ruam 2: Soldering

Soldering
Soldering
Soldering
Soldering
Soldering
Soldering

Tin cov khoom sib txuas ntawm lub qhov hluav taws xob, ntxig rau hauv lub thawv thiab kaw lub txiv ntoo kom ruaj.

Muab cov nyees khawm tso rau hauv lub qhov thiab kub kua nplaum lossis epoxy lawv rau hauv qhov chaw. Kuv tau rub ib txhais ceg los ntawm txhua lub nyees khawm ua ke thiab muab sib dhos ua ke yog li peb tsuas xav tau ib qho 5 volt mov rau txhua 3 khawm.

Cov hlua LED muaj 2 lub xov hlau ntxiv uas peb tsis xav tau txuas rau txoj haujlwm no yog li peb tuaj yeem txiav lawv. Kuv tau txiav lawv ze rau sab saum toj ntawm qhov sib txawv me ntsis kom lawv tsis tuaj yeem luv. Khaws cov xov hlau no raws li peb tuaj yeem siv tau rov qab rau hauv lub thawv

Kuv kuj tau txiav qhov txuas tawm raws li peb yuav tau txuas ncaj qha mus rau cov xov hlau, Txiav kom ze rau qhov txuas raws li qhov ua tau.

Lub rooj tsavxwm tsab ntawv haum rau hauv lub thawv ntawv zoo heev yog li tsis xav tau kev txiav.

Solder IC lub qhov (socket) mus rau ntawm lub rooj tsavxwm qhov chaw nyob ze rau sab saum toj, qhov no tso cai rau peb muaj chaw seem ntau hauv qab rau lwm yam khoom siv thiab txuas mus rau txoj hlua LED.

Cov kab xaim hluav taws xob rau lub cev pins 5, 6 thiab 7 rau cov nyees khawm, txuas cov xov hlau mus rau qhov rub tawm tus tiv thaiv, uas nyob rau hauv lem yuav txuas rau hauv av

  • Pin 5 = Hom khawm
  • Pin 6 = Rho tawm khawm nrawm
  • Pin 7 = Speed plus button

Cov ntaub ntawv xaim rau LEDs txuas rau lub cev tus pin 3 yog li muab lwm lub xov hlau txuas thiab txuas rau lwm qhov kawg rau 300-500Ω resistor qhov chaw nyob ze rau hauv qab ntawm pawg thawj coj saib.

Peb tuaj yeem siv cov xov hlau peb txiav tawm txoj hlua LED ua peb lub xov tooj hluav taws xob tseem ceeb

  • Txuas Pin 8 ntawm IC qhov (socket), xaim rau cov nyees khawm thiab lub ntsiab LED hlua RED xaim rau 5V
  • Txuas tus Pin 4 ntawm IC qhov (socket), tag nrho 3 rub tawm tus tiv thaiv thiab lub ntsiab LED teeb liab xaim xaim rau hauv av

Solder lub 5v khawm hlau mus rau ib qho rau cov nyees khawm. Txuas txhua lub khawm kom raug Pin ntawm IC. Vam tias koj tuaj yeem pom hauv cov duab uas kuv tau yuav cov xov hlau uas txuas rau IC mus rau nruab nrab ntawm pawg thawj coj nrog tus tiv thaiv ntawm ib sab thiab khawm ntawm lwm qhov.

Kuv tau tso lub capacitor rau ntawm lub rooj tsavxwm tab sis nws yuav yooj yim dua txuas nws mus rau lub qhov rooj.

Thaum lub rooj tsavxwm ua tiav ntxig rau 3 lub xov hlau rau txoj hlua LED los ntawm lub qhov thiab cov laug rau ntawm lub rooj tsavxwm. Txuas cov xov hluav taws xob mus rau lub qhov (socket). Cov kab ntawv no muaj lub hauv paus tus pin (ib txwm V+) txuas nrog cov ceg luv dua tab sis nws ib txwm zoo tshaj los tshuaj xyuas ob zaug.

Ua ntej gluing txhua yam nyob rau hauv qhov chaw nws zoo tshaj plaws los xyuas txhua yam ua haujlwm raws li nws yooj yim tsis nco kev sib txuas.

Pom zoo: