Welcome! Log In Create A New Profile

Advanced

Repurpose Anet_v1.0 with Marlin

Posted by FenriX 
Repurpose Anet_v1.0 with Marlin
March 08, 2019 04:50AM
Hi! I'm new in this development environment, I'm trying to build the most popular MPCNC and i would like to repurpose the control board of my Anet A8 for it.
I downloaded the source code of the marlin firmware and i'm looking at the code.

the steppers are:
X, Y, Z1, Z2, E

looking at the header file pins_anet_10 i found this:
//
// Steppers
//
#define X_STEP_PIN         15
#define X_DIR_PIN          21
#define X_ENABLE_PIN       14

#define Y_STEP_PIN         22
#define Y_DIR_PIN          23
#define Y_ENABLE_PIN       14

#define Z_STEP_PIN          3
#define Z_DIR_PIN           2
#define Z_ENABLE_PIN       26

#define E0_STEP_PIN         1
#define E0_DIR_PIN          0
#define E0_ENABLE_PIN      14

and looking at the stepper controller in the schematic of the board i found this:
https://raw.githubusercontent.com/ralf-e/ANET-3D-Board-V1.0/master/ANET3D_Board_Schematic.png

The controller for stepper Z1 and Z2 seems to be the same.
While X, Y and E have obviously separated controllers...

Now my objective is really simple but without any kind of experience i really don't know how to do this.
I would like to use stepper X and Y for X', Z1 and Z2 for Y' and E for Z'
for the stepper Z1 and Z2, since they have the same controller, it's easy, i just need to change the pins, and then the parameter in the configuration file...
The same goes for the Extruder stepper, here as well I have one stepper for the extruder in the original configuration and i need one stepper for the Z axes in the MPCNC project
I don't know how to use the stepper X and Y for the new X' axes, since they have separated controllers, how can i configure the header to use both of them for the same axes?
I understand that this is a really stupid question but all I know about this things is theoretical...

Furthermore, after I've solved this little issue i will have to edit the jerk since the original Z axes run on a leadscrew and i think i might be done, am i right?

EDIT: i've noticed the pin XY-enable in the schematic, is that something i can use to make those two controller work with the same input?

Edited 2 time(s). Last edit at 03/08/2019 05:06AM by FenriX.
Re: Repurpose Anet_v1.0 with Marlin
March 08, 2019 06:07AM
the firmware has to have the option to uses two stepper driver together as one axis as it has to send two step and two direction pins at the same time.

Marlin has this but marlin presumes you have 5 stepper drivers x,y,z,e0,e1 and re allocates e1

So try setting #define X_DUAL_STEPPER_DRIVERS in Configuration_adv.h

and set the pins to the following without any E0

#define X_STEP_PIN 15
#define X_DIR_PIN 21
#define X_ENABLE_PIN 14

#define E1_STEP_PIN 22
#define E1_DIR_PIN 23
#define E1_ENABLE_PIN 14

#define Y_STEP_PIN 3
#define Y_DIR_PIN 2
#define Y_ENABLE_PIN 26

#define Z_STEP_PIN 1
#define Z_DIR_PIN 0
#define Z_ENABLE_PIN 14

but I suspect it wont work as marlin is designed to have a E axis...

maybe adding the following will help.

#define E0_STEP_PIN -1
#define E0_DIR_PIN -1
#define E0_ENABLE_PIN -1


NB the two Z motors (that your using for Y) are in parallel, what this mean is that each stepper gets half the current... not good for a milling machine
Covert them to in series see https://www.instructables.com/id/Wiring-Your-Z-Stepper-Motors-in-Series



You could also use the cable on the X axis to control two steppers

"EDIT: i've noticed the pin XY-enable in the schematic, is that something i can use to make those two controller work with the same input?"
No. Enable is the line that tells the chip to listen to your step and direction lines now. You still have the separate step and direction lines activated simultaneous

Edited 1 time(s). Last edit at 03/08/2019 06:23AM by Dust.
Re: Repurpose Anet_v1.0 with Marlin
March 08, 2019 06:09AM
Yeah, i noticed that the two Z stepper are in parallel, but they get twice as much current and other controller, so it should be fine anyway, right?
EDIT: i can't resolve the url, thanks anyway, i'll find a way to rewire those stepper eventually...
But there's a bigger problem for what i can see, that i'll probably have to switch to a more feasable solution, this one might be easy but it's not natively compatible with what i want to do

Edited 1 time(s). Last edit at 03/08/2019 06:18AM by FenriX.
Re: Repurpose Anet_v1.0 with Marlin
March 08, 2019 06:17AM
If the stepper driver doesn't get to hot and thermally throttle...
Re: Repurpose Anet_v1.0 with Marlin
March 08, 2019 06:21AM
I know this is not the topic to ask about this, but can you suggest an alternative firmware and/or board?
In italy it's hard to find a good board without paying a lot in shipping
This is the reason i thought about this solution

Edited 1 time(s). Last edit at 03/08/2019 06:22AM by FenriX.
Re: Repurpose Anet_v1.0 with Marlin
March 08, 2019 06:31AM
reading the MPCNC page its say how to wire your steppers

It say to just use a splitter cable and wire them in series (with one coil reversed, since the steppers face each other)

https://www.v1engineering.com/assembly/wiring-the-steppers/


so you can use your board if you just make up two cables.

no need to mess about joining two stepper drivers or remapping io pins to move controllers

Edited 1 time(s). Last edit at 03/08/2019 06:34AM by Dust.
Re: Repurpose Anet_v1.0 with Marlin
March 08, 2019 06:40AM
So you think it will be enough to just use the x, y and z pins plugging 2 serialized stepper in x and y? I thought this was the worst way to do this... XD
Then, X, Y and Z pins, removing the Extruder... And i should be done?
With some slight modification i already used my 3d printer as a cnc so the last part should be easy...
Thanks! I should have found this answer on my own, i really need lot's of experience on these kind of things... It's embarassing XD
Sorry, only registered users may post in this forum.

Click here to login