element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Open LED Race how-to
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: cypresstwist
  • Date Created: 27 Dec 2019 9:09 PM Date Created
  • Views 6427 views
  • Likes 9 likes
  • Comments 20 comments
  • nano
  • led game
  • analog kit
  • arduino_tutorials
  • holidayspecial19ch
  • game
  • arduino_tutorial
  • electronic game
  • cars
Related
Recommended

Open LED Race how-to

cypresstwist
cypresstwist
27 Dec 2019

So I saw a video of Open LED Race in action and I liked it. Simple, enjoyable, cheap to make and something that would keep small kids entertained. I'm a Psychologist and some of my clients are less than 10 years old so in an effort to bond with them in the first meeting I needed something that would create the feeling of a mutual goal, engage them in conversation and allow me to study their determination and level of engagement in the game. Open LED Race is perfect for this.

 

How Open LED Race works is you use two (or four) analog controllers to "race" cars made out of LEDs. The LED strip is the track and you can arrange it in any shape you wish. You need some cables, an Arduino, a cheap speaker, three electronic components and a LED strip.

 

I bought these two big analog buttons since they looked like they could take repeated hits from the angry hands of small children. One red and one green as the two player version of the game has a red and a green player. I've soldered the positive and negative ends of a three meter long cable to their respective +/- places on the buttons and soldered the other end of the cables to an RCA plug.

 

image

I've got a cheap Arduino Nano from AliExpress (CH340) and an I/O expansion board to go with it.

image

You will also need a WS2812 or WS2813 LED strip that has 60 LEDs per meter and is 5 meters long. I've got this from AliExpress for $30.

image

Along with the buttons and RCA male jacks you'll also need a four RCA female jack group like the one in the image below. Just in case you want to upgrade the game to four players later.

image

And an 0.25W or 0.50W 8 ohm speaker for the sound effects.

image

You will also need one resistor (between 330Ω and 500Ω). I used a 475Ω one.

image

...and one 5V 1000µF capacitor like the big one in the picture below and another anywhere in the 5V 1-10µF range (the second one in the picture is a 4.7µF one and the third a 10µF one; either will do).

image

You will also need a standard power source for the Arduino.

image

 

Now using the schematic below try it out first with a breadboard:

image

