Introduction: Arduino Based Stranger Things Lights

We are hosting a Halloween party and since Stranger Things is on everyone's minds this year, I thought I could make a cool, creepy decoration using an arduino and some programmable LEDs

Step 1: Materials List

Good news. No tools are required to build this instructable. You don't need to know how to solder or anything fancy.

All parts can be found on Amazon, or if you want things cheaper, you can do a little research on other sites. The parts list is:

Mokungit 100pcs WS2811 12mm LEDs

https://www.amazon.com/gp/product/B01DLVK3CE/ref=o...

DC Power Jack Adapters:

https://www.amazon.com/gp/product/B00XJ23U3A/ref=o...

5V/10A DC Power Supply

https://www.amazon.com/gp/product/B01HYXAG04/ref=o...

Arduino Uno

https://www.amazon.com/Arduino-Uno-R3-Microcontrol...

9V/1A DC Power Supply

https://www.amazon.com/ZJchao-Power-Adapter-Arduin...

Step 2: Simple Wiring

Everything is plug and play here. The only concern is what color your actual wires are. The wires I got were different colors than on the supplier's website. Once you piece together what is power, ground, and data, you're off and running.

Step 3: Get Your Creepy Font

I used Something Strange from Dafont: http://www.dafont.com/something-strange.font

You will want to print these out and attach them to the wall along with your LEDs to determine which LEDs match which letters. If you want to go smaller, you can assume one LED per letter and it makes your life a whole lot easier.

When writing down which LEDs match which letters on your wall, you will want to remember that the code treats the first LED as #0, so start counting at 0 instead of 1.

Step 4: Start Programming

I am new to programming, so I apologize upfront for my poor coding skills. Take what you can from what I've done and improve upon it!

The first step was to download FastLED: http://fastled.io/

FastLED is the library that helps run some of the features in the code.

Second, download my StrangerThings program and open it up and start reading through my comments.

My main concept was that I wanted my program to be random. I didn't want the program to cycle through a word every x minutes and have it lose the eerie effect. This is done through the randomseed and random function paired with a switch/case scenario. Then all you have to do is set up subroutines to run within each case.

Feel free to post questions and I'll do my best to answer. Since I'm not a programmer I'm not exactly sure what to share with everyone.

Step 5: Test and Add Features

The best way I found to test was to just run the subroutines one after another without the random variable and the cases to see if you like how each one looks. When you are happy with the rates of changes and the speed of letters showing up and disappearing, turn the random variable and cases back on and you're off to the races!

Comments

author
Fizx_Guy (author)2017-04-12

This project is great...so I'm trying to create my own version. Basically, I have a linear string of 37 LEDs with the intent to have a place for A-Z, a space, and 0-9 all represented. I've tried to modify several existing codes but to no avail. I'd love to be able to have it spell out different alphanumeric strings as well as run random lights, chases, flickering, etc; not to mention color variety. Any code help would be appreciated. Thanks!

author
CaseyWoodland made it! (author)2016-12-21

Our developers made one with arduino, here's how they did it:

http://www.woodlandmanufacturing.com/articles/news/how-to-make-a-stranger-things-alphabet-sign-with-lights-code/

all-lights.jpgarduino-together.jpgisolated.jpg
author
KFull1 (author)2016-12-18

I keep getting an error code saying:

In file included from C:\Users\Lorraine\Desktop\ST\FOZHJ9WIUDWFP1W\FOZHJ9WIUDWFP1W.ino:3:0:

C:\Users\Lorraine\Documents\Arduino\libraries\HashMap/HashMap.h:33:22: fatal error: WProgram.h: No such file or directory

#include <WProgram.h>

I've seen things online saying that I need to change wprogram.h to arduino.h, but I have no idea where to do that. Please help!

author
balbert3 (author)2016-12-09

I just did this project and here is my code, kinda mix of a few others...

https://gist.github.com/byrontn/04cbe55e95603babfc12befe72045290

author
egambo (author)balbert32016-12-11

I used your code and for some reason every time there is a space in my phrase, it finishes the word prior to the space just fine.....pauses....and then displays the last letter of the word before the space again and then continues on as it should... Any ideas?

author
egambo (author)egambo2016-12-11

#include <FastLED.h>

#include <HashMap.h>

#define DATA_PIN 6 //this is the data pin connected to the LED strip. If using WS2801 you also need a clock pin

#define NUM_LEDS 100 //change this for the number of LEDs in the strip

#define COLOR_ORDER RGB

CRGB leds[NUM_LEDS];

CRGB colors[5];

