I have a NeoPixel strip with 105 pixels...I'm testing the above circuit on my breadboard to power the strip before I get a PCB made for a much larger project (images attached are my schematic & pic of the breadboard w/ components).
Components pictured (left to right):
1N4001 - rectifier diode
100uF electrolytic capacitor
LM7805 - 5 Volt regulator
10uF capacitor
1000uF capacitor (as suggested in the NeoPixel Uberguide)
(Not pictured - the wire I have going from the NeoPixel data line into pin #6 on my Arduino Uno)
I'm using a 5V 3000mA DC power adapter -- But no matter what 5V adapter I use, the strip just starts going crazy flashing at random, random variations of colors. Even when using the Adafruit example sketches w/ Arduino (strandtest, simple)
This is the "simple" NeoPixel sketch...But the LEDs go crazy no matter what sketch I upload to the Uno
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1
#define PIN 6
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 105
// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
// Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest
// example for more information on possible values.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
int delayval = 500; // delay for half a second
void setup() {
// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket
#if defined (__AVR_ATtiny85__)
if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
// End of trinket special code
pixels.begin(); // This initializes the NeoPixel library.
}
void loop() {
// For a set of NeoPixels the first NeoPixel is 0, second is 1, all the way up to the count of pixels minus one.
for(int i=0;i<NUMPIXELS;i++){
// pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
pixels.setPixelColor(i, pixels.Color(0,150,0)); // Moderately bright green color.
pixels.show(); // This sends the updated pixel color to the hardware.
delay(delayval); // Delay for a period of time (in milliseconds).
}
}
You need a 100nF cap on the input of the regulator to GND (close to the terminals).
You need a minimum of ~8v on the left side of the breadboard.
You need a common GND to the strip and Arduino.
Thanks LarryD, the problem I was the lack of common GND & the input voltage.
Wawa - I'm using a 3000mA power adapter with variable voltage (i cranked the voltage up to 9.5) because I will eventually be upscaling this project to include 300+ LEDs. This is from the Adafruit NeoPixel guide:
Each individual NeoPixel draws up to 60 milliamps at maximum brightness...
To estimate power supply needs, multiply the number of pixels by 20, then divide the result by 1,000 for the “rule of thumb” power supply rating in Amps. Or use 60 (instead of 20) if you want to guarantee an absolute margin of safety for all situations. For example:
9.5volt - 0.7volt(the diode) - 5volt(regulator output) = 3.8volt across the regulator.
With 300 LEDs at full brightness (18Amp), 3.8*18= 68.4watt has to be dissipated in the regulator.
That's the size of a beefy computer CPU cooler with 12cm fan on full.
Apart from that, the 7805 regulator (with heatsink) and the diode can't handle more than ~1Amp (15 NeoPixels).
Forget about linear supplies.
You need a 5volt/20Amp switching supply for 300 NeoPixels.
Leo..
I've actually got all 105 NeoPixels running at full brightness now... Thanks for the advice, I'm sure if I lower the brightness to say 100 (or less) instead of 255 I could run a lot more of them. Full brightness at 255 is almost painfully bright anyway.
Adafruit sells a 5V 10A switching power supply that they recommend for running a "couple hundred NeoPixels or more"...
(From the NeoPixel guide)
Adafruit offers 5V DC power supplies up to 10 Amps. This is usually sufficient for a couple hundred NeoPixels or more.
Yes, that is a switching power supply.
Good for about 150+ NeoPixels at full brightness, and more if you reduce the brightness of one or more colours.
Leo..