Avisos
Vaciar todo

Enabling Auto Leveling in Firmware  

Página 2 / 5
  RSS
KenKelso
(@kenkelso)
Eminent Member
Re: Enabling Auto Leveling in Firmware

I have just implemented this but using a Capacitive Sensor (LJC18A3-H-Z/BX 1-10mm Capacitance Proximity Sensor Switch NPN NO DC 6-36V 300mA).
This is able to sense the glass so no aluminium tape is required on the bed.
I had a lot of trouble getting it to work using a potential divider (the resistors) to reduce the output voltage so I tried getting it to trigger a transistor which also failed. Both these semi triggered the device I guess because they altered the capacitance.

So, I used a small relay which it triggers fine, I then put the relay in series with the Z end stop switch and away we go.

Jury is out on how reliable it will be, I'm doing some trial prints right now to see.

Ken K

Respondido : 02/01/2016 1:08 pm
richard.l
(@richard-l)
Miembro Moderator
Re: Enabling Auto Leveling in Firmware

@Ken

I'm interested in how the prints turn out. Also, if it is successful, some pics of how you set it up and mounted it would be nice.

Respondido : 02/01/2016 8:21 pm
KenKelso
(@kenkelso)
Eminent Member
Re: Enabling Auto Leveling in Firmware

I'll do that Richard.

A tip: Slic3r has G28 set as a default in the printer settings custom gcodes, this will reset the auto-levelling matrix, so it is necessary to put a G29 in after it or no auto-levelling will take place.

Ken

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

@ Richard

That gecko plate looks very interesting! If you find out what the surface coating is please let us know...it looks like some kind of translucent film, makes me wonder about durability. The magnets are smart though...great idea.

-After a some searching, it appears that the gecko plate is a thin spring-steel plate that is held in place by the magnets built into the aluminum plate. Not sure if there is something unique about the surface.

@ Antonius

To be honest, I'm not exactly sure what the problem was. I changed some of the FW settings, but I was back to the exact same settings I had before when it started working perfectly...so the FW settings are solid. It was the wee hours of the morning and I wasn't being super scientific about the process at that point. I ended up taking apart and reassembling my Y-axis, re-centered the aluminum tape pieces and made sure they were nice and flat...I also made sure my X-axis was perfectly level. The X-axis doesn't really need to be level if you are manually leveling the bed, since you will level the bed to match the X-axis..but with auto-leveling the equation assumes a perfectly level X-axis.

At any rate, it's continuing to work perfectly and I'm very pleased with the results. I even tried making the bed "extremely" un-level by shimming up one side...but the auto-leveling did it's thing and I still got nice flat even first layers in all four corners of the build plate.

@Ken

Please keep us posted with results. I've read very mixed reviews on forums regarding capacitive sensors...some people reporting very good results and some saying it's inconsistent or not accurate. The diversity of opinion ended up steering me toward the inductive sensor.

-Nate

Respondido : 03/01/2016 7:30 am
KenKelso
(@kenkelso)
Eminent Member
Re: Enabling Auto Leveling in Firmware

@Richard
@Nathan

Well lots of fiddling and my conclusion on the capacitive probe is that the repeatability is not too good. Over 4 auto-level sequences the difference in Z readings at the same spots are as high as 0.13mm, this may have been a freak reading and the average difference was 0.04mm. Essentially even a quick and dirty manual levelling was superior.

I have now taken the probe off and fixed up the Z end stop switch on an arm, the arm is on a bracket fixed to the fan as with the capacitance probe. As I can't find any pins on the Mini_rambo board to use to control a servo the arm is manually raised and lowered, it has a little detent to hold it in up and down positions.

The maximum difference with this over 4 sequences is 0.03mm.

One advantage of this setup is that it can be wired in series with the Z end stop to give added safety.

I have an inductive sensor on order (ordered both at the same time but it's not arrived yet) so I will be experimenting with that if my wife hasn't confiscated the printer by then 🙂

Ken

Respondido : 03/01/2016 5:37 pm
richard.l
(@richard-l)
Miembro Moderator
Re: Enabling Auto Leveling in Firmware

@Ken

Thanks for the info.

What voltage does the servo need? I am using an available 5v output on the Rambo mini to power my Raspberry Pi. Would 5v be enough?

Also, what bracket did you use to attach the servo? I haven't found a suitable one and my design skills are horrible.

Respondido : 04/01/2016 5:10 pm
KenKelso
(@kenkelso)
Eminent Member
Re: Enabling Auto Leveling in Firmware

@Richard

The little 9g micro servos are fine with 5volts but I am not using a servo as I have not found a suitable pin on the Rambo Mini to drive it from. The standard Rambo board has one but the Mini has lest general purpose i/o pins, I have studied
the circuit diagrams and tried a few pins I thought might work but all to no avail.

What I did was mount the Z-Probe switch on an arm on the extruder that I could manually move up and down. I can upload the design for this to thingiverse if you like.

Unfortunately once I had printed the servo bracket I modified the design and lost the original but as I say the servo is no good to you unless you can up with a suitable pin on the Mini Rambo to drive it.

I have now hooked up an inductive sensor to play with, interestingly I have it connected to the 12v supply but un-triggered it only shows 5.8v on the black line so pointless using a potential divider or LM7805 voltage regulator.

Ken

Respondido : 04/01/2016 9:15 pm
jonese
(@jonese)
Eminent Member
Re: Enabling Auto Leveling in Firmware

The 1st Motor Extension servo pin on the RAMBo board is connected to pin 78 "PA0/AD0" on the ATMega2560 (Arduino pin 22) .

Unfortunately, the Mini-RAMBo leaves the pin unconnected on the board. You could solder a mod wire to the package lead if you have the SMT type of skillset. Something I'll probably do if I go the servo route.

Respondido : 04/01/2016 9:38 pm
KenKelso
(@kenkelso)
Eminent Member
Re: Enabling Auto Leveling in Firmware

@All
Conclusions

I have now tested a capacitive, inductive and micro switch probe and over 5 auto level cycles in order of repeatability they are:

Type Max Error
Micro Switch 0.03mm
Capacitive 0.13mm
Inductive 0.16mm

Despite having to manually extend the micro switch, which is no big deal, it has the advantage that its more repeatable and can probe anywhere on the glass. Also I can leave the original end stop switch in place as a backup.

Thank you endif.j, I now have a little soldering job to do!!!

Anyone need a couple of sensors 🙂

Ken

Respondido : 05/01/2016 12:01 pm
jonese
(@jonese)
Eminent Member
Re: Enabling Auto Leveling in Firmware

ken.k: Double check I got the right pin. Also, you might want to see if there is another output that is brought out on the board that's easier to get a hold of. I only checked what the larger Rambo board was using for the 1st servo, but you might be able to use another compatible pin.

I haven't looked at the code yet so I'm not sure if its using hardware or software PWM to drive the servo. That might expand (or decrease) the choice of suitable pins to use.

Respondido : 05/01/2016 2:56 pm
KenKelso
(@kenkelso)
Eminent Member
Re: Enabling Auto Leveling in Firmware

@All

I have published the parts for a "Manual Z Probe" on Thingiverse.

Ken

Respondido : 05/01/2016 3:27 pm
KenKelso
(@kenkelso)
Eminent Member
Re: Enabling Auto Leveling in Firmware

@endaf

I have scoured the RepRap mini rambo circuit diagram and the pins list in mini rambo development and tried a few possibles but nothing worked.

Ken

Respondido : 05/01/2016 3:29 pm
KenKelso
(@kenkelso)
Eminent Member
Re: Enabling Auto Leveling in Firmware

@endaf

Hardware PWM I think, same as an Arduino.

I am wondering if pin13 could be used, its only got a pointless LED on it that could be disconnected, haven't looked at how easy it is to get at yet.

The Max endstops also look like a possibility.

Respondido : 05/01/2016 8:23 pm
richard.l
(@richard-l)
Miembro Moderator
Re: Enabling Auto Leveling in Firmware

@ken

Thanks for diving head-first into this. Your results are quite interesting.

If there are no available pins to attach the servo, and one didn't want to manually move it into and out of position, I would assume a board change would be in order.

Respondido : 05/01/2016 8:36 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Enabling Auto Leveling in Firmware

Hi Guys

There are 4 available ATMega pins brought out to the P3 connector (plus 1 dual use pin):

Digital Pins 16 and 17 look the most promising - both offer PWM - and are available on P3 connector, pins 3 and 5 respectively.

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…

Respondido : 06/01/2016 10:26 am
KenKelso
(@kenkelso)
Eminent Member
Re: Enabling Auto Leveling in Firmware

@PJR

I tried those pins but when I set the servo to pin 16 or 17 I lost stepper motor control, maybe I missed something in the firmware, I'll have another look at this.

I Set the number of servos to 1 in Configuration.h and added the following to the Rambo Mini section of pins.h

#ifdef NUM_SERVOS
#define SERVO0_PIN 17
#endif

Any tips on the firmware changes necessary?

Respondido : 06/01/2016 1:05 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Enabling Auto Leveling in Firmware

Ken

It's down to the available timers.

You will need to servo.attach and servo.detach in the same function; the motor interrupt will be disabled whilst the servo is attached.

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…

Respondido : 06/01/2016 1:55 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Enabling Auto Leveling in Firmware

Ken

There are also ATMega pins 23, 24 and 30 on the RAMBo mini, complete with their own +5V and 0V pins (these are the X, Y and Z MAX endstops, which can be re-assigned in firmware).

Not sure if these would also affect the timers though.

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…

Respondido : 06/01/2016 5:24 pm
KenKelso
(@kenkelso)
Eminent Member
Re: Enabling Auto Leveling in Firmware

@PJR

progress of sorts.

Even if I do servo.detach the steppers remain inactive, I have tried several things including re-initialising the steppers after the servo.attach/detach but no luck so far.

The good news is that having hacked the M280 code I can turn an LED attached to P3 pin 16 on and off. So this opens the possibility of triggering a separate Arduino to put the servo up and down.

Respondido : 06/01/2016 7:40 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Enabling Auto Leveling in Firmware

Ken

I wonder.. I think you may have to turn the interrupts on once they are turned off. At least that's the case with a PIC.

I haven't looked at the firmware, but I guess there is a function to set up the interrupts.

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…

Respondido : 06/01/2016 8:36 pm
Página 2 / 5
Compartir: