NeoPixel strip with built-in LDO
Neopixels are interesting. They can be almost any colour that you require, are usually quite easy to configure, can require a fair bit of current if used in sufficient quantities, and can be quite fragile when soldering—not to even talk about resoldering them onto a different PCB. My biggest pain with these versatile little LED modules is that they seem to only operate on 5v DC.
This may be fine in many environments, but for my current project, using them as replacement lighting modules for the cabin lights of my car, that 5v requirement will mean a lot of additional wiring. So I decided to just use the 12 DC that is already conveniently present in the car, and add an LDO regulator to the strip – yeah, I know, this may be nothing new, and yes, I am aware of the current limitation issues of LDO regulators.
What is on the PCB?
Well, in this case, it is a quite straight-forward answer. 12 NeoPixels, a 5v LDO regulator, and some capacitors. The LDO regulator can provide a constant current output of 800mA and 12 Neopixels with a maximum current draw of 60mA each, will require 720mA, so everything seems to be ok in the current department. I am also never going to run them at maximum current either, as they will be way too bright!
Two 5-way header pins provide the standard Power, ground, data in and data out connections – note that I have still provided a 5v input, just in case I want to reuse these in another application, where 12v is not available…
Schematic
The 12 Neopixels are daisy-chained from pixel 1 to pixel 12, with a 100nf capacitor over the power rails of each pixel.
An AMS1117-5.0 LDO regulator provides voltage regulation down to the required 5v DC. This means that the maximum input voltage can be as high as 15v DC ( remember that most of this will be disposed of as heat by the regulator – I have provided an on-pcb heatsink, but recommend that the input voltage be limited to 12 DC at a maximum – to not over-drive the regulator )
The two 5-way headers provide connections for power, ground and signals. There are from pins 1 to 5:
VIN: 12v DC maximum down to 7.2 v DC
VCC: 5v DC only
DIN: Data In
DOUT: Data out
GND: Ground connection
Using the strip
The NeoPixel strip will work with all common NeoPixel libraries, including Adafruit NeoPixel. One word of caution though – NeoPixels are never truly switched off; even when not lit up, the chip inside the pixel still consumes about 1 mA of current. While this may not seem like a lot, it quickly adds up, and can potentially drain a battery-operated system completely in a few hours if you use a lot of them.
It is thus considered good practice to completely remove the input voltage from the pixel power pins when not in use. I am currently experimenting with a way of doing this via a Mosfet and transistor combination that will be controlled from the same microcontroller that drives the strip. Yes, you end up using another gpio pin, but you also potentially save a lot of power; in my book a good trade-off, since gpio pins on microcontrollers are plentiful these days, and we rarely use all of them anyway…
The circuit comprises a simple NPN transistor ( BJT type) that drives the gate of a P-MOS mosfet, acting as a switch, that, when switched on, provides power to the NeoPixel strip.
Manufacturing the PCB
The PCB for this project was sponsored by PCBWay .
Disclaimer:
Clicking on the PCBWay link will take you to the PCBWay website. It will enable you to get a $5.00 USD voucher towards your first PCB order. (Only if you sign up for a free account).
Assembly and Testing
This PCB’s assembly is straightforward and can be done without a stencil, using a very fine-tipped soldering iron, or, in my case, with a stencil and hotplate to reflow solder the components all at once.
Be careful never to heat a single pin on the NeoPixel chip for longer than about 2-to-3 seconds. The wires inside the chip are super super tiny, and the excessive heat can cause damage to them, leaving you with a pixel that does not work.
The stencil that I used for assembly