Capacitive Auto-Leveling on TAZ 5

Hey Mirage

That’s really helpful!! Thanks for taking the time to give such a detailed response.

So just so I understand, mesh levelling just learns the lie of the print bed, so assuming you broke the grid down small enough it could cope with most problems. Auto bed levelling finds the best plane that passes closest to the probed points, but if twisting is the cause and therefore the actual plane isn’t flat the equation won’t be accurate.

My first port of call will be to try and level the Y axis rails. I treated myself to some digital calipers recently, so they might help, although finding 0.6mm might be tricky.

I’d really like to get the auto-bed levelling working as the mesh levelling is manual at present, although there is talk of making it automatic at some point.

I’ll report back and let you know how I get on.

So just so I understand, mesh levelling just learns the lie of the print bed, so assuming you broke the grid down small enough it could cope with most problems. Auto bed levelling finds the best plane that passes closest to the probed points, but if twisting is the cause and therefore the actual plane isn’t flat the equation won’t be accurate.

Exactly.

My first port of call will be to try and level the Y axis rails. I treated myself to some digital calipers recently, so they might help, although finding 0.6mm might be tricky.

Good luck, but the digital calipers may not do the trick. Your best bet is probably to remove the springs again, and align the bottom plate corners with the capacitive probe. At that point, you should be back to the ~2.6mm twist, which can be mostly removed by applying metal shims to the corner brackets at the X/Y frame joints. Then, you can replace the glass surface and springs again. Even if twisting has not been completely eliminated, it may be possible to achieve exact alignment - the glass will normally bend slightly without bottoming out the adjustment screws.

That is roughly the procedure used to tram my Taz3.

mesh levelling is manual at present, although there is talk of making it automatic at some point

If automation is the critical issue, it might be worth your while to fix this. Should be easy, just modify the existing bed probing function to input data to the mesh leveling related variables.

Just for reference, the datasheet clearly shows that objects other than grounded metal are ‘see-through’ for the E2K-X4ME1 sensor. Not that this is necessarily affecting our automatic-alignment use case, but it would be cool to get the PEI shieets with sputter coated conductive backings.

http://www.mouser.com/ds/2/307/e2k-x_ds_e_7_1_csm460-349205.pdf

Hi Mirage

Good to know about the sensor. I’ve ordered a Zebra Plate from America to print on which has a thin metal conductor layer top and bottom, so hopefully it will work OK with that, although it won’t be grounded as such.

I’ve had a good play with my Y rails and here are my latest figures. Can you tell from them whether the twist has been reduced. Things look pretty flat but haven’t tried the auto level routine again yet.

RECEIVED: Bed X: 32.000 Y: 23.000 Z: 1.797
RECEIVED: Bed X: 147.000 Y: 23.000 Z: 1.838
RECEIVED: Bed X: 262.000 Y: 23.000 Z: 1.937
RECEIVED: Bed X: 262.000 Y: 138.000 Z: 1.852
RECEIVED: Bed X: 147.000 Y: 138.000 Z: 1.943
RECEIVED: Bed X: 32.000 Y: 138.000 Z: 2.138
RECEIVED: Bed X: 32.000 Y: 253.000 Z: 2.032
RECEIVED: Bed X: 147.000 Y: 253.000 Z: 1.933
RECEIVED: Bed X: 262.000 Y: 253.000 Z: 1.965

RECEIVED: Eqn coefficients: a: -0.00030797 b: 0.00051993 d: 1.91081333
RECEIVED: Mean of sampled points: 1.93729162
RECEIVED: planeNormal x: 0.000308 y: -0.000520 z: 1.000000
RECEIVED:
RECEIVED: Bed Height Topography:
RECEIVED: ±----------+
RECEIVED: |…Back…|
RECEIVED: |Left…Right|
RECEIVED: |…Front…|
RECEIVED: ±----------+
RECEIVED: +0.09521 -0.00417 +0.02771
RECEIVED: +0.20021 +0.00583 -0.08479
RECEIVED: -0.14042 -0.09917 -0.00042
RECEIVED:
RECEIVED: Corrected Bed Height vs. Bed Topology:
RECEIVED: +0.11604 +0.05208 +0.11938
RECEIVED: +0.28083 +0.12188 +0.06667
RECEIVED: +0.00000 +0.07667 +0.21083
RECEIVED:
RECEIVED: Bed Level Correction Matrix:
RECEIVED: +1.000000 +0.000000 -0.000308
RECEIVED: +0.000000 +1.000000 +0.000520
RECEIVED: +0.000308 -0.000520 +1.000000

I still don’t really understand why the ‘Bed Correction Matrix’ shows1 +1s diagnally across the plate when the actual bed levelling shows a variation across the same points of less than 0.1mm?

