Intro: DIY Slim NeoPixel Strip With Spark Core
We needed some edge lightning for an edge-lit sign we are making for #HackBergen hackerspace.
To make the sign easier to make I would like the LEDs to be on a strip which is as slim as possible. NeoPixel strips+chips for sale appear to be 10mm or wider. However ws2812b 5050 chips are 5mm wide, allowing me to create a custom LED-strip covering the 4mm acrylic inlays avoiding excess.
I also wanted to have some control over placement as the letters on the sign are not all the same size and the spacing is not even. I could of course design & etch a PCB or have someone make one professionally, but it turns out it is fairly easy to make small DIY strips with perfboard.
From another member of HackBergen I got some rolls of the bare ws2812b chips. I already had perfboard, and wanted to connect them to the awesome SparkCore. The SparkCore has 3.3V logic and ws2812b´s need >3.7V. So I had to level up the output from the SparkCore for the ws2812b´s to function properly.
Step 1: What Is Needed
- Spark Core
- Perfboard made of the easily cut type (pertinax, brownish type. Glasfiber is hard to cut) - I prefer those with 3-hole pads for the LED strips and full line pattern for the tiny Spark Core shield, but what ever type you prefer will probably do.
- Wires with 3 different colors - I used FKUX 0,08 from Clas Ohlson nr 49.126-25 Wires
- Soldering iron, lead and de-soldering pump. I prefer the leaded type as it is much easier to get a nice connection. I do not do this for a living and do not even solder once a month, so I am not afraid of dying from lead poisoning, however soldering should always be done in a very well ventilated area or under a fume hood.
- ws2812b 5050 (4 pin type)
- Capacitors 0.1uF (100nF)
- Resistors (2 * 10K, 1 * 4.7K, 1 * 270 ohm)
- Bc547 or equivalent NPN small signal transistor
- Cheap socket type
- Olfa sharp knife (or something like it)
- Metal Ruler or something straight and solid to aid cutting perfboard
- Multimeter with continuity tester for checking for short-circuits
- Lupe or magnifying glass
- AdaFruit ws2812b NeoPixel datasheet
- Spark Core pinout
Step 2: Cut Perfboard
Use the very sharp knife to cut out a double strip of 3-hole pads from the perfboard as shown in the pictures.
It is easier to get a clean break if you cut on both sides of the board and you want some angle on the knife when you get in a little deeper to make a tiny groove.
Be careful not to cut yourself or the table.
When you have made a good cut into the board, as it is made of soft pertinax it should be fairly easy to break of the double strip when pressing it down onto a table.
Step 3: Add Pixels
In preparing the perfboard strip, use the soldering iron to apply solder to the 4 points you intend to mount the chip. This will aid the heat conductivity and allow the solder to flow underneath the chip while carefully heat the chip´s pins from the side. Be careful to find the triangular indentation mark on the corner of the chip. This indicates the chip´s orientation!
It is easier to wire the chips from left to right if they are upside down compared to the data sheet, as Data Out (DO) then is on the right side of the chip and can be connected to the next chip further to the right's Data In (DI) on the left side. The Fritzing drawing of the ws2812b in breadboard mode is upside-down, so that gives you some clue to what is easiest. As we need to connect everything with wires later, leave space to solder those in. The holes in the perfboard are wide enough to take two wires at once if you need to.
Later when the chips is mounted with the supply wires to the left, the first LED to the left will be #0.
Hold down the chip and perfboard strip with two fingers and warm the solder from the side. Do this on the first pin, just to make it stick, then straighten the chip and solder the next one. Alternate between the pin pair until the chip has dropped down as close to the board as it can. Repeat on the other side.
The trick is to hold pressure on the chip while warming the solder, until the chip lowers down onto the board. Use your fingernails to press and heat at the same time while avoiding burnt fingertips. Do not overdo it and melt the chip. A few moments on each pin should be enough, as the solder will flow and cover the tracks.
Practice makes perfect.. :)
Step 4: Add Capacitors
These chips work by a having a constant stream of data sent to them, so there are potential for a lot of noise on the power supply. People have found that we need capacitors on each ws2812bs power supply pins so they will be stable under operation and not reset themselves because of ripples from the power lines.
Add Noise Suppressing 0.1uF (100nF) capacitors somewhere between the chips connecting 5V and GND.
I used the 1206 SMD type, but if you have room on the backside for through hole types you can do that too. Then they could be polarized which mine was not and therefore a bit easier to mount.
Step 5: Add Wires to the Perfboard Backside
Now solder in the wires to connect all pixels and capacitors. Using different colored wires help keeping track of what goes where as this can easily be confusing.
Take your time and be sure to get the polarity right for the chips.
Step 6: Check for Shortcuts and Disconnected Pins
There are a lot of potential for shortcuts and disconnected pins here. You should test with the continuity tester if some tracks seem too close. If there is too much solder applied, such it off with a solder pump. A wick also works, but to me, the pump works best. It is amazing how little solder is actually needed and if you check and see a good connection there are no need to flood the traces with lead.
The ws2812b does not tolerate reverse voltage, so it will burn very quickly. There will not be a smoking show, it just will stop working and you'll be sad and have to solder in a new pixel. As the chips data line are connected in series like lights on a Christmas tree, all chips after the ruined one will also stop working even though the first one usually takes the overload hit. If that happens you will have to start with the first one and change them all till they all start glowing again. It is not a crisis, but can be tedious work.
Step 7: Make Tiny SparkCore Shield
To be able to unplug the SparkCore from the sign, I made a small perfboard card with sockets on. The voltage level transistor is also going to be mounted on this board.
The pins used on the SparkCore are header type and much thicker that normal chip pins. Because of this, I chose the cheap socked type with a spring for each pin. I did not have exactly the right size socket, so I just cut it until I had the right number of pins.
Step 8: Add Voltage Level Converter
Solder in the resistors first then wires. Check connections, then solder in the transistor.
2 * 10k ohm
1 * 4.7k ohm
1 * 270 ohm on the A7 pin to Spark Core for safety (not critical, 100 - 300 ohm will probably do)
BC547 or equivalent. I used the C33725 Transistor.
I also added a electrolytic capacitor with the value 100uF on the input powerlines, just for good measure.
I do not think transistor type matter much as this is only logic level signals. Just get a NPN transistor and get Collector, Basis and Emitter in the right order and you should be good.
Step 9: Test With SparkCore
I used A7 as the output pin and the NeoPixel example program for spark.io/build set for 10 pixels.
As an example, this can be used: VerkstedSkilt
Copy and paste into https://spark.io/build should work, but you probably have to add the NeoPixel library in addition so the linker will find it.
Upload program to the Spark Core and hopefully watch the strip glow.
Our youngest cat seems to think it is something to watch.. :)
zerblatt007 made it!