第1步:工具&零件
工具:
烙鐵(小鑿尖)
焊料
焊膏
熱槍
SMD鑷子
眼鏡。..。.. Lol
零件:
1x PCB心臟
1x 9V電池連接器
1x Digispark Arduino(具有拆卸所需的所有部件?。?/p>
或。..
1x Attiny85 SOT8
1x MC78M05BDTRKG(DPACK)或L78XX(SOT89)(5V穩壓器)
1x 100uf C3528 16V偏振電容(可選)
1x紅色0402 LED
2x 66.5Ohm 0402電阻器
1x二極管(SOD123)
1x 4.7uf 0805電容器
1x 0.1uf 0402電容器
18x SK6812 LED
18x 0.1uf 0603電容器
2x 1.5KOhm 0402電阻器
1x Micro USB SMD
第2步:放置它在一起!
我首先從小組件開始然后轉移到SK6812 LED。我使用的是焊膏并且非常適用,我的意思是非常小的焊膏滴到焊盤上;在焊接好所有東西之后,你會想要檢查每個墊子,以確保沒有任何墊子橋接,一切都是安全的!我用我的SMD鑷子將所有東西放在焊膏上然后我用我的熱風槍設置在大約220攝氏度。您將觀察到液體液化,并在約3-5秒內完成后變成閃亮的銀色。使用烙鐵來修復任何錯誤。
讓我們先從電容開始:
C1:0.1uf 0402
C2 :4.7uf 0805
C3-C22:0.1uf 0603
C23:100uf C3528極化!!
Diodes next:
D1-D2:Zener SOD-323
- D1和D2必須放在非常特定的方向!指示線應最靠近電路板底部!
D3:常規二極管SOD123
- D3的方向應使指示線最接近兩個5V中較小的一個 - 調節器。
電阻器:
R1-R2:66.5Ohm 0402
R3:1.5KOhm 0402
R4:300-500歐姆可選電阻?。?/p>
R5:1.5KOhm 0402
5V穩壓器:
焊接調節器,只需注意LED的電流消耗??!
微處理器:
將Attiny85扔在那里并將其焊接下來!
LED:
讓電路板冷卻,然后將所有LED放在電路板上。你需要花費很少的時間用LED上的熱風槍來防止它們被破壞。一旦你看到它繼續融化!
微型USB:
這是最后一次,因為它在背面,如果電路板,它很難焊接其他所有東西搖搖晃晃地說。一定要檢查橋接。
在背面,如果你想跳過所有其他的焊接廢話,我給你選擇將digispark Arduino板直接焊接到背面。此外,我有一個直接5V電源選項或7-30V選項,不要反轉極性!我忘了添加極性保護。..。..我的不好。
還!在標記w/out電阻和電阻跳線選項時我犯了一個小錯誤,如果你沒有使用電阻,你需要焊接電阻器選項,如果你碰巧使用了一個電阻器,你需要焊接w/輸出電阻器選項。
我認為這就是它。..我想我們將繼續編碼!
第3步:CODE
這些是我使用的三個代碼文件,因此您可以使用它們。要使用Rainbow代碼,您還需要下載Color_Definitions文件!彩虹文件會讓你的心臟像彩虹一樣點亮,顏色會在每個LED上移動,非常整潔。如果安裝了RGB-led,V-Heart_RGBW_4C將允許您測試RGBW led的所有4個功能。簡單文件是一個非?;镜拇a,用于測試指定顏色的所有LED。
您可以編寫自己的代碼或其他任何您喜歡的內容。只需確保不將亮度設置為225(MAX),因為每個LED消耗大約120mA的電流,因此。..數學。.. 2400mA是很多電流。您需要使用您需要的電流插入5V電源,或確保添加一個強大的5V穩壓器。
//RAINBOW CODE//
#include
#include “Color_Definitions.h”
#ifdef __AVR__
#include
#endif
// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1
#ifdef __AVR_ATtiny85__
#define NEO_PIN 0 // NeoPixel DATA
#undef LED_BUILTIN
#define LED_BUILTIN 1 // LED on Model A
#else
#define NEO_PIN 0 // NeoPixel DATA
#endif
#define NEO_PTYPE NEO_GRBW // | What type of NeoPixel strip is attached to the Arduino?
#define NUMPIXELS 20 // How many NeoPixels are attached to the Arduino?
#define BRIGHTNESS 15 // set max brightness
#define IWAIT 2000
#define SWAIT 20
#define LWAIT 50
#define HWAIT 1500
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUMPIXELS, NEO_PIN, NEO_PTYPE + NEO_KHZ800);
// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across
// pixel power leads, add 300 - 500 Ohm resistor on first pixel‘s data input
// NOTE: RGBW LEDs draw up to 80mA with all colors + white at full brightness!
void setup() {
#ifdef __AVR_ATtiny85__
// This is for Trinket 5V 16MHz
if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
// End of trinket special code
#endif
#ifdef LED_BUILTIN
// Turn the onboard LED off by making the voltage LOW
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, LOW);
#endif
strip.begin();
strip.setBrightness(BRIGHTNESS); // set brightness
strip.show(); // Initialize all pixels to ’off‘
#ifdef IWAIT
delay(IWAIT);
#endif
}
void loop() {
rainbowCycle(SWAIT);
}
// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint16_t wait) {
uint16_t i, j;
for(j=0; j《256*5; j++) { // 5 cycles of all colors on wheel
for(i=0; i《 strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
}
strip.show();
delay(100);
}
}
// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
WheelPos = 255 - WheelPos;
if(WheelPos 《 85) {
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
} else if(WheelPos 《 170) {
WheelPos -= 85;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
} else {
WheelPos -= 170;
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}
}
第4步:完成
恭喜!您現在擁有一件令人敬畏的藝術作品,您可以與親人分享!我希望你喜歡這個作品。
-
led
+關注
關注
242文章
23431瀏覽量
664594 -
pcb
+關注
關注
4332文章
23201瀏覽量
401051
發布評論請先 登錄
相關推薦
遠心鏡頭同軸和非同軸差異化

評論