Welcome! Log In Create A New Profile

Advanced

Auto Bed Levelling - End Stop installation

Posted by Stephanel 
Auto Bed Levelling - End Stop installation
February 03, 2015 02:41PM
Hi there!

I am trying to install the auto bed levelling with RAMPS 1.4 and Marlin firmware. I have a Delta Printer.

Despite the Auto Bed Levelling seems to be supported out of the box by the Marlin firmware, I have trouble setting it up... I did the following:

  • I put a jumper between the VCC and 5V on the RAMPS 1.4 to power my servo motor.
  • I attached a servo motor to the RAMPS 1.4
  • I connected an end stop to the Z axis MIN pins on the RAMPS
  • I setup the Marlin firmware
#define Z_PROBE_OFFSET {0, 10, -5.6, 0}  // X, Y, Z, E distance between hotend nozzle and deployed bed leveling probe.
#define Z_PROBE_DEPLOY_START_LOCATION {-40, -25, 30, 0}   // X, Y, Z, E start location for z-probe deployment sequence
#define Z_PROBE_DEPLOY_END_LOCATION {0, -25, 30, 0} 	  // X, Y, Z, E end location for z-probe deployment sequence
#define Z_PROBE_RETRACT_START_LOCATION {40, -25, 20, 0}  // X, Y, Z, E start location for z-probe retract sequence
#define Z_PROBE_RETRACT_END_LOCATION {0, 50, 1, 0}     // X, Y, Z, E end location for z-probe retract sequence 
// ...
#define NUM_SERVOS 1 // Servo index starts with 0 for M280 command

#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 165,65} // X,Y,Z Axis Extend and Retract angles
  • And I used G30 to start the bed levelling sequence

I would have expected the following to happen:
  • The system homes (G28)
  • The effector goes down to the DEPLOY_START_LOCATION
  • The servo motor moves to the correct start position
  • The effector moves down until it hits the bed
  • The effector moves back up and moves to another probe location

However, what happens is
  • The system homes (G28)
  • The effector goes down to the DEPLOY_START_LOCATION
  • (I think) The effector moves to the DEPLOY_END_LOCATION
  • (I think) The effector moves to the first probe location
  • The effector moves down until it hits the bed and keeps on moving!

I manually click the end stop multiple times, but nothing happens. Furthermore, the servo motor does not move at all...

Should I somehow define which end stop pin I use? I use a standard end stop switch as probe.

Thanks a lot for your input!

Edited 1 time(s). Last edit at 02/03/2015 02:44PM by Stephanel.
Re: Auto Bed Levelling - End Stop installation
February 03, 2015 03:13PM
Maybe I'm not the only one experiencing this, but often once I write down my problem on a forum like this, I find the solution :-)

Basically, what happened is that I had the min end stops disabled.

#ifndef ENDSTOPPULLUPS
  // fine Enstop settings: Individual Pullups. will be ignored if ENDSTOPPULLUPS is defined
  #define ENDSTOPPULLUP_XMAX
  #define ENDSTOPPULLUP_YMAX
  #define ENDSTOPPULLUP_ZMAX
  // #define ENDSTOPPULLUP_XMIN
  // #define ENDSTOPPULLUP_YMIN
  #define ENDSTOPPULLUP_ZMIN <---- this was commented
#endif

// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. <--- this was set to true
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 = true; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS   <---- this was uncommented

So the three above indicated bugs resulted in the end stop not working.

Now, when the end stop is clicked, the effector moves up a bit and goes down again. It does this a few times, and after that moves to another probe point.

It seems to me the correct functioning for the end stop.

Now only the servo still seems not to work properly...
Re: Auto Bed Levelling - End Stop installation
February 05, 2015 12:15PM
For the servo not moving, the 5V regulator on the Arduino doesn't have much left over and you may not have sufficient power to drive the servo. Remove the jumper between Vcc and the +5V and use a 5V line from your power supply (if it has one). If it doesn't, you can use a LM7805 jambed into the power inputs has a hacked way to get the 5V, or a proper circuit board with one, or something like a cheap LM2596 buck-boost power supply with the ground tied in to the primary power supply.
Re: Auto Bed Levelling - End Stop installation
February 07, 2015 10:51AM
Actually, the servo does move. When I startup the printer, it moves to one position and then back to the original position. When I start the G30 process, it also moves to one position and then back. When I start the print, it does not move.

I would expect the servo motor to go to one position, stay there until the end of the G30 process, and then move back to the original position.

Or do I misinterpret things?
Sorry, only registered users may post in this forum.

Click here to login