1 (edited by Necromant 2013-05-12 12:19:27)

Topic: [WIP][RFC] Automatic bed adjustment

Okay, this will be yet another overkill, anyway, but still.

Bed adjustment is annoying me, even with a dial gauge, so the plan is:
* Add three cheap steppers (28BYJ-48, 2-3 bucks/pcs in china) to the bed adjustment screw and a little bit of electronics to drive 'em.
* Add a bed probe.
* Hook custom electronics to EXT pins of sanguinololu, that (luckily) have a UART available, add gcode passthrough to the firmware

Current status:
* electronics (atmega16 + uln2003a):  50% complete, board mostly done, I will still have to etch&populate the board next weekend, will post the design once it proves to be working.
* firmware - Will be based off antares and my WIP firmware for homebrew CNC stuff, since arduino proved to be a pile of crap (Sorry, people). 50%
* Mechanical parts still need modeling and printing. 0%
* Add gcode passthrough for a few extra commands to firmware 0%
* Host app to perform probing 0%

So, my question here is: Has someone tried to make a more or less reliable bed probe? So far adding a needle to contact the aluminum bed looks like the most straightforward approach, but that won't work for a glass bed.
Other possibilities I'm evaluating:
* A toggle switch. Looks easier, but I think it won't be as precise.
* Try to hack a digiatal gauge, see if I can grab serial data from it, as seen in digital calipers.

Why not just add a bed probe and transform gcode coordinates on the run to mach the bed angle? Might be an idea, but I'm afraid that the rod is subject to some hysteresis, so it's simpler to keep it moving into one direction throughout the print. And since I'm planning to do some more X-tra fine 0.05mm prints on it, this is not acceptable for me.

2

Re: [WIP][RFC] Automatic bed adjustment

Surprised you didn't just run with https://github.com/ErikZalm/Marlin/pull/323  . Demos at https://www.matterhackers.com/news/auto … ion-update .

They use a roller micro. Everything else is already in place in Marlin bar some tweak patches via that pull .

What made the arduino/ATmel a pile of crap ? I do the above sorta thing with 8-bit micro's including Atmels of many different flavours quite often ? Anyway...

I'd just jump on board the above pulls - already a fair amount if not all your work is.. well... done smile

There is also the discussion here: http://www.soliforum.com/topic/458/auto … -leveling/

You shoulda asked earlier! smile And still keen to hear what makes a bog-stock 8-bit micro that does this sorta thing all the time a pile of crap - not because I'm an arduino fan boy by any means (gimme an ARM any day...) , but I'm curious about what the genuine issues were ...

3 (edited by Necromant 2013-05-12 13:19:17)

Re: [WIP][RFC] Automatic bed adjustment

adrian wrote:

Surprised you didn't just run with https://github.com/ErikZalm/Marlin/pull/323  . Demos at https://www.matterhackers.com/news/auto … ion-update .

They use a roller micro. Everything else is already in place in Marlin bar some tweak patches via that pull .

Yes, this looks a lot simpler, but will still require moving the rod during printing of a single layer.

adrian wrote:

What made the arduino/ATmel a pile of crap ? I do the above sorta thing with 8-bit micro's including Atmels of many different flavours quite often ? Anyway...
You shoulda asked earlier! smile And still keen to hear what makes a bog-stock 8-bit micro that does this sorta thing all the time a pile of crap - not because I'm an arduino fan boy by any means (gimme an ARM any day...) , but I'm curious about what the genuine issues were ...

No problem with atmel (actually - attiny2313 stuffed with vusb stack is still my favorite), just don't like arduino (the software part of it, the hardware is pretty typical, though insanely overpriced), since I have to often switch MCUs for my projects, between avr, stm32, msp430 (fram series rock!). And a lot of tasty stuff is not available with it. Even vusb for avr is not supported! Besides, as a linux kernel hacker for a living I have been long addicted to Kconfig.

adrian wrote:

I'd just jump on board the above pulls - already a fair amount if not all your work is.. well... done smile

There is also the discussion here: http://www.soliforum.com/topic/458/auto … -leveling/

Yeah, I will be trying this as well. But as I said above, for 0.05 layers I think I will get better results if I do NOT move z rod during printing of a layer at all, to avoid any artifacts. So this leaves me with only one insane option.

4 (edited by adrian 2013-05-12 13:02:25)

Re: [WIP][RFC] Automatic bed adjustment

Oh, and heres two Hack-a-Day articles I have in my bookmark collection for a rainy day - reading the pulses from the plethora of Chinese digital calipers that are about all you'll find these days.

http://hackaday.com/2007/03/11/digital-caliper-modding/
http://robocombo.blogspot.com.au/2010/1 … rface.html
http://www.justblair.co.uk/Measurement/ … liper.html

Basically they send out a pulse-train that you read to get the distance measured.. its not an actual serial interface on 99% of them unfortunately... but on the plus side, they almost all universally have the pogo-pin pads under the slide-cover ! smile

So a digital caliper may be the easiest route...

5 (edited by Necromant 2013-05-12 13:50:15)

Re: [WIP][RFC] Automatic bed adjustment

adrian wrote:

Oh, and heres two Hack-a-Day articles I have in my bookmark collection for a rainy day - reading the pulses from the plethora of Chinese digital calipers that are about all you'll find these days.

http://hackaday.com/2007/03/11/digital-caliper-modding/
http://robocombo.blogspot.com.au/2010/1 … rface.html
http://www.justblair.co.uk/Measurement/ … liper.html

Basically they send out a pulse-train that you read to get the distance measured.. its not an actual serial interface on 99% of them unfortunately... but on the plus side, they almost all universally have the pogo-pin pads under the slide-cover ! smile

So a digital caliper may be the easiest route...

Yeah, I've seen those very articles a year or so ago, and I'm still wondering if digital dial gauge has something similar built-in.  (And yes, it's not serial, I was wrong).

6

Re: [WIP][RFC] Automatic bed adjustment

I was contemplating something similar but was thinking more on the lines of an ultrasonic range finder or laser for distance reading.  Not sure if it's even feasible but one of the things on my "TO RESEARCH" list..... which seems to be growing more and more every day wink

7 (edited by Necromant 2013-05-12 19:25:56)

Re: [WIP][RFC] Automatic bed adjustment

rjp350z wrote:

I was contemplating something similar but was thinking more on the lines of an ultrasonic range finder or laser for distance reading.  Not sure if it's even feasible but one of the things on my "TO RESEARCH" list..... which seems to be growing more and more every day wink

I'm afraid laser will suck, due to being reflected from the glass surface.
ultrasonic and PIR sensors are not likely to work as well.
ultrasonic has minimal distance of about 30 to 60 cm.
PIR - I'm afraid glassy surface will screw up the readings and I don't think it's that precise. (but it IS on my checklist to try)

8

Re: [WIP][RFC] Automatic bed adjustment

Thanks,  didn't do any research as of yet but good to know.  What about hacking an optical mouse?  I know they are pretty accurate at close range but would also need to look at masking off specific areas o the glass to ensure you get accurate readings

9

Re: [WIP][RFC] Automatic bed adjustment

Why not just a digital dial indicator?

There's another thread around here somewhere that mentions interfacing arduino avr or another microcontroller with digital calipers - I don't see why the same couldn't be done with a cheap dial indicator.  The cheap indicator that I bought from harbor freight this week has a similar output port.

Mine is labeled "Pittsburgh" but I'm sure they're the same thing:
http://www.harborfreight.com/1-inch-sae … 93295.html

Example connections and interfaces with the calipers:
http://www.robotroom.com/Caliper-Digital-Data-Port.html
http://nut-bolt.nl/2012/reading-digital … n-arduino/
http://robocombo.blogspot.com/2010/12/u … rface.html

10

Re: [WIP][RFC] Automatic bed adjustment

I missed those.  Will have to check them out.

THANKS....

DynamechGT wrote:

Why not just a digital dial indicator?

There's another thread around here somewhere that mentions interfacing arduino avr or another microcontroller with digital calipers - I don't see why the same couldn't be done with a cheap dial indicator.  The cheap indicator that I bought from harbor freight this week has a similar output port.

Mine is labeled "Pittsburgh" but I'm sure they're the same thing:
http://www.harborfreight.com/1-inch-sae … 93295.html

Example connections and interfaces with the calipers:
http://www.robotroom.com/Caliper-Digital-Data-Port.html
http://nut-bolt.nl/2012/reading-digital … n-arduino/
http://robocombo.blogspot.com/2010/12/u … rface.html

11 (edited by DynamechGT 2013-05-14 22:54:51)

Re: [WIP][RFC] Automatic bed adjustment

Ha - go figure...  adrian and Necromant were on to the same thing in their posts above - I was was just looking at the "new posts" part of the thread.  Their posts were exactly what I was referring to when I said "...another thread around her somewhere..."

Consider this:
...put thick gears in place of the leveling thumbscrews, put a worm gear on little gear motors (3 - one for each screw)  to turn them [thick screw gears so that the worm gear can slide up and down along the teeth as they move up and down], drive the gear motors from an arduino (with simple on/off transistor switches to get enough current) connected to the dial indicator.  As long as the extruder is repeatably near the leveling screws, an algorithm to level a 3-point plane should pretty much solve it - just cycle around the 3 screws.  All the resolution you need will come from the dial indicator - don't worry about backlash in the leveling gears.

Really, if you manually put the back single thumb screw at a "middle" position, you would only have to adjust the other two screws to level the bed. ...but still use a measurement at the other screw.


Assuming you can repeatably position the extruder (either by direct g-code or by g-code scripts with pauses), theres no need to mess with anything else on the computer side of things.

12

Re: [WIP][RFC] Automatic bed adjustment

Heres a thought re the probe.. why not go something like a CNC tool touch off-plate ?

using one side of the loop connected to a PCB plate of a known thickness (or thin copper/brass plate) and the other side connected to the extruder bolt..

You could home the Z-Axis, drop it 10mm, move the head to a known place, then creep back till the circuit goes high. Then knowing the deltas on the different z-axis apogee's, you could calculate the level bed and set your z-height by removing the thickness of the copper plate.

Obviously backlash would need to be minimal to make this work, but i can't see too many other shortcomings. still slightly manual having to move the touch off plate around the bed, but otherwise pretty automated. if you wanted to avoid doing that, then just use a PCB blank the same size as the entire bed.

13

Re: [WIP][RFC] Automatic bed adjustment

adrian wrote:

...still slightly manual having to move the touch off plate around the bed, but otherwise pretty automated. if you wanted to avoid doing that, then just use a PCB blank the same size as the entire bed.

Yep - I really wish we had a level of scripting available in the gcode that could perform some basic actions/math and make use of auxilliary inputs and outputs on the control board.  Only way I could think to do that currently would be to run the printer on Mach 3 and a diffferent board.  Basically process the slicing and gcode in RH and Slic3r, save gcode to file, load in Mach 3, run leveling and z-stop scripts (with inputs and outputs), load gcode and print.  I'm not experienced with Mach 3 but I'm sure it could be configured to interpret the extruder and bed temperatures.

14

Re: [WIP][RFC] Automatic bed adjustment

Just gonna leave this here... http://www.youtube.com/watch?feature=pl … hDSFuC7HkQ

15

Re: [WIP][RFC] Automatic bed adjustment

Holy Crap thats a nice and easy way to level the bed.

SD2 - Glass Bed, Fans on PCB and Y motor, Custom enclosure
Slicer - Simplify3D

16

Re: [WIP][RFC] Automatic bed adjustment

elmoret wrote:

Just gonna leave this here... http://www.youtube.com/watch?feature=pl … hDSFuC7HkQ


KIS method in all its splendor .. *bow*

17

Re: [WIP][RFC] Automatic bed adjustment

That might be something we can implement depending on how much room is under the bed. Might need to sacrifice a little z height.

18 (edited by DynamechGT 2013-05-20 03:50:00)

Re: [WIP][RFC] Automatic bed adjustment

lawsy wrote:

That might be something we can implement depending on how much room is under the bed. Might need to sacrifice a little z height.

For those with the aluminum bed - we could attach another 8x8 aluminum plate to the bottom of the bed carriage, drill out and countersink holes in the corners of the bed, use longer versions of the leveling screws we already have through to the bottom plate (through oversized drilled out holes), with a compression spring holding up each screw which would each be "endstopped" by a nut and washer superglued/locktited onto it's end - then it's just a matter of printing a setscrew thing for each corner.

... I just don't feel so good about this acting on 4 corners and without close tolerance ball joints and blah, blah, blah...

Somebody else should try this and prove me wrong!  smile

I'm already playing with gear motors and dial indicators and an arduino for this task (no drilling required) - ok, well, at least I have a couple of things ordered....

19 (edited by nfhill 2013-05-21 04:31:10)

Re: [WIP][RFC] Automatic bed adjustment

Nostalgia trip (it won't help you interface to these calipers), just old guy telling stories.

Back when the first version of these calipers was made, the external interface was much simpler.  The data port was intended to drive an external up/down counter.  One pin was a clock and another a direction signal. That's how they worked internally too.  (no uC in them back then)

How do I know?  Back in '78 - '80 I was the project engineer responsible for designing the electronic guts in the very first digital caliper with a liquid crystal display.  All of these new ones use the same sensor and operational concept.

The sensor concept, and the basic functionality, was invented and patented by a professor in Stockholm, Sweden.  I was the project engineer turning his patent into a product.

The attached photo is my personal one of the original model.  Over 30 years old and still working.

(Back to original programming)

Nick

Post's attachments

P1010034.JPG 91.35 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

20

Re: [WIP][RFC] Automatic bed adjustment

On topic contribution

Why not just mount a microswitch on the extruder and write a program that positions it over each adjusting screw.  Then drive the print table up slowly until the switch trips.  Save the Z count for each of the three positions.  Then it would be a simple matter for the program to position the extruder/switch over each position and tell the user which way to turn the adustment screw until all three positions trip the switch at the same Z count.

The switch could be connected in parallel to the existing Z switch.

Run the program on the controlling computer with it sending G codes to the printer.

Nick