int myleds[25];

int last_letter = 0;

CRGB white = CRGB(255,255,255);

CRGB red = CRGB (255, 0, 0);

CRGB green = CRGB (0, 255, 0);

CRGB blue = CRGB(0, 0, 255);

CRGB off = CRGB(0, 0, 0);

const byte HASH_SIZE = 28;

HashType<char,int> hashRawArray[HASH_SIZE];

HashMap<char,int> charToLed = HashMap<char,int>( hashRawArray , HASH_SIZE );

void setup() {

FastLED.addLeds<WS2811, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS); //setting up the FastLED

randomSeed(analogRead(0)); //seeding my random numbers to make it more random.

myleds[0] = 4;//A

charToLed[0]('a',4);

myleds[1] = 7;//B

charToLed[1]('b',7);

myleds[2] = 10;//C

charToLed[2]('c',10);

myleds[3] = 12;//D

charToLed[3]('d',12);

myleds[4] = 15;//E

charToLed[4]('e',15);

myleds[5] = 18;//F

charToLed[5]('f',18);

myleds[6] = 22;//G

charToLed[6]('g',22);

myleds[7] = 24;//H

charToLed[7]('h',24);

myleds[8] = 63;//I

charToLed[8]('i',63);

myleds[9] = 59;//J

charToLed[9]('j',59);

myleds[10] = 55;//K

charToLed[10]('k',55);

myleds[11] = 53;//L

charToLed[11]('l',53);

myleds[12] = 50;//M

charToLed[12]('m',50);

myleds[13] = 49;//N

charToLed[13]('n',49);

myleds[14] = 45;//O

charToLed[14]('o',45);

myleds[15] = 42;//P

charToLed[15]('p',42);

myleds[16] = 38;//Q

charToLed[16]('q',38);

myleds[17] = 71;//R

charToLed[17]('r',71);

myleds[18] = 74;//S

charToLed[18]('s',74);

myleds[19] = 76;//T

charToLed[19]('t',76);

myleds[20] = 79;//U

charToLed[20]('u',79);

myleds[21] = 82;//V

charToLed[21]('v',82);

myleds[22] = 85;//W

charToLed[22]('w',85);

myleds[23] = 88;//X

charToLed[23]('x',88);

myleds[24] = 90;//Y

charToLed[24]('y',90);

charToLed[25]('z',94);

colors[0] = white;

colors[1] = red;

colors[2] = green;

colors[3] = blue;

colors[4] = off;

reset();

abcs();

}

void loop() {

//myrandomizer(60);

type("there is only zuul");

//myrandomizer(60);

type("merry christmas");

//myrandomizer(60);

type("i will get you");

//myrandomizer(60);

type("happy hanukkah");

//myrandomizer(60);

type("spank me");

//myrandomizer(60);

type("tis the season");

}

void myrandomizer(int timesec) {

reset();

int loops = timesec * 20;

for (int i = 0; i <= loops; i++) {

int id = random(0, 25);

int l = myleds[id];

leds[l] = randomColor();

FastLED.show();

delay(50);

}

reset();

}

void abcs() {

for (int i = 0; i < 25; i++) {

int t = myleds[i];

leds[t] = white;

FastLED.show();

delay(250);

}

delay(10);

}

CRGB randomColor() {

int t = random(4);

return colors[t];

}

void reset() {

for (int x = 0; x < NUM_LEDS; x++) {

leds[x] = off;

}

FastLED.show();

last_letter = 0;

}

void displayLetter(char letter) {

if(isWhitespace(letter)){

last_letter = 0;

delay(2000);

}

int lednum = charToLed.getValueOf(letter);

if(lednum >= 0 && lednum <= 99) {

if(last_letter == lednum){

delay(2000);

}

leds[lednum] = white;

FastLED.show();

last_letter = lednum;

delay(2000);

leds[lednum] = off;

FastLED.show();

}

}

void type(String message){

reset();

message.toLowerCase();

for(int i =0; i< message.length();i++){

displayLetter(message[i]);

}

reset();

}

author
balbert3 (author)egambo2016-12-11

Not sure it worked great for me, maybe try commenting out the toLower() line...

author
drfresh (author)2016-10-24

Hey bxl4662. This was an amazing idea and you did a great job! I took this a bit further, and added a Raspberry Pi into the picture. The Pi runs a web interface where users can send their own messages to the arduino (to do this I had to wrote some functions to be able to dynamically generate the messages from strings, but I used some of your cool CHRISTMAS, and LOWREDUP effects!).


I'm still not 100% complete with everthing, but here's a functioning demo:


And my code:https://github.com/dfresh613/strangerLights

For anyone looking to dynamically create messages from strings (not have to setup every LED for every message), use my displayMessage() function!

author
GregF15 (author)drfresh2016-10-27

Thanks both for all your work! My first time playing with Arduino, and got it to work.

drfresh, can you send me a shopping list for raspberry pi components so I can learn how to add your functionality into the project? Thanks!

author
drfresh (author)GregF152016-12-04

All you need is a basic raspberry pi. Preferably a model with built-in wifi so you can access the web interface from anywhere on your network.

author
Davinci2K1 (author)drfresh2016-12-03

@drfresh BRILLIANT. I am having all kinds of challenges getting Django ( and python ) running on my Pi. ( I am able to SSH in, and do most installs - but config kills me. Might just have to give in and learn how to use vim :-( Nano I can understand.

author
EmilyD70 (author)2016-10-19

Has anyone in Canada found an alternative to the LED strip used in this tutorial, since Amazon won't ship it here? :(

author
Davinci2K1 (author)EmilyD702016-12-03

I have purchased two strings of WS2811 LEDs from Amazon.ca
http://a.co/7jUoEHR (a Prime seller, too!)

I've got the Arduino part running perfectly for 100 ( 2 x 50 chained together)

But, have struggled with @dfreshes Raspberry Pi web interface ( installing Django on my Raspberry Pi has been very ... challenging.

author
RollyD1 (author)2016-12-02

ive done the project. now i was wondering is it possible to make the LED light or follow some music beats?

author
gilesw3 (author)2016-11-25

Hi there. I am struggling to get this to work and wondered if somebody could please assist me? I have the Arduino Uno connected to my laptop. I have the Fast_led library activated and the above coding added too. I can upload it to the UNO (TX and RX are flashing). The problem appears to be with my LEDs and the power. They are WS2811 with a white data cable, a red 5v wire and two blue grnd wires.

Whenever I connect my 5V charger the lights blink once then go out. I have connected the white wire to pin 6 and the second blue grnd to the uno. The red and blue wires are connected to the 5v power source.

Any help would be very gratefully received.

author
bxl4662 (author)gilesw32016-11-25

It sounds like the lights might be wired in reverse. Look at the little circuit board attached to each led. It has an arrow on it pointing in the direction it should be set up. For a quick test flip them around and re plug it all in and see what happens.

author
gilesw3 (author)bxl46622016-11-26

OK thanks for that. I've now reversed them and the same is happening. When I verify the code I get this message for Fast.LED

In file included from C:\Users\Giles Wallwork\Documents\Arduino\libraries\FastLED-3.1.3/bitswap.h:4:0,

from C:\Users\Giles Wallwork\Downloads\FOZHJ9WIUDWFP1W\FOZHJ9WIUDWFP1W.ino:1:

C:\Users\Giles Wallwork\Documents\Arduino\libraries\FastLED-3.1.3/FastLED.h:17:21: note: #pragma message: FastLED version 3.001.003

# pragma message "FastLED version 3.001.003"

^

Is this something that might be affecting it?

Thanks

author
gilesw3 (author)gilesw32016-11-27

Well that was odd. All the coding was right and the wires were all set out ok however I changed the output data pin from 6 to 7 and it sprang to life. Plus as I was using 50pcs WS2811 I simply went in and deleted all the lines of code pointing to LEDs above 50. Hey Presto it works a treat. Cool

author
nextjenn (author)2016-10-24

So I just dug out my Arduino to try this and I'm a bit rusty (and was never really good), so sorry if this is a dumb question. But I've uploaded the code and have my lights attached to the Arduino (and Arduino attached to my computer). How do I run the code? Should it just be doing something automatically?

author
bxl4662 (author)nextjenn2016-10-25

No worries! There are a few things I think you are missing. First, you have to make sure you download the FastLED library. You can download it from the website in my instructable. Once you download it you need to go into arudino and then to Sketch>Include Library>Manage Libraries and pick the folder that you just downloaded.

At that point you have the necessary library to run the program that I wrote. Next, you didn't mention power. Do you have a power supply for the LEDs? (Sorry if these are dumb things you've already done) If you aren't powering the LEDs from a separate supply, you can maybe power a few at a time from the arduino itself. However, if you try to power more than 6 or 7 at once, you are going to max out the arduino.

There might be a few other things that need worked through as well. Feel free to post additional questions here or send me a message!

author
nextjenn made it! (author)bxl46622016-10-25

Thank you for responding, bxl!

Here are a few more tidbits.
-It needs to be portable (no outlets where it will be hanging)

-So I'm using a 9v battery to power the Arduino.


-I'm trying to use a battery holder to power the LED lights. I think this may be where I'm having trouble. I was hoping to use a 4 AA Alkaline battery pack with a diode to power this. But now I'm wondering if this wouldn't work? (I've unconnected for now until I'm sure it won't burn out the LED)

Once I have the battery power connected to both the LED and the Arduino, it should start blinking, correct? I'm starting to think I just don't have the LED power source connected right and that is why nothing is happening?

14813306_10107895277362739_1703967796_o.jpg14274317_10107895277886689_1062442851_o.jpg
author
bxl4662 (author)nextjenn2016-10-26

Power isn't my best area, but let's work this out. You know the 9v is working fine powering your board, so for now I would just power it with your computer to save the battery.

Now you should have uploaded a program like the one in the image below (change the number of LEDs to match your string and the data pin to match whichever pin you are using). Once you have uploaded that to your arduino, the first LED should start blinking.

If nothing happens, try switching the LED number in the code from LED 0 to the LED closest to your 4x AA battery pack and re-uploading (probably LED 49 or 99). If that LED starts blinking, but you can't get LED 0 to blink, it sounds like there might be a voltage drop and there just isn't enough power/amperage from the battery pack? (electrical engineers, if I'm wrong, don't crucify me!)

blink.PNG
author
nextjenn (author)bxl46622016-10-26

So I tried this and it still didn't work (even when I switched to 49).

The a few lights (random throughout the string) blink when I first connect the power source for the LED, but nothing is happening beyond that.

author
nextjenn (author)nextjenn2016-10-26

Update: I think I may have been using the wrong processor! changed and trying again.

author
nextjenn (author)nextjenn2016-10-26

That was it! It works now! Thank you for your help!

author
gilesw3 (author)nextjenn2016-11-25

How did yours eventually work please as I am having similar problems.

author
bxl4662 (author)nextjenn2016-10-27

I'm not sure I did anything for you, haha. But I'm glad you figured it out!!

author
DustinS58 (author)nextjenn2016-10-27

processor? can you explain? i'm having the same issue.

author
RollyD1 (author)2016-11-21

Done was able to edit and made Merry Christmas now im figuring out how to add buzz sound =)

author
konahart made it! (author)2016-10-30

Thanks for this Instructable -- it really got me up and running for this project! I wrote some code for it that might be useful:

https://github.com/konahart/Stranger-Things-SparkC...

Mine was written for Spark Core, but could be adapted for Arduino.

Thanks again for posting this!

IMG_20161028_153523.jpg
author
RolandN10 (author)konahart2016-11-19

nice - thanks :)

author
bxl4662 (author)konahart2016-10-31

Great work! It is nice seeing other people tweaking the project to make it their own. Thanks for sharing!

author
RollyD1 (author)2016-10-29

Hello sir Bxl the link on your amazon LED lights only shows 50pcs but you are said we need 100pcs so i searched around amazon will this work?

https://www.amazon.com/Mokungit-100pcs-Diffused-Waterproof-Exposed/dp/B01DTUALBK/ref=sr_1_2?s=lawn-garden&ie=UTF8&qid=1477807897&sr=8-2&keywords=Mokungit%2B100pcs&th=1

author
bxl4662 (author)RollyD12016-10-30

Unfortunately, the link that you provided are not addressable. Essentially you would only be able to do the same thing to all of the LEDs at the same time (no spelling letters or Christmas lights).

Just so you know, I only used 100 due to the size of my wall. If you want to use smaller letters or have a smaller display, 50 lights would be plenty (you only truly need 26 or 36 if you want to have numbers too). The interesting thing is that in my purchase list, it shows that I bought the 100 LED option, but it looks like the company doesn't offer them any more. If you need all 100, I would just order two of the 50 LED strings that I posted on my instructions list. They literally snap together and then you combine the ground and power with the adapters I linked.


author
RollyD1 (author)bxl46622016-10-30

Thanks ill be ordering the 50 5v version =)

author
RollyD1 (author)RollyD12016-10-30

Oh Do we need both male and Female adapters? or just the female one? price has huge difference

author
bxl4662 (author)RollyD12016-10-31

I got the male/female so I could connect the two strings together. Since you are only getting one string you would just need a way to connect it to the power supply. I think that means you would only need a female connector for that end. I'm not exactly sure the best place to buy just one or two. I bought the pack so I could have extras for future projects.

author
RollyD1 (author)bxl46622016-11-15

Hello sir my order just came and everything is working.. can you teach me how to spell Merry Christmas? for display

author
bcupps made it! (author)2016-11-15

Thanks for a great tutorial. It was a hit at our Halloween party & sitting around my office for a week.

IMG_20161022_152852.jpg
author
robertbu made it! (author)2016-11-06

Thanks for the instructable. I made one for Halloween using a tri-fold foam display board. That way I can store it and get it out again next year. The lights go through one of several patterns for 5 or 10 seconds then dim and spell out one of a dozen words. I added a flickering lamp (controlled by the same arduino) that dimmed when the words when the words were being spelled out.

StrangerThingsLights.jpg
author
kazmatikk (author)2016-10-27

Hey Bxl, so i bought the LED's you suggested and all the onnections are in the place. Sorry for the absolute noob questions but this is my first time - The code got verified but there seems to be a problem uploading to the board . Have attached an image for reference of the error message shown.

