Welcome! Log In Create A New Profile

Advanced

freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander

Posted by ractorIII 
freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander
January 10, 2020 05:50PM
I think I have my problem narrowed down to an issue getting pin D59/A5 to function as the Direction pin for E2

I'm working with a mixing extruder Cartesian setup that utilizes 5 extruder steppers - all is well except E2 always rotates forward - even if it is given a negative value.

Please see:

[reprap.org]

The appropriate changes have been made to pins.h, and I have nulled (-1) every designation for D59 in pins_RAMPS.h

If you have any expertise - please help. I'm starting to set up a new controller with Duet Wifi but would still really like to solve this final issue with my ramps setup.
Re: freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander
January 10, 2020 07:16PM
Try M43 (you need to enable it first) [marlinfw.org] (for debugging only, don't leave it enabled)

Then it will show if you have managed to miss something for pin 59
Re: freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander
January 11, 2020 10:21AM
Thanks again Dust - I didn't know about the pins debugging feature - It looks like the pin is correct - M43 yields:

'PIN: 59 Port: F5 (A 5) E2_DIR_PIN protected'

It looks now like I've been trouble shooting the wrong pin - it looks like this is my confliction:

PIN: 1 Port: E1 TXD protected
. E4_DIR_PIN protected

I'll get into this a little later this afternoon - but if anyone can look at my M43 report (file attached) that would be incredibly helpful!

Edited 2 time(s). Last edit at 01/11/2020 11:13AM by ractorIII.
Attachments:
open | download - marlin_pins_debugging.txt (8.3 KB)
Re: freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander
January 11, 2020 11:14AM
yes in your pins.h

from previous post you added

#ifndef E4_DIR_PIN
#define E4_DIR_PIN 1


But you cant use pins D0 or D1 ad they are hardwired to the usb/serial converter chip (ie your usb connection)
D0 and D1 is also known as RX0 and TX0 (serial0 lines)
Re: freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander
January 11, 2020 11:24AM
depending on your stepper driver types, IF you don't need them I would set all CS_PIN to -1

The simpler A4988 and DRV8825 don't use the CS_PIN's
Re: freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander
January 11, 2020 11:32AM
It's interesting that pin 1 can't be used... It's use is described in the configuration for the x3 expander:

[reprap.org]

[www.reprap.me]

I guess this is the issue that I need to resolve...
Re: freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander
January 11, 2020 12:38PM
In an email from RepRap.me (the vendor that supplied the x3 expander):

"The DIR#3 pin is connected to I/O pin 1, which in some firmwares is used for serial communication.

If you can disable the communication in the firmware, you can take control of the I/O pin 1"

does this make sense? how would I go about this and will it cause other problems?
Re: freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander
January 11, 2020 09:38PM
"If you can disable the communication in the firmware, you can take control of the I/O pin 1"

does this make sense? how would I go about this and will it cause other problems?"

This will disable the usb cable... how are you going to control the printer? at least while testing you really need the usb cable.
Re: freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander
January 12, 2020 11:25AM
Dust, thanks for clarifying - with your help, I'm learning a lot!

My thought at the moment is that I can:

1) break that one wire out of the harness and route it to D11
2) change the pin assignments in pins.h so that D11 controls DIR on E4
3) verify that there are no conflicts in pins_RAMPS.h and I should be ready to roll.

Thoughts?
Re: freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander
January 12, 2020 04:15PM
Sounds like a plan.
Re: freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander
January 12, 2020 05:18PM
Quote
ractorIII
My thought at the moment is that I can:

1) break that one wire out of the harness and route it to D11
2) change the pin assignments in pins.h so that D11 controls DIR on E4
3) verify that there are no conflicts in pins_RAMPS.h and I should be ready to roll.

Thoughts?


Would like more information on this, would you please post more on what you have done.
Really want to add 3 extruders to my MPCNC using Ramps 1.6 and Adruino Mega 2560.
I'm using all Ramps 1.6 Stepper drivers now two for X two for Y and one for Z axis, would truly like a tricolor-ed extruder as an addition.

Is this the Stepper Expander you are using

[www.reprap.me]

Edited 1 time(s). Last edit at 01/12/2020 07:41PM by Roberts_Clif.


Computer Programmer / Electronics Technician
Re: freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander
January 12, 2020 05:49PM
Quote
Dust
depending on your stepper driver types, IF you don't need them I would set all CS_PIN to -1

The simpler A4988 and DRV8825 don't use the CS_PIN's

Knew this but thank you for pointing it out. Nice to know for sure.

Edited 2 time(s). Last edit at 01/12/2020 05:51PM by Roberts_Clif.


Computer Programmer / Electronics Technician
Re: freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander
January 12, 2020 09:05PM
@Roberts_Clif he is using this [www.reprap.me]

But they refer to the documentation here [reprap.org]
Which suggests using D1... not a good idea if you wish to use USB
Re: freeing up pin D59 in Marlin 2.0 Mega / Ramps / x3 expander
January 12, 2020 09:30PM
@Roberts_Clif - Dust is really the pro in this conversation, but if I can add more note - the D1 issue won't be a hurdle with the ramps + expander unless you are working with 5 extruder steppers. You should be able to go up to 4 without this particular issue.
Sorry, only registered users may post in this forum.

Click here to login