Go Down

Topic: Anybody experience with Marlin auto bed leveling for the Arduino Materia 101 (Read 11293 times) previous topic - next topic

botberg

Hi,

I was wondering if anybody already has experience with building in Marlin auto bed leveling? There are many examples available... like this one

Potentially this would make the start of the print process much more easy and reliable. And also it should not be that complex to implement and reverse if not succesfull.

My specific questions for Marlin auto bed leveling for the Arduino Materia 10
- Where to place the proximity sensor
- What should be the minimal detecting distance
- Any experiences to share?

Thanks in advance,


Bas.

botberg

Last weekend I've implemented the Auto Bed leveling feature in my Materia 101

- I've installed a proximity sensor (KAS-80-A12-S, M12, PNP) costing only 15 Euros
- I created a green PLA bracket to place this sensor in a 31mm distance from the extrusion head
- To place this sensor, I had to limit the X-Axis to 130mm
- Within the Merlin software component 'Configuration.h' I made the appropriate settings
- It took some time to make the currect settings, as the X,Y,Z offset needs to be very precize

In the picture below, you'll see the proximity sensor placed right to the extrusion head, mounted in a bracket which I (of course) printed in green PLA with the Materia 101. Click here to see the picture of the Proximity Sensor https://drive.google.com/file/d/0B_Ep1IUblMIPaTFaaTBicnd5aDQ/view?usp=sharing

Conclusion
This auto bed level function works very well.
- I don't have to manually adjust the printing tray anymore
- Always sure that the placement of the first extrusion layer is placed well
- Increases the printer successes enormously
- Above all... it was fun and rewarding to make

Since this proximity sensor is an addition, which is connected at the Z-end-stop connector, there is no structural hardware change needed, and can alway revert back to the normal implemenation. I only had to bring the voltage level of the swith signal back from 12V to 5V, by simply using a LM7805.


Regards,


Bas.
Netherlands


dp_1

- Within the Merlin software component 'Configuration.h' I made the appropriate settings
Could you show us the changes you made? It would be really interesting and helpful.

Thanks,
dp_1
Prendete quello che dico come un suggerimento, non mi assumo responsabilità di nessun tipo

botberg

Hi dp_1,

Sure, I'm happy to share the configuration.h file in which you'll find the modifications.
Thats one of the main reasons for this Arduino Materia 101 forum isn't it?

Since it has been some weeks ago that I implemented it, I might not remember all the changes I made...
But you'll be able to see all of them in the attached configuration.h file.
I selected some of those changes which I still do remember....


1) Change the End-stop settings
First thing to do... change the Endstop-settings in order to support a good interpretation of the proximity sensor of the Z-Axis... change the true value to false:
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS


2) Limits after homing
Then I had to change the settings of the travel limits after homing. Since my proximity sensor is placed right of the extruder, see the attached picture, I had to limit the X_MAX_POS to 130.
// Travel limits after homing
#define X_MAX_POS 130
#define X_MIN_POS 0
#define Y_MAX_POS 110
#define Y_MIN_POS 0
#define Z_MAX_POS 100
#define Z_MIN_POS 0


3) Enabling the auto-bed leveling feature
Maybe the most important change is to enable the auto-bed leveling:
/============================= Bed Auto Leveling ===========================
#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)


4) Setting the measurement method
To mark the auto-bed-leveling measurement points, I choose the GRID option by selecting
#define AUTO_BED_LEVELING_GRID


5) Defining the measurement points
And have given some fixed measurement positions to mark the front, back, left and right area of the bed:
// set the rectangle in which to probe
    #define LEFT_PROBE_BED_POSITION 10
    #define RIGHT_PROBE_BED_POSITION 90
    #define BACK_PROBE_BED_POSITION 90
    #define FRONT_PROBE_BED_POSITION 10


6) Settings for the homing movement
Then some practical settings to support the movements during the auto-bed-level command:
#define Z_RAISE_BEFORE_HOMING 1       // (in mm) Raise Z before homing (G28) for Probe Clearance.
                                        // Be sure you have this distance over your Z_MAX_POS in case

  #define XY_TRAVEL_SPEED 4000         // X and Y axis travel speed between probes, in mm/min

  #define Z_RAISE_BEFORE_PROBING 10    //How much the extruder will be raised before traveling to the first probing point.
  #define Z_RAISE_BETWEEN_PROBINGS 10  //How much the extruder will be raised when traveling from between next probing points


7) Positioning the extruder
I also modified the positioning for travel related to Extruder
// Travel limits after homing
#if EXTRUDERS == 1

 #define X_MAX_POS 130
 #define X_MIN_POS 0
 #define Y_MAX_POS 110
 #define Y_MIN_POS 0
 #define Z_MAX_POS 100
 #define Z_MIN_POS 0


8) Setting the manual homing switch locations
Not sure why, but I also needed to modify the following manual homing switch locations:
//Manual homing switch locations:
// For deltabots this means top and center of the cartesian print volume.
 #define MANUAL_X_HOME_POS 130
 #define MANUAL_Y_HOME_POS 110
 #define MANUAL_Z_HOME_POS 100
 #if MOTHERBOARD == 80
   #define MANUAL_Z_HOME_POS 206
 #endif


9) Picture of the proximity sensor for reference
To get a better look on how I implemented this proximity sensor, just look at the picture which I attached to this post. Don't know why... but it seems that the picture is turned 90 degrees left...

10) Testing the result with Pronterface and OctoPrint
Testing the result was the most rewarding. After many changes of the settings I finally found those that worked well for me. Good help here was 'Pronterface', which gives direct access to the printer via the USB cable to the Pronterface console. And while I was getting used to the ease of use of direct access to drive XYZ axis movements via this Pronterface, I also saw the use of 'OctoPrint', which enables remote wireless internet access via a Raspberry for transferring files, monitoring printing progress and good insight in extruder temperature in time. And and installed a 30 euros wireless DLink webcam too, which is visible in the OctoPrint remote access menu... so also visable inspectation of the printing progress.

Credit where credit is due
I learned a lot from this youtube video by Thomas Sanladerer https://www.youtube.com/watch?v=EcGFLwj0pnA. He explains step by step how to implement this auto bed leveling or 'Setting up auto bed tramming leveling tilt compensation', as Thomas is explaining. After seeing this 13 minute video, I was excited to implement this my selves for the Arduino Materia 101 too. Also Thomas uses OctoPrint during this instruction... which now has become my primary access route to transfer gcode files to the Materia 101.

My other ideas for further 'hacking' of the Materia 101
  • I'm thinking of reversing the directions of the menu-rotary switch, would be possible in the pins.h file I've seen somewhere. Personally I always turn this rotary switch in wrong direction...
  • And maybe another interesting option would be to implement a 200mW laser which could be managed by the M106 S1-S255/M107 g-code command. I've implemented this on another DIY 3D printer and it works great with Inkscape and Vectric Cut2D and VCarve Pro.


Success with implementing.  :)
Would like to hear your experiences too.

Regards,


Bas
Netherlands


dp_1

Added to my todo list :).
Well, I first have to make my printer start, but I'll try to include this change soon.
Thanks,
dp_1
Prendete quello che dico come un suggerimento, non mi assumo responsabilità di nessun tipo

vdubster

Hi dp_1,

Sure, I'm happy to share the configuration.h file in which you'll find the modifications.
Thats one of the main reasons for this Arduino Materia 101 forum isn't it?

Since it has been some weeks ago that I implemented it, I might not remember all the changes I made...
But you'll be able to see all of them in the attached configuration.h file.
I selected some of those changes which I still do remember....


1) Change the End-stop settings
First thing to do... change the Endstop-settings in order to support a good interpretation of the proximity sensor of the Z-Axis... change the true value to false:
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS


2) Limits after homing
Then I had to change the settings of the travel limits after homing. Since my proximity sensor is placed right of the extruder, see the attached picture, I had to limit the X_MAX_POS to 130.
// Travel limits after homing
#define X_MAX_POS 130
#define X_MIN_POS 0
#define Y_MAX_POS 110
#define Y_MIN_POS 0
#define Z_MAX_POS 100
#define Z_MIN_POS 0


