Page 4 of 21

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Fri Mar 13, 2015 1:29 pm
by mhackney
626Pilot, I have the FSRs working on my mini kossel running smoothie so I am set to try this. Did you ever find a way to post the binary? I have a little issue with compiling smoothie right now that is driving me nuts and the guys on the IRC can't figure it out either.

thanks,
Michael

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Fri Mar 13, 2015 2:56 pm
by mhackney
Ok, I have you firmware built and loaded. I edited my config file to add the new stuff for the HC config.

I can run G29 and get an average score
I can run G32 and it calibrates what looks to be reasonably well
I run G31 OPQRS and get a hang (did it twice and hung both times) and had to reboot

Code: Select all

> G31 OPQRS
 
[HC] Heuristic calibration in progress. Press Reset to abort.
[HC] /!\ PROBE CRASH DANGER /!\ Don't press buttons, send commands, or access the SD card.
 
[HC]             Data source: Probe
[HC]            Active tests: [Endstops (O), mul=1.00] [Delta Radius (P), mul=1.00] [Arm Length (Q), mul=1.00] [Tower Angle Offset (R), mul=1.00] [Virtual Shimming (S), mul=1.00] 
[HC]          Inactive tests: (none)
[HC]  Keep last settings (K): false
[HC]     Annealing tries (T): 50
[HC]            Max temp (U): 0.350
[HC] Binary search width (V): 0.100
[HC]     Overrun divisor (W): 2.000
[HC]    Zero all offsets (Y): false
 
[HC] Baseline kinematics updated.
[HC] Keeping existing kinematics.
[HC] Depth-mapping the print surface...
[PK]           Arm length: 214.300
[PK]         Delta radius: 105.146
[PK]      Endstop offsets: {-0.407, 0.000, -0.563}
[PK] Radius offsets (ABC): {0.000, 0.000, 0.000}
[PK]  Angle offsets (DEF): {0.000, 0.000, 0.000}
[PK]     Virtual shimming: {0.000, 0.000, 0.000}, vector={0.000, 0.000, 1.000}, d=0.000, enabled
[PK] Depth (Z) correction: disabled
Any suggestions?

What are the G31 parameters I couldn't find them documented anywhere.

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Fri Mar 13, 2015 4:21 pm
by mhackney
Ok , after rebooting I did another G29 then G32. Then I did a G31 Z and got this:

Code: Select all

> G31 Z
 
[DM] Current kinematics:
[PK]           Arm length: 214.300
[PK]         Delta radius: 105.271
[PK]      Endstop offsets: {-0.360, 0.000, -0.532}
[PK] Radius offsets (ABC): {0.000, 0.000, 0.000}
[PK]  Angle offsets (DEF): {0.000, 0.000, 0.000}
[PK]     Virtual shimming: {0.000, 0.000, 0.000}, vector={0.000, 0.000, 1.000}, d=0.000, enabled
[PK] Depth (Z) correction: disabled
 
[PR] Priming probe 5 times.
[DM] Depth to bed surface at center: 352 steps (0.000 mm)
[DP] do_probe_at(): steps=70 - this is much too small - is probe_height high enough?
[DM] do_probe_at() returned false.
[DM] Couldn't depth-map the surface.
ok
I am running with FSRs and have the comprehensive-delta.probe_offset_z = 0

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Fri Mar 13, 2015 11:36 pm
by 626Pilot
mhackney wrote:I run G31 OPQRS and get a hang (did it twice and hung both times) and had to reboot
If it hangs during probing, it has probably run out of memory. If you have an LCD controller, disable it in config.
mhackney wrote: What are the G31 parameters I couldn't find them documented anywhere.
Type G31 with no arguments and it will tell you the params for simulated annealing.
mhackney wrote: [PR] Priming probe 5 times.
[DM] Depth to bed surface at center: 352 steps (0.000 mm)
[DP] do_probe_at(): steps=70 - this is much too small - is probe_height high enough?
[DM] do_probe_at() returned false.
[DM] Couldn't depth-map the surface.
ok[/code]

I am running with FSRs and have the comprehensive-delta.probe_offset_z = 0
That's a safety feature to help prevent the printer from damaging the probe if something isn't right. Try increasing probe_height. Let me know if that doesn't fix it.

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Sat Mar 14, 2015 1:52 am
by Nylocke
Could you disable the LCD, run the calibration and save it, then reenable the LCD? I always prefer SD printing and LCD control over the printer.

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Sat Mar 14, 2015 11:58 am
by mhackney
Ok, I disabled the GLCD and set my zprobe.probe_height = 10. That seems to solve the hanging issue. However, when I run G31 OPQRS I get:
[HC] Heuristic calibration in progress. Press Reset to abort.
[HC] /!\ PROBE CRASH DANGER /!\ Don't press buttons, send commands, or access the SD card.

[HC] Data source: Probe
[HC] Active tests: [Endstops (O), mul=1.00] [Delta Radius (P), mul=1.00] [Arm Length (Q), mul=1.00] [Tower Angle Offset (R), mul=1.00] [Virtual Shimming (S), mul=1.00]
[HC] Inactive tests: (none)
[HC] Keep last settings (K): false
[HC] Annealing tries (T): 50
[HC] Max temp (U): 0.350
[HC] Binary search width (V): 0.100
[HC] Overrun divisor (W): 2.000
[HC] Zero all offsets (Y): false

[HC] Baseline kinematics updated.
[HC] Keeping existing kinematics.
[HC] Depth-mapping the print surface...
[PK] Arm length: 214.550
[PK] Delta radius: 105.459
[PK] Endstop offsets: {0.000, -0.625, -0.783}
[PK] Radius offsets (ABC): {0.000, 0.308, 0.090}
[PK] Angle offsets (DEF): {-0.339, -0.864, -0.451}
[PK] Virtual shimming: {-0.026, 0.559, 0.302}, vector={-0.006, -0.000, 1.000}, d=-0.279, enabled
[PK] Depth (Z) correction: disabled
[PR] Priming probe 5 times.
[DM] Depth to bed surface at center: 750 steps (0.000 mm)
[PD] 0.450
[PD]
[PD] [ 0.000] 0.075 -0.025 -0.175 [ 0.000]
[PD]
[PD] 0.138 0.025 0.000 -0.150 -0.100
[PD]
[PD] [ 0.000] 0.038 0.000 -0.125 [ 0.000]
[PD]
[PD] 0.013
[PD] Best=0.000, worst=0.450, min=-0.175, max=0.450, mu=0.006, sigma=0.111, energy=0.109
[HC] Generating carriage positions for a printer with this configuration.

[HC] Starting test configuration: Arm Length=214.550, Delta Radius=105.459

[HC] ***** Simulated annealing pass 1 of 1 in progress *****
[HC] Existing calibration has energy 0.109

[HC] Reticulating splines...
[HC] Try 0 of 50, energy=0.084 (want <= 0.010)
[HC] Try 5 of 50, energy=0.092 (want <= 0.010)
[HC] Try 10 of 50, energy=0.060 (want <= 0.010)
[HC] Try 15 of 50, energy=0.067 (want <= 0.010)
[HC] Try 20 of 50, energy=0.082 (want <= 0.010)
[HC] Try 25 of 50, energy=0.073 (want <= 0.010)
[HC] Try 30 of 50, energy=0.065 (want <= 0.010)
[HC] Try 35 of 50, energy=0.059 (want <= 0.010)
[HC] Annealing has stalled - aborting.

