Introduction: Sparky Jr - RGB LED Controller

Picture of Sparky Jr - RGB LED Controller

What is it?
Sparky Jr is a programmable RGB LED mod companion light up activation controller for pushbuttons on gaming fightsticks.

How does it work?
Well, at the end of the day. The base code essentially allows you to customize your light up pattern, defining buttons and button combinations and mapping them to a specific color.

The default button combination setup (on a 8 button fightstick) is 1x, 2x, 3x, 4x per row, and then 4 cross row combinations. Support for both 6 and 8 buttons controllers is written in.

So what does the board look like?
a. ATMEL ATMEGA328PU 28pin MCU
This is the brains of the operation. Preloaded with the Sparky.pde sketch.

b. Button (Momentary Switch) Input Header
This is the input connection. This would be ideally connected to the signal lines of your arcade button switch

c. Common RGB LED Leg Connector
Regardless of wether your setup is common anode or cathode, your RGB LED will typically have 4 connection. One for       each color and one for the commmon leg (Anode or Cathode). Each common leg

d. Red Green Blue
Each RGB LED will have a connection for each of the three color. You can daisy chain all of your reds (or green, or  blues) with one wire per color. Similarily the spacing here allows for a 3 terminal 3.5mm screw terminal. Thus allowing your   configuration to screw down 6 or 8 individual wires for each corresponding color.

e. Common Anode Jumper
By default. The Sparky software is set to act as though you where installing common cathode RGB LEDs. Should this not suit your given application or power consumption and you wish to use common anode LEDs. Simply place the jumper on the 2 pin male header. The microcontroller will automatically detect the jumper and switch the output pins appropriately for a common anode application.

f. Reset
The 2 via holes provided here enable a wires remote reset. Should you wish to use a reset button or switch, simply solder on wire to each of the switches legs.

g. FTDI Header
On the six pin FTDI header, the recommended setup is to solder your VCC and GND headers to the appropriate pins (#4 and #5 respectively). The customization starts here. If you are creative or adventurous and decide to want to upload your own program to the ATMEG328 you can solder a 6 pin header and upload via FTDI. If you solder a 6 pin header to the FTDI connection, you will need to solder your VCC and GND input lines to the underside of the board.

h. 20pin breakout
this is for direct ribbon connect to the TEasy Strike PS3 mod.

Step 1: Show Me What Can Be Done?

Picture of Show Me What Can Be Done?
Some video examples of what Sparky Jr can do. Make sure to check out the showcase for some user submitted videos.






 

 

Step 2: The Configurator - Softcore Modding

Picture of The Configurator - Softcore Modding
Configurator Walkthrough
Simple steps to customizing your Sparky product




More about the Configurator

1. What do i need?
First and foremost, you will need to solder up some header pins to the FTDI header on the Sparky Jr. This is the 6 pin header on the PCB. 90° male headers will do. You can solder 6 wires to a 6 pin female header if you wish not to open your case every time.
Next up, we need something that can talk through the FTDI header you just soldered on. You will need an FTDI breakout board. Modern Device carries the USB-BUB, similarily SparkFun carries the FTDI Basic Breakout. Both are cost effective.

2. Download the Configurator
The Sparky Configurator is available in Windows and Mac OS X flavors. Download the one that suits you best.
Additionally, we encourage you to visit our downloads area and poke around our SVN

3. Running the Configurator
Plug in your FTDI breakout to the Sparky Jr. Run the Configurator. When the Configurator launches, you will first be presented with a list of COM ports available to the interface. Your typical FTDI COM port will have the letters TTY (on Mac) or COM (on Windows) in it. Click this one, if you see the kicks go red click GO! If not, click another port until you do.
The Sparky will reset and enter config mode. You will see your 3 primary kick button LEDs light up red, PRESS AND HOLD THEM DOWN. They will next turn yellow, then white. Once they turn off start using the schema selector and color selector in the Configurator.
As you select a button schema (example EX Punch or 2x Punch) and a color. You will see those buttons light up the color you just set them to. You do not have to confirm or save. The configurator saves on any change request.

4. When you are done.
Once you are happy with your with your light up color setup, simply close the application and unplug the FTDI breakout board.
Plug your fightstick USB cable into whichever device you wish (360, PS3, PC...), you will see the three primary kick light up red again. LEAVE THEM ALONE. the lights will go yellow, then green. Once you see your green lights turn off, you're good to go!

5.Enjoy!

Step 3: The Configurator - Hardcore Modding

Picture of The Configurator - Hardcore Modding
You here? You ready? Wanna do more cool stuff?

We recommend familiarity with coding. At minimum a basic understanding of Object Oriented Programming. If you know C++ or Java... ...your gold!


Arduino Environment

1.What do i need?
Visit the Arduino site and download the most recent Arduino IDE. You will need to get the appropriate one for your Operating System. Install it.
Check out a copy of the Arduino Files repository from our public SVN

2.Fire up the Arduino Software
Once the Arduino IDE start. Navigate using the Open function the Sparky.pde file from the Arduino Files folder you downloaded from the SVN. 4 Files will open. Sparky, SparkyClass.cpp, SparkyClass.h, SparkyConfig.h

3.The Sparky Files
Sparky.pde: There is no real reason for you to change anything in this file. It kinda does it's own thing.
SparkyClass.cpp: This is the meat and potatoes of the software. Familiarize yourself with the SoarkyClass constructor and members. Most everything you need to know about SparkyClass members are defined in comment blocks as appropriate.
SparkyClass.h: This is simply the Class definition file for SparkyClass.cpp, you won't need to edit it unless you are adding new methods or class members.
SparkyConfig.h: This is your first time run config definitions. It has the constance for all the primary colors. The most important line here is the last. This tells the core which version of Sparky Jr you are using. If you are using the standard Sparky Jr release, the constant MUST be set to SprkJr. If you got yourself a Sparky Jr PWM, set it to SprkJrPWM, this applies as well to those of you who have performed a wire conversion hack and have turned your Sparky Jr into a Sparky Jr PWM.

Processing Environment

1. What do i need?
Visit the Processing site and download the most recent Processing IDE. You will need to get the appropriate one for your Operating System. Install it.
Check out a copy of the Processing Files repository from our public SVN

2. Fire up the Processing Software
Once the Processing IDE start. Navigate using the Open function the Sparky.pde file from the Processing Files folder you downloaded from the SVN. Open Sparky.pde

3. Only 1 file?
Yep. That's it. The entire Configurator is only 1 coded file. It relies on several assets you can find in the images folder. There are 4 important methods in the Configurator over all others: com(), store(), retrieve(), send().
com(): lists out all the available serial / com port addresses and builds the COM port selector
store(): saves the current color slected for the appropriate button schema in both 16bit and hex numbers
retrieve(): returns a stored schema and color set
send(): writes out the string pattern on the selected COM port for the Sparky Jr to recieve.

Step 4: Firmware Modding

Picture of Firmware Modding

How to update that little chip that does oh so much?


Preperation

1. What do i need?
First and foremost, you will need to solder up some header pins to the FTDI header on the Sparky Jr. This is the 6 pin header on the PCB. 90° male headers will do. You can solder 6 wires to a 6 pin female header if you wish not to open your case every time.

Next up, we need something that can talk through the FTDI header you just soldered on. You will need an FTDI breakout board. Modern Device carries the USB-BUB , similarily SparkFun carries the FTDI Basic Breakout . Both are cost effective.
If you purchased a Sparky Jr PWM, the six pin male header is already there

2.The source code
Visit the Arduino site and download the most recent Arduino IDE. You will need to get the appropriate one for your Operating System. Install it.

Check out a copy of the Arduino Files repository from our public SVN

Arduino Environment

1. Fire up the Arduino Software
Once the Arduino IDE start. Navigate using the Open function the Sparky.pde file from the Arduino Files folder you downloaded from the SVN. 4 Files will open. Sparky, SparkyClass.cpp, SparkyClass.h, SparkyConfig.h

2. The Sparky Files
Sparky.pde: There is no real reason for you to change anything in this file. It kinda does it's own thing.
SparkyClass.cpp: This is the meat and potatoes of the software. Familiarize yourself with the SoarkyClass constructor and members. Most everything you need to know about SparkyClass members are defined in comment blocks as appropriate.
SparkyClass.h: This is simply the Class definition file for SparkyClass.cpp, you won't need to edit it unless you are adding new methods or class members.
SparkyConfig.h: This is your first time run config definitions. It has the constance for all the primary colors. The most important line here is the last. This tells the core which version of Sparky Jr you are using. If you are using the standard Sparky Jr release, the constant MUST be set to SprkJr. If you got yourself a Sparky Jr PWM, set it to SprkJrPWM, this applies as well to those of you who have performed a wire conversion hack and have turned your Sparky Jr into a Sparky Jr PWM.

3.Clear your EEPROM!
You will notice in the 'Arduino Files' folder a second folder named 'ClearEEPROM', open the ClearEEPROM.pde in the Arduino IDE first and upload it. This will clear the ATMEGA328's internal memory. This is a good thing.

4.Upload the new Sparky.pde
Open the Sparky.pde file (4 files will open, see step 3)
Make sure that your board version is set correctly (see step 3)
Upload your new code
Open the configurator and design away

Step 5: Go and Play

Picture of Go and Play
Here are a few installations from users with their Sparky Jr in action







Step 6: Thanks

Picture of Thanks

Thanks for reading through
Make sure to visit us and find out more

Sparky Jr - RGB LED Controller

Comments

68str86 (author)2011-06-07

i recently purchased this product
a+
easy install
easy configure
support thread i found on a video game thread
http://shoryuken.com/forum/threads/official-sparky-thread-sparky-jr-v2-mini-dark-or-lite.117272/

32teeth (author)68str862011-06-07

thanks for the comment
thanks for the support
i do remember your email thread

Jimmacle (author)2011-06-03

WOW! You'll definitely win the contest.

32teeth (author)2011-06-03

@RoboGeekDude12

Thanks for the comment. This project started over 2 years ago from a conceptual idea based on a "i am bored with a single color light up" and "i want to be able to change my colors on the fly"

you can see some of the early work in my flickr sets.

this is the original concept on a perfboard PCB using and arduino and 2 74hc595 shift registers
http://farm4.static.flickr.com/3064/4562490392_1132a16cc3.jpg

and here is the wiring nonsense on the backside
http://farm4.static.flickr.com/3461/4561819281_d608a203be.jpg

again,
thanks for the kind words, much appreciated

About This Instructable

6,470views

18favorites

License:

More by 32teeth:MoledculeSparky Jr - RGB LED Controller
Add instructable to: