BreakoutBros Halloween Day Special: Stranger Things Board Tutorial

Happy Halloween! Today we are in the Halloween spirit and will be going over a tutorial to make a Stranger Things “HELP ME” Board.


Parts you will need:

  1. Arduino or equivalent
  2. LEDs
  3. Cardboard or chipboard
  4. 9V Battery
  5. Wire
  6. Sharpie
  7. Electrical Tape

The Elegoo Uno R3 Complete Starter kit turned out great for this as it includes 4 different LED colors. Luckily I also had some other color LEDs lying around so I could add more variety to the project.


Schematic

stranger_things_schematic

In order to use less I/O pins we will be using a 5×5 matrix. This will cover letters A-Y. For Z it will have its own pin. From looking at the schematic above, you can see that in order to turn on one LED the row will turn high and the source will be set low. For example. To turn on A, PIN 2 will be set High and Pin 8 will be set low. This will only turn on A. Each combination of having one ROW  set as a high with the other ROWS being set to LOW and one column set as a low with the other columns set to HIGH will only tun on one LED at a time. This uses 10 pins + 1 to do all 26 letters. This utilizes a lot less I/O pins than having to have one I/O for each LED.

The next thing to decide is the Source Resistors(R1-R6). Since there are varying LEDs there will be varying voltage drops. Anywhere from 1.5V to 3.5V across the LED. Since this is supposed to look spooky, we don’t really care that some LEDs might seem brighter and others might seem dimmer. The only concern we have is to make sure we don’t exceed the 20mA that is the most the Arduino Pins can source. I ended up picking 250 Ohm resistors for this project. This gives us a range of (5V-1.5V)/250 Ohm to (5V-3.5V)/250Ohms, or 14mA – 6mA. This is OK because we will not exceed the 20mA max requirement for the I/O pins.


Step 1

Now that we have the circuit we will be using, the first step is to grab your chipboard or cardboard and layout the alphabet. Make sure to try this out on a piece of paper beforehand so you can get the correct spacing and size of the letters

letters-stranger_things_tutorial


Step 2

Next we will drill holes beneath the letters. Try to make these spaced so that the LED leads can easily be inserted into the holes.

stranger_things_drill


Step 3

Once you have drilled all the holes, it is time to insert all the LEDs. I chose to try and make the LEDs random. Insert them all the same polar direction so it’s easier to wire up. I inserted each LED with the LONG lead on the LEFT. This made wiring the LEDs very easy when looking at the schematic.

stranger_things_leds


Step 4

Now it is time to begin soldering. You will need to flip the board over onto its back. Make sure the LEDs don’t fall out when you do this. I did this by putting another piece of chip board on top of the LEDs when I flipping it to its back.

stranger_things_solder_start     stranger_things_solder_end


Step 5

Now go ahead and add in your Arduino, 9V battery and wire everything to the appropriate pins. Also use the electrical tape to make sure nothing shorts out. I placed mine on the leads of the LED and the back of the Arduino. I then used the electrical tape to secure the 9V battery and Arduino to the back of the board.

stranger_things_back_arduino      stranger_things_overall_back


Step 6 – Coding

Now we will begin to code. You can test out your circuit and wiring by setting using digitalWrite() and setting all ROWs low except for one ROW and then set all columns high except for one column and make sure the corresponding LED turns on for the combination.

Instead of using digitalWrite() we will go directly into the ATMEGA micro library to turn on and off the pins by setting PORTD and PORTB to the Digital I/O we want on and off. This will make the programming easier. PORTD controls Digital I/O pins 0-7 while PORTB controls pins 8-13. For example:if you want to turn pin 7 on and all other pins off you just set PORTD = 10000000.

To start we will create a structure that will define each letters PORT configuration.


1
2
3
4
5
typedef struct // Create a structure to convert Binary of the PORTs for the corresponding Letter
{
  byte portd;
  byte portb;
}letter_data_t;

The structure we will name letter_data_t. Next we will layout the table defining each letter as a port based on the 5×5 matrix we have wired up. This will be the letter[] array.


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const letter_data_t letter[] =
{
  {B00000100,B11111110}, //A
  {B00000100,B11111101}, //B
  {B00000100,B11111011}, //C
  {B00000100,B11110111}, //D
  {B00000100,B11101111}, //E
  {B00001000,B11111110}, //F
  {B00001000,B11111101}, //G
  {B00001000,B11111011}, //H
  {B00001000,B11110111}, //I
  {B00001000,B11101111}, //J
  {B00010000,B11111110}, //K
  {B00010000,B11111101}, //L
  {B00010000,B11111011}, //M
  {B00010000,B11110111}, //N
  {B00010000,B11101111}, //O
  {B00100000,B11111110}, //P
  {B00100000,B11111101}, //Q
  {B00100000,B11111011}, //R
  {B00100000,B11110111}, //S
  {B00100000,B11101111}, //T
  {B01000000,B11111110}, //U
  {B01000000,B11111101}, //V
  {B01000000,B11111011}, //W
  {B01000000,B11110111}, //X
  {B01000000,B11101111}, //Y
  {B10000000,B11111111}, //Z
  {B00000000,B00000000}  //26 = 0ff
};

Now the table has been established referencing the PIN output for each letter using the structure we created above.

Next we will go to the setup part of the code. Each pin needs to be set as an output


39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
void setup() {
  // Setup each pin used as an output 
  pinMode(2,OUTPUT);
  pinMode(3,OUTPUT);
  pinMode(4,OUTPUT);
  pinMode(5,OUTPUT);
  pinMode(6,OUTPUT);
  pinMode(7,OUTPUT);
  pinMode(8,OUTPUT);
  pinMode(9,OUTPUT);
  pinMode(10,OUTPUT);
  pinMode(11,OUTPUT);
  pinMode(12,OUTPUT);
 
}

Now that the code has been setup and our table created, we will setup some functions. The main function for this program is the runHelpme() function. This will have the board spell H-E-L-P M-E. Which is our attempt to show that someone in the “UPSIDE DOWN” might be trying to contact us.


65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
void runHelpme()
{
 
  PORTD = letter['h'-'a'].portd;
  PORTB = letter['h'-'a'].portb;
  delay(1000);
  PORTD = letter['e'-'a'].portd;
  PORTB = letter['e'-'a'].portb;
  delay(1000);
  PORTD = letter['l'-'a'].portd;
  PORTB = letter['l'-'a'].portb;
  delay(1000);
  PORTD = letter['p'-'a'].portd;
  PORTB = letter['p'-'a'].portb;
  delay(1000);
  PORTD = letter[26].portd;
  PORTB = letter[26].portb;
  delay(1000);
  PORTD = letter['m'-'a'].portd;
  PORTB = letter['m'-'a'].portb;
  delay(1000);
  PORTD = letter['e'-'a'].portd;
  PORTB = letter['e'-'a'].portb;
  delay(1000);
  PORTD = letter[26].portd; //Turn off the LEDs
  PORTB = letter[26].portb; //Turn off the LEDs
  delay(1000);
  }

This uses our structure we created and will subtract the letter we want minus ‘a’ , which is the first letter in the table. This will result by giving us our wanted “letter” number of the table we created. After setting the letter on, we delay for one second then turn on the next letter.

The next function we will write are some flair functions to make the board seem a little weird. The first flair function will be a runRandom() function which will pick random letters and turn them on for random amount of times.


94
95
96
97
98
99
100
101
102
103
104
105
void runRandom()
{
  for(int i = 0; i<=15; i++)
  {
    int x = random(0,25);
    PORTD = letter[x].portd;
    PORTB = letter[x].portb;
    delay(random(40,200));
    delay(random(40,200));
    delay(random(40,200));
  }
}

This will run for 15 random letters. We set x to a random number between 0-25 which chooses one of the 26 letters and then wait three random times between 40mS and 200 mS.

The last function we will write is a flickerRandom() function. This will flicker a random function. I think this definitely adds a nice touch that the board has something strange going on with it.


107
108
109
110
111
112
113
114
115
116
117
118
119
void flickerRandom()
{
  int x = random(0,25);
  for(int i = 0; i<=5; i++)
  {
    PORTD = letter[x].portd;
    PORTB = letter[x].portb;
    delay(random(40,500));
    PORTD = letter[26].portd;
    PORTB = letter[26].portb;
    delay(random(40,500));
  }
}

This will flicker 5 random letters anywhere between 40mS – 500mS of time for the flicker.

Now that all the functions are written, it’s time to put all the main loop code together.


55
56
57
58
59
60
61
62
63
void loop() {
  flickerRandom();
  delay(2000);
  runHelpme();
  delay(2000);
  flickerRandom();
  flickerRandom();
  runRandom();
}

This will first start with the flickering routine, delay for 2 seconds, display our “H-E-L-P M-E” routine , wait for 2 seconds, flicker again 2 times in a row then run the random routine. This all come together to show that the stranger things board definitely has some strange things going on with it and if you watch close enough someone can see that it is saying “HELP ME”. Obviously someone from the UPSIDE DOWN, is trying to contact us!

You can get the full BreakoutBros Stranger Things code here.

Make sure you subscribe to see more update on projects, tutorials, and reviews!

4 thoughts on “BreakoutBros Halloween Day Special: Stranger Things Board Tutorial

  1. Melii Mendoza says:

    Hi! I am doing the stranger things board project but im having problems with the schematic i never read an schematic before and i want to ask if anyone can help me pleaaase

    1. Josh says:

      Sure, what exactly are you having trouble with?

      1. Melii Mendoza says:

        with how to do the matrix, how to wire the leds! but in the image (not schematic) its not clear! :c

  2. Josh says:

    Ok it seems you are confused about which side of the LED needs to go to the pin and which side needs to go to the resistor.

    Check out the third picture on this page: https://startingelectronics.org/beginners/components/LED/

    As you can see the Notched side (short lead) is the Cathode. It’s negative and connected to the resistor and then pin 8-12. The round side (long lead) is the Annode, its positive and connected to the Arduino Pin 2-6.

    Once you know that it’s easy to connect (the long lead of) LEDs A-E to Pin 2. Then F-J to pin 3 and so on.

Leave a Reply

Your email address will not be published. Required fields are marked *