MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.28k stars 19.23k forks source link

How to set an E plug for z2? [dual z] #11097

Closed Xenoyr closed 6 years ago

Xenoyr commented 6 years ago

Hi, guys, I'm really sorry if the section isnt correct.. but I didnt find anything else.. and also no one could hep me about that.. anyway, I'm pretty noob, so probabily is my fault

However, I tryed activing the `

define Z_DUAL_STEPPER_DRIVERS`

and also specifying or not that the second Z motor is using an tmc2208

But always I have this error:

exit status 1
#error "No E stepper plug left for Z2!"

More defined error: [spoiler]

> In file included from C:\Users\L\AppData\Local\Temp\arduino_build_997957\sketch\MarlinConfig.h:39:0,

                 from C:\Users\L\AppData\Local\Temp\arduino_build_997957\sketch\G26_Mesh_Validation_Tool.cpp:27:

pins.h:766: error: #error "No E stepper plug left for Z2!"

       #error "No E stepper plug left for Z2!"

        ^

In file included from C:\Users\L\AppData\Local\Temp\arduino_build_997957\sketch\MarlinConfig.h:41:0,

                 from C:\Users\L\AppData\Local\Temp\arduino_build_997957\sketch\G26_Mesh_Validation_Tool.cpp:27:

SanityCheck.h:354: error: #error "Z_DUAL_STEPPER_DRIVERS requires Z2 pins (and an extra E plug)."

   #error "Z_DUAL_STEPPER_DRIVERS requires Z2 pins (and an extra E plug)."

[/spoiler]

Into the pins_TRIGORILLA_14.h

#ifndef BOARD_NAME
  #define BOARD_NAME "Anycubic RAMPS 1.4"
#endif

#define IS_RAMPS_EFB

#define FAN2_PIN             44
#define ORIG_E0_AUTO_FAN_PIN 44

#include "pins_RAMPS_13.h"

#undef E1_STEP_PIN
#undef E1_DIR_PIN
#undef E1_ENABLE_PIN 
#undef E1_CS_PIN

I'm using Marlin bugfix 1.1.x I'm using 4 tmc2208 drivers (with the first setup/board/driver, 4 drivers were enought for everything) I'm using an trigorilla board 1.4 Sorry, for my bad english and maybe intrusion and thanks

GMagician commented 6 years ago

I think that

#undef E1_STEP_PIN
#undef E1_DIR_PIN
#undef E1_ENABLE_PIN
#undef E1_CS_PIN

says to Marlin that no 2nd extruder exists. Maybe Trigorilla pinout is not completed. For sure undef lead to think that E1 doesn't uses standard ramps pin, otherwise there is no sense to remove them

Xenoyr commented 6 years ago

I thought that it was not complete.. But I dont have the knowlege to complete the pins of the trigorilla.. any help? to declare the orther 2 plug (the trigorilla has 6 plug for steppers.. but on pinout are declared 4 of them..) and make working the secon Z axis? sorry and thanks

GMagician commented 6 years ago

Sorry, I can't find documentation about it. You may try removing undef and see what happens (but this may be dangerous). Best would be using a Ohmmeter to check where E1 stick pins goes into 2560 (you need to follow dir, step, en, and CS)

crzcrz commented 6 years ago

I thought that it was not complete.. But I dont have the knowlege to complete the pins of the trigorilla.. any help? to declare the orther 2 plug (the trigorilla has 6 plug for steppers.. but on pinout are declared 4 of them..) and make working the secon Z axis? sorry and thanks

Trigorilla board has 5 stepper driver sockets, and the pinout should be (mostly) identical to RAMPS. There are 6 stepper connectors because there are 2 for the Z-axis, wired either in series, or in parallel. I'm not quite sure which way it is, because I use two independent Z motors myself, and consequently have the second one connected to E1.

Just remove all 4 #undef E1_* lines and it should work. At least it does for me with bugfix-2.0.x.

It is not quite clear to me why pins_TRIGORILLA_14.h and pins_TRIGORILLA_13.h even have these undefs, perhaps the person who submitted them was not using E1.

GMagician commented 6 years ago

It is not quite clear to me why pins_TRIGORILLA_14.h and pins_TRIGORILLA_13.h even have these undefs, perhaps the person who submitted them was not using E1.

see #8349 about why there is 1.4 and 1.3

I'll post a PR to fix this. Please leave this open until fix will be merged Thanks

GMagician commented 6 years ago

@thinkyhead I don't have enough history knowledge, it seems that #undef in trigorilla are wrong. May I remove them and post a PR?

crzcrz commented 6 years ago

There are 6 stepper connectors because there are 2 for the Z-axis, wired either in series, or in parallel. I'm not quite sure which way it is, because I use two independent Z motors myself, and consequently have the second one connected to E1.

It's probably in parallel, because otherwise it would not work with just one motor connected and there are no jumpers to short the unused one.

GMagician commented 6 years ago

Yes only 5 are independent one is duplicated for Z double motor

crzcrz commented 6 years ago

This is defined in pins_TRIGORILLA.h in derhopp's custom Marlin build for Anycubic i3 Mega (which uses the Trigirilla board):

#define Z2_STEP_PIN        36
#define Z2_DIR_PIN         34
#define Z2_ENABLE_PIN      30

This is identical to E1 pins in RAMPS.

There is, however, a conflict between FAN2_PIN (pins_TRIGORILLA_14.h) and E1_CS_PIN (pins_RAMPS.h), both of which use pin 44.

crzcrz commented 6 years ago

It seems that chip select pins are only used with TMC2130 drivers, so no problem here for majority of people.

thinkyhead commented 6 years ago

I don't have enough history knowledge, it seems that #undef in trigorilla are wrong. May I remove them and post a PR?

@GMagician — If we can confirm the true number of E stepper plugs that exist on the board.

@Xenoyr — How many E steppers can fit on a Trigorilla 1.4 board? If more than one, then all you need to do is remove those #undef lines from pins_TRIGORILLA_14.h and Z2 will automatically be assigned to the E1 pins.

crzcrz commented 6 years ago

@thinkyhead Here's the board. 5 drivers - X, Y, Z, E0, and E1.

img_0500

thinkyhead commented 6 years ago

Good to know, thanks! I will update the Trigorilla 1.4 pins. Also, do we know whether all the pins match up to RAMPS 1.3 or RAMPS 1.4? The only difference between these is the first servo pin. On RAMPS 1.3 it's pin 7, and on RAMPS 1.4 it's pin 11.

crzcrz commented 6 years ago

I guess I could poke the poor thing with a multimeter and find out.

crzcrz commented 6 years ago

Just to confirm, you want to know if the S0/S header pin from the mostly unpopulated "servos" group on the right to the big capacitor is connected to digital pin 7 or 11 of the MCU? That would be 10'th or 2'nd pin, counting from the bottom on the left side of the chip, respectively?

Xenoyr commented 6 years ago

@crzcrz so.. I need only to add those in the pinout of the trigorilla?

#define Z2_STEP_PIN        36
#define Z2_DIR_PIN         34
#define Z2_ENABLE_PIN      30

Anyway.. just find another problem (idk if it is over theme or not) I put the tmc 2208 at 0.8V (I didnt put them to 1.2V, because in this moment I havent a case, and also I have a microfan, I wouldnt want to risk an overheating) But anyway the steppers go to only 1 direction, they cannot go in the opposite direction the lcd says "endstop x/y/z(or whatever it is)", even if nothing is touching them, what's the problem?

thinkyhead commented 6 years ago

I guess I could poke the poor thing with a multimeter and find out.

Or you could use M43 T (PINS_DEBUGGING).

thinkyhead commented 6 years ago

@Xenoyr — so.. I need only to add those in the pinout of the trigorilla?

Nope. You just set Z_DUAL_STEPPER_DRIVERS and Marlin does the rest, assuming these lines are removed from pins_TRIGORILLA_14.h:

#undef E1_STEP_PIN
#undef E1_DIR_PIN
#undef E1_ENABLE_PIN
#undef E1_CS_PIN
Xenoyr commented 6 years ago

futhermore often, if I try to make it go in the opposite direction.. or ir doesnt take the command ore if it takes, go in the opposite direction, or better, in the same direction as before (only one directio)

Xenoyr commented 6 years ago

@thinkyhead ok thanks.. I will trying anyway for the steppers.. what can be the problem? (I hope it is not the board again, otherwise I will try to send it back for the second time -.-)

thinkyhead commented 6 years ago

Hard to say. When a stepper fails to go in the commanded direction it's usually bad wiring or a bad stepper driver.

crzcrz commented 6 years ago

@Xenoyr It is not clear from your description what exactly is going on. Is it the one axis misbehaving, or all of them? Did the problem appear after you swapped old steppers to TMC2208, or are TMCs the only steppers you have? If you give us more information we can try helping you further.

crzcrz commented 6 years ago

@thinkyhead I just buzzed the board with a multimeter and Servo0 is connected to digital pin 11 on the MCU. So at least mine matches RAMPS 1.3. There may be other revisions of the Trigorilla board in the wild of course.

thinkyhead commented 6 years ago

A Servo0 pin of 11 corresponds to RAMPS 1.4, so Trigorilla is using a good numbering scheme.

Xenoyr commented 6 years ago

@crzcrz I think I solved via software.. but Always I have another problem.. the endstops are not readen for any reason, they are all connected well, but still they are not readen.. so the boards slam to infinity to the endstop without halt anyway yes I use only tmc 2208 (I have also the a4998 but in this board never used..) ps: does anyone here the pinout scheme of this board? I google it but I didnt find anything :-/

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.