Welcome! Log In Create A New Profile

Advanced

Auto-calibration problem

Posted by pkm 
pkm
Auto-calibration problem
November 13, 2015 02:44PM
Hello,

I've built a 500mm bed delta. Duet 0.8.5 with dc42 firmware 1.09j, dc42's IR probe, buildtak bed. And I can't get a good auto-calibration.

The probing results are something like -0.4 +0.4 -0.4 +0.4 -0.35 +0.35 on the larger hexagon and like -0.1 -0.1 0.1 on the smaller triangle. I.e. a distinctive wave. Mean value 0.35 or so.

I thought about different surface properties, buildtak is a bit bumpy... well, today I checked triggering height at each point, and it's about 0.8-0.9mm, no such large difference. I have to check if the towers are leaning, nothing else comes to mind. But they seemingly don't. The rods are equal lenght, joints spacing is equal too. Need to check if the glass is warped... but almost 1mm warp? I think I'd noticed that too.

Of couse there must be a reason, just need to find it, double and triple check everything.
What can generally cause this kind of wave?

Also is it a large problem to increase the calibration points number in the firmware? I remember Hercek saying that he usually loads a hundred of points to his wxmaxima calibration sheet.
BTW I can't geth wxmaxima to calculate that sheet, there's some Lisp error at the end.

Edited 1 time(s). Last edit at 11/13/2015 02:56PM by pkm.
Re: Auto-calibration problem
November 13, 2015 03:17PM
Any photos of your setup, or specifics about rod length, tower spacing, and bed diameter?
pkm
Re: Auto-calibration problem
November 13, 2015 03:34PM
I have no photos at the moment

Bed 500mm
Delta radius 257mm
Rod length 540mm
Max height 730mm

I use max radius 200mm for the calibration points.
Re: Auto-calibration problem
November 13, 2015 07:43PM
Quote
pkm
BTW I can't geth wxmaxima to calculate that sheet, there's some Lisp error at the end.
The only common issue I know about is that at least some windows versions of wxmaxima do not know properly unicode characters. The file is UTF-8 encoded. Works fine on linux. On windows, one may need to do search and replace to get ride of the unicode letter α, β, γ. E.g. α -> alpha, β -> beta, γ -> gamma.
Re: Auto-calibration problem
November 13, 2015 11:08PM
PKM, I had this issue.

Turned out that my steps per mm value was off. Calculate this exactly using the number of teeth on your pulleys, your belt pitch, degrees per step on your motors, and number of microsteps on your drivers. There are simple formulas online to help you with this.

To verify, measure exactly how far a carriage moves when you ask it to go 10mm down in the Z direction. Use a set of calipers to get this distance.

Once you have this right then you need to redo your home position and delta radius.
Re: Auto-calibration problem
November 14, 2015 04:00AM
Incorrect steps/mm will cause that wave around the periphery. At large radius, so will incorrect diagonal rod length. I suggest you check the steps/mm as the previous reply suggests. If the problem persists then you could try using 7 factor calibration to adjust the diagonal rod length too, although there is a danger that this will cause incorrect XY sizing.

I will consider increasing the number of points allowed in the next firmware release. Currently the maximum is 16 so you could add a few more.

Edited 1 time(s). Last edit at 11/14/2015 04:02AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
pkm
Re: Auto-calibration problem
November 14, 2015 07:29AM
Thanks for the valuable input!

hercek That was UTF as you said! Later I found the edited calibration sheet on the forum, it works and I'll take a better look at it
I guess that you get actuators values for each point from marlin somehow. But what if I would like to use an IR sensor or just a gauge for measuring, then I should enable reverse kinematics in the calibration sheet, right? Or I can get RepRapFirmwareto output those values?

nebbian, dc42 you were correct about steps/mm, the value was 7% off!
Here's why it happened. I found a lot with 15 teeth pulleys on aliexpress, but I thougth that the pulleys would be too weak with 8mm bore... so I asked the seller to ship 16 teeth pulleys. So he did. Later I forgot about that and did not care to count the teeth. So I kept thinking about 15 and made the calculations accordingly.

Now the probing values are mostly within 0.1mm, just a few points are off:
0.025 0.053 0.056 0.061 -0.073 -0.017 0.015 -0.018 0.149 0.072 -0.064 -0.296 -0.137 0.027 -0.064 0.173, mean -0.002, deviation from mean 0.109

This already looks like uneven or bumpy surface, and I probably should choose another set of calibration points, measute offsets at each point etc.

dc42, I would really appreciate you increasing the number of points in the firmware. Probably to 32 or 50 or even 100, to get all bed covered.
I guess no need to probe so many points before each print.
Thorough calibration should be performed from time to time, and before each print it should be just S=3 leveling to sense the bed.

I did have some pretty bad issue when probing. A few times the effector just did not stop and went into bed... so now the heat break is severely bent (my printer has NEMA23 motors). Luckily I have a few spares.
I'm not sure whether the IR sensor led flashed or not when it didn't stop. I'll try to observe it later. Probably some bad contact in the effector connector...
Re: Auto-calibration problem
November 14, 2015 12:11PM
Quote
pkm
hercek That was UTF as you said! Later I found the edited calibration sheet on the forum, it works and I'll take a better look at it
I guess that you get actuators values for each point from marlin somehow. But what if I would like to use an IR sensor or just a gauge for measuring, then I should enable reverse kinematics in the calibration sheet, right? Or I can get RepRapFirmwareto output those values?
Marlin: Use command M114 to get carriage positions on towers at the moment the probe touches the bed. To touch the bed I use G30. I'm not sure how the latest Marlin behaves. In past, it did return exactly 2 mm from the probe point ... so all the values from M114 would be offset by 2 mm. It does not really matter that they are offset provided that the offset is the same for all probe points.

