Welcome! Log In Create A New Profile

Advanced

Re-purposing an MKS Gen L V1.0 board

Posted by billTheTailor 
Re-purposing an MKS Gen L V1.0 board
February 14, 2020 01:42PM
I hope this is the right place to ask this; I've gotten no results anywhere else. (If it's not, please redirect me!)

I have an MKS Gen L V1.0 board that I'd like to re-purpose. The goal is to press a button and start a stepper motor that will run at a set speed until I hit the button again. Such a task is trivial on an Arduino (I've already got this working on an Arduino Uno), but I have more MKS boards (3) than I do Arduinos (1), and, frankly, I'm intrigued by the possibility.

Using Marlin, I know how to make the board work - it came from a functioning 3d printer, after all, and except for the heated bed connection it works fine.

If I understand correctly, the MKS is just an Arduino Mega 2560 + Ramps mashup, so is it possible to write a sketch that would address the MKS like an Arduino? e.g. define a pin, input/output, send it low/high, etc? If it is, any information on how I can go about it? Pin mappings, etc? Perhaps even a sample sketch?

Thanks for your input and help!

- Bill in KCMO

Measure with a micrometer.
Mark with a crayon.
Cut with an axe.

Edited 4 time(s). Last edit at 02/14/2020 06:05PM by billTheTailor.
Re: Re-purposing an MKS Gen L V1.0 board
February 14, 2020 08:08PM
Yes this is correct.
In 3D Printer Marlin firmware pins_RAMPS.h holds pin numbers that you will likely need.

Here are the Stepper pins
// Steppers
//
#define X_STEP_PIN         54
#define X_DIR_PIN          55
#define X_ENABLE_PIN       38
#define X_CS_PIN           53

#define Y_STEP_PIN         60
#define Y_DIR_PIN          61
#define Y_ENABLE_PIN       56
#define Y_CS_PIN           49

#define Z_STEP_PIN         46
#define Z_DIR_PIN          48
#define Z_ENABLE_PIN       62
#define Z_CS_PIN           40

#define E0_STEP_PIN        26
#define E0_DIR_PIN         28
#define E0_ENABLE_PIN      24
#define E0_CS_PIN          42

#define E1_STEP_PIN        36
#define E1_DIR_PIN         34
#define E1_ENABLE_PIN      30
#define E1_CS_PIN          44

Edited 1 time(s). Last edit at 02/14/2020 08:09PM by Roberts_Clif.


Computer Programmer / Electronics Technician
Re: Re-purposing an MKS Gen L V1.0 board
February 14, 2020 09:39PM
you might want to watch [www.youtube.com]
Re: Re-purposing an MKS Gen L V1.0 board
February 14, 2020 10:07PM
This is exactly the information I needed. Thank you very much!


- Bill in KCMO

Measure with a micrometer.
Mark with a crayon.
Cut with an axe.
Re: Re-purposing an MKS Gen L V1.0 board
February 15, 2020 08:44AM
This is great information. As I have so much on my mind sometimes this type of information just gets overlooked.
I have a couple 3D Printer controllers that would be considered a one piece MKS Motherboard, they all have at least one stepper motor driver that is dead.
I have tried to replace the A4982SLPT chip without any success as of this post. I believe the selected replacement A4982SLPT is not pin compatible with original.

I digress on this subject of Re-purposing an MKS Gen L V1.0 board a little though.
These MKS Controllers would make perfect test boards for my Arduino tests, if they burned up would not make any differences as they are already useless for my 3D Printer.
They however might make for Re-purposing an MKS controller for a Robot controller or many other projects like Drones or my up coming R2D2 clone.

Both already serve a use for being a test Controller to upload my Marlin firmware during testing new functions of the Marlin firmware.
However a little late as I had just purchased two each of

MEGA 2560 R3 Board ATmega2560
Arduino UNO R3 ATMEGA328P
Sensor Shield V5 Digital Analog Expansion Module

Some
40Pin Single / Dual Row Straight Strip Pin Header PCB Panel 2.54mm

And several Arduino projects/programming teaching books, I know there are many free online tutorials and PDF books that can also be used.

Edited 8 time(s). Last edit at 02/15/2020 09:30AM by Roberts_Clif.


Computer Programmer / Electronics Technician
Sorry, only registered users may post in this forum.

Click here to login