[HC] End of annealing pass (energy=0.059)
[HC]
[HC] Heuristic calibration complete (energy=0.059). Final settings:
[PK] Arm length: 215.137
[PK] Delta radius: 105.725
[PK] Endstop offsets: {0.000, -1.154, -1.169}
[PK] Radius offsets (ABC): {0.000, -0.048, 0.460}
[PK] Angle offsets (DEF): {-0.691, -1.274, -0.388}
[PK] Virtual shimming: {-0.013, 0.790, 0.689}, vector={-0.008, -0.002, 1.000}, d=-0.488, enabled
[PK] Depth (Z) correction: disabled

[HC] Final SIMULATED depths:
[PD] 0.345
[PD]
[PD] [ 0.000] 0.005 -0.006 -0.048 [ 0.000]
[PD]
[PD] 0.129 -0.006 0.000 0.006 0.102
[PD]
[PD] [ 0.000] -0.003 0.012 -0.040 [ 0.000]
[PD]
[PD] -0.005
[PD] Best=0.000, worst=0.345, min=-0.048, max=0.345, mu=0.020, sigma=0.075, energy=0.059

[HC] You can run this command again to see if it gets better, or type M500 to save.
ok
So it looks like it is not able to converge on a low energy (<= 0.010) state. What contributes to this? One thing I noticed is that the middle set of 5 probe points comes very close to the edges of the build platter - they also happen to be the big outliers in Z height. My probe radius is set to 60 (this is a mini kossel with an Orion heated bed):
leveling-strategy.delta-calibration.radius 60 # the probe radius
Perhaps I should make that smaller and try to get away from the build plate edge? The plate has a PEI surface. It does not look to be high at those points but its difficult to see with the PEI surface installed and a straightedge.

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Sat Mar 14, 2015 12:07 pm
by mhackney
Hmm, things were going reasonably well after disabling the GLCD. I'd done a few G31s without a problem. I just set my delta radius to 55 to address the issue I mentioned above and G31 hung again while priming prove (2 of 5 complete then hang):
> G31 OPQRS

[HC] Heuristic calibration in progress. Press Reset to abort.
[HC] /!\ PROBE CRASH DANGER /!\ Don't press buttons, send commands, or access the SD card.

[HC] Data source: Probe
[HC] Active tests: [Endstops (O), mul=1.00] [Delta Radius (P), mul=1.00] [Arm Length (Q), mul=1.00] [Tower Angle Offset (R), mul=1.00] [Virtual Shimming (S), mul=1.00]
[HC] Inactive tests: (none)
[HC] Keep last settings (K): false
[HC] Annealing tries (T): 50
[HC] Max temp (U): 0.350
[HC] Binary search width (V): 0.100
[HC] Overrun divisor (W): 2.000
[HC] Zero all offsets (Y): false

[HC] Baseline kinematics updated.
[HC] Keeping existing kinematics.
[HC] Depth-mapping the print surface...
[PK] Arm length: 214.300
[PK] Delta radius: 105.146
[PK] Endstop offsets: {-0.141, 0.000, -0.563}
[PK] Radius offsets (ABC): {0.000, 0.000, 0.000}
[PK] Angle offsets (DEF): {0.000, 0.000, 0.000}
[PK] Virtual shimming: {0.000, 0.000, 0.000}, vector={0.000, 0.000, 1.000}, d=0.000, enabled
[PK] Depth (Z) correction: disabled
[BH] Determining the probe-from height.
[PR] Priming probe 5 times.

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Sat Mar 14, 2015 12:26 pm
by mhackney
Ok, reset and it started probing and then hung at the last probe point.


I also noticed that you are not using

leveling-strategy.delta-calibration.radius 60 # the probe radius

to set the probing radius. I lowered that (ultimately to 30) and it has no effect. The middle set of 5 probes points goes all the way to the edge of my build plate. I also noticed that the row above and below that go within 2mm of the edge of the plate. How can I reduce this probing radius? I didn't see a pconfig parameter in your new parameter block.

Cheers,
Michael

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Sat Mar 14, 2015 1:16 pm
by mhackney
Ok, going through the code I see that you refer to a delta_radius in the config that I did not have. I went through your config file more closely to make sure I've copied everything I need. I just reset after adding the radius and will try to run the G31 and hopefully won't hang!

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Sat Mar 14, 2015 1:35 pm
by mhackney
Well, it ran once and bailed at Try 25 of 50, energy=0.038 with "Annealing has stalled - aborting". I then tried running G31 again immediately and it hung at the arming probe step.

Is it required to run G32 before each and every G31 run? Could that be causing an issue (that I didn't)?

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Sat Mar 14, 2015 2:30 pm
by mhackney
Well, running the G32 before G31 did not do it, the G31 hung right at the ft. priming probe.

I'm not sure why it worked a few times and now is failing/hanging. I am running ethernet on my Smoothie but I disabled the GLCD and that seemed to make a difference this morning.

Maybe some success?

Posted: Mon Mar 16, 2015 11:22 am
by mhackney
So, after letting the printer sit over the weekend while I did some other things, I came in this morning with a fresh attempt.

I first ran a G32 and saved the settings with M500. Then I ran a G31 Z to get a baseline. It actually seems pretty good to me right off the bat: energy=0.044 and looking at the map values (see below) there is not a lot of variability.

Then I ran G31 OPQRS and it ran through without crashing. However, and I see this almost every time I get this far, it does terminate the simulated annealing pass with a "Annealing has stalled - aborting." This time it happened at try 40 of 50 with an energy=0.025. I know the target is 0.010 but this is the furthest I've been able to get! I saved this with M500.

Finally I ran G31 Z to have a before-after comparison. That also ran to completion without hanging and resulted in the last height map below. You'll see energy=0.109 but this is much greater variation in the values than there were in the Before/first run. I don't understand that at all.

I am going to run another pass and see how it goes but wanted to capture this at lease.

> G31 Z

[DM] Current kinematics:
[PK] Arm length: 214.300
[PK] Delta radius: 105.615
[PK] Endstop offsets: {0.000, -0.282, -0.767}
[PK] Radius offsets (ABC): {0.000, 0.000, 0.000}
[PK] Angle offsets (DEF): {0.000, 0.000, 0.000}
[PK] Virtual shimming: {0.000, 0.000, 0.000}, vector={0.000, 0.000, 1.000}, d=0.000, enabled
[PK] Depth (Z) correction: disabled

[BH] Determining the probe-from height.
[PR] Priming probe 5 times.
[BH] Bed height set to 200.212
[PR] Priming probe 5 times.
[DM] Depth to bed surface at center: 770 steps (0.000 mm)
[PD] 0.062
[PD]
[PD] [ 0.000] 0.000 -0.025 -0.062 [ 0.000]
[PD]
[PD] -0.050 0.000 0.000 -0.025 -0.062
[PD]
[PD] [ 0.000] 0.075 0.050 0.075 [ 0.000]
[PD]
[PD] 0.038
[PD] Best=0.000, worst=0.075, min=-0.062, max=0.075, mu=0.003, sigma=0.035, energy=0.044
ok
> G31 OPQRS

[HC] Heuristic calibration in progress. Press Reset to abort.
[HC] /!\ PROBE CRASH DANGER /!\ Don't press buttons, send commands, or access the SD card.

[HC] Data source: Probe
[HC] Active tests: [Endstops (O), mul=1.00] [Delta Radius (P), mul=1.00] [Arm Length (Q), mul=1.00] [Tower Angle Offset (R), mul=1.00] [Virtual Shimming (S), mul=1.00]
[HC] Inactive tests: (none)
[HC] Keep last settings (K): false
[HC] Annealing tries (T): 50
[HC] Max temp (U): 0.350
[HC] Binary search width (V): 0.100
[HC] Overrun divisor (W): 2.000
[HC] Zero all offsets (Y): false

[HC] Baseline kinematics updated.
[HC] Keeping existing kinematics.
[HC] Depth-mapping the print surface...
[PK] Arm length: 214.300
[PK] Delta radius: 105.615
[PK] Endstop offsets: {0.000, -0.282, -0.767}
[PK] Radius offsets (ABC): {0.000, 0.000, 0.000}
[PK] Angle offsets (DEF): {0.000, 0.000, 0.000}
[PK] Virtual shimming: {0.000, 0.000, 0.000}, vector={0.000, 0.000, 1.000}, d=0.000, enabled
[PK] Depth (Z) correction: disabled
[PR] Priming probe 5 times.
[DM] Depth to bed surface at center: 770 steps (0.000 mm)
[PD] 0.050
[PD]
[PD] [ 0.000] 0.000 -0.038 -0.062 [ 0.000]
[PD]
[PD] -0.075 -0.025 0.000 -0.025 -0.075
[PD]
[PD] [ 0.000] 0.062 0.025 0.087 [ 0.000]
[PD]
[PD] 0.062
[PD] Best=0.000, worst=0.087, min=-0.075, max=0.087, mu=-0.000, sigma=0.038, energy=0.049
[HC] Generating carriage positions for a printer with this configuration.

[HC] Starting test configuration: Arm Length=214.300, Delta Radius=105.615

[HC] ***** Simulated annealing pass 1 of 1 in progress *****
[HC] Existing calibration has energy 0.049

[HC] Reticulating splines...
[HC] Try 0 of 50, energy=0.042 (want <= 0.010)
[HC] Try 5 of 50, energy=0.050 (want <= 0.010)
[HC] Try 10 of 50, energy=0.068 (want <= 0.010)
[HC] Try 15 of 50, energy=0.038 (want <= 0.010)
[HC] Try 20 of 50, energy=0.036 (want <= 0.010)
[HC] Try 25 of 50, energy=0.037 (want <= 0.010)
[HC] Try 30 of 50, energy=0.034 (want <= 0.010)
[HC] Try 35 of 50, energy=0.026 (want <= 0.010)
[HC] Try 40 of 50, energy=0.025 (want <= 0.010)
[HC] Annealing has stalled - aborting.

[HC] End of annealing pass (energy=0.025)
[HC]
[HC] Heuristic calibration complete (energy=0.025). Final settings:
[PK] Arm length: 214.300
[PK] Delta radius: 105.112
[PK] Endstop offsets: {0.000, -0.364, -0.302}
[PK] Radius offsets (ABC): {0.912, 0.000, 0.503}
[PK] Angle offsets (DEF): {-0.226, -0.417, 0.303}
[PK] Virtual shimming: {0.422, 0.503, 0.076}, vector={-0.001, 0.003, 1.000}, d=-0.334, enabled
[PK] Depth (Z) correction: disabled

[HC] Final SIMULATED depths:
[PD] 0.051
[PD]
[PD] [ 0.000] 0.004 -0.040 -0.019 [ 0.000]
[PD]
[PD] 0.000 -0.010 0.000 -0.000 0.001
[PD]
[PD] [ 0.000] 0.066 0.001 0.065 [ 0.000]
[PD]
[PD] -0.048
[PD] Best=0.000, worst=0.066, min=-0.048, max=0.066, mu=0.003, sigma=0.025, energy=0.025

[HC] You can run this command again to see if it gets better, or type M500 to save.
ok
> M500
Settings Stored to /sd/config-override
ok
> G31 Z

[DM] Current kinematics:
[PK] Arm length: 214.300
[PK] Delta radius: 105.112
[PK] Endstop offsets: {0.000, -0.364, -0.302}
[PK] Radius offsets (ABC): {0.912, 0.000, 0.503}
[PK] Angle offsets (DEF): {-0.226, -0.417, 0.303}
[PK] Virtual shimming: {0.422, 0.503, 0.076}, vector={-0.001, 0.003, 1.000}, d=-0.334, enabled
[PK] Depth (Z) correction: disabled

[PR] Priming probe 5 times.
[DM] Depth to bed surface at center: 808 steps (0.000 mm)
[PD] 0.050
[PD]
[PD] [ 0.000] -0.125 -0.025 0.100 [ 0.000]
[PD]
[PD] -0.213 -0.112 0.000 0.125 0.237
[PD]
[PD] [ 0.000] -0.050 0.038 0.213 [ 0.000]
[PD]
[PD] -0.025
[PD] Best=0.000, worst=0.237, min=-0.213, max=0.237, mu=0.009, sigma=0.091, energy=0.109

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Mon Mar 16, 2015 11:34 am
by mhackney
Well, I attempted to run G31 OPQRS immediately after posting the above and got a hang:
> G31 OPQRS

[HC] Heuristic calibration in progress. Press Reset to abort.
[HC] /!\ PROBE CRASH DANGER /!\ Don't press buttons, send commands, or access the SD card.

[HC] Data source: Probe
[HC] Active tests: [Endstops (O), mul=1.00] [Delta Radius (P), mul=1.00] [Arm Length (Q), mul=1.00] [Tower Angle Offset (R), mul=1.00] [Virtual Shimming (S), mul=1.00]
[HC] Inactive tests: (none)
[HC] Keep last settings (K): false
[HC] Annealing tries (T): 50
[HC] Max temp (U): 0.350
[HC] Binary search width (V): 0.100
[HC] Overrun divisor (W): 2.000
[HC] Zero all offsets (Y): false

[HC] Baseline kinematics updated.
[HC] Keeping existing kinematics.
[HC] Depth-mapping the print surface...
[PK] Arm length: 214.300
[PK] Delta radius: 105.112
[PK] Endstop offsets: {0.000, -0.364, -0.302}
[PK] Radius offsets (ABC): {0.912, 0.000, 0.503}
[PK] Angle offsets (DEF): {-0.226, -0.417, 0.303}
[PK] Virtual shimming: {0.422, 0.503, 0.076}, vector={-0.001, 0.003, 1.000}, d=-0.334, enabled
[PK] Depth (Z) correction: disabled
[PR] Priming probe 5 times.
[DM] Depth to bed surface at center: 809 steps (0.000 mm)

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Mon Mar 16, 2015 7:03 pm
by 626Pilot
I'm not sure why it crashed the second time, probably memory exhaustion. It looks like the SA made it worse the first run through. Try running it a few times to see if it improves anything.

You can also try adjusting the parameters. See these?

Code: Select all

[HC] Annealing tries (T): 50
[HC] Max temp (U): 0.350
You can try, for example, G31 OPQRS T75, G31 OPQRS U0.5, etc. T75 will have it run more iterations, whereas U0.5 increases the starting annealing temperature. The default setting is something I chose because it seems to work pretty well, but I have occasionally seen it do better with more iterations. When you increase the iterations, it spends more time at a higher temp, so it can search the space a little more. Increasing the temp does the same thing, but obviously it has more of a chance to do its work if you give it more iterations.

You can also adjust the individual temperature multipliers for each variable. For example, if you do G31 O1.5 P1 Q0.5 R3 S1.75, each one of those variables will start at max temp (0.35) times the number you provide.

There is also the issue of tower lean. I've found the annealer produces better results when it's given more salient variables to try messing with. When I get around to adding that, I think it will produce better results, although it will run slower.

Beyond that, as you suggested, the Taguchi method could make the algorithm able to self-tune in ways that it can't now. I found a whitepaper in which some researchers used a small neural network to let an SA algorithm tune itself. I've been looking for an excuse to implement an actual neural net for awhile. This might be the time when I do it, assuming the Smoothieboard's processor has enough RAM to hold the number of neurons it would take.

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Mon Mar 16, 2015 7:43 pm
by mhackney
Thanks for the info. At this point, I have not been able to run more than once without a hang and even then, the first time I get hangs about 50% of the time. I've also never successfully completed all the pass - getting the annealing has stalled message.

Seems like the memory issue is significant, unfortunately. Can anything be done to optimize memory usage?

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Mon Mar 16, 2015 8:02 pm
by mhackney
626Pilot, I hung at the probing step yet again. Do you think this is also memory related? This happens up front so depending on when you allocate memory, might not be a me issue. There seems to be no rhyme or reason for when it hangs while probing but it happens very often.

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Mon Mar 16, 2015 8:11 pm
by Nylocke
When it hangs, does it restart by itself or does it just pause and wait for user interaction? I'm worried about this on the Mini Kossel, the board appears to completely power cycle when trying to start a print anymore, I'm thinking its the power supply (hoping really) and not the X5 running out of RAM. We have a beefier one coming in, but I'm not sure what road to take if it turns out the X5 is running short on RAM.

This is the main reason why I haven't gone the Smoothie 5X route with my printer. Still waiting for a better Smoothie based board or a cheaper BBB solution that can use 4 hotends..

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Mon Mar 16, 2015 8:21 pm
by mhackney
No, you have to press the tiny, tiny reset button on the smoothie board. It's a PIA.

I still bit the bullet and I'm putting smoothies on all my active printers. I ordered 2 with the group buy. For normal operation it is quite nice and I can visually see the difference in quality on parts printed on the same printer but one with RAMBo and the other with Smoothie. I know that the smoothie developers are very conservative with memory usage. When I developed the TemperatureSwitch module last year, they reviewed the code multiple times and made "recommendations" for performance and memory usage. It resulted in a pretty nice module.

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Mon Mar 16, 2015 8:25 pm
by Nylocke
I'm really hoping the X5 works the same way and its just tripping the measly 5 amp PSU. Hopefully when its all calibrated and running nicely I can get the Viki2 running without it crashing.

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Mon Mar 16, 2015 8:30 pm
by 626Pilot
mhackney wrote:626Pilot, I hung at the probing step yet again. Do you think this is also memory related?
Probably. Turn off whatever stuff (LCD, etc.) you don't need right this minute. Smoothie is set up to run on the processor with 32K of system RAM and another 32K in banks, which is a nuisance. I have to manually tell it to malloc stuff on one of the banks, and then add code to free it when it's done. I have about another K of arrays I can move.
Nylocke wrote:When it hangs, does it restart by itself or does it just pause and wait for user interaction? I'm worried about this on the Mini Kossel, the board appears to completely power cycle when trying to start a print anymore, I'm thinking its the power supply (hoping really) and not the X5 running out of RAM. We have a beefier one coming in, but I'm not sure what road to take if it turns out the X5 is running short on RAM.
I have two damaged Azteeg X5 Minis. One blew one of its tiny heater FETs, and the other has weird "stuttering" issues that will make it lock up at random times (like when it's homing, or doing something else that will result in horrible noises). Neither board was used for more than a few months before it started going south.

Smoothieboards have bigger through-hole FET components. I got one a couple months back. I have to say it's working really well for me. I'm not impressed with Azteeg's quality so far, and I don't feel motivated to buy any more of their boards.

I would not use a 5-amp PSU. It's not enough. You may be starving the processor for current when you turn on the hot end.

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Mon Mar 16, 2015 8:48 pm
by Nylocke
I had used it in the past with a RAMPS board with a similar setup so I thought it would be okay until we could get a beefier one. We ordered a beefier one so thats getting resolved.

I heard about your quality issues in the z=0 issues thread. Wish I had read that sooner before we bought the X5. When it fails (or if, who knows) we can get a real smoothie.

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Tue Mar 17, 2015 1:55 am
by 626Pilot
mhackney wrote: I also noticed that you are not using

leveling-strategy.delta-calibration.radius 60 # the probe radius

to set the probing radius. I lowered that (ultimately to 30) and it has no effect.
You probably have stuff left over from using a different delta strategy. See this: https://github.com/626Pilot/Smoothiewar ... lta/config

The value you want is zprobe.probe_radius

Make sure that your file has all the stuff from comprehensive-delta.* and zprobe.*. Other people have reported crashes and other weird behavior from having missing config values. All the config values take up RAM, so if there's some old setting that you don't see in my reference config, comment it out or get rid of it!
So it looks like it is not able to converge on a low energy (<= 0.010) state.
I wouldn't expect it to on all printers. (It has never once reached the 10-micron goal on mine.) The annealing process will stall when it sees no significant improvement over and over for some number of cycles, meaning that it can't figure out a path to a better config. I put in stalling detection so you wouldn't have to wait for it to finish all its iterations to arrive at the same answer it did when it first stalled.

Better than 10 microns is "wish list" territory. Might be possible for some people, but remember, the firmware doesn't know how to figure out (or make use of) tower lean. I would bet your towers are not 90.000000 degrees relative to the bed!

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Tue Mar 17, 2015 7:34 am
by mhackney
Thanks, I figured out the config parameters the other day by comparing your config to mine carefully this time. So I have been set on the radius question and that did make a big difference.

And some more feedback...

I've run the process enough times now to observe that I get much better results NOT using the SA but simply running your G32 and then doing a G31 Z to check the map. This is a very typical result like the one I just ran:
> G31 Z

[DM] Current kinematics:
[PK] Arm length: 214.300
[PK] Delta radius: 105.112
[PK] Endstop offsets: {-0.203, 0.000, -0.297}
[PK] Radius offsets (ABC): {0.912, 0.000, 0.503}
[PK] Angle offsets (DEF): {-0.226, -0.417, 0.303}
[PK] Virtual shimming: {0.422, 0.503, 0.076}, vector={-0.001, 0.003, 1.000}, d=-0.334, enabled
[PK] Depth (Z) correction: disabled

[BH] Determining the probe-from height.
[PR] Priming probe 5 times.
[BH] Bed height set to 200.700
[PR] Priming probe 5 times.
[DM] Depth to bed surface at center: 796 steps (0.000 mm)
[PD] 0.062
[PD]
[PD] [ 0.000] 0.013 -0.038 -0.025 [ 0.000]
[PD]
[PD] 0.050 0.013 0.000 -0.038 -0.013
[PD]
[PD] [ 0.000] 0.062 0.013 0.025 [ 0.000]
[PD]
[PD] -0.062
[PD] Best=0.000, worst=0.062, min=-0.062, max=0.062, mu=0.003, sigma=0.027, energy=0.034
ok
But if I then run SA and perform a G32 Z I get much wider variation and a larger energy as per my example posted yesterday. I've observed this all 6 times I've been able to get this far without hanging.

What is the correlation of energy to microns?

I'm actually pretty happy with the results shown above using just the "simple" G32 calibration. I would love to use the Z height correction from that point. Can this be done simply by running G31 A WITHOUT running the SA routine first (but simply run the G32 first)?

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Tue Mar 17, 2015 7:49 am
by mhackney
Going through your config file and mine again. I have found a few little crufty things to clean up. Also, I see you have:

probe endstop
probe_pin 1.28 # optional pin for probe

I don't. Do I need these?

Re: Heuristic (AI) calibration for delta printers on Smoothi

Posted: Tue Mar 17, 2015 5:51 pm
by 626Pilot
If G32 is better for you, then yeah, you can just do that and then G31 A. G32 is like GeneB's method, but it converges the endstops and DR simultaneously, so you should get a little better calibration.

About the probe and probe_pin vars, I don't know. Could be they changed where those things are defined. If it works, it works.

The energy is calculated by taking all the points other than the center, measuring their deflections (higher or lower) relative to center, and averaging. If all the points were 0.1 relative to center, the energy would be 0.1. Normally, when I calibrate my printer, it will start off with an energy of .2xx and then the SA will get it down below .1. Most people who run it actually get better results than I do. Probably because I'm using an old acrylic kit from 2012.