Welcome! Log In Create A New Profile

Advanced

Marlin for MKS Gen v1.3 upgrade

Posted by J-Max 
Marlin for MKS Gen v1.3 upgrade
September 30, 2015 01:03PM
Hi all,

I just recived the new MKS gen v1.3.
The board is an AIO (all in one Mega+Ramps),
but there's interesting features like :
- 4 mosfet outputs instead of 3 (for E1 E0 Fan Bed)
- Step/Dir output for powerfull external drivers, included digital servomotors drivers
- 24V 100% powerable
- Direct 2x20pins LCD controler output
- Accessible reset button
- 3x 12-24v output
- 3x 5v output
the remaining features are Ramps 1.4 alike.

Pin scheme :


The version of Marlin provided by the manufacturer is old and full of bugs :
There's no boards.h MKS gen is not implemented,
and there's issues on the pin.h because one of the mosfet output (bed) is not implemented.

I want to implement a board 39(?) especialy for the MKS gen
to make a plug and play version of marlin.

I would like to know what's the proper way to go.
Is a future upgrade of next Marlin possible ?
Should I ask to a regular Marlin programmer ?
Can I submit some changes in the Github ?
Or should I make a custom version of Marlin for my own purpose
(shared with other reprapers if they want it)

I'm looking forward to reading from you smiling smiley

++JM


^ Things I said. My thingiverse here. My website there (in french).
Attachments:
open | download - MKSgen_v1.3.jpg (528.5 KB)
Re: Marlin for MKS Gen v1.3 upgrade
October 01, 2015 05:54AM
Hi,

So, I worked several hours on yesteray evening...

I compared Pins.h from actual Marlin release with the Migbot's version,
which uses the MKS Base board (not MKS Sbase = Smoothieboard compatible).
That board is simpler than the MKS Gen but shares 4 mosfet output too.
I did not debug all the code, but there's a lot of differencies.

Here's a list of major issues with regular Marlin's EEB board management.
- Bed output do not trig (D8 output)
- Graphic controlers management beeps like into alarm mode,
and the click is considered as Kill button.

Yesterday I identify 2560 pin for D8 and it seems to be pin 17.
I tryed to trig the output by gCode M42 P17 S255, unsuccessfully. confused smiley

++JM

Edited 1 time(s). Last edit at 10/01/2015 05:56AM by J-Max.
Re: Marlin for MKS Gen v1.3 upgrade
October 02, 2015 08:19AM
Just take a seat they're always free
No surprise no mystery
In this theatre that I call my soul
I always play the starring role

So lonely
So lonely
So lonely
So lonely

So lonely
So lonely
So lonely

sad smiley
Re: Marlin for MKS Gen v1.3 upgrade
October 04, 2015 10:31AM
Hi,

Hmm. 115 views and no awnser.
Maybe nobody knows anything on this.

++JM
Re: Marlin for MKS Gen v1.3 upgrade
October 10, 2015 05:52PM
Hi guys,

218 views and still no awnser.

Hopefully I managed to solve the problem by myself.
I have a Marlin fully working with MKS Gen V3.

Problem solved :
+ Marlin >=2 extruder bug (compillation problem on temperature.c) = Arduino failure = solved by using an early version of arduino 1.0.6
+ MKS github Marlin 2ex bug = pins.h attribution failure = solved by using a recent genuine Marlin release
+ Marlin configuration failure = Fail on creation a new MKS Gen EEFB (39) board = solved by modifying Ramps EBB board
+ Graphic controler bug (RRD Full Graphic Smart Controler & RRD Smart Controller) = standard cable failure = solved by reversing one end on each cable

Attached file : fully working Marlin 1.0.2 for MKS Gen v1.3
/!\ Warning : you still need to adjust configuration.h settings according to your own printer's needs.
My printer is working at high speed because of quality components,
that speeds may overtake where your own printer is able to go.

Enjoy

++JM

Edited 1 time(s). Last edit at 10/10/2015 05:53PM by J-Max.
Attachments:
open | download - JMax_MKS_GEN.rar (277.1 KB)
Re: Marlin for MKS Gen v1.3 upgrade
October 13, 2015 04:07AM
You should disable TEMP_SENSOR_2 with a "0" not "-1".
2000mm/s with 100steps/mm are not possible. The AVR is way to slow for that speed. But anyway the speed in your slicer software is what should be correct.


Triffid Hunter's Calibration Guide --> X <-- Drill for new Monitor Most important Gcode.
Re: Marlin for MKS Gen v1.3 upgrade
October 13, 2015 03:01PM
Yeah ! I've got my first awnser !

++JM
Re: Marlin for MKS Gen v1.3 upgrade
January 08, 2016 11:05AM
Can you elaborate the solution to the graphic controler problem?

I loaded Marlin onto mine and just hear a anoying sound from my LCD, but nothing visible is displayed. It stays black.
Same Firmware on a Ramps works flawless.


EDIT:
Also can't compile your firmware:
Arduino: 1.6.7 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\XXX\Marlin.pde:44:101: fatal error: U8glib.h: No such file or directory

     #include  // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/)

                                                                                                     ^

compilation terminated.

exit status 1

Edited 1 time(s). Last edit at 01/08/2016 11:13AM by BearTechandTools.
Re: Marlin for MKS Gen v1.3 upgrade
January 09, 2016 08:35AM
"Yesterday I identify 2560 pin for D8 and it seems to be pin 17.
I tryed to trig the output by gCode M42 P17 S255, unsuccessfully"

D8 is P8, not related to physical pins, these are the arduino label system.

You also have a D7, which in the extra mosfet

NB There are pins listed in pins.h as SENSITIVE_PINS
These pins cannot be modified with a m42 command

ie #define SENSITIVE_PINS { 0, 1, \
X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, \
Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, \
Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_MIN_PROBE_PIN, \
PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, \
_E0_PINS _E1_PINS _E2_PINS _E3_PINS \
analogInputToDigitalPin(TEMP_BED_PIN) \
}

ie HEATER_BED is listed, so you will not be able to control D8

But D7 is not listed (unless its a high extruder) So it should be controllable with a M42 P7 S255

Edited 1 time(s). Last edit at 01/09/2016 08:36AM by Dust.
Re: Marlin for MKS Gen v1.3 upgrade
January 09, 2016 12:13PM
Hi guys,
Quote
BearTechandTools
Can you elaborate the solution to the graphic controler problem?

I loaded Marlin onto mine and just hear a anoying sound from my LCD, but nothing visible is displayed. It stays black.
Same Firmware on a Ramps works flawless.


EDIT:
Also can't compile your firmware:
Arduino: 1.6.7 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\XXX\Marlin.pde:44:101: fatal error: U8glib.h: No such file or directory

     #include  // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/)

                                                                                                     ^

compilation terminated.

exit status 1
You need to install the u8glib into your arduino software (newbie basic issue).
Do a seach with the keyword in the wiki section of the reprap forum.

The continuous beep with blue screen is because of the cable you use.
You need to invert one connector at the end of each cable. Simple as that. (Pin 1 should be Pin 20)

@Dust,
Thank you for your entry, even if you come after the battle winking smiley
Pins are already set in the Marlin version I posted several weeks ago.
Obviously, they are fully managed by Marlin and works properly since I solved the problem.

++JM
Re: Marlin for MKS Gen v1.3 upgrade
January 09, 2016 01:29PM
Quote
J-Max
You need to install the u8glib into your arduino software (newbie basic issue).
Do a seach with the keyword in the wiki section of the reprap forum.
Okay hadn't this error yet. I'll sure be testing this!

Quote
J-Max
The continuous beep with blue screen is because of the cable you use.
You need to invert one connector at the end of each cable. Simple as that. (Pin 1 should be Pin 20)

Huh. Weird isn't it? Sound a lot like a mistake in my ears.
So on one cable I''ll have to remove this notch thing so that I can turn the cable arround?
Did I understand that right?


Another question:
I have a custom Marlin Version for a CNC which should be used for a Ramps 1.4 board.

What would be the better way:
Change the Setting in your working Marlin Version for the MKS Gen or change the Marlin Version for the CNC?
Any hints?


Thanks
Re: Marlin for MKS Gen v1.3 upgrade
January 09, 2016 02:10PM
Hi,

You have to reverse one plug on each cable.
It's not a mistake, it's about the board and the cables.

If your marlin is for a CNC and not for a 3D printer, you don't need my modified Marlin.
Just upload your previous Marlin for Ramps to the MKS Gen. They are fully compatible.
The MKS Gen just have another mosfet output.
If you don't want to use that output, consider the MKS Gen as a regular Ramps board.

++JM
Re: Marlin for MKS Gen v1.3 upgrade
January 10, 2016 05:41AM
Quote
J-Max
Hi,

You have to reverse one plug on each cable.
It's not a mistake, it's about the board and the cables.

If your marlin is for a CNC and not for a 3D printer, you don't need my modified Marlin.
Just upload your previous Marlin for Ramps to the MKS Gen. They are fully compatible.
The MKS Gen just have another mosfet output.
If you don't want to use that output, consider the MKS Gen as a regular Ramps board.

++JM

With mistake I meant a design flaw of the board. Having to reverse a Pin is not exactly Ramps compatible isn't it? smiling smiley
Could you please post a picture of your LCD cables? I don't want to damage anything.

The Mosfet output is for heating? Additional Fans? (Stuff I think I don't need)
So that shouldn't be a problem.
Re: Marlin for MKS Gen v1.3 upgrade
January 10, 2016 05:58AM
Hi,

The mosfet outputs allows direct management of 4 devices : extruders, heatbeds, heat chambers, fans, lasers...
Whatever you like. One is over dimensioned for heavy power consumption, like heatbeds.

The different wire management is to fit with the MKS screens. If you use generic screens you need different cables.
It's not a mistake, it's just a choice. Note there's many screens on the market even if the reprap community use few of them.
Pinouts or screen management may be different from one kind to another.

Sorry I can't post a picture without dismantling my machine, the cables are hidden in the structure of my printer's cabinet.
Anyways you can't damage anything even if you go wrong. Actualy you have a reverse cable and you don't damage your screen.
Just mark your initial connector position with a marker line cross both cable and connector.
Then dismantle the connector. You will notice pins are in a _-_-_-_- shape.
Just reverse the connector in a way the connector pins fits the _-_-_-_- shape from behind. Simple as that. winking smiley

++JM
Re: Marlin for MKS Gen v1.3 upgrade
January 10, 2016 06:02AM
Hi,

The mosfet outputs allows direct management of 4 devices : extruders, heatbeds, heat chambers, fans, lasers...
Whatever you like. One is over dimensioned for heavy power consumption, like heatbeds.

The different wire management is to fit with the MKS screens. If you use generic screens you need different cables.
It's not a mistake, it's just a choice. Note there's many screens on the market even if the reprap community use few of them.
Pinouts or screen management may be different from one kind to another.

Sorry I can't post a picture without dismantling my machine, the cables are hidden in the structure of my printer's cabinet.
Anyways you can't damage anything even if you go wrong. Actualy you have a reversed cable and you don't damage your screen.
Just mark your initial connector position with a marker line cross both cable and connector.
Then dismantle the connector. You will notice pins are in a _-_-_-_- shape.
Just reverse the connector in a way the connector pins fits the _-_-_-_- shape from behind. Simple as that. winking smiley

++JM
Re: Marlin for MKS Gen v1.3 upgrade
February 12, 2016 02:53PM
Hey J-Max
Yes I had the same problem. It relates to different versions of the RRD controller. There are cables floating around for one version which are being sold with other versions. I had to grind off the keys and reverse them. I know what you are going through. Thanfully, we are surrounded by a wealth of knowledge! Documentation for the boards can often be just a framework. I really have no idea what Marlin version or modifications are resident on my MKS Gen v1.1 and I'm afraid to just blow it away testing new configurations. I'm using it for CNC/printer with an MK8 head.

Have not installed and tested it yet - should be fun!
Re: Marlin for MKS Gen v1.3 upgrade
February 13, 2016 10:45PM
J-Max, do you realize there is a Marlin Firmware folder? That is where the people that support Marlin are looking for new issues.

Why don't you check out: [forums.reprap.org]
Re: Marlin for MKS Gen v1.3 upgrade
February 23, 2017 04:37PM
Hi J-Max!
I realize this thread is over a year old, still hoping you could answer my question: I replaced my Arduino 2560 + Ramps 1.4 Shield for this MKS, and of course I need to install Marlin on it. Now most of it is working fine, but one thing I have difficulty with: the old Ramps had 2 x 4 pins next to the Z-stepper-driver, because the z-movement uses 2 stepper motors. But this MKS board only has 1 x 4 pins for the z-stepper-motor. (see picture, circled in red) Those work fine, but I need another 1 x 4 pins that do exactly the same. Can I now in the firmware designate the other 4 pins (circled in blue) to copy the behaviour from the original z-stepper pins? If yes, please tell me how, although I'm not a programmer, I know the basics of coding, just not enough to figure it out myself.



Hope you still read this and can help, thanks!
Re: Marlin for MKS Gen v1.3 upgrade
February 25, 2017 04:37PM
Hi XiniX,

The easyest way is to build a "Y" cable for the Z port. Note, this is exactly what is done on the Ramps Z port.
The output you circled in blue on your plan is for cascading the Z port to an external driver.
For this output, the procedure and accessories are described there : [www.makerbase.com.cn]

++JM


^ Things I said. My thingiverse here. My website there (in french).
Re: Marlin for MKS Gen v1.3 upgrade
June 22, 2017 12:48AM
Hey there, figured you folks will know the answer.

Using MKS Gen v1.4
Compiled my own firmware from Marlin 1.1.3
Still seemingly no EEFB setting
Used EEB, and then modified the pins for the extra output

HEATER_0_PIN D10
HEATER_1_PIN D7
HEATER_BED_PIN D8
HEATER_FAN_PIN D9
(which I would have thought should sort it, but sadly no fan (just EEcool smiley - can you use a RAMPS FAN extender on this do you think?


Re: Marlin for MKS Gen v1.3 upgrade
June 27, 2017 08:48AM
Jaburges, I have a MKS Gen 1.4 also. It's difficult enough trying to figure out how to config firmware with the board being explicitly supported..smiling smiley

Ive sent you a PM to avoid too much thread hijacking..smiling smiley

Edited 1 time(s). Last edit at 06/27/2017 08:50AM by jedifraz.
Sorry, only registered users may post in this forum.

Click here to login