The NEW Build Your Own Arcade Controls
Main => Project Announcements => Topic started by: philip88 on June 15, 2013, 02:00:00 pm
-
Hi,
please find attached the schematics / layout files / sourcecode in order to build your own LED-Wiz Clone named "LWCloneU2".
It is based on the microcontroller ATMega32U2 and fully compatible with the original LED-Wiz (tested with the Mala plugin and LED-Blinky Application).
With some modification it is also possible to create a composite USB device that includes keyboard / joystick controller etc.
Also included is a replica of the "ledwiz.dll" that should be fully compatible with the existing one (tested with the test app of LED-Blinky), but does not have some bugs that I discovered while testing it with my USB device.
A 64 bit version is provided, too.
More detailed information is given in the readme file.
-
What was your parts cost?
-
The uC (2,5 EUR) and the PCB for the breakout board (3,2 EUR) were the most expensive parts.
Then some more for the crystal, the connector and the other small parts like resistors etc.
In total I guess about 9 EUR.
Recently I ordered an Arduino Leonardo for 15 $ (still waiting for arrival) that uses a ATMega32u4 and should work with very little modifications to the firmware.
The teensy board should be fine, too.
-
Very cool. I have a few Minimus AVR 32 boards looking for a reason to exist, and now I think they've found it.
:applaud:
I'd be curious to see just how many LED's one could drive with the addition of something like a set of serial shift registers. With a bit more coding, the PWM could probably be maintained to a half decent level as well.
Thanks for this.
-
Interesting! I'll have to look further into this as pretty sure I'm gunna use up all the outputs on my current ledwiz......and I'm getting back into toying with electronics.
-
Do you think this could be combined with the KADE firmware to make a skee-ball controller/encoder?
Skeeball would use:
8 playfield switch inputs - 10, 20, 30, 40, 50, 100, 100, gutter
7 playfield "target" lights - all of the above, except for gutter
3 admin buttons - up, down, select
I think that leaves 2 pins (on the Minimus AVR) for lighting the admin buttons, etc.
If you need to free up 4 or 5 more pins, you could use HWB for "shifted" inputs. :dunno
Scott
-
This is pretty cool! How are you licensing the source code?
-
Do you think this could be combined with the KADE firmware to make a skee-ball controller/encoder?
I don't see a stopper to add this to the KADE framework. At least as a selectable firmware it should be easy.
For my own cabinet, I made a composite device (2 Joysticks, 1 Keyboard, 1 Media Device, 1 LED-Wiz), based on the sources of the "AVR Atmega V-USB Mame Arcade Panel Controller" and the LWCloneU2 and run into problems with the original 'ledwiz.dll' and therefor created my own 'ledwiz.dll'. I don't know in detail about the KADE encoder(s) and how to combine it with LWCloneU2 but I think it should be possible to create a "skee-ball controller/encoder".
How are you licensing the source code?
All sourcecode and provided schematics that is created by me (*) is free, i.e. anyone can use it for whatever purpose.
The uC firmware is based on the LUFA framework, that states on the homepage:
"LUFA is free to use - even for commerical purposes, subject to the MIT license restrictions (see project documentation)"
(*) some sourcecode is derived work and so not fully covered by my *free* copyright.
In the provided *.zip file, this applies to the folowing files:
\win32\driver\include\ledwiz.h (this is a modified version of the interface header from the official LED-Wiz SDK)
\firmware\* (all files in this folder are based on an example of the LUFA framework concerning the USB stuff. The LED control is from me)
-
Hi philip88, did you have any luck porting your code to the arduino?
-
I haven't gone through the code yet but am curious, how does this interface to something like LEDBlinky? Can I modify this to use a higher pin count, like my ATXMEGA128 or the AT32UC3[121 I/O] MCs , without changing the USB interface much?
I am thinking about one device for all the lighting in my 4 player panel.
-
I agree with you.
-
Please find below the firmware update for the Arduino Leonardo.
In the default configuration it allows to use all available pins for driving LEDs or Bulbs, i.e. 20 general purpose pins + 2 TX/RX pins + 3 prog pins.
On my sample "shield" I only use 8 pins conntected to transistors for driving 12V/100mA bulbs.
Since the device is compatible to the LED-WIZ on the USB protocol level, it works with LEDblinky.
And because of this there is a limit of 32 pins per device.
-
Well crap. Guess that rules out one LED board for a 4 man RGB lighting rig. I may still use the usb interface/data packing scheme to make my own. Still looking into the LUFA USB stuff. Looks like I'll hit the hard cap on USB data width unless I change how the lighting codes are packed into the bytes being sent.
I will report if I figure any of this out.
-
Hi, first of all big THX for sharing your Project Code and Files really appreciate this.
Iīm very new to the microcontroller area and own an arduino Mega2560 with a ATMega16u2 and Mega2560 Chips sitting on it.
Do you think your code is easy extendable for interacting between the the 16u2 and the mega2560 Chip for me as an beginner :)
A friend of mine (with some knowledge in TCL and Linux Scripting) helped me out with compiling your code with some little changes for the 16u2 instead of the 32u4 you are using and that worked great.
Now i hope there is a way to get the outputīs working by interacting of the two chips.
Would be great if you or someone else could help and give me a hint how to realize that.
I think this could be interesting for some other Arduino users as well as there are more Arduino or compatible Boards out that have 2 Microcontrollers sittin on it e.g. the Arduino Uno with an 16u2 and an mega328.
If it will be not possible to realize then i have to look for an leonardo ;)
thx for your help
-
Hi michsebins,
> Do you think your code is easy extendable for interacting between the the 16u2 and the mega2560 Chip for me as an beginner
I think it is easy extendable but it might be a bigger task to get it to work since you have to write *two* programs (with potential bugs) that do communicate with each other.
Anyway, there is a place in the code where 8 bytes are received from the PC via USB and then some action is triggered depending on the data.
Here I would add two "sync" bytes (with some fixed 'magic' value) and transmit the 10 bytes over the serial connection to the Mega2560. There you receive the data, skip the bytes until the sync bytes match and then process the 8 bytes in the same way as it was done before.
Uploading the firmwares to both chips might be a bit complicated since you first need the original Arduino firmware for the Mega16u2 in order to program the Mega2560 and then reprogram the Mega16u2 with the LedWiz firmware.
-
thx for your quick answer and tips.
I will try to get deeper into the whole thing and find out if i can handle this challenge. As i said iīm very new to the arduino or microcontroller side so i have to learn a lot and for now itīs a step to high for me.
The other thing is that english is not my native language and a lot of guides and tutorials are hard to understand for me. But hey itīs all new for me and i have fun in trying to learn that so everything is great ^^
The firmware uploadīs seem to be no problem as i tried something like "Arduino-Big-Joy" which also needs to first program the 2560 and the flash the 16u2. And when you want to change code on the 2560 you have to flash the orig firmware first but that worked.
Anyway great project that youīve done and iīm considering to buy a leonardo or derivate so i can easily use your code and study the stuff more and perhaps somewhen in the future i can port it to the mega.
One last question from here when you use your code on the leonardo can you only use the 7 analog outputs for pwm signals to receive (e.g. for RGB LEDs) or is there something like softPWM in there that let you use RGB Leds also on digital outputs (sorry that i have to ask but i tried to find out myself but canīt figure it out yet)
thx again for all
-
One last question from here when you use your code on the leonardo can you only use the 7 analog outputs for pwm signals to receive (e.g. for RGB LEDs) or is there something like softPWM in there
Yes it uses a quick and dirty software PWM implementation for all available pins (like the second approach, given here: http://www.mikrocontroller.net/articles/Soft-PWM (http://www.mikrocontroller.net/articles/Soft-PWM)).