Cornhole LED Scoreboard Using an Arduino

by tmckay1.jackson in Circuits > Arduino

4180 Views, 10 Favorites, 0 Comments

Cornhole LED Scoreboard Using an Arduino

How To Make a Corn Hole Scoreboard: DIY Scoreboard | Arduino Projects

In this article we describe how we modified a cornhole board and added ws2811 leds to it to add a scoreboard to each one. We use an esp8266 to control the leds to draw the score, and we use 2 push buttons on each board to manually increase and decrease the score. To find out more details keep reading!

Supplies

1. esp8266 - https://amzn.to/3eShgVu

2. ws2811 leds - https://amzn.to/3hzwv7M

3. Push Buttons - https://amzn.to/33TcrF7

4. Micro USB (Power cord for the esp8266) - https://amzn.to/3uZmJ2o

Draw Out the Grid for the LEDs

p1.jpg
p3.jpg
p2.jpg
p4.jpg

The first thing we did was draw out the grid of LEDs that will show the score. Each board needs 30 leds (15 per number), and they are oriented with 5 rows and 3 columns. We aligned the numbers in the center of the board from the bottom of the hole to the bottom of the board vertically. Then we aligned the numbers horizontally as well. For a single number (15 leds) we separated each led by 2 inches and then separated the numbers from each other by 4 inches. Since we have 15 leds per number and 2 numbers per board we need a total of 60 ws2811 leds for the entire project.

Drill Out Holes on the Grid

p5.jpg
p6.jpg

After drawing out the grid, we start drilling out the holes from the top of the board. We got a little tear out here from the drill and so we went back with a sander to get rid of the splinters from each hole. The tear out was pretty bad in some locations and some of the veneer ripped up on one of the holes, so I'd recommend adding masking tape to the top so the tear out is not that bad. We also went on the back with the orbital sander to clean up some of the tear out on the back to prevent splinters. The holes were 1/2" in diameter.

Secure the LEDs in Place With Hot Glue

p7.jpg
p8.jpg
p9.jpg

Now that the board is sanded down, go ahead and add the LEDs from the back of the board. We did not poke the LEDs through all the way so that we could fill the gap with epoxy resin. We did this so that the bags would not get snagged on the board and the resin would diffuse the light a little bit. We used hot glue to secure the leds from the back. Since we are planning on filling the gap with resin, we made sure to add a LOT of hot glue so no resin leaked through.

Add the Epoxy Resin to the Holes of the LEDs

p13.jpg
p10.jpg
p11.jpg
p12.jpg

We filled the gap in the holes with table top epoxy resin. This was a simple 1:1 mix that we got from total boat and we needed about 2 pours to completely fill the hole. After the first pour we noticed some of the resin receded in the holes so the second pour made sure it was completely over the top of the hole. We used a syringe to make it easier to fill and reduce the spillage. Then we came back with the blow torch to pop some of the bubbles and make the resin flow better on the board.

Sand Down the Cured Epoxy Resin

p14.jpg
p15.jpg
p16.jpg

After the resin cured, we went back with a sander and grinded down everything flush with the veneer on the plywood top. We made sure to not grind away too much and sand through the veneer. We started with 50 grit, then 80, then 120, and finally 180. We really took our time here to ensure we did not puncture the veneer, it came out pretty good we are very happy with it.

Set Up the Circuit

p22.jpg
p17.jpg
p18.jpg
p19.jpg
p20.jpg
p21.jpg
circuit.png

Now for the circuit. We finished soldering the leds together so the data flows from the bottom of one number to the top of the next, and we made sure that the data flowed in the correct orientation since we were dealing with ws2811 leds (the direction is important). We added heat shrink to the soldered ends so we did not touch the exposed ends of the other wires and possibly introduce a short.

Aside from the leds, we wired up two push buttons with pull up resistors. The diagram shows a square red button and a round red button because we could not find a black round button in the diagram program. For our purposes we used two push buttons one round red and the other round black to control the score and they were wired in the same way as described in the diagram (the square red one is actually the black round one). It doesn't matter what kind of push button you use, but we just wanted to clarify the discrepancy in the photograph. We chose black to decrement the score and red to increment the score.

We secured the push buttons to the side of the board and drilled out holes about the same size as the button width. Then we used hot glue to secure them. The buttons simply have a power input from the esp8266, a ground output, and a digital output to the esp8266 with a pullup resistor so we can read the values. The esp8266 was secured with hot glue to the side of the board since we did not want the bean bags to potentially shock the microcontroller and either break it, or knock it loose. We then hot glued all the wires to the back of the board so they were not sticking out.

The entire thing is powered by a micro usb and we use the Vin pin from the esp8266 to supply the 5V to power the leds. We didn't add a resistor to the data pin of the leds, but if you are worried about heat, you could add a 220 Ohms or 330 Ohms resistor.

Refinish the Top of the Board

p23.jpg

Since we sanded everything down we had to refinish the board. This is always an enjoyable process. We already gave it a few coats of polyurethane before this so we did a light 320 grit sanding over everything, wiped off the dust, and refinished it with more polyurethane. This thing came out great.

Upload the Code and Enjoy

IMG_0109.JPG
IMG_0096.JPG
IMG_0104.JPG
IMG_0128.JPG

Github Repo: https://github.com/tmckay1/corn_hole_score/tree/ma...

Now all you need to do is upload the code to the esp8266 and power them with micro usb cables, and you are good to go! The code is pretty self explanatory based on the comments/naming I used, but I will call out a few things here:

  • Make sure you change the decrement pin (DEC_PIN) that the black push button is connected to the correct pin that you use to receive the digital input from. Same goes for the INC_PIN, and the data pin connected to the LEDs (LED_PIN)
  • It's worth calling out that we uploaded the code to each board with different colors (red and blue) so that we could clearly distinguish between the teams. I suggest doing that as well.
  • We keep the MAX_SCORE as 21 since we are doing cornhole, but you could change this to anything you'd like.