Quick Digital LED Jack-o-lantern Light
1918 Views, 14 Favorites, 0 Comments
Quick Digital LED Jack-o-lantern Light
There are many great Arduino + LED Pumpkin projects. This one is designed to be very easy to make and can be a great starting point for other projects. Only three soldering connections and a very short program!
This one features a basic Arduino Uno since they are widely available and easy to program. The LEDs are digital RGB ones so you can make any color and animation you want. For this project I show a flame effect.
Parts
This project has very few parts:
- Arduino Uno - there are official ones and lower cost clones. AliExpress has clones under $3 if you can wait for shipping.
- LEDs - WS2812b or "Neopixels". The 8 LED strips are very easy to solder to. Adafruit has them too.
- Battery connector - a 9v connector with a 2.1 X 5.5mm DC Plug
- 9v Battery
- Wires - 3 short lengths (~3") of 22 or 20 gauge wire. If you have colored wires like these, then red, black, and some other color for the data line are all you need.
Construction
This project is very easy to build. For the three wires, strip a very small amount (1/8") off of one end, and a bit more on the other end (1/4"). Tin the short ends, and tin the +5, Data In, and Gnd on the LED strip. Then solder the wires to the strip, with red for +5, black for ground, and the other color for data In.
The +5 and ground wires go in the Arduino header marked as +5 and Gnd - there are two Gnd pins, so I usually use the one that is further from the +5 to avoid shorts. The Data In wire is connected to digital pin 6 on the other side of the board.
That's It!
The attached program simulates a flickering flame, but you can use any animation you want. The Neopixel library from Adafruit has a few test programs you can get started with.
/***************************************************************************** * * flame animation for neopioxels (WS2812b) connected to pin 6 * for pumpkin / jack-o-lanterns * 10/18/2015 Carl F. Sutter * * Thanks to José Daniel Herrera Gomariz http://arduino-guay.blogspot.com.es * *******************************************************************************/ #include <Adafruit_NeoPixel.h> #define PIN 6 #define NUMPIXELS 8 // Parameter 1 = number of pixels in strip // Parameter 2 = Arduino pin number (most are valid) // Parameter 3 = pixel type flags, add together as needed: // NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) // NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) // NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products) // NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); void setup() { strip.begin(); strip.show(); // Initialize all pixels to 'off' randomSeed(analogRead(0)); } // setup void loop() { byte brightness = random(100,255); uint32_t color = strip.Color(255, random(50,80), 0); uint16_t i; for(i=0; i<strip.numPixels(); i++) { strip.setPixelColor(i, color); } strip.setBrightness(brightness); strip.show(); delay(random(20,300)); } // loop.