Jump to content



Photo
* * * * * 3 votes

LEDWIZ Clone on Arduino MEGA 2560 Rev.3


  • Please log in to reply
39 replies to this topic

#1 cyclemat

cyclemat

    Hobbyist

  • Members
  • PipPip
  • 23 posts

  • Flag: Germany

  • Favorite Pinball: Terminator

  • PS3 Gamer Tag: cyclemat
  • 360 Gamer Tag: cyclemat

Posted 27 November 2013 - 10:38 PM

Here comes the LWClone on Arduino MEGA 2560

 

Its Beta its run.

 

 

 

 

its Emulate a Ledwiz with the ID 1 - 16 changeable with a tool on the fly

 

Easy to use you need a Arduino Mega 2560 with 16u2 ore 8u2 chip as Serial Converter ( a Arduino UNO Hex is in the Package but not tested )

 

Look what Arduino Comport is ( Hardware Manager ) 

 

Extract the File to C:\

 

run the bat

 

enter your Arduino Comport (com1 or com2)

 

wait

 

when finished you must bring you arduino into DFU mode and flash the 16u2 file to your arduino

 

http://aphes.com/har...-into-dfu-mode/

 

Whe you didn`t can bring your Arduino into DFU mode you have an cheap China Clone an must reflash the bootloader over ICSP

 

Ready to rumble

 

you need a driver pcb to use it with Solenoids or else, shakers via H Bridge can drive directly

 

UPDATE 30.11.2013

Config tool to set the ID

 

 

Download

 

https://www.dropbox....0.2014.rar?dl=0

 

 

who wants to support the project may send a small donation via paypal

 

[email protected]

 

 

Update 05.12.13

 

Added Keyboard support on the git 

please test it and give feedback 

 

https://github.com/cithraidt/lwcloneu2/tree/master/firmware

 

Update 07.12.2013

Added Drivershield samples to the File

 

34pgzd0.png

UPDATE 18.12.2013

 

The PIN Edition is here

on Digial pin 2 -> 13 you find the keys " A, S, D, ESC, SHIFT L, SHIFT R, CTRL-L, CTRL-R , 1, 5

 

The LEDwiz pins on 22-52

 

Delet

 

 

Update 14.09.2014

 

 

old

 

 

Pinmap

#define LED_MAPPING_TABLE(_map_) \
	\
	_map_( A, 0, 0 ) /* ( AD0 )               Digital pin 22 */ \
	_map_( A, 2, 0 ) /* ( AD2 )               Digital pin 24 */ \
	_map_( A, 4, 0 ) /* ( AD4 )               Digital pin 26 */ \
	_map_( A, 6, 0 ) /* ( AD6 )               Digital pin 28 */ \
	_map_( C, 7, 0 ) /* ( A15 )               Digital pin 30 */ \
	_map_( C, 5, 0 ) /* ( A13 )               Digital pin 32 */ \
	_map_( C, 3, 0 ) /* ( A11 )               Digital pin 34 */ \
	_map_( C, 1, 0 ) /* ( A9 )                Digital pin 36 */ \
	_map_( D, 7, 0 ) /* ( T0 )                Digital pin 38 */ \
	_map_( G, 1, 0 ) /* ( RD )                Digital pin 40 */ \
	_map_( L, 7, 0 ) /*                       Digital pin 42 */ \
	_map_( L, 5, 0 ) /* ( OC5C )              Digital pin 44 (PWM) */ \
	_map_( L, 3, 0 ) /* ( OC5A )              Digital pin 46 (PWM) */ \
	_map_( L, 1, 0 ) /* ( ICP5 )              Digital pin 48 */ \
	_map_( B, 3, 0 ) /* ( MISO/PCINT3 )       Digital pin 50 (MISO) */ \
	_map_( B, 1, 0 ) /* ( SCK/PCINT1 )        Digital pin 52 (SCK) */ \
	_map_( A, 1, 0 ) /* ( AD1 )               Digital pin 23 */ \
	_map_( A, 3, 0 ) /* ( AD3 )               Digital pin 25 */ \
	_map_( A, 5, 0 ) /* ( AD5 )               Digital pin 27 */ \
	_map_( A, 7, 0 ) /* ( AD7 )               Digital pin 29 */ \
	_map_( C, 6, 0 ) /* ( A14 )               Digital pin 31 */ \
	_map_( C, 4, 0 ) /* ( A12 )               Digital pin 33 */ \
	_map_( C, 2, 0 ) /* ( A10 )               Digital pin 35 */ \
	_map_( C, 0, 0 ) /* ( A8 )                Digital pin 37 */ \
	_map_( G, 2, 0 ) /* ( ALE )               Digital pin 39 */ \
	_map_( G, 0, 0 ) /* ( WR )                Digital pin 41 */ \
	_map_( L, 6, 0 ) /*                       Digital pin 43 */ \
	_map_( L, 4, 0 ) /* ( OC5B )              Digital pin 45 (PWM) */ \
	_map_( L, 2, 0 ) /* ( T5 )                Digital pin 47 */ \
	_map_( L, 0, 0 ) /* ( ICP4 )              Digital pin 49 */ \
	_map_( B, 2, 0 ) /* ( MOSI/PCINT2 )       Digital pin 51 (MOSI) */ \
	_map_( B, 0, 0 ) /* ( SS/PCINT0 )         Digital pin 53 (SS) */ \
	\
	/* end */

#if (USE_MOUSE)
#define MOUSE_X_CLK_INDEX    9
#define MOUSE_X_DIR_INDEX   10
#define MOUSE_Y_CLK_INDEX   11
#define MOUSE_Y_DIR_INDEX   12
#endif

#define SHIFT_SWITCH_INDEX   13

#define PANEL_MAPPING_TABLE(_map_) \
	\
	_map_( E, 4,    MOD_LeftShift,   0                 ) /* ( OC3B/INT4 )         Digital pin 2 (PWM) */ \
	_map_( E, 5,    MOD_RightShift,  0                 ) /* ( OC3C/INT5 )         Digital pin 3 (PWM) */ \
	_map_( G, 5,    MOD_LeftControl, 0                 ) /* ( OC0B )              Digital pin 4 (PWM) */ \
	_map_( E, 3,    MOD_RightControl,0                 ) /* ( OC3A/AIN1 )         Digital pin 5 (PWM) */ \
	_map_( H, 3,    KEY_Esc,         0                 ) /* ( OC4A )              Digital pin 6 (PWM) */ \
	_map_( H, 4,    KEY_Enter,       0                 ) /* ( OC4B )              Digital pin 7 (PWM) */ \
	_map_( H, 5,    KEY_1,           KEY_P             ) /* ( OC4C )              Digital pin 8 (PWM) */ \
	_map_( H, 6,    KEY_5,           KEY_5             ) /* ( OC2B )              Digital pin 9 (PWM) */ \
	_map_( B, 4,    KEY_2,           KEY_A             ) /* ( OC2A/PCINT4 )       Digital pin 10 (PWM) */ \
	_map_( B, 5,    KEY_3,           KEY_S             ) /* ( OC1A/PCINT5 )       Digital pin 11 (PWM) */ \
	_map_( B, 6,    KEY_4,           KEY_D             ) /* ( OC1B/PCINT6 )       Digital pin 12 (PWM) */ \
	_map_( B, 7,    0,           0       ) /* ( OC0A/OC1C/PCINT7 )  Digital pin 13 (PWM) */ \
	_map_( J, 1,    KEY_6,         KEY_LeftArrow     ) /* ( TXD3/PCINT10 )      Digital pin 14 (TX3) */ \
	_map_( J, 0,    KEY_7,               0                 ) /* ( RXD3/PCINT9 )       Digital pin 15 (RX3) */ \
	_map_( H, 1,    KEY_F,      0                 ) /* ( TXD2 )              Digital pin 16 (TX2) */ \
	_map_( H, 0,    KEY_G,      0                 ) /* ( RXD2 )              Digital pin 17 (RX2) */ \
	_map_( D, 1,    KEY_H,      KM_ALT_F4         ) /* ( SDA/INT1 )          Digital pin 20 (SDA) */ \
	_map_( D, 0,    KEY_J,      KM_SHIFT_F7       ) /* ( SCL/INT0 )          Digital pin 21 (SCL) */ \
	_map_( F, 0,    J1_Up,        KEY_RightArrow    ) /* ( ADC0 )              Analog pin 0 */ \
	_map_( F, 1,    J1_Down,      KEY_Enter         ) /* ( ADC1 )              Analog pin 1 */ \
	_map_( F, 2,    J1_Left,      KEY_Esc           ) /* ( ADC2 )              Analog pin 2 */ \
	_map_( F, 3,    J1_Right,      KEY_Tab           ) /* ( ADC3 )              Analog pin 3 */ \
	_map_( F, 4,    J1_Button1,      0                 ) /* ( ADC4/TMK )          Analog pin 4 */ \
	_map_( F, 5,    J1_Button2,      0                 ) /* ( ADC5/TMS )          Analog pin 5 */ \
	_map_( F, 6,    J1_Button3,      KEY_F7            ) /* ( ADC6 )              Analog pin 6 */ \
	_map_( F, 7,    J1_Button4,        AC_VolumeUp       ) /* ( ADC7 )              Analog pin 7 */ \
	_map_( K, 0,    J1_Button5,         AC_VolumeDown     ) /* ( ADC8/PCINT16 )      Analog pin 8 */ \
	_map_( K, 1,    J1_Button6,           KEY_PageUp        ) /* ( ADC9/PCINT17 )      Analog pin 9 */ \
	_map_( K, 2,    J1_Button7,         KEY_PageDown      ) /* ( ADC10/PCINT18 )     Analog pin 10 */ \
	_map_( K, 3,    J1_Button8,         KEY_DownArrow     ) /* ( ADC11/PCINT19 )     Analog pin 11 */ \
	_map_( K, 4,    0,           AC_Mute           ) /* ( ADC12/PCINT20 )     Analog pin 12 */ \
	_map_( K, 5,    0,      0                 ) /* ( ADC13/PCINT21 )     Analog pin 13 */ \
	_map_( K, 6,    0,      0                 ) /* ( ADC14/PCINT22 )     Analog pin 14 */ \
	_map_( K, 7,    0,      0                 ) /* ( ADC15/PCINT23 )     Analog pin 15 */ \
	\
	/* end *

UPDATE 14.10.2014

 

https://www.dropbox....0.2014.rar?dl=0

 

Now Sixaxis are supported and i have edit the keymappin please connect the Axelometer  X Y Z to Analog pin 0 1 2

 

plunger can be the 3th


Edited by cyclemat, 14 October 2014 - 03:00 PM.


#2 javier1515

javier1515

    Pinball Fan

  • VIP
  • 573 posts
  • Location:Villa Maria Cordoba

  • Flag: Argentina

  • Favorite Pinball: The Addams Family, Hook



Posted 28 November 2013 - 03:10 AM

Next week I reached an Arduino MEGA 2560 Rev.3 you buy, do not see the hours to try this.

 

a query .. I want to put a knocker to my cab .. I have to put a relay and that would suffice? sorry if this is a dumb question but I have not quite clear.

 

Thank you very much for sharing.


"Learning without thought is vain, thought without learning is dangerous." (Confucius)
 
"Aprender sin pensar es inútil, pensar sin aprender es peligroso". (Confucio)

 

 

Please, if you can help me with a small contribution to update my work team and continue to make more tables I will be eternally grateful.
 

#3 russdx

russdx

    Pinball Fan

  • VIP
  • 1,317 posts
  • Location:Bristol UK

  • Flag: United Kingdom

  • Favorite Pinball: NBAFB

Posted 28 November 2013 - 10:45 AM

Does an arduino output even have enough current to power a relay LOL??? Id use a big power transistor my self :), Or little transistor controlling a relay if you really want the relay.



#4 zebulon

zebulon

    Cantankerous old B****D

  • Platinum Supporter
  • 1,172 posts
  • Location:Whitby, Ontario, Canada

  • Flag: Canada

  • Favorite Pinball: xenon, Medieval Madness, Royal Flush, Silverball Mania

Posted 28 November 2013 - 01:53 PM

20ma max on the average from an arduino, nowhere near enough to power a relay that you would need for a knocker...:)

 

Russ is right, you'll need something like a TIP120 (102? I can never keep that straight) or a MosFET to safely run anything more than a small led.


 ZB%20%20Storefront1%20.png               [email protected]

Don't pm or expect an answer from me here ... the links above are my contacts.

I know so much about so little that I could teach you all there is to know about nothing......


#5 cyclemat

cyclemat

    Hobbyist

  • Members
  • PipPip
  • 23 posts

  • Flag: Germany

  • Favorite Pinball: Terminator

  • PS3 Gamer Tag: cyclemat
  • 360 Gamer Tag: cyclemat

Posted 01 December 2013 - 12:13 AM

you can use a Darlington Array ULN 2803 (Darlington-Arrays, DIL-18 = TD 62083AP) the same are on the LEDWIZ



#6 cyclemat

cyclemat

    Hobbyist

  • Members
  • PipPip
  • 23 posts

  • Flag: Germany

  • Favorite Pinball: Terminator

  • PS3 Gamer Tag: cyclemat
  • 360 Gamer Tag: cyclemat

Posted 01 December 2013 - 12:46 AM

zebulon can you create a driver shield ?



#7 zebulon

zebulon

    Cantankerous old B****D

  • Platinum Supporter
  • 1,172 posts
  • Location:Whitby, Ontario, Canada

  • Flag: Canada

  • Favorite Pinball: xenon, Medieval Madness, Royal Flush, Silverball Mania

Posted 01 December 2013 - 01:43 PM

Shouldn't be too difficult, the basics are already in the board design. It will just be a matter of laying out the components to fit and adding in the pin config.

 

I'll need a map of the pinout that you are using so I can get the connections right.

 

I'll be interested to see how this works as I've been working on a deign that incorporates an avr controller into the boards directly...we'll talk...:)


Edited by zebulon, 01 December 2013 - 04:40 PM.

 ZB%20%20Storefront1%20.png               [email protected]

Don't pm or expect an answer from me here ... the links above are my contacts.

I know so much about so little that I could teach you all there is to know about nothing......


#8 cyclemat

cyclemat

    Hobbyist

  • Members
  • PipPip
  • 23 posts

  • Flag: Germany

  • Favorite Pinball: Terminator

  • PS3 Gamer Tag: cyclemat
  • 360 Gamer Tag: cyclemat

Posted 01 December 2013 - 10:32 PM

here is the git

https://github.com/cithraidt/lwcloneu2

 

it uses PWM pin  2 - 13  = ch 1 - 12

COmunication Pins 14,15,16,17,20,21 =ch 13-18

Digital pin 22 - 35 = 19-32

 

i would to make a cheap board with 4 uln2803 chips 1 sided and as arduino shield the uln in Sockets to change it when they burned up and fuse holder for every channel  

 

 

look on the arduino homepage there are the chematics


Edited by cyclemat, 01 December 2013 - 11:10 PM.


#9 maxxsinner

maxxsinner

    Enthusiast

  • Platinum Supporter
  • 319 posts
  • Location:Australia

  • Flag: Australia

  • Favorite Pinball: F14 Tomcat

Posted 02 December 2013 - 01:31 AM

I'll be interested to see how this works as I've been working on a deign that incorporates an avr controller into the boards directly...we'll talk... :)

 

 

Now that would be the perfect solution. No need for boards on boards.....

 

Just one board to rule them all!

 

Wait... haven't I heard that somewhere else?  :angel_not:  :facepalm:



#10 cyclemat

cyclemat

    Hobbyist

  • Members
  • PipPip
  • 23 posts

  • Flag: Germany

  • Favorite Pinball: Terminator

  • PS3 Gamer Tag: cyclemat
  • 360 Gamer Tag: cyclemat

Posted 04 December 2013 - 11:40 PM

ok update added keysupport on the git 

 

 

we want to make a version for WS 2801 IC to drive all channels over it what we only need is the HArdware please support  the Project  via paypal: [email protected]

 

when you spend money please enter your Forum name in papal an we make a list of all the people they want to help



#11 zebulon

zebulon

    Cantankerous old B****D

  • Platinum Supporter
  • 1,172 posts
  • Location:Whitby, Ontario, Canada

  • Flag: Canada

  • Favorite Pinball: xenon, Medieval Madness, Royal Flush, Silverball Mania

Posted 05 December 2013 - 01:40 AM

might want to talk with swisslizard about the addressable strips...he's already far into it...:)


 ZB%20%20Storefront1%20.png               [email protected]

Don't pm or expect an answer from me here ... the links above are my contacts.

I know so much about so little that I could teach you all there is to know about nothing......


#12 cyclemat

cyclemat

    Hobbyist

  • Members
  • PipPip
  • 23 posts

  • Flag: Germany

  • Favorite Pinball: Terminator

  • PS3 Gamer Tag: cyclemat
  • 360 Gamer Tag: cyclemat

Posted 07 December 2013 - 10:19 AM

Invite Him to this conversation :love39: he is the DOF GOD FAther



#13 cyclemat

cyclemat

    Hobbyist

  • Members
  • PipPip
  • 23 posts

  • Flag: Germany

  • Favorite Pinball: Terminator

  • PS3 Gamer Tag: cyclemat
  • 360 Gamer Tag: cyclemat

Posted 18 December 2013 - 10:32 PM

updaaaaaaaaaaaaaaaaaaaaaaaaaaaaate



#14 maurilio911

maurilio911

    Hobbyist

  • Members
  • PipPip
  • 17 posts

  • Flag: Brazil

  • Favorite Pinball: Ironman

Posted 19 June 2014 - 11:22 AM

Hello Everybody!

Please I need some help to Ledwiz arduino.

I write the all software to mega2560, when test app is runing the arduino led(13) is on and ID:4 showed.

But I get an error on VisualPinball open.

I try to Regsvr32  to file ledwizm05.ocx and get an error.

The path for the file is correct, Regsvr32 C:\Games\Visual Pinball\Tables\ledwizm05.ocx.

ps. Windows 7 64bits.

 

Thanks,

Maurilio.

 

 



#15 zebulon

zebulon

    Cantankerous old B****D

  • Platinum Supporter
  • 1,172 posts
  • Location:Whitby, Ontario, Canada

  • Flag: Canada

  • Favorite Pinball: xenon, Medieval Madness, Royal Flush, Silverball Mania

Posted 19 June 2014 - 11:35 AM

register the file directly from the file location directory rather than remotely with a path.


 ZB%20%20Storefront1%20.png               [email protected]

Don't pm or expect an answer from me here ... the links above are my contacts.

I know so much about so little that I could teach you all there is to know about nothing......


#16 maurilio911

maurilio911

    Hobbyist

  • Members
  • PipPip
  • 17 posts

  • Flag: Brazil

  • Favorite Pinball: Ironman

Posted 21 June 2014 - 01:58 AM

Zebulon, Thank you replying!

you mean that I have to copy the file to system32 ?

I've copy it and try to register, and I got this error:

" The module 'ledwizm05.ocx' may not compatible with the version of windows that you're running..."

I did the same test on my windows 7 notebook, and I got same error.

The ledwiz test app works fine in both PCs. Turn on several arduino pinout when running test app and get id:4.

Do you have the right file to send me? or tell me where can I found it to download?

 

Thanks a lot,



#17 zebulon

zebulon

    Cantankerous old B****D

  • Platinum Supporter
  • 1,172 posts
  • Location:Whitby, Ontario, Canada

  • Flag: Canada

  • Favorite Pinball: xenon, Medieval Madness, Royal Flush, Silverball Mania

Posted 21 June 2014 - 03:31 PM

Nope, leave the file in the tables folder.

 

Make sure you are logged in to windows as administrator (or at least running the command in administrator mode).

 

Open command prompt

 

Change directories until you are in the tables directory  (you should have a prompt that looks like "C:\Games\Visual Pinball\Tables\"

 

Register the ocx with "Regsvr32  ledwizm05.ocx"

 

Try that and see if it works.


 ZB%20%20Storefront1%20.png               [email protected]

Don't pm or expect an answer from me here ... the links above are my contacts.

I know so much about so little that I could teach you all there is to know about nothing......


#18 parabolic

parabolic

    Enthusiast

  • Silver Supporter
  • 225 posts
  • Location:Greenville, SC

  • Flag: United States of America

  • Favorite Pinball: revenge from mars

Posted 22 July 2014 - 10:23 PM

Soooo.....just stumbled on this - trying to decypher what exactly the latest version does.... Currently im using a MEGA in place of an IPAC for inputs - however, it seems a bit sluggish - It looks like this does input as well? I think the code im using is why its slow - can I use this in place of it? Im not really concerned with the LEDWIZ yet. I am familiar with putting the MEGA into DFU mode to load the hex in to "pretend " its a controller - I just need the code and maybe some steps on the procedure to do this.

Thanks!


Parabolic Technologies - 3D printers and 3D design printing

"Transforming YOUR Ideas into a Reality!"

[email protected]

https://www.facebook...f_type=bookmark


#19 cyclemat

cyclemat

    Hobbyist

  • Members
  • PipPip
  • 23 posts

  • Flag: Germany

  • Favorite Pinball: Terminator

  • PS3 Gamer Tag: cyclemat
  • 360 Gamer Tag: cyclemat

Posted 13 September 2014 - 10:43 PM

UPDATE 



#20 philco67

philco67

    Neophyte

  • Members
  • Pip
  • 3 posts

  • Flag: Belgium

  • Favorite Pinball: Eight ball champ Bally

Posted 14 September 2014 - 04:45 AM

Hi,

 

the update link (mega) seems empty...  

 

Regards from Belgium


Edited by philco67, 15 September 2014 - 04:18 AM.