Repetier: I do not know whether the current Repetier can report positions of carriages on towers. I use a slightly modified Repetier which does report them when doing single point probe. If you want, let me know and I'll push it to github.

You could compute tower positions from cartesian coordinates of the touch point, but the notebook does not support that. Only the equations are mentioned there but they are not solved. You would need to do it yourself. Just use carriage positions on towers reported by firmware (M114). If you would use some different kind of probe then you need to convert the probe output to carriage positions on towers at the bed touch point. E.g. if you would use a gauge which measures the real distance to bed at cartesian point (X,Y,Z) then you need to get carriage positions at that point with M114 (lets mark them: ta, tb, tc). Then compute the positions for the wxmaxima notebook as (ta-m, tb-m, tc-m) where m is the distance from (X,Y,Z) to bed as measured by your gauge.

If your printer is play free (i.e. extremely tight/solid) then you do not need much probe points. If you have some play (e.g. between belts and pulleys). then you want more points. The more points the higher chance that the errors will average out. Do not select points in some nice order. Select them in random order so that the same area of bed is approached from multiple directions.

Here is an example Haskell script which generates the probing points:
import System.Random
import qualified Data.Set as Set

xyRange :: Int
xyRange = 90

xyInc :: Int
xyInc = 9

radiusSq :: Int
radiusSq = 115*115

speed :: Int
speed = 90*60

height :: Int
height = 14

main :: IO ()
main = mkBgn >> go (shuffle 0 points)
 where
  go [] = return ()
  go ((x,y):rest) =
    if x*y > radiusSq then go rest else do
    putStrLn $ mkG0 x y
    putStrLn "G30"
    go rest

  mkBgn = mapM_ putStrLn
    [ "G0 X0 Y0 Z" ++ show height
    , "G0 X-41.2 Y-23.8 F" ++ show speed
    , "G0 X0 Y-48"
    , "G0 X41.2 Y-23.8"
    , "G0 X41.2 Y23.8"
    , "G0 X0 Y48"
    , "G0 X-41.2 Y23.8"
    , "G0 X0 Y0" ]

  mkG0 x y =
    showString "G1 X" $ shows x $ showString " Y" $ shows y $ showString " Z" $ show height


points :: [(Int,Int)]
points =
  let range = [0-xyRange, xyInc-xyRange .. xyRange] in
  concat $ map (\r -> zip range (repeat r)) range


shuffle :: Int -> [a] -> [a]
shuffle seed lst =
  let ll = length lst in
  if ll < 2 then lst else
  pick lst $ mkRandomSeq (ll-1) (randomRs (0, ll-1) $ mkStdGen seed) ll


pick :: [a] -> [Int] -> [a]
pick rv@[] _ = rv
pick rv@[_] _ = rv
pick _ [] = undefined
pick lst (p:ps) =
  let (prefix, x:sufix) = splitAt p lst in
  x : pick (prefix ++ sufix) ps


mkRandomSeq :: Int -> [Int] -> Int -> [Int]
mkRandomSeq maxRandomNumber randomNumbers rvLength = go randomNumbers rvLength
 where
  go [] _ = []
  go _ 0 = []
  go (r:rs) cnt =
    let upperLimit = cnt * ((maxRandomNumber+1) `div` cnt) in
    if r >= upperLimit then go rs cnt else
    (r `rem` cnt) : go rs (cnt-1)

Edited 1 time(s). Last edit at 11/14/2015 12:16PM by hercek.
pkm
Re: Auto-calibration problem
November 16, 2015 09:52AM
hercek
Thanks a lot for your help! I'll try to figure out how to use your info and your script. First I need to find a way to log probing data in RepRapFirmware.
I could also make some tests on my 200mm bed printer (RAMPS/Repetier), but this is mostly nesessary for the large delta.

My current results when I replaced Buidtak glass with a clear glass
Bed probe heights: 0.030 -0.065 -0.023 0.005 0.037 -0.017 0.007 0.021 -0.004 0.011 -0.024 0.066 0.035 -0.030 -0.012 0.037, mean 0.005, deviation from mean 0.032
Not too bad.

dc42
David, is it currently possible to log more than 16 probing points? I would like to build a height map for the printer, use the data for calculations etc.
Re: Auto-calibration problem
November 16, 2015 12:57PM
Quote
pkm
dc42
David, is it currently possible to log more than 16 probing points? I would like to build a height map for the printer, use the data for calculations etc.

It's on my list for the next release of my fork of RepRapFirmware. Currently held up while I finish a release of PanelDue firmware.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Auto-calibration problem
November 16, 2015 01:10PM
The only really interesting thing is difference between maximum and minimum probe result. If it is less than 0.05 then it does not make much sense to improve it more. If RepRapFirmware can get you there then there is hardly any need to mess with wxmaxima. That would save you time.
pkm
Re: Auto-calibration problem
November 16, 2015 01:29PM
The difference is 0.13mm for now, not so bad for 500mm bed... but it could be better.
I think more points could improve the accuracy. Averaging of errors etc, exactly as you say.
Also I'd like to check the actual error in points different from those used for calibration.

It's not so much about time, it's about fun.
Sorry, only registered users may post in this forum.

Click here to login