top of page
Ethan Jin

Flash the BeatBox Brain Module by Yourself With an Arduino Uno + Easy LED Modification!

The BeatBox's Brain Module controls the MIDI functionalities, and can be very easily reprogrammed if you have access to an Arduino Uno. You can use this to customize the MIDI outputs of the BeatBox, or use the extra pins available on the board to control additional components. In this article, we'll be going through how to update the brain module with Arduino, as well as adding an LED modification that's the same as in our Crystal Edition limited units.


It is a similar process for Mac and Windows users with just a few steps that are unique. Steps 1-3 are the same for both and go as follows:


STEP 1: Get your parts ready! For this you will need an Arduino Uno to act as an AVR programmer, 6x female to male jumper wires, 6x 2.54mm headers, a Windows or Mac computer, and the brain board. The brain board needs to be by itself and not have any other part attached to it, meaning you can’t do this while the board is still installed in the BeatBox. You should be able to use any AVR programmer for this task, in this case we are just focusing on repurposing an Arduino as an AVR programmer since you can use the Arduino for other fun projects later on.



STEP 3: Download Arduino 1.8.12 here: https://www.arduino.cc/en/Main/OldSoftwareReleases#previous Make sure you download the 1.8.12 version, this workaround isn’t going to work on the most recent 1.8.18. When you open the 1.8.12 version it will ask you if you want to upgrade to the newer version, DO NOT upgrade it. If you are already using 1.8.18, you will need to downgrade it to 1.8.12.


This is where the steps become different depending on your operating system.

Windows users: continue on to the steps below starting with step 4.

Mac users: scroll down to the "Mac" section to see your step 4 and following steps.


STEP 4: Download Teensyduino installer for Windows: https://www.pjrc.com/teensy/td_download.html


STEP 5: Install Arduino 1.8.12, and then install Teensyduino. It’ll ask you to install it to your Arduino install folder and you'll go ahead and allow it to.


STEP 6: Go to your Arduino install folder, and find the Teensy library. This is usually at Program Files (x86) -> Arduino -> hardware -> teensy -> avr.


STEP 7: Replace the “boards.txt” file with the file we provided in the google drive download. This will allow Arduino to use our brain board as a Teensy 2.0 ++. To do this you can copy the new file and paste it in to the folder with the original file. It will ask you if you want to replace the file and you will want to allow it to.


STEP 8: Now, go to cores -> usb_midi, and replace the “usb_private.h” file with the file we provided. You'll replace it the same way you did with the "boards.txt" above. This will change the device name back to Beatbox after flashing the board.


STEP 9: Open Arduino, and open the ArduinoISP example.


STEP 10: Connect the Arduino Uno to your computer using the included USB cable. Under “Tools”, make sure you have Arduino Uno as the board, and Arduino Uno as the port.


STEP 11: Click “upload” to upload the code. This will turn your Arduino Uno into an AVR programmer.


STEP 12: Now comes the fun part. Get the jumper wires, and connect the male ends to digital pins ~10,~11,12,13, 5v, and ground. There are 3 ground ports on the board labeled GND. You only have to plug into one of them. We have plugged it into the one next to 5v.


STEP 13: Connect the header pins to the bottom 6 empty pin holes on the brain board by putting in the longer side. Ideally this should be soldered down, but the header pins just by themselves seem to make enough contact for this to work.


STEP 14: Connect the cables to the pins as such, from left to right: Gnd, 13, 11, 12, 10, 5v. Notice that 11 and 12 are reversed on the brain board.


STEP 15: Open the supplied “midicodev2.2.ino” file with Arduino. This time, in “Tools”, select Teensy 2.0 ++ as your board, “MIDI” as USB Type, but use Arduino Uno as the port. Select “Arduino as ISP” as the Programmer. FOR MAC: When you open “midicodev2.2.ino” it will want to create a folder for it and go ahead and allow that.


STEP 16: Go to Sketch - Include Library - Manage Libraries, and add OneButton to your libraries.


STEP 17: Now, using Sketch -> Upload using Programmer, you should be able to upload the new firmware to your Brain Board. This can take over a minute, so be patient!

Once it is done uploading, you're good to go!


Mac


STEP 4: Download Teensyduino Macintosh OS Software on https://www.pjrc.com/teensy/td_download.html


STEP 5: We have to do a bit of hacking here since instead of being an add-on installer, Teensyduino on Mac OS is a bundled app that has Arduino 1.8.13 built-in, but we need the downgraded 1.8.12 version. Go to your Arduino 1.8.12 app (not Teensyduino), right click and open “Show Package Contents”, then go to Contents -> Java. With Teensyduino, do the same thing, open “Show Package Contents”, go to Contents -> Java. Replace the “Hardware” folder in Arduino with the “Hardware” folder in Teensyduino.


STEP 6: You can close Teensyduino now. Go to Arduino Contents -> Hardware -> Teensy

-> avr, and replace the “board.txt” file with the file we provided.


STEP 7: Now, go to cores -> usb_midi, and replace the “usb_private.h” file with the file we provided.


STEP 8: Those are all the steps that are different on a Mac! You can go back to step 9 on the Windows guide for the rest of the tutorial.



NOW. The fun part. If your BeatBox was purchased prior to April 1st, 2022, the firmware file we provided you is actually a bit different from the file that was shipped with your BeatBox at first. Let's walk through how to make an LED strip identical to the one we shipped in the Crystal Edition, and hook it up to the BeatBox!


midicodev2.3 includes a few lines of code that controls the LED strip. Let's go over those codes first.



Lines 78 to 93 are definitions for the LED strip settings. Note that on line 80, LED_COUNT defines the amount of individual LED bulbs that you are controlling, so change this if you plan on having more than 12 bulbs.


Lines 181 to 226 control the LED breathing effect. By default, this fills the LEDs with a random color, breathes to full brightness and back once, then chooses a different random color.


Lines 228 to 242 control the LED effect upon a button trigger. By default, half of the BeatBox button triggers will make the LEDs blink blue, and the other half will make the BeatBox blink yellow. You can play with these settings to achieve your ideal LED effect, but make sure you keep a copy of the original code file so you can always go back to it.


Now, let's talk about making the LED strip!


Soldering: Required


Estimate Total Time: 1 Hour


Materials:


- Strip of LEDs (min 12 LEDs) Amzn

I don’t know the exact model that I used but, in my experience, you could use either WS2812b or SK6812. Both use a 5V, GND, and data pin to control everything and are compatible with the library used.


- Wire

I had 2 rolls of 22 AWG wires laying around and they do the trick, but having 3 colors makes it a lot easier to distinguish.


- Solder

I mean, this one is kind of obvious.


Tools:

- Soldering Iron

- Wire Cutter/Stripper


Preface:

All fun things come with some levels of precaution. In this case, we will be dealing with electrical power. It is VERY IMPORTANT that you don’t mix up the 5v and GND pins. This will create a short and can damage your unit, laptop, and/or Arduino. I’m sure there is more legal jargon that I could say but to summarize, Rhythmo isn’t responsible for damages incurred in failing to properly follow the procedure. Now onto the fun stuff!


NOTE: Soldering releases dangerous fumes into the air. Please take the proper precautions before starting (i.e., having good ventilation, masks). Also please don't burn yourself.


You’ll want to cut the strip into sections of 4 (if you are wanting to do 12 LEDs but if you want to divert from the path, go off then I guess). These LED strips have white lines that allow you to cut off the LEDs at the solder pads so you can re attach them.



These LED strips need to be connected in one direction, so make sure you follow the direction of the white arrows printed on the strip. Solder 5v to 5v, DO to DIN, and GND to GND. By breaking up a whole strip of 12 LEDs into 3 separate strips, we are able to bend the strip around into a U shape, so 3 sides of the BeatBox will be illuminated at the same time.




Now, solder three longer wires to the beginning terminals of the strip, which should be on the top left of the image above, since this is where the current should start flowing. Solder the three longer wires to the BeatBox Brain Module's extra pins below:



Just to recap, the DIN wire should be connected to the top row of the extra pin holes, 9th hole from the left.


Install this LED strip into your BeatBox, and you should be able to have a unit that has the same breathing LED effects as our Crystal Edition units. In order to keep the tutorial concise, we didn't go very deep into editing the code, but the hardware's control code is pretty easy to understand since all the functionalities are sectioned out. We might go deeper into the specifics next time!




1,145 views0 comments

Recent Posts

See All

Commenti


bottom of page