Wiring the analog LED Strip is not so difficult compare to addressable LED Strip. To control an analog LED Strip using popular Microcontroller like Arduino you need to add a power transistor to the circuit if you are new to transistor visit this link. Transistor allows you to use small current that microcontroller provided by its own pin to control higher voltage current that other device required. As you can see the diagram below the LED strip required 12v from external power source. Ground should wired to common ground even the + voltage is different.
Required Component
- Arduino Microcontroller.
- Analog LED Strip
- 10 Resistor
- Power Transistor (EX: TIP12X)
- 12v 4A Regulator (if your using longer strip you need to calculate required current to get bright and exact current draw) See below the voltage drop calculator
- Solder Less Bread Board
- Jumper Wire / DuPont Wire
- Voltage Regulator (EX: L7805 Optional for Standalone)
- 1uf Capacitor (Required For the Regulator)
- 10uf Capacitor (Required For the Regulator)
Wiring Diagram
Source Code / Sketch Code
Blink Show
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
/* 14CORE Test Code for: LED STRIP SHOW DEMO .:+osysso++:` `+yhs/-` `-+s+` `:/+++++++++` .:/++ooo++/-` .ooooooooooo+: :///////////- `odh/` `:y+` /ddhsooooooo+ /hddhsooooydddh sdddoooooosdddy` `////////////` -hds` `sy. +ddy` .ddd: sddy.dddo +ddd- .-----------` `hds :sssss/ -ossssso-yy` `hdd: oddy `ddd/oddd:......+dddo .++++++++++++ +dd` :sdddh` :ydddddddo +y/ .ddd+........ `hddy:.....:yddy.hdddddddddddy+. ```````````` ydy .hddd/+hdddhydddh/.+yo /hdddddddddd. :shddddddddhs/`+ddd:````-yddy- :ooooooooooo+ odh` sdddooyyyyyhddddyy.sy+ ` `......... ``.... ....` ```...` ` `` `` ` -dd+`::::` .:::- /yy. -oos+:-oos+--oos+: /o `+y o/: o:+/ h:`yos /+-`/+/+ s:y/y. /dd/ `+yy: +//+ +/:+ +/:+ -. `/ -:o.:/:`//+- + +:- :`-+:`://: +`o`+. -yds. `/yys- .`-.. .``` ```` .`` ` ` ``` ``-..` ` :ydy/.`````.-/oyhs: `+++oo+oo+:.+-++/-/ooo+o +:o/oo///:+/ .:oyhhhhhhhso:` `. ``` */ int LEDSTRP1 = 9; int LEDSTRP2 = 10; int LEDSTRP3 = 11; void setup() { pinMode(LEDSTRP1, OUTPUT); pinMode(LEDSTRP2, OUTPUT); pinMode(LEDSTRP3, OUTPUT); } void loop(){ digitalWrite(LEDSTRP1, HIGH); delay(1000); digitalWrite(LEDSTRP1, LOW); delay(1000); digitalWrite(LEDSTRP2, HIGH); delay(1000); digitalWrite(LEDSTRP2, LOW); delay(1000); digitalWrite(LEDSTRP3, HIGH); delay(1000); digitalWrite(LEDSTRP1, LOW); delay(1000); digitalWrite(LEDSTRP1, HIGH); digitalWrite(LEDSTRP2, HIGH); digitalWrite(LEDSTRP3, HIGH); delay(1000); digitalWrite(LEDSTRP1, LOW); digitalWrite(LEDSTRP2, LOW); digitalWrite(LEDSTRP3, LOW); delay(1000); digitalWrite(LEDSTRP1, HIGH); digitalWrite(LEDSTRP2, HIGH); digitalWrite(LEDSTRP3, HIGH); delay(500); digitalWrite(LEDSTRP1, LOW); digitalWrite(LEDSTRP2, LOW); digitalWrite(LEDSTRP3, LOW); delay(500); digitalWrite(LEDSTRP1, HIGH); digitalWrite(LEDSTRP2, HIGH); digitalWrite(LEDSTRP3, HIGH); delay(500); digitalWrite(LEDSTRP1, LOW); digitalWrite(LEDSTRP2, LOW); digitalWrite(LEDSTRP3, LOW); delay(500); digitalWrite(LEDSTRP1, HIGH); digitalWrite(LEDSTRP2, HIGH); digitalWrite(LEDSTRP3, HIGH); delay(500); digitalWrite(LEDSTRP1, LOW); digitalWrite(LEDSTRP2, LOW); digitalWrite(LEDSTRP3, LOW); delay(1000); } |
Random Show
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
/* 14CORE Test Code for: LED STRIP SHOW DEMO .:+osysso++:` `+yhs/-` `-+s+` `:/+++++++++` .:/++ooo++/-` .ooooooooooo+: :///////////- `odh/` `:y+` /ddhsooooooo+ /hddhsooooydddh sdddoooooosdddy` `////////////` -hds` `sy. +ddy` .ddd: sddy.dddo +ddd- .-----------` `hds :sssss/ -ossssso-yy` `hdd: oddy `ddd/oddd:......+dddo .++++++++++++ +dd` :sdddh` :ydddddddo +y/ .ddd+........ `hddy:.....:yddy.hdddddddddddy+. ```````````` ydy .hddd/+hdddhydddh/.+yo /hdddddddddd. :shddddddddhs/`+ddd:````-yddy- :ooooooooooo+ odh` sdddooyyyyyhddddyy.sy+ ` `......... ``.... ....` ```...` ` `` `` ` -dd+`::::` .:::- /yy. -oos+:-oos+--oos+: /o `+y o/: o:+/ h:`yos /+-`/+/+ s:y/y. /dd/ `+yy: +//+ +/:+ +/:+ -. `/ -:o.:/:`//+- + +:- :`-+:`://: +`o`+. -yds. `/yys- .`-.. .``` ```` .`` ` ` ``` ``-..` ` :ydy/.`````.-/oyhs: `+++oo+oo+:.+-++/-/ooo+o +:o/oo///:+/ .:oyhhhhhhhso:` `. ``` */ int LEDSTRP1 = 9; // Channel 1 Led Strip int LEDSTRP2 = 10; // Channel 2 Led Strip int LEDSTRP3 = 11; // Channel 3 Led Strip void setup() { } void loop(){ analogWrite (LEDSTRP1, random(1024)); analogWrite (LEDSTRP2, random(1024)); analogWrite (LEDSTRP3, random(1024)); delay(1000); } |
Voltage Drop Calculator | Link
Wiring 3014/3020/2835/5050/ Analog LED Strip with MCU
Tack så mycket. koden testades.