December 19, 2021
Description
On a cartesian printer with 2 independent leadscrews for z, it happens, that the X- axis tilts a little and this induces z-wobbling artifacts. The Heatbeds are often mounted on springs / silicone pads etc. to get the opportunity to level the bed. A probing point on that floating bed could potentiate the error of a crooked heatbed.
So I decided to use 2 independent points to align both z-axis perfectly. In lack of space to mount a fixed point, I got the idea to use 2 Servo motors to realize this project.
I used SG90-Servo motors, I got for a few bugs from amazon ( https://www.amazon.de/gp/product/B07236KYVC/ref=as\_li\_tl?ie=UTF8&camp=1638&creative=6742&creativeASIN=B07236KYVC&linkCode=as2&tag=kuhnikuehnast-21&linkId=c00879a243a402316da38e3fb5ae6c94 )
https://www.youtube.com/watch?v=TvXCyZwuqzM
As I use a DuetWifi Board, here the config:
to power the Servos with 5 V, I used a buck converter (The case and the converters can be found here: https://www.thingiverse.com/thing:3181309 ) At first, you have to change something in your config.g file to align the heater pins as PWM-pins for the servos:
M307 H4 A-1 C-1 D-1 ; Set Heater 4 to be PWM-Controlled (Servo Left)
M307 H5 A-1 C-1 D-1 ; Set Heater 5 to be PWM-Controlled (Servo Right)
The servos are moved by the M280 Code. (e. g. M280 P4 S25 I1 - P is the Pin-Number you use, (4 and 5); S is the angle you want the servo to be set (25 °) and I is for inverting (I don't know exactly why, but I had to send all commands as inverted, otherwise the servo didn't move)
I also added the "move down command" (M280 P4 S25 I1 for the left servo) into the config.g to prevent a crash on startup, so the servos will always be in the parking position. Be careful as the right servo has to move exactly the opposite direction than the left one! (Parking position for the left is at 25 ° and for the right 170 ° in my setup)
Next, I edited the bed.g file to enable the auto bed compensation. This is the code. If you have any questions, feel free to ask me in the comments:
; prepare auto bed compensation
G1 Y227.0 F12000 ; move bed out of the way
M561 ; clear any bed transform
M280 P4 S105 I1 ; left Servo Up
M280 P5 S83 I1 ; right Servo Up
; go to first probing point and take this as zero
G1 Z10 ; move 10 up to prevent a crash
G1 X-20.7 Y227.0 F12000 ; go to left Servo probing point
G31 P25 Z0 ; set trigger height to 0
G30 X-20.70 Y227.0 ; define left Servo probing point as Z=0
; perform auto bed compensation
G30 P0 X6.2 Y232.935 H0 Z-99999 ; probe point P0
G31 P25 Z0.2075 ; set trigger height to 0.2075 (= hardware offset of both points)
G30 P1 X214.4 Y232.935 H0 Z-99999 S2 ; go to defined probing point 2 and do: S2 - Adjusting; S-1 Report
; park servos
M280 P4 S25 I1 ; left Servo down
M280 P5 S170 I1 ; right Servo down
; reset the z-height to normal
G92 Z15 ; define z higher than normal to get a probe result
G31 P25 X+26.9 Y5.935 Z1.065 ; Z probe trigger value, offset in relation to nozzle. And trigger height adjustment -> reset to standard
G1 X83.1 Y104.065 F12000 ; go to the middle of the bed
G30 X83.1 Y104.065 ; probe the bed
Printer:
Hypercube Evolution
Resolution:
0.2
10 - 40 %
Category: 3D Printer AccessoriesLicense:
Creative Commons — Attribution
7