RECEIVED: Bed X: 32.000 Y: 23.000 Z: 1.797
RECEIVED: Bed X: 147.000 Y: 23.000 Z: 1.838
RECEIVED: Bed X: 262.000 Y: 23.000 Z: 1.937
RECEIVED: Bed X: 262.000 Y: 138.000 Z: 1.852
RECEIVED: Bed X: 147.000 Y: 138.000 Z: 1.943
RECEIVED: Bed X: 32.000 Y: 138.000 Z: 2.138
RECEIVED: Bed X: 32.000 Y: 253.000 Z: 2.032
RECEIVED: Bed X: 147.000 Y: 253.000 Z: 1.933
RECEIVED: Bed X: 262.000 Y: 253.000 Z: 1.965

The smallest Z measurement is 1.797, largest is 2.138, a difference of only 0.341mm. That’s very good!

whether the twist has been reduced

Yes. If these measurements were taken against the bottom layer (ie. bare metal mounting plate), then you should easily be able exactly align the glass using the springs.

I still don’t really understand why the ‘Bed Correction Matrix’ shows1 +1s diagnally across the plate when the actual bed levelling shows a variation across the same points of less than 0.1mm?

You are right, it is wrong. :wink:

Zebra Plate from America to print on which has a thin metal conductor layer top and bottom, so hopefully it will work OK with that, although it won’t be grounded as such

Interesting. Grounding the plate should be easy, just use a gator clamp. The datasheet graphs clearly show a flatly equal response to grounded metal under a wide varitey of conditions, so this would be well wothwhile.

Astek777,

It has been about a week. Success yet?

Hi Mirage

I’ve been waiting for my Zebra Board to arrive from the US (which it just has) and I’m currently away for a few days, so hoping to have a good play Sunday or Monday.

Will report back my results. Quite excited at the prospect of reliable first layer printing!!!

Hi Mirage

Sorry for delay getting back…been bit busy catching up with work since my return from hols.

Having had a good play now, and a good few more failed prints, I seem to be finally making some progress…hurray!!

Since I’ve straightened up the Y-axis rails I managed to get the bed just about level anyway, so hard to tell how much the ‘auto-levelling’ is actually helping, but there is a small amount of adjustment in the Z-axis as it prints, and the first layer lines all seem fairly even now.

My prints were failing roughly 70% through the first layer even though it looked pretty flat, and the filament was grinding, but this turned out to be under-extrusion. I’d already calibrated it once since receiving the printer, but having installed various different firmwares something must have changed as it was almost 20% under (18mm under the 100mm extrude) even though it was using my updated figure.

Had a bit of trouble trying to get the first layer to gel together properly, but I think that’s more down to the new Zebra Board being a slightly more textured surface than the glass I was using beforehand. I’m very impressed with it though. PLA grips great without any heating but the board has a small amount of flex so makes removing large parts easy.

Was printing a bracket for my Xbox Kinect which has quite large, flat surfaces and I was getting some horrible wave effects. This turned out to be due to the filament cooling fan (it was coming on at 100% after layer 1), which has now been disabled and won’t be used unless I’m printing small parts.

There are so many variables at play it’s easy to get lost as to what could be affecting what.

Anyway, thanks for your help and persistence! Hopefully this information will be useful to others in future too.

Thanks for the update! Glad to hear it actually works now. Out of curiosity, could you provide the latest topography and correction data? Hopefully the values are less extreme now, especially the correction matrix.

Here you go:

RECEIVED: G29 Auto Bed Leveling
RECEIVED: Bed X: 52.000 Y: 43.000 Z: 1.905
RECEIVED: Bed X: 147.000 Y: 43.000 Z: 1.900
RECEIVED: Bed X: 242.000 Y: 43.000 Z: 1.694

RECEIVED: Bed X: 242.000 Y: 138.000 Z: 1.607
RECEIVED: Bed X: 147.000 Y: 138.000 Z: 1.987
RECEIVED: Bed X: 52.000 Y: 138.000 Z: 1.903

RECEIVED: Bed X: 52.000 Y: 233.000 Z: 1.816
RECEIVED: Bed X: 147.000 Y: 233.000 Z: 1.779
RECEIVED: Bed X: 242.000 Y: 233.000 Z: 1.631

RECEIVED: Eqn coefficients: a: -0.00121272 b: -0.00048026 d: 2.04704594
RECEIVED: Mean of sampled points: 1.80249996
RECEIVED: planeNormal x: 0.001213 y: 0.000480 z: 1.000000

RECEIVED: Bed Height Topography:
RECEIVED: ±----------+
RECEIVED: |…Back…|
RECEIVED: |Left…Right|
RECEIVED: |…Front…|
RECEIVED: ±----------+
RECEIVED: +0.01312 -0.02313 -0.17188
RECEIVED: +0.10063 +0.18438 -0.19500
RECEIVED: +0.10250 +0.09750 -0.10812

RECEIVED: Corrected Bed Height vs. Bed Topology:
RECEIVED: +0.02333 +0.10229 +0.06875
RECEIVED: +0.06521 +0.26417 +0.00000
RECEIVED: +0.02146 +0.13167 +0.04125

RECEIVED: Bed Level Correction Matrix:
RECEIVED: +0.999999 +0.000000 -0.001213
RECEIVED: -0.000001 +1.000000 -0.000480
RECEIVED: +0.001213 +0.000480 +0.999999

Guys, quick question, are you all using the version of marlin that I posted or some other version?

Just to document it if someone what to add this mod to their printer.

I had tried several different versions, but the one I was using when posting the figures was the latest development version (as of when I downloaded it) from the main branch.

Just ordered the OMRON E2K-X4ME1 from a company in China on Ebay for $14 w/ free shipping. I have to wait a couple weeks to get it, but these are $60 on Amazon.

I’m going to begin working on this with my Taz 5 soon. Already purchased the inductive sensor, now I’m trying to figure out the Opto isolator. I see that I can get the 4N28 various placed online, but is there a place I can get a ready to go pcb rather than buying x number of parts to end up with just one?

It looks like this uses a 1k resistor, 4N28 Isocoupler, and what about the pcb?

The PCB you’ll have to make up yourself. You just need some stripboard like this (http://www.maplin.co.uk/p/veroboard-copper-dil-stripboard-381x2146mm-fl17t). Solder your components to the board and cut/scratch off any connections you don’t want. I used a sharp knife, but some people use a drill bit or similar.

I used the OMRON E2K-X4ME1, and it’s been very reliable. Officially it’s supposed to detect against a grounded metal plate. Different surfaces will trigger the sensor at different levels. I originally had it setup over the TAZ 5 glass bed, but have since purchased a Printinz Zebra board (it’s excellent!), and the sensor triggered at a completely different height.

The original thread showed the PCB being mounted inline on the outside of the printer, but I mounted mine inside the main board enclosure and used spare pins on the X axis plug to pass the wires though. Kept everything nice and tidy.

Also, I noticed that the original PCB diagram showed 12v, but the free connector on the RAMBO board is 24v. The OMRON E2K-X4ME1 is happy with 24v anyway, and everything else remains the same.

Do be aware the the probe does have a tendency to hit the X0Y0 bed clamp. You need to make sure you modify your starting G-CODE to raise the Z axis by 10mm before homing (G28). You will need to have installed a more up-to-date firmware than the one pre-installed on the TAZ 5 as that doesn’t support auto-bed levelling. Most of the newer versions home the X & Y axis to 0,0 and then move the hotend back to the centre of the bed before homing the Z axis. This is great, but if you don’t raise your Z axis by 10mm before running G28, and the hotend is close to the bed, it will crash!

I use:

G91 ; switch to relative position
G1 Z10 ; raise the Z axis 10
G90 ; switch to absolute positioning
G28 ; home all axes - yes axes is the plural of axis…I know, crazy hey
G29 ; auto level bed

I finally have the inductive sensor in. I am going to order some pcb blanks to mill on my CNC router. However, I would like a bit more info on the wiring. Could someone label this with what each wire is. I don’t understand BL, BR Etc.

Correct what I have wrong
BL = ?
BR = +12v (where is this coming from?)
BU = Ground (ok to share with rambo?)

As for the 4N28, what do the red dots represent? And the 1k resistor, can i get some more specifics on what i need to order? Links to the resistor and Optoisolator would be appreciated. Mouser / ebay / amazon / etc.

The red pins(dots) are unused or not needed pins, and the BL line is the detection pin from the sensor that drives the LED inside the optoisolator. The 1000 ohm resistor controls how much current the led is driven by. The opto-isolator can handle up to 70 volts, so you are more limited by how many volts the sensor can handle. So if it can handle the 24 volts from the RAMBo just use it instead of 12 volts.

Awesome! The sensor I have is happy with 24v according to the sheet. Now i just need to order the resistor and Optoisolator and make the pcb. I’ll report back once I make some progress.

if you don’t want to mess around creating the pbc, you can get this and it would work fine, you just need to wire it correctly.

https://www.sparkfun.com/products/9118

I build my own pcb to use the same terminals that lulzbot uses. Just to make everything consistent.

Vitor Henrique

Would this one work also? I can have it here tomorrow if so.

http://amzn.com/B00UWSGXEW

And just to verify wiring on the sparkfun one:

24v and Ground to HV / HVG
Sensor to HV / HVG / OUT1
Endstop to NC / IN1

Is that correct?