Notifications
Clear all

Enabling Auto Leveling in Firmware  

Strona 3 / 5
  RSS
KenKelso
(@kenkelso)
Eminent Member
Re: Enabling Auto Leveling in Firmware

@Peter

I have spent hours trying different things to get servos to work in the firmware but whatever I do after servo.attach I lose the steppers. Running the stepper interrupt initialisation(st_init) after servo.attach/detach has no effect .

So I have now connected an Arduino to pin 3 of the P3 connector, hacked the Marlin firmware and written a bit of servo code on the Arduino and it works a treat. The repeatability is good with a Standard Deviation of 0.008253 over 10 probings.

If anyone is interested I will tidy up the code and post it along with the servo mounting bracket to go on the extruder fan to Thingiverse or somewhere. There are too many changes to the firmware to explain all the edits required.

Those of you with inductive or capacitive probes I would be interest to see the results of a repeatability test. Just send an M48 to the printer from Prontaface etc. and tell me the Standard Deviation reported.

My values are:
Capacitance Probe = 0.05715
Inductive Probe = 0.0545
Manual Micro Switch = 0.02121
Servo/Micro Switch = 0.005565

Ken

Opublikowany : 09/01/2016 12:37 am
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Enabling Auto Leveling in Firmware

Hi Ken

Sorry I was unable to provide a solution; using an Arduino will work well, but it's not as "neat" as I would like to have...

One day I will hopefully get chance to go through the coding to find out the reason why.

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Opublikowany : 09/01/2016 9:00 pm
nathan.h
(@nathan-h)
Eminent Member
Topic starter answered:
Re: Enabling Auto Leveling in Firmware

@Ken

Which inductive probe do you have and what kind of surface inductive material are you using? When I use M48 at all four corners of my bed I get STD in range from 0.004-0.007. It seems odd that your results differ by an order of magnitude.

-Nate

Opublikowany : 10/01/2016 3:10 am
KenKelso
(@kenkelso)
Eminent Member
Re: Enabling Auto Leveling in Firmware

@Nate

Sorry I should have said M48 L 8 which moves X and Y around between probes, might make a difference.

The probe I used was an LG12A3-4-Z/BX, I think the 4 means it's sensing distance is 4mm.

I used copper tape on the glass as I had it handy (used to stop slugs around trees!!) so this could also make a difference as the eddy currents will not be the same as for aluminium or iron.

Ken

Opublikowany : 10/01/2016 6:24 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Enabling Auto Leveling in Firmware

Guys

And now for the most stupid question possible. Why? Why do you want/need to use firmware to correct for a build plate that is not level? Why not simply level the bed and print?

What am I missing here?

I have a cheap Chinese clone. I calibrate the bed when I have to change the nozzle. the rest of the time, I just press the "print" button and it prints, with a perfect first layer 99 times out of 100.

I will be very interested to hear your responses.

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Opublikowany : 10/01/2016 7:23 pm
KenKelso
(@kenkelso)
Eminent Member
Re: Enabling Auto Leveling in Firmware

@pjr

I guess I am just striving for that 100 times out of a 100 :-}

Plus the tech. challenge of getting it working!!!

What clone do you have?

Ken

Opublikowany : 11/01/2016 7:42 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Enabling Auto Leveling in Firmware

Hi Ken

I have an Afinibot. Also the Prusa.

The Afinibot has a cloned Melzi controller, aluminium build plate and acrylic frame. It's not as fast or as precise as the Prusa, but it works.

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Opublikowany : 11/01/2016 10:31 pm
nathan.h
(@nathan-h)
Eminent Member
Topic starter answered:
Re: Enabling Auto Leveling in Firmware

@Ken

That's the same sensor I have. From what I could find the inductivity of copper and aluminum are very similar, both have a sensitivity of 0.4 x Sn (40% of the operating distance compared to iron). I just tried out the M48 L 8 and got the same results as before. The size of the tape will make a difference too. The tape should be at least 3x the operating distance of the sensor squared...so 12X12mm for a 4mm sensor. The aluminum tape pieces i'm using are a little more than that. Could also be that the copper is not pure.

I see that there is an 8mm detector for the same price available on ebay. I should have bought that one as it might allow for using tape on the bottom of the glass.

@Peter

It's true that a properly leveled bed you shouldn't have to correct very often.
However, for me personally, I had trouble getting the bed sufficiently level and this was noticeable when going from smaller to larger and delicate prints. If the bed was off just a little the nozzle would brush the print at some point and it would fail...very frustrating. I also like to swap build plates to let one cool while I print on another and this might effect the level to some degree. After getting auto leveling to work this has not been an issue...I have done prints that turn out perfectly that failed for me before. I also agree with Ken that it's just fun to tinker around and experiment a bit :).

Opublikowany : 12/01/2016 1:13 am
richard.l
(@richard-l)
Member Moderator
Re: Enabling Auto Leveling in Firmware

I have received my inductive sensor and am in the process of trying to enable it in firmware. Instructions are sparse and I have run into a problem I can't seem to resolve.

In the Configuration.h file it makes an include to the Configuration_prusa.h. I have copied and renamed the appropriate file but while parsing through it there are things that are conflicting..

In Configuration.h there is this..

const bool Z_MIN_ENDSTOP_INVERTING = true;

but in Configuration_prusa.h it is this...

const bool Z_MIN_ENDSTOP_INVERTING =false;

Which is correct?

Do I change the #define Z_MIN_POS in the Configuration_prusa.h to 0. Do I change the #define MANUAL_Z_HOME_POS to 0?

Is there anything else I need to be aware of?

Opublikowany : 15/01/2016 9:17 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Enabling Auto Leveling in Firmware

Richard

I think you will need to be very careful with apparent conflicts. Defines within the code should prevent them.

Configuration.prusa.h should take precedence.

Z_MIN_POS should be the only change to make; I believe that the other setting is for manual control (via the knob) only.

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Opublikowany : 15/01/2016 9:23 pm
richard.l
(@richard-l)
Member Moderator
Re: Enabling Auto Leveling in Firmware

Okay, that clears it up some.

Still trying to figure out how I'm going to upgrade the firmware through OctoPi. I guess I could break out the USB cable and hook it back up to my computer.

Opublikowany : 15/01/2016 9:26 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Enabling Auto Leveling in Firmware

Richard

I think you have no chance of doing it via the Pi. I simply switch the plugs over. Surely that would be the best method when testing? User Pronterface to control the printer.

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Opublikowany : 15/01/2016 9:29 pm
richard.l
(@richard-l)
Member Moderator
Re: Enabling Auto Leveling in Firmware

Agreed.

One more quick question...

Where do I place the marlinAddon folder? If I put it under Libraries in the Arduino folder it says it is an invalid library.

Opublikowany : 15/01/2016 9:37 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Enabling Auto Leveling in Firmware

Now I am lost. What Marlin add-on folder?

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Opublikowany : 15/01/2016 9:43 pm
richard.l
(@richard-l)
Member Moderator
Re: Enabling Auto Leveling in Firmware

Just realized what that was for. It came from the Prusa3D site and enables the Arduino IDE to upload the firmware. Don't think I need that and have removed it.

Opublikowany : 15/01/2016 9:52 pm
richard.l
(@richard-l)
Member Moderator
Re: Enabling Auto Leveling in Firmware

Just tried a Verify of my changes and received this error message. It looks like it isn't happy having them different.

Arduino: 1.6.7 (Windows 10), Board: "RAMBo"

In file included from sketch\Marlin.h:22:0,

from sketch\BlinkM.cpp:5:

Configuration.h:246: error: redefinition of 'const bool Z_MIN_ENDSTOP_INVERTING'

const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.

^

In file included from sketch\Configuration.h:5:0,

from sketch\Marlin.h:22,

from sketch\BlinkM.cpp:5:

Configuration_prusa.h:31: error: 'const bool Z_MIN_ENDSTOP_INVERTING' previously defined here

const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.

^

exit status 1
redefinition of 'const bool Z_MIN_ENDSTOP_INVERTING'

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

Opublikowany : 15/01/2016 10:03 pm
richard.l
(@richard-l)
Member Moderator
Re: Enabling Auto Leveling in Firmware

Sorry, I figured out what I did wrong. The conflict was my own doing. I removed the line I added to the Configuration.h file and it no longer errors on that.

Now when compiling I receive this error...

Bootloader file specified but missing: C:\Users\Richard\AppData\Local\Arduino15\packages\rambo\hardware\avr\1.0.0\bootloaders\stk500boot_v2_mega2560.hex

Opublikowany : 15/01/2016 10:31 pm
richard.l
(@richard-l)
Member Moderator
Re: Enabling Auto Leveling in Firmware

Ok, I now have what I believe to be all my errors worked out.

I go to Export Compiled Binaries and I end up with 2 hex files...

Firmware.ino.rambo.hex 324KB
Firmware.ino.with_bootloader.rambo.hex 337KB

Which should I flash? I don't want to leave my machine in an unusable state because I flashed the wrong file. Also, the hex files that Prusa provides are 264KB. Why such a large discrepancy? I wouldn't think there would be that large of a difference.

Opublikowany : 16/01/2016 12:23 am
nathan.h
(@nathan-h)
Eminent Member
Topic starter answered:
Re: Enabling Auto Leveling in Firmware

@Richard

Did you download the latest non-compiled FW version from github? https://github.com/prusa3d/Prusa-i3-Plus

I found that I could not properly upload the firmware with the most recent Arduino IDE. I had to load and install the older version 1.0.6. This version worked fine for me. The Rambo board also needs to be added to Arduino IDE. I used these directions here (the Rambo folder is found in the arduinoaddons folder in zip from Github, under arduino_1.0.x.) Once you've made the necessary FW edits you should be able to upload via USB to the Rambo.

-Nate

Opublikowany : 16/01/2016 10:07 am
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Enabling Auto Leveling in Firmware

Hi Guys

I don't understand why you need to generate a HEX file when you can upload directly from the Arduino IDE. The instructions to do this with the latest Arduino software are in this thread: http://shop.prusa3d.com/forum/viewtopic.php?f=13&t=266

It really is very simple to do and works a whole load better than the "firmware updater" program.

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Opublikowany : 16/01/2016 8:49 pm
Strona 3 / 5
Share: