Welcome! Log In Create A New Profile

Advanced

Marlin 1.04 wrong X and Y direction when auto calibrating

Posted by GordonL 
Marlin 1.04 wrong X and Y direction when auto calibrating
December 10, 2015 01:43PM
Good day members,

Just built my first printer. Mechanically I have it dialed in as close as I can (in my book), it can move from Y-100 to Y+100 with +/-1mm and
the printer head Z height is +/-1mm across that range (during manual movement in pronterface).

I am hoping to use auto calibration to finish this off but I am having trouble to use it properly, I am on Marlin 1.04, RUMBA board.

When I send the G30A command in pronterface, it does some pretty weired stuff, the screen indicates 1 set of coordinates, but the
actual printer is clearly going somewhere different.

Here is a rought discription after G30A, and what the LCD controller says the printer is probing at:
1. Home all axis----normal
2. probe at X0 Y-29 Z-20------(Y29 is my sensor offset, I can understand that, but the Z-20?, it is clearly probing on top of the bed)
3. probe at X0 Y-29 Z-20------(at this point it moved to roughly Y55, but screen says it is at Y-29??!)
4. probe at X0 Y71 Z-20-------(the scale is off)
5. probe at X-86 Y+21 Z-20----(at this point the print head is at about Y75, and X positive region, scale is off)
6. probe at X-86 Y-79 Z-20-----(again, printer clearly is still point at the positive regions of X and Y, scale is off)
7. probe at X0 Y-125 Z-20------(same as No.6)
8. probe at X86 Y-79 Z-20------(the Y is clearly wrong, it it still in the positive region, X scale is possibly wrong)
9. probe at X86 Y21 Z-20------(the scale is off)
10. move to X0 Y0 Z0-----------(way off, more like X0 Y62.5 Z0), then it tells me my physical end stops are not within 3mm tolerance.

In manual mode, I can home the printer, then lower the Z, and it will be dead center in my printer bed----I marked my printer bed and the
nozzle is pointing right at it every single time. I can also move it in X and Y and Z direction with reasonable accuracy.

It is only during G30A that the printer is doing some weired stuff.

Any ideas? Any feedback is gratefully received.I have also uploaded my config.h for your reference.

Thanks for your time in advance.

Kind regards

Gordon
Attachments:
open | download - Configuration.h (25.3 KB)
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 11, 2015 12:44AM
use the following commands for testing

G28 ; home
G1 Z20 ; goto Z20, just to be safe, mark where one of the carriages is
G1 Z50 ; measure to your mark, did it really move 30mm?
G1 X-80 ; should go to the left edge
G1 X80 ; right edge
G1 X0 Y80 ; back
G1 Y-80 ; front

Y may be negative in back. I don't remember.

This should tell you what is happening, and we can go from there. I just built a delta also and I tried a G29. It went up till I pulled the plug, like Z was reversed. I'm going to try 30A right now.

David
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 11, 2015 02:37AM
Good evening Dave,

Thanks for your suggestion.

I did as instructed by you and here are my results:

From z20 to z50, it moved 29.25 by my measurements----this make sense, the step/mm setting I put in is proportionally less step per mm.
If I use the default 160 step / mm setting, the z is spot on, but x and y is off----this tells me that my Delta radius is off slightly am I correct?
Or do I have to tweak some other settings somewhere?

x-80----left edge.
x80-----right edge.
x0 y80-front edge.
y-80----back edge.

All behaving as expected....this weired movement only happends when I use G30A.. sad smiley

Any more suggestions?

Thanks for your help.

Kind regards,

Gordon
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 11, 2015 03:02AM
Quote
GordonL
Good evening Dave,

Thanks for your suggestion.

I did as instructed by you and here are my results:

From z20 to z50, it moved 29.25 by my measurements----this make sense, the step/mm setting I put in is proportionally less step per mm.
If I use the default 160 step / mm setting, the z is spot on, but x and y is off----this tells me that my Delta radius is off slightly am I correct?
Or do I have to tweak some other settings somewhere?

x-80----left edge.
x80-----right edge.
x0 y80-front edge.
y-80----back edge.

All behaving as expected....this weired movement only happends when I use G30A.. sad smiley

Any more suggestions?

Thanks for your help.

Kind regards,

Gordon

Y should be + at the back and negative at the front Normally (ie Not sure if Marlin is different but suspect not) the front right motor is Y the front Left is X and the rear is Z I would suggest that you may have 2 of the motor positions swapped.
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 11, 2015 03:24AM
Good evening dougal 1957,

Thanks for your reply.

If I physically rotate my printer, so that front right motor is Y, front left motor is X, and back motor is Z (I am facing the printer so my left is X and my right is Y), then:

y80----head moves directly away from me, towards Z motor
y-80---head moves directly towards me
x80----head moves directly to my right (towards Y motor)
x-80---head moves directly to my left (towards X motor)

This all seems completly normal to me....I am rather lost sad smiley

One other thing I must mention, I have been using the arduino IDE example eeprom clear program to wipe the eeprom, didn't make any difference at all...

When you guys use marlin 1.04, do you guys use the default configuration.h or do you go to---> example configurations folder ---> delta folder, and use the configuration.h from there? Come to think of it, I might not have copied the

Configuration_adv.h file over, would that make a actual difference?

Thanks.

Kind regards,

Gordon Lin
Anonymous User
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 11, 2015 03:57AM
Quote
GordonL
When you guys use marlin 1.04, do you guys use the default configuration.h or do you go to---> example configurations folder ---> delta folder, and use the configuration.h from there? Come to think of it, I might not have copied the

OMG! - No Chance to use a Delta without config.h for a Delta...
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 11, 2015 04:10AM
U are confusing me, can you explain further please?

Thanks.
Anonymous User
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 11, 2015 04:31AM
You have to use the configuration-files from the Delta-Directory - else the Firmware will not know it is driving a Delta!
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 11, 2015 05:48AM
Don't confuse Marlin main branch and RichCattells? Marlin 1.04 branch. I haven't played with Richs version yet, but maybe you don't have to copy&paste delta config.files for his branch?!

Anyway, the way you described the movement here :
Quote

y80----head moves directly away from me, towards Z motor
y-80---head moves directly towards me
x80----head moves directly to my right (towards Y motor)
x-80---head moves directly to my left (towards X motor)

is correct.
But regarding steps/mm and scaling the printer you are wrong. You have to calibrate delta radius to get horizontal effector movement.
You have to calibrate delta rod length to scale the printer, not steps/mm.
-Olaf
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 11, 2015 05:56AM
I confirmed that y-80 is at the front, and y80 is at the back in front of the Z tower. Your directions are reversed. -X is to your left, +X to the right.

I looked at you Configuration.h file and it looks ok. It does have #define DELTA .

Can you confirm that looking at the RAMPS board with the three steppers driver cards at the bottom the green wire from the motor connectors are on the left?

steps per mm should all be the same for X,Y,Z. I found this in another version of Marlin for a delta:

#define XYZ_FULL_STEPS_PER_ROTATION 200
#define XYZ_MICROSTEPS 16
#define XYZ_BELT_PITCH 1
#define XYZ_PULLEY_TEETH 16
#define XYZ_STEPS (XYZ_FULL_STEPS_PER_ROTATION * XYZ_MICROSTEPS / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH))

#define DEFAULT_AXIS_STEPS_PER_UNIT {XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 184.8} == (200, 200, 200, 184.6)

Those are my settings, but I think I may have fugded the belt pitch since I think a GT2 belt has a pitch of 2, but my measured movements were 50% too short with 100 steps per mm.


if DELTA_RADIUS is too low starting at X0, Y0, Z30 , moving too X0, Y80, Z30 the nozzle will go lower as Y increases (or decreases, i.e. larger negatives). Movements to the edges form an upside down bowl (Convex)

I think you can only check steps per mm for X if Y=0, check Y at X=0. As X moves away from the origin Y scales down. I think I have seen this but have not really measured anything.

I think I am getting correct movements for G29 or G30 A, but my Z-probe wobbles a lot and is not at all consistent. The design in my opinion is not very good.

if DELTA_RADIUS is too high the movements form a bowl shape (concave), higher at the edges.

I measured delta_radius directly, it's the distance from the rod pivot centerline at the carriage, to the 0,0 point on the bed. Due to the shape of my HKBay Kossel XL carriages this was really easy. See image. With that value movement across the bed doesn't vary in Z at all.

get the movement directions sorted and I should have a better idea of where to go from there by tomorrow smiling smiley
Attachments:
open | download - delta_radius1.jpg (276.3 KB)
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 11, 2015 01:17PM
Quote
o_lampe
Don't confuse Marlin main branch and RichCattells? Marlin 1.04 branch. I haven't played with Richs version yet, but maybe you don't have to copy&paste delta config.files for his branch?!

Anyway, the way you described the movement here :
Quote

y80----head moves directly away from me, towards Z motor
y-80---head moves directly towards me
x80----head moves directly to my right (towards Y motor)
x-80---head moves directly to my left (towards X motor)

is correct.
But regarding steps/mm and scaling the printer you are wrong. You have to calibrate delta radius to get horizontal effector movement.
You have to calibrate delta rod length to scale the printer, not steps/mm.
-Olaf

Good day Olaf,

Thanks for the confirmation.

No wonder when I change the steps/mm for X and Y, the perfect z scale goes out. That make sense. I will tweak the rod length to calibrate.

Still doesn't explain why the printer is not moving where it tells me is moving when using G30A tho.... sad smiley

I am actually confused by the branches of the firmware now, can you provide official links to each one? I can google them, but I would like
the links you provided for double checking, if you don't mind.

Thanks a lot smiling smiley

Edited 1 time(s). Last edit at 12/11/2015 01:20PM by GordonL.
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 11, 2015 02:10PM
Thanks for your reply David.

Quote
voi9viper
I confirmed that y-80 is at the front, and y80 is at the back in front of the Z tower. Your directions are reversed. -X is to your left, +X to the right.

I think you might be looking at a earlier post I made, I was confused then, but Olaf already confirmed that my movement directions are correct.
Y+ away from me
Y- towards me.
X+ towards my left
X- towards my right



I looked at you Configuration.h file and it looks ok. It does have #define DELTA .

Thanks, that is a relieve tongue sticking out smiley

Can you confirm that looking at the RAMPS board with the three steppers driver cards at the bottom the green wire from the motor connectors are on the left?

Sorry I am not familiar with RAMPS board, I am using a rumba board------I am hoping I can use the diamond hot end one day and do proper color blending.


steps per mm should all be the same for X,Y,Z. I found this in another version of Marlin for a delta:

#define XYZ_FULL_STEPS_PER_ROTATION 200
#define XYZ_MICROSTEPS 16
#define XYZ_BELT_PITCH 1
#define XYZ_PULLEY_TEETH 16
#define XYZ_STEPS (XYZ_FULL_STEPS_PER_ROTATION * XYZ_MICROSTEPS / double(XYZ_BELT_PITCH) / double(XYZ_PULLEY_TEETH))

#define DEFAULT_AXIS_STEPS_PER_UNIT {XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 184.8} == (200, 200, 200, 184.6)

Those are my settings, but I think I may have fugded the belt pitch since I think a GT2 belt has a pitch of 2, but my measured movements were 50% too short with 100 steps per mm.

If you are using GT2 belts, I believe the pitch should be 2.


if DELTA_RADIUS is too low starting at X0, Y0, Z30 , moving too X0, Y80, Z30 the nozzle will go lower as Y increases (or decreases, i.e. larger negatives). Movements to the edges form an upside down bowl (Convex)

I think you can only check steps per mm for X if Y=0, check Y at X=0. As X moves away from the origin Y scales down. I think I have seen this but have not really measured anything.

I think I am getting correct movements for G29 or G30 A, but my Z-probe wobbles a lot and is not at all consistent. The design in my opinion is not very good.

if DELTA_RADIUS is too high the movements form a bowl shape (concave), higher at the edges.

I measured delta_radius directly, it's the distance from the rod pivot centerline at the carriage, to the 0,0 point on the bed. Due to the shape of my HKBay Kossel XL carriages this was really easy. See image. With that value movement across the bed doesn't vary in Z at all.

Going from the pic you uploaded, we effectively have the same set up, except my parts I bought from robodigg and are all aluminium....I used a cheap infra red module from banggood for my z-probe, seem to give consistent readings.

May I confirm with you the exact link you downloaded your firmware from? Since you are getting the correct movements in G30A?



get the movement directions sorted and I should have a better idea of where to go from there by tomorrow smiling smiley
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 11, 2015 02:53PM
Quote
o_lampe
Don't confuse Marlin main branch and RichCattells? Marlin 1.04 branch. I haven't played with Richs version yet, but maybe you don't have to copy&paste delta config.files for his branch?!

Anyway, the way you described the movement here :
Quote

y80----head moves directly away from me, towards Z motor
y-80---head moves directly towards me
x80----head moves directly to my right (towards Y motor)
x-80---head moves directly to my left (towards X motor)

is correct.
But regarding steps/mm and scaling the printer you are wrong. You have to calibrate delta radius to get horizontal effector movement.
You have to calibrate delta rod length to scale the printer, not steps/mm.
-Olaf

Good day Olaf,

I adjusted my rod length, and I now have very accurate x and y scale, thanks!

Still trying to figure out the auto calibration indicated movement vs actual movement issue tho... sad smiley
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 11, 2015 04:25PM
I modified my z probe to prevent wobbles, so i am about to give this another try. Where did you get the firmware you are running? I want to grab a copy, use my Configuration.h, and see what happens.
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 11, 2015 04:46PM
Quote
voi9viper
I modified my z probe to prevent wobbles, so i am about to give this another try. Where did you get the firmware you are running? I want to grab a copy, use my Configuration.h, and see what happens.

Here:
[github.com]

I believe this is a dedicated Delta firmware with auto calibration----I still went ahead and copied the Configuration.h from the example configuration folder.

Do note that this is not working for me correctly tho, I can't get the auto calibration going properly----the reason for this thread.

I used one of these, since I have a aluminium heated bed:
[www.banggood.com]

For your glass bed it is a bit trickier, I would imagine your current set up of a physical switch is best.
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 12, 2015 05:53AM
I cheated. I had a Azteeg X5 on order, and it came in today. The first thing I did was home the printer, and the speed scared me. After a couple of minor issues like the Z-probe not enabled in the smoothieboard firmware the first G32 command was perfect. Print speed is way way higher than the Mega2560/RAMPs 1.4 boards, and the connections were even easier. So was the initial setup. For a little more then $100 it's well worth it
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 12, 2015 12:57PM
Quote
voi9viper
I cheated. I had a Azteeg X5 on order, and it came in today. The first thing I did was home the printer, and the speed scared me. After a couple of minor issues like the Z-probe not enabled in the smoothieboard firmware the first G32 command was perfect. Print speed is way way higher than the Mega2560/RAMPs 1.4 boards, and the connections were even easier. So was the initial setup. For a little more then $100 it's well worth it

I am glad that it worked well for you. I am also looking at a smoothieboard----do you edit the firmwware the same way? or do you have a softward tool to do it? Being a 32 bit cotex-m3 cpu chip
I would expect things to be extremely smooth and, from the ease of use point of view, very polished, like using a computer rather than a hobby grade setup?

Thanks.

Kind regards,

Gordon
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 12, 2015 01:36PM
Smoothie uses a text config file on the SD card. It's very easy to set up. I spent less than 2 hours and had the printer running correctly. I have not even looked at the source code. They even mount the SD card over USB so you can edit it while the card is in the board. There are also extra G666 commands so you can change the configuration on the fly. The time saved is worth more than than price of the board, at least for me, even if I am retired with too much free time smiling smiley The only issue I had was a big warning to unmount the SD card from the host while calibrating the printer. Those linux guys!!! On windows you need to eject the SD Card that gets mounted over USB or it screws up the interrupt timing in the smoothie firmware. I kept taking the SD card out of the board, and of course that does not work. I think the config file supplied with the firmware will work for you as well, after changing the size parameters. Also, the Z-probe was not enabled and I had to invert the logic on the pin. In the config file you just add or delete an "!" from the pin assignment:

# optional Z probe [smoothieware.org]
zprobe.enable true # set to true to enable a zprobe
zprobe.probe_pin 1.29!^ # pin probe is attached to if NC remove the !
zprobe.slow_feedrate 5 # mm/sec probe feed rate
#zprobe.debounce_count 100 # set if noisy
zprobe.fast_feedrate 100 # move feedrate
zprobe.probe_height 5 # how much above bed to start probe

I was really surprised at the easy setup.

David
Re: Marlin 1.04 wrong X and Y direction when auto calibrating
December 12, 2015 01:41PM
Smoothie uses a text config file on the SD card. It's very easy to set up. I spent less than 2 hours and had the printer running correctly. I have not even looked at the source code. They even mount the SD card over USB so you can edit it while the card is in the board. There are also extra G666 commands so you can change the configuration on the fly. The time saved is worth more than than price of the board, at least for me, even if I am retired with too much free time smiling smiley The only issue I had was a big warning to unmount the SD card from the host while calibrating the printer. Those linux guys!!! On windows you need to eject the SD Card that gets mounted over USB or it screws up the interrupt timing in the smoothie firmware. I kept taking the SD card out of the board, and of course that does not work. I think the config file supplied with the firmware will work for you as well, after changing the size parameters. Also, the Z-probe was not enabled and I had to invert the logic on the pin. In the config file you just add or delete an "!" from the pin assignment:

I tried to post a config sample but reprap said I looked like an automated bot, so I'm attaching a config file.

I was really surprised at the easy setup.

David
Attachments:
open | download - config.txt (14.2 KB)
Sorry, only registered users may post in this forum.

Click here to login