3) Enabling the auto-bed leveling feature
Maybe the most important change is to enable the auto-bed leveling:
/============================= Bed Auto Leveling ===========================
#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)


4) Setting the measurement method
To mark the auto-bed-leveling measurement points, I choose the GRID option by selecting
#define AUTO_BED_LEVELING_GRID


5) Defining the measurement points
And have given some fixed measurement positions to mark the front, back, left and right area of the bed:
// set the rectangle in which to probe
    #define LEFT_PROBE_BED_POSITION 10
    #define RIGHT_PROBE_BED_POSITION 90
    #define BACK_PROBE_BED_POSITION 90
    #define FRONT_PROBE_BED_POSITION 10


6) Settings for the homing movement
Then some practical settings to support the movements during the auto-bed-level command:
#define Z_RAISE_BEFORE_HOMING 1       // (in mm) Raise Z before homing (G28) for Probe Clearance.
                                        // Be sure you have this distance over your Z_MAX_POS in case

  #define XY_TRAVEL_SPEED 4000         // X and Y axis travel speed between probes, in mm/min

  #define Z_RAISE_BEFORE_PROBING 10    //How much the extruder will be raised before traveling to the first probing point.
  #define Z_RAISE_BETWEEN_PROBINGS 10  //How much the extruder will be raised when traveling from between next probing points


7) Positioning the extruder
I also modified the positioning for travel related to Extruder
// Travel limits after homing
#if EXTRUDERS == 1

 #define X_MAX_POS 130
 #define X_MIN_POS 0
 #define Y_MAX_POS 110
 #define Y_MIN_POS 0
 #define Z_MAX_POS 100
 #define Z_MIN_POS 0


8) Setting the manual homing switch locations
Not sure why, but I also needed to modify the following manual homing switch locations:
//Manual homing switch locations:
// For deltabots this means top and center of the cartesian print volume.
 #define MANUAL_X_HOME_POS 130
 #define MANUAL_Y_HOME_POS 110
 #define MANUAL_Z_HOME_POS 100
 #if MOTHERBOARD == 80
   #define MANUAL_Z_HOME_POS 206
 #endif


9) Picture of the proximity sensor for reference
To get a better look on how I implemented this proximity sensor, just look at the picture which I attached to this post. Don't know why... but it seems that the picture is turned 90 degrees left...

10) Testing the result with Pronterface and OctoPrint
Testing the result was the most rewarding. After many changes of the settings I finally found those that worked well for me. Good help here was 'Pronterface', which gives direct access to the printer via the USB cable to the Pronterface console. And while I was getting used to the ease of use of direct access to drive XYZ axis movements via this Pronterface, I also saw the use of 'OctoPrint', which enables remote wireless internet access via a Raspberry for transferring files, monitoring printing progress and good insight in extruder temperature in time. And and installed a 30 euros wireless DLink webcam too, which is visible in the OctoPrint remote access menu... so also visable inspectation of the printing progress.

Credit where credit is due
I learned a lot from this youtube video by Thomas Sanladerer https://www.youtube.com/watch?v=EcGFLwj0pnA. He explains step by step how to implement this auto bed leveling or 'Setting up auto bed tramming leveling tilt compensation', as Thomas is explaining. After seeing this 13 minute video, I was excited to implement this my selves for the Arduino Materia 101 too. Also Thomas uses OctoPrint during this instruction... which now has become my primary access route to transfer gcode files to the Materia 101.

My other ideas for further 'hacking' of the Materia 101
  • I'm thinking of reversing the directions of the menu-rotary switch, would be possible in the pins.h file I've seen somewhere. Personally I always turn this rotary switch in wrong direction...
  • And maybe another interesting option would be to implement a 200mW laser which could be managed by the M106 S1-S255/M107 g-code command. I've implemented this on another DIY 3D printer and it works great with Inkscape and Vectric Cut2D and VCarve Pro.


Success with implementing.  :)
Would like to hear your experiences too.

Regards,


Bas
Netherlands


Any chance your still reading the forum, could you provide a download of your probe bracket?

Many thanks,

James.
3D Printing Reviews - http://3d-printing-reviews.blogspot.co.uk/

Go Up