Arduino error 2.pngArduino error.png
author
bxl4662 (author)kazmatikk2016-10-27

It looks like it is trying to send it to the wrong port. Go to tools>port, and then select the port that your arduino is plugged into (mine usually says arduino. If it doesn't say, you can try the available ports until it writes). While you are at it, go to tools>board and make sure it has the right board selected as well.

If that doesn't do it, then we'll have to do a little more digging.

author
kazmatikk (author)bxl46622016-10-27

Alright, got that sorted too. The program got uploaded to the board but the lights aren't turning on. Have exchanged the 2 cables between GRND and input no 3 as well but it still doesnt seem to light up. Right now i'm powering my Arduino through a USB cable to my computer and also have a 12v 1A adapter if required. I'm not powering the LEDs because it should have sufficient power from the arduino alone to atleast light up.

Also, If a program gets uploaded to the board do i have to keep the USB connection still connected or does the board work as a standalone ?

IMG_2983.JPGIMG_2984.JPG
author
bxl4662 (author)kazmatikk2016-10-28

Which LED's did you buy? Do you have a link to them? It looks like your LEDs only have two wires? There should be a power, ground, and data. Your code looks fine and if it is uploading and verifying, I don't think that's the problem. It looks like a hardware/wiring issue to me.

author
kazmatikk (author)kazmatikk2016-10-28

This is what my program looks like - changed the led input to 6 and no of leds to 50. The LEDs power on all together when i connect it to a power source. Also read nextjen's comments and checked for the first LED to start blinking but doesn't seem to work :|

ARduino software.png
author
KristenW31 (author)2016-10-26

How would I add more phrases? I figured I could just go in order and add another phrase and have it be CASE 6 but that didn't work. I assume its because in a note it says: I have 3 conditions that will give me the Christmas lights (z=6, z=7, z=8) while there is only one condition for all other subroutines.

author
bxl4662 (author)KristenW312016-10-27

The two images below should show you what you would have to do to add a new case/phrase. BTW, if you want to add a bunch of new phrases and cases, all you have to do is increase the random number at the bottom of the void loop code. Right now it goes from 0 to 9, but you can pick any number for that top number. The more numbers that don't match cases (in the example that I've attached, every number above 6), the more often default will be randomly selected and the more often you'll see the Christmas lights.

voidloop.PNGcase 6 example.PNG
author
bxl4662 (author)KristenW312016-10-26

You should have no issues adding cases exactly as you described. The reason the Christmas lights worked for case 6, 7, and 8 is that I set that to the default. What that means is that any time my random number generator doesn't equal a case condition it will revert to the default. In my code the only time that happens is when z equals 6, 7, or 8.

To add more words you will have to write a new subroutine having the program spell out a new word for you. Call out that new subroutine in case 6 and you should be up and running. To test it quickly, set z equal to 6 at the very top of the code and it should start with that subroutine.

I'm on my phone, so I can't post any code or anything. If you need more help, let me know.

author
gweemz (author)2016-10-26

When plugging in the leds to the 5V dc power, should they stay on? Mine blink quickly once then shut off. Trying to get this to work, but they will not light up at all.

author
bxl4662 (author)gweemz2016-10-26

No, they shouldn't light up at all until told to do so from the data line. You might want to check your wiring/orientation of everything.

About This Instructable

51,799views

165favorites

License:

Bio: I'm a mech engineer who likes to start tons of crazy projects and occasionally finish a few. I love to travel, but when I ... More »
More by bxl4662:Arduino Based Stranger Things Lights
Add instructable to: