Marlin firmware Z axis fails with #define COREXY uncommented

1,306 views
Skip to first unread message

jesse mulalley

unread,
Apr 1, 2016, 10:15:32 AM4/1/16
to H-bot and CoreXY 3d printers
Hi, I am running the Sainsmart all in one board with 8825 stepper drivers. The Z axis functions properly with //#define COREXY but when I uncomment to use my COREXY settings then the Z axis steppers stop working properly. 

Marlin 1.1.0 RC3 firmware
0.4A stepper motors connected in parallel to two 8mm leadscrews(one on each side)


Thanks in advanced!

adam paul

unread,
Apr 1, 2016, 10:28:13 AM4/1/16
to H-bot and CoreXY 3d printers
I would think your z would remain"normal"and you would define XY as your coreXY axis? Just a guess,I don't use marlin.

Jetguy

unread,
Apr 1, 2016, 10:32:04 AM4/1/16
to H-bot and CoreXY 3d printers
Tip-Use Repetier firmware instead of banging your head against the wall trying to make marlin work.
It defaults to ramps 1.4 and mega2560- should be a no brainer.

Also, do not forget DRV8825 drivers require specific timing in order to work. As such, you must also define the delay in config.h
you may have to hand edit this one in to config.h at the end.
#define STEPPER_HIGH_DELAY 2
Again, I use 2 for anytime I use a DRV8825 driver.

It's supposed to be ramps 1.4 and a 2560, so just use that in the online configuration.
You may have to figure out the fans and some other stuff, but at least motion and printing will be 2000% better than now.
http://rigidtalk.com/wiki/index.php?title=SainSmart_2in1

Marlin Configuration.h

If you are using the Marlin based firmware be sure to go through the Rigidbot configuration.h and copy all the required parameters.

Set or leave the motherboard assignment as RAMPS_13_EEB in configuration.h

This tells it it's going to be Extruder Extruder and Heated Bed but we're going to trick it to include fan and correct the heaters pins as labeled, the rest is already correct for the board assignement:

The following will assign all pins correctly as they are labeled on the actual board.

in pins_RAMPS_13.h changed the following:


#if MB(RAMPS_13_EFF) to #if MB(RAMPS_13_EEB) // <--- EBB has 90% of the values we need, but we rename it EFF to EEB so that it keeps the fan assignment from EFF then change the pins on the following lines to correspond.


#define FAN_PIN 7
#define HEATER_0_PIN 9
#define HEATER_1_PIN 10
#define HEATER_BED_PIN 8

Jetguy

unread,
Apr 1, 2016, 10:39:51 AM4/1/16
to H-bot and CoreXY 3d printers
Again, if this isn't dead clear, you have a RAMPS 1.4 + Arduino Mega 2560 all in one.
AKA RAMPS 1.4 to anybody else in a discussion about firmware.

As such, you have a choice in what firmware to run. Marlin is open source- but far too many people are poking their hands into it at the same time resulting in chaos.
So, it's not as well tested and yes- you change a config and blamo- now you find it doesn't work correctly.

Repetier is ALSO open source, but controlled. They pull in and test versions and when you use the online tool and configuration, 99.999% of the time, it's going to work.

So again, for basic points of discussion, you have RAMPS 1.4 and simply want to run Core XY. In addition, you have DRV8825s and need to run then with proper delay in configuration.h to not confuse the chip.

One you enter those things, plus specifics of your printer (steps per mm for all axis, thermistors, LCD, etc....) there is no reason why this won't work 1000% better than the mess you have now.

Jetguy

unread,
Apr 1, 2016, 10:41:46 AM4/1/16
to H-bot and CoreXY 3d printers
Also, I included the link from the wiki specific to that board. All they were talking about is somebody added a custom define for that board in that specific version of Marlin so that the fans and other details came out on specific outputs. That's really trivial stuff, let's get motion right first and worry about the petty stuff at the end.
Message has been deleted

Jetguy

unread,
Apr 1, 2016, 10:47:46 AM4/1/16
to H-bot and CoreXY 3d printers
Also remember the important things.

It's an untested setup. As such, unplug/remove from the screw terminals the heated bed and the extruder heater.
Leave the thermistors plugged in. We need temp feedback, but for safety, we don't want heaters connected.

Flash your test firmware, then test motion, get that sorted, then command a low temp like 50C for the extruder and observe what output LED turns on.
Yes, you would get a decoupled error and shutdown after some time. That's GOOD. If you don't get that, you need to go back and define it in for your safety.
Do the same for the heated bed and also note the fans (command the fan on and see what output that is too).

Then ONLY after you know 100% what output is what, and that heater decoupled worked, then connect heaters and again, do the low temp 50C test to see that they work. Then after all that, do a PID tune and then you are nearing ready to print.

This is the proper and safe way to commission a new board and firmware.


On Friday, April 1, 2016 at 10:39:51 AM UTC-4, Jetguy wrote:

jesse mulalley

unread,
Apr 1, 2016, 10:49:37 AM4/1/16
to H-bot and CoreXY 3d printers
Ok, Thank you for the information, very helpful. I will try the Repetier firmware first. I also have a pile of A4988 stepper drivers to use as well, I see that the jumper settings are different as well. 

Jetguy

unread,
Apr 1, 2016, 11:06:55 AM4/1/16
to H-bot and CoreXY 3d printers
Yes, sorry, 3D printer building from scratch is not easy or straightforward and unfortunately, the info for making a given firmware work with the thousands of iterations of electronics out there, not to mention drivers and configs is a lot to learn. Even I'm not an expert and probably don't get it right the first time. I just happen to know a few places to looks and some of the gotchas we've seen across the dozens of forums I read daily.

If you get stuck, I just happen to have that same board not being used on my parts pile and can maybe test some configs this weekend.


On Friday, April 1, 2016 at 10:49:37 AM UTC-4, jesse mulalley wrote:

jesse mulalley

unread,
Apr 1, 2016, 11:31:01 AM4/1/16
to H-bot and CoreXY 3d printers
Movement is working perfectly in all dimensions using Repetier. Now I need to sort out the heater pins for the bed and the extruder. I have a RepRapDiscount full display and it only shows extruder temp, no bed temp. What software do you run for command/control? MatterController or Cura or another? 

jesse mulalley

unread,
Apr 1, 2016, 11:38:23 AM4/1/16
to H-bot and CoreXY 3d printers
You are correct about the stepper timing, movement is delayed, moving 200mm command only moves about 100mm

Jetguy

unread,
Apr 1, 2016, 11:44:16 AM4/1/16
to H-bot and CoreXY 3d printers
Repetier host- of course. http://www.repetier.com/

you probably didn't define a heated bed?

Jetguy

unread,
Apr 1, 2016, 11:47:12 AM4/1/16
to H-bot and CoreXY 3d printers
The reason you really, really, really want to do that is once you connect with Repetier host, then you can read and write the EEPROM settings and that's where steps per mm is stored (along with a bunch of other common settings such as PID, control type, limits, and other functions can be set without flashing new firmware).

Jetguy

unread,
Apr 1, 2016, 11:51:48 AM4/1/16
to H-bot and CoreXY 3d printers
Also, let's assume you did enter the delay setting and also set your drivers jumpers right, it's a known thing that marlin got the Core XY motion wrong and there was an error that you have to double the X and Y steps per mm.

Lets say you used 1/16th stepping, 20 tooth GT 2 pulleys, that should be 80 steps per mm.
However, some Core XY firmware requires 160 steps per mm to get the correct XY distance.

I cannot remember if Repetier had this issue or not, just saying, after ensuring you fixed the delay thing for DRV8825s, try this as a second fix.

jesse mulalley

unread,
Apr 1, 2016, 12:29:39 PM4/1/16
to H-bot and CoreXY 3d printers
Yes, I am using G20 pulleys and 1/16th jumper settings. I changed the mm/step from 80 to 160 and there was no change. 

I had to change the configuration.h to read 
HAVE_HEATED_BED 1 //now it works on BDE pin

Extruder heater works on ET1 (not on ET0)

Been having troubles setting my vref on the X/Y stepper drivers. My Nema 17's are 1.2A. What I have found the vref should be 0.6VDC but for some reason my drivers only go from 1.6VDC ~ 3VDC so I don't know what the problem is there. Homing all axis works but axis quickly lose resolution, the axis shows -20mm at home position....

What is the stepper timing you are referring to? 

Thank you for your help,

jesse mulalley

unread,
Apr 1, 2016, 12:45:05 PM4/1/16
to H-bot and CoreXY 3d printers
The Repetier Host is the way to go! It looks like my steps per mm never changed from 80 to 160 the last time I flashed. Fixed that problem, 160mm per step is the fix. 

Ben Holmes

unread,
Apr 1, 2016, 12:57:12 PM4/1/16
to jesse mulalley, H-bot and CoreXY 3d printers
One of the biggest problems in using Repetier in trying to quickly iterate testing configuration is the EEPROM saving of parameters over the config file.  Whenever you change the configuration inside the config file you also have to change the EEPROM_MODE to a value other than what you last sent.  I alternate changing it from 1 to 2 and then back to 1.  If you also use Repetier Host you can change the EEPROM settings right within the software which is much easier.

Ben

--
You received this message because you are subscribed to the Google Groups "H-bot and CoreXY 3d printers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h-bot-and-corexy-3d-...@googlegroups.com.
Visit this group at https://groups.google.com/group/h-bot-and-corexy-3d-printers.

Jetguy

unread,
Apr 1, 2016, 3:28:48 PM4/1/16
to H-bot and CoreXY 3d printers
You MUST fix the timing in configuration.h when using DRV8825s.
Also, do not forget DRV8825 drivers require specific timing in order to work. As such, you must also define the delay in config.h

Again, I use 2 for anytime I use a DRV8825 driver regardless of coreXY mode or not.

Hint, open config.g and search for "STEPPER_HIGH_DELAY"
The default is 0 and that won't work with DRV8825s.
Reply all
Reply to author
Forward
0 new messages