(image courtesy of https://www.hackster.io/gbarbarov/open-led-race-a0331a )

 

Connect a Dupont wire to one end of the resistor and the other end to A0 on the Arduino Nano. Another wire goes to the other end of the resistor and the DI cable of the WS2813 LED strip.
Take the 4.7µF or 10µF capacitor and connect it with wires to the D3 pin of the Nano and the + (red wire) of the speaker. The other speaker wire (black) goes to Ground.
Look at the bottom row of the RCA female group and connect their two positive ends to D6 and D7 respectively on the Nano. Their negative wires shoud go to Ground.

One end of the 1000µF capacitor should go to 5V and the other to Ground.

Connect the 5V and GND wires of the WS2813 to 5V and GND respectively. The remaining BI wire of the WS2813 also goes to Ground on the Nano. The WS2812 has no BI line.

 

In the end you should have something that looks like this:

 

image

image

The Arduino code to be uploaded to the Nano is here. You will also need a file called Adafruit_Neopixel.h. Open two tabs in the Arduino IDE, paste the contents of the files there and upload them to your Nano. The Chinese-made CH340 uses the old bootloader method for uploading files so be sure to check that in Tools > Processor > ATMega328p (Old Bootloader).

image

 

After the code is flashed into the microcontroller you can unplug the USB cable, fit the Nano into the I/O expansion board and plug in the power source. You can check out the game and if all connections are well-made.

 

Take a small proto board and solder the components and RCA female group onto it.


image

One thing you have to take into account is that the two capacitors are as far away as possible from one another. In a previous build the game kept freezin after a race if the red player won and I could not figure out why. It turns out the capacitors influenced one another and I had to better spread the components on the proto board.


image

It would be advisable to position them even farther away from one another than shown in the image above.


The reason the proto board was cut so small is because I also wanted a case to house this, the I/O board with the Arduino Nano and the Speaker. I took three 6mm thick wooden planks and drew a case:


image

You can make your own design. This I made out of my head without much planning; just some measurements and simple math, then cut the pieces with a table saw.

image

Use wood glue to glue the pieces together and apply pressure on the joint.

image

I've glued small wooden cubes in the inner corners of the box for better stability and glue adherence but also because I wanted the boards a bit elevated.

image

I've used Dupont cables to make the connections between the boards and the speaker and glued the speaker on the inner side of what would be the "cover" of the box. Drew small holes in that door and enlarged some of them with a polishing stone mounted on an electric drill. I applied pressure on the holes with the rounded head of the polishing stone until the wood started to smoke and the imprint it left was black and glossy and with an inner curvature. You will need these holes for the speaker. Use a glue gun to secure the wires, speaker and components.

image

Sand down the case. You can paint it if you want to. Now take some small wooden cubes that have the same height as the ones you glued inside the corners of the box and place three of them under three corners of each of the two boards. Secure them with screws or glue them to the boards. The important thing is the boards should be elevated and at the same level.

 

The elevation is needed because you will want to drill holes where you can fit the RCA cables, for the USB jack and for the power jack. These should be on the back of the case and it's better to have them one centimeter above ground level so you can easily pull the cables out when you want to move the game box. One hole on each side of the box at about halfway to its top. You can cut the female jack of the WS2813 LED strip leaving about five centimeters of wire coming out of it, insert these wires through one gole, secure the jack with glue so that it points outwards then connect these wires to their respective Dupont wires to make a connection. You can now use the other end of the LED strip (the male one) to connect the 5 meter long WS2813 to this female socket. The other end of the LED strip you can just cram in a bit in the other hole. The LED "cars" tend to appear at the beginning of the strip once they've reached the end of it so if you connect the two ends to the case it would look like they pass through the case as a checkpoint.


Sand down the case a bit then use something to give it a coating. I've used clear epoxy resing since that's what I've had around the house. Took a piece of cloth and rubbed the entire case well, left it to dry, repeated the procedure a couple more times, sanded it a bit again for leveling then applied a final clear coating.

 

Using wood I've built simple button holders or "joysticks" - cases for the large buttons really.

image

I wanted them to be big so the kids would have to use both hand to play the game - one for holding the joystick and the other for slapping the big button. The more physical action the more adrenalin your body pumps and the more adrenalin the more alert you become. I needed them alert after a game or two so I could do Psychological Counselling or therapy with them - so they'd pay attention to our discussion and the questions I would ask.

 

I've painted the button cases with acrylic paint, let them dry and applied some epoxy resin coating so they'd look nice and shiny:

image

Open LED Race is simple: the faster you hit the button the faser your LED car goes. After five laps the first one in line wins and then the entire LED strip lights up in the color of that player so you'll know for sure who won that race. Then it starts all over again. You even have "slopes" defined by blue LEDs and you can elevate these parts of the strip or make a loop out of it in that spot because the cars will need speed to pass over these and will "slide back" if they reach these points and you're not pushing the button fast enough, making the player lose ground.

 

You can stop the game by pulling out the plug, otherwise it goes on forever, but you can easily mount an On/Off switch somewhere along the power line or on the box itself.


Here's a sample gameplay video I've made:


You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

  • If the game freezes check the distance between the capacitors first then if all the connections are properly soldered.
  • You only need to use one end of the LED strip to make the connections.
  • Check out the code before uploading as you can modify the speed of the cars, how many rounds a race has and a bunch of other things.
  • If you use two 5 meter LED strips you can have an even bigger track; you just need to modify the 300 in the code to 600.
  • Make an extender for the barrel jack of the power cord. Mine is about four meters in lenght and I can place the case and track in the middle of my office without having to have a power plug nearby.
  • You can use smaller analog buttons and play the game with your thumbs but you'll get tired pretty quickly this way.
  • You don't absolutely need an I/O extender for the Arduino Nano (although it helps a lot to have many ground and voltage pins to chose from) as you can power the Arduino using its USB data cable and a proper 5V power adapter for it.
  • If you have a 3D printer there are cases and button handles for Open LED Race ready to be printed.

 

Enjoy.

/Next day edit: It looks like the folks at Open LED Race awarded me a prize for this build. Cool. Will make another build out of it and donate it to and NGO dealing with autistic children.

 

image

 

/January 7th edit: gameplay with a friend in my office, on which occasion I've found out your chances of winning increase if you repeatedly hit the button with your forehead... image

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

  • Sign in to reply

Top Comments

  • jw0752
    jw0752 over 5 years ago +4
    Hi Razvan, I think you did a great job on this build and I am confident it will serve your intent to catch the attention of the children. A couple years ago one of my grandsons told me about a machine…
  • cypresstwist
    cypresstwist over 5 years ago in reply to jw0752 +4
    Hi John Thank you for your input. I've only heard about such treatments in Psychology. PTSD is rare ouside a clinical environment such as hospitals or specialized treatment centers and I myself never had…
  • jw0752
    jw0752 over 5 years ago in reply to cypresstwist +4
    I just read your profile and I immediately wanted to follow you, hence the follow request. Based on what you said in your profile you are just eccentric enough to fit in well here. A while back the whole…
  • cypresstwist
    cypresstwist over 5 years ago in reply to odroid

    You're very welcome. image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • odroid
    odroid over 5 years ago

    cypresstwist helped me to find the problem !!

    thank you very much for the help and patience my friend !!

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • cypresstwist
    cypresstwist over 5 years ago in reply to odroid

    My Twitter is @cypresstwist. Please send me the .fzz file you found.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • odroid
    odroid over 5 years ago in reply to cypresstwist

    I have a problem with the component board. which project follows?

    I downloaded the .fzz file from the hackster site but this is different from the PCB protoboard

    do you have twitter?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • cypresstwist
    cypresstwist over 5 years ago in reply to odroid

    My box it at my Psychologist's office. I have a client today there s I'll try to take pictures. But the bottom of the board is glued to the inner side of the case so I don't know if it would help you.

    image

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube