Jump to content
  • 0
cyclemat

Lwclone On Arduino Mega 2560

Question

Here comes the LWClone on Arduino MEGA 2560

 

How to Compile

Windows Prerequisites

On Windows, you will need a copy of the latest Atmel Toolchain, either downloaded 
and installed as a standalone package, or installed as part of Atmel Studio. 
You will need to ensure that the "bin" directory of the toolchain is available 
in your system's PATH environment variable.

In addition, you will need to install a ported version of the ZSH or BASH *nix shells, 
and a standard set of *nix utilities such as cut, find and sed. 
These can be found in the "basic" system package of the of the MinGW installer (http://www.mingw.org). 
Once installed, add the "msys\1.0\bin" of the MinGW installation folder is added 
to your system's PATH environment variable.

The bootloaders currently also require the "bc" application, 
which can be installed from http://gnuwin32.sourceforge.net/downlinks/bc.php. 
Once installed add the "GnuWin32\bin" path of the GnuWin32 installation folder 
to your system's PATH environment variable.

Linux Prerequisites

On Linux systems you will need to install the latest Linux distribution 
of the standalone Atmel Toolchain from the Atmel website for general development, 
or use the latest avr-libc and avr-gcc packages for your chosen distribution's package 
manager. For full device support, the Atmel standalone package is recommended.

How 2 Flash

Connect your Arduino to USB and look witch comport it has
Start Flash Main Chip Arduino Mega to LW.bat
enter your Comport e.g com2 or com32 what ever
Remove USB
Connect your USBASP to the ISP header behind the USB port
Start Flash 8u2 - 16u2 Arduino Mega - with USBASP Dongle to LW.bat
Connect The USB port wait for reorgination the Device 
Start Change ArduLW ID.bat
Enter your LEDWIZ ID e.g. 1 or 2 up to 16
That is it test it with Visualpinball an Pinmame/DOF

 have make New packages 23.01.2016

 

https://mega.nz/#F!bdZHVaxK!3WmePgTED-3xQp8oj-ZfOA

 

one package with inverted LED ports so that High ist normal and low is on ( for the Relaisboards from ebay)

 

 

For Boards that say it gives problems with The STK500 Timeout Error Here ist a Short way to fix it !?!?

 

 

1. Connect the USBASP to the ISP connector behind the USB Port.

2.Start the  "0. Flash 8u2 - 16u2 Arduino Mega - with USBASP Dongle to Arduino.bat"

 

3. Connect the USBASP to the Second ISP port

4. Start the "Flash m2560 Unlock fuses, erase, verify - with USBASP Dongle.bat"

5. Start the "Flash m2560 Write the bootloader, set the lock fuse, verify  - with USBASP Dongle.bat"

 

 

Now you can flash it normaly

 

when the flash with the USB ASP didnt work test to bridge the GND point on the 10->6 Pole Converter

 

FOR HELP PLEASE POST YOUR PINMAP.H AS CODE AND WHEN YOU HAVE COMPILING PROBLEMS POST YOUR OUTPUT AS CODE SO I CAN BETTER

HELP

 

So have make a little Video tutorial don`t say anything about my english have do my best.

 

 

 

 

 

Share this post


Link to post
Share on other sites

194 answers to this question

Recommended Posts

  • 0

@UncleSash

for wiring the MMA, you have the information on the kakou's github https://github.com/kakou-fr/lwcloneu2

Connect : 
MMA <=> ARDUINO
Vin     5v
GND     GND
SDA     20
SCL     21

I'm changing the pinmap.h to have something more adaptated to the shield. (by exemple : I put the plunger to A3 pin)

I'm drawing a wiring schematic to explain how to connect all the stuff on your actual shield... could be usefull to create tyhe new one.

The joystick buttons are useless, .. so I chose to ignore them, maybe we can gain more place for the WEMOS then

the github is at this link https://github.com/aetios50/PincabLedStrip

we use D6, D7 and D8 pins, that's all !

The only thing which could be usefull for the WEMOS is to integrate 3 port with resistance to connect these 3 data pins

Schéma_UPC.jpg

EDIT : I compiled the new firmware with the pin mapping based on  this wiring. I'll share it soon for those who could be interessed. 

Share this post


Link to post
Share on other sites
  • 0

For the wemos, it actually use D6,D7,D8, and GND (must be connected to the same GND use by the ledstrips). But, i work on an improved version that use D5,D6,D7. If you can provides an connector to this 4 PINS (D5-D8) with 4 resistors (between the wemos pin and the connector), and a connector for the GND of the wemos (to connect it to the  GND of the ledstrips power supply), it would be perfect :)

Share this post


Link to post
Share on other sites
  • 0
For the wemos, it actually use D6,D7,D8, and GND (must be connected to the same GND use by the ledstrips). But, i work on an improved version that use D5,D6,D7. If you can provides an connector to this 4 PINS (D5-D8) with 4 resistors (between the wemos pin and the connector), and a connector for the GND of the wemos (to connect it to the  GND of the ledstrips power supply), it would be perfect


No problem.
Which value needs the resistors?

Share this post


Link to post
Share on other sites
  • 0
On 20/10/2017 at 11:48 AM, kakou said:

For the wemos, it actually use D6,D7,D8, and GND (must be connected to the same GND use by the ledstrips). But, i work on an improved version that use D5,D6,D7. If you can provides an connector to this 4 PINS (D5-D8) with 4 resistors (between the wemos pin and the connector), and a connector for the GND of the wemos (to connect it to the  GND of the ledstrips power supply), it would be perfect :)

Effectively,  that's a good idea for the GND, thx @kakou ! 

Share this post


Link to post
Share on other sites
  • 0

1st Step is done.
LED WIZ Mega rev 1.5!
Implementing the MMA845 into the OLD Design with original Arduino MEGA Footprint!
Also improvet (since rev 1.4): 3.5mm pitch - Screw Terminals!

59eff3852e386_LEDWiz-Mega2560-MMA845.thumb.jpg.4ae00b6ef249be8792c58c769e7d0084.jpg

 

Next Step:
Implenting the MEGA2560 MINI into the Design!

needs a couple Days.... because I am busy.

- Sascha

Share this post


Link to post
Share on other sites
  • 0

@UncleSash  Good Job !

 

Here is the last Firwmare, I've remapped some buttons, changed the hotkey attribution and switched buttons.

I've made a double pack for two type of Arduinos MEGA2560 :

- those which have a DFU mode 

- and without DFU, so the same way that cyclemat explain here (with USBASP etc...)

 

Last Firmware Pack : https://mega.nz/#!t8c3wChI!HYkTybykeWW-CSzzqDcPaVBNcBk8ujmkHTz8YxxihqQ

For the DFU mode method, you need also FLIP 3.4.7 to flash the 16U2 chipset  https://mega.nz/#!o0NCSARJ!HEXEutTiIVyjaiv-57tuFtO3e1_MweD84-XJ6YPpmyg

 

I will write another How To if necessary, I wrote one but it's in french in Pincab Passion.

 

For those who wants to try, I recommand to buy a Funduino MEGA2560, it has the DFU mode (no need for an USBASP) and works perfectly  with this new firmware

 

 

Share this post


Link to post
Share on other sites
  • 0

Great, I ve got some questions so 😉

You don't put the Wemos ? Any chance to have it one the same pcb ?

Can you stuck the big terminals each other  like the small ones ?

How do you separate buttons terminals and uln terminals ?

Do you need dimension for the wemos ?

Can I suggest a disposition for this new shield ?

Share this post


Link to post
Share on other sites
  • 0
Great, I ve got some questions so

You don't put the Wemos ? Any chance to have it one the same pcb ?

Can you stuck the big terminals each other  like the small ones ?

How do you separate buttons terminals and uln terminals ?

Do you need dimension for the wemos ?

Can I suggest a disposition for this new shield ?

 

Feel free to bring your Ideas in.

It is just the first layout to implement the mini.

 

The terminals for the FETs are all 5.08mm pitch. And yes, we could stick them together, we can change that.

 

Wemos... I still wait on mine. It was just ordered.

But you can send me the Details how you think to implement it.

 

Feel free to ask when you need anything.

 

The ULN terminals are one 8 block (X4 & X5) on each side (the one next to the uln).

The other 4 blocks (X1,2,3,7) are the keyboard inputs. (The labeling is not done yet)

Share this post


Link to post
Share on other sites
  • 0

For me, we have one block of 8 which is useless (2*8 for keyboard, 1*8 for joystick terminal and just 1 terminal for A4 plunger)

I will try to draw something to give my idea.

@kakou if you can take a look at the firmware to implement the 8 joypad buttons. If they don't work at all, we can delete them from this project 😉

Share this post


Link to post
Share on other sites
  • 0

For me, we have one block of 8 which is useless (2*8 for keyboard, 1*8 for joystick terminal and just 1 terminal for A4 plunger)

I will try to draw something to give my idea.

@kakou if you can take a look at the firmware to implement the 8 joypad buttons. If they don't work at all, we can delete them from this project 😉

Share this post


Link to post
Share on other sites
  • 0
For me, we have one block of 8 which is useless (2*8 for keyboard, 1*8 for joystick terminal and just 1 terminal for A4 plunger)
I will try to draw something to give my idea.
[mention=15084]kakou[/mention] if you can take a look at the firmware to implement the 8 joypad buttons. If they don't work at all, we can delete them from this project


Do that.
Because I do not understood what you mean.
This Design use the same number of I/Os.
The MMA is directly connected.

Share this post


Link to post
Share on other sites
  • 0

@UncleSashOk, so here is my idea, I draw it on Autocad because that's the only software I know... :P

large.Capture.PNG.834c6fbf3724c657a053dd441af47784.PNG

So with my explanation :)

- I put the FETs like that because I think about some heat problems with gear by example. with this type of organization, we can put a dissipator on one or several FETs 

- You have the 16 keyboard inputs 

- the 8 buttons for joypad (depends if they can work, if not, we delete them)

- I draw the wemos at scale so normaly that fit exactly  like I draw it (just wait yours to confirm that 

- I draw terminals for the three WEMOS data PIN and the GND (i realized, there is 4 resistance 220, we just need 3... :rolleyes:)

I don't know if it's realisable like that, just keep me inform if you need something

DWG File

 

Share this post


Link to post
Share on other sites
  • 0

Hi! Thanks for this awesome Project!!

I just bought an Arduino(chinese) and after reading and researching about Lwclone I'm disappointed...
My Arduino have CH340...

Useless?

I just want driving my 16 Channel Relay Board... I just want 10 solenoids feedback. Nudge/Buttons using KL25Z and Plunger are for future upgrade..

Thanks in advance!

PCB Relay Image

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×