Auto bed levelling? am im doing it the wrong way?
February 07, 2015 08:49AM
After sending M280 P0 S150 command

[ERROR] Can't read from printer (disconnected?) (SerialException): device reports readiness to read but returned no data (device disconnected?)
[ERROR] Can't write to printer (disconnected?) (SerialException): write failed: [Errno 5] Input/output error
[ERROR] Can't write to printer (disconnected?) (SerialException): write failed: [Errno 5] Input/output error

it keep disconnecting after run the code above.

Below are my setting

Quote

//============================= Bed Auto Leveling ===========================

#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
#define Z_PROBE_REPEATABILITY_TEST // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.

#ifdef ENABLE_AUTO_BED_LEVELING

// There are 2 different ways to pick the X and Y locations to probe:

// - "grid" mode
// Probe every point in a rectangular grid
// You must specify the rectangle, and the density of sample points
// This mode is preferred because there are more measurements.
// It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive

// - "3-point" mode
// Probe 3 arbitrary points on the bed (that aren't colinear)
// You must specify the X & Y coordinates of all 3 points

#define AUTO_BED_LEVELING_GRID
// with AUTO_BED_LEVELING_GRID, the bed is sampled in a
// AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
// and least squares solution is calculated
// Note: this feature occupies 10'206 byte
#ifdef AUTO_BED_LEVELING_GRID

// set the rectangle in which to probe
#define LEFT_PROBE_BED_POSITION 50
#define RIGHT_PROBE_BED_POSITION 150
#define BACK_PROBE_BED_POSITION 150
#define FRONT_PROBE_BED_POSITION 50

// set the number of grid points per dimension
// I wouldn't see a reason to go above 3 (=9 probing points on the bed)
#define AUTO_BED_LEVELING_GRID_POINTS 2


#else // not AUTO_BED_LEVELING_GRID
// with no grid, just probe 3 arbitrary points. A simple cross-product
// is used to esimate the plane of the print bed

#define ABL_PROBE_PT_1_X 15
#define ABL_PROBE_PT_1_Y 180
#define ABL_PROBE_PT_2_X 15
#define ABL_PROBE_PT_2_Y 20
#define ABL_PROBE_PT_3_X 170
#define ABL_PROBE_PT_3_Y 20

#endif // AUTO_BED_LEVELING_GRID


// these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
// X and Y offsets must be integers
#define X_PROBE_OFFSET_FROM_EXTRUDER -25
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35

#define Z_RAISE_BEFORE_HOMING 4 // (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 15 //How much the extruder will be raised before traveling to the first probing point.
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points

//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.

//If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
//The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
// You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.

// #define PROBE_SERVO_DEACTIVATION_DELAY 300


//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
//it is highly recommended you let this Z_SAFE_HOMING enabled!!!

#define Z_SAFE_HOMING // This feature is meant to avoid Z homing with probe outside the bed area.
// When defined, it will:
// - Allow Z homing only after X and Y homing AND stepper drivers still enabled
// - If stepper drivers timeout, it will need X and Y homing again before Z homing
// - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
// - Block Z homing only when the probe is outside bed area.

#ifdef Z_SAFE_HOMING

#define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28)
#define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28)

#endif

#ifdef AUTO_BED_LEVELING_GRID // Check if Probe_Offset * Grid Points is greater than Probing Range
#if X_PROBE_OFFSET_FROM_EXTRUDER < 0
#if (-(X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
#error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
#endif
#else
#if ((X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
#error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
#endif
#endif
#if Y_PROBE_OFFSET_FROM_EXTRUDER < 0
#if (-(Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
#error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
#endif
#else
#if ((Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
#error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
#endif
#endif


#endif

#endif // ENABLE_AUTO_BED_LEVELING


// The position of the homing switches
//#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
//#define BED_CENTER_AT_0_0 // If defined, the center of the bed is at (X=0, Y=0)

//Manual homing switch locations:
// For deltabots this means top and center of the Cartesian print volume.
#define MANUAL_X_HOME_POS 0
#define MANUAL_Y_HOME_POS 0
#define MANUAL_Z_HOME_POS 0
//#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.

//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)

// default settings

#define DEFAULT_AXIS_STEPS_PER_UNIT {100.20,100,2557,145} // default steps per unit for Ultimaker
#define DEFAULT_MAX_FEEDRATE {200, 200, 5, 45} // (mm/sec)
#define DEFAULT_MAX_ACCELERATION {5000,5000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.

#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for retracts

// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend.
// #define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
// #define EXTRUDER_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis

// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
#define DEFAULT_XYJERK 15.0 // (mm/sec)
#define DEFAULT_ZJERK 0.4 // (mm/sec)
#define DEFAULT_EJERK 5.0 // (mm/sec)








/*********************************************************************\
* R/C SERVO support
* Sponsored by TrinityLabs, Reworked by codexmas
**********************************************************************/

// Number of servos
//
// If you select a configuration below, this will receive a default value and does not need to be set manually
// set it manually if you have more servos than extruders and wish to manually control some
// leaving it undefined or defining as 0 will disable the servo subsystem
// If unsure, leave commented / disabled
//
#define NUM_SERVOS 1 // Servo index starts with 0 for M280 command

// Servo Endstops
//
// This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes.
// Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500.
//
#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


Where am i doing this wrong?

this is servo im using
Servo
Re: Auto bed levelling? am im doing it the wrong way?
February 07, 2015 08:23PM
Looks like your servo is killing the 5 volt VCC bus. What kind of board are you using?


-David

Find me online at:
Thingiverse
Instructables.com
LinkedIn
Facebook

Check out my FolgerTech Prusa i3 (plexi) at MindRealm.net
Re: Auto bed levelling? am im doing it the wrong way?
February 07, 2015 09:55PM
ramps 1.4 + arduino MEGA 2560 R3
Re: Auto bed levelling? am im doing it the wrong way?
February 07, 2015 11:27PM
I'm using the same boards and a servo for auto-leveling. You can take a look at photos of my wiring by clicking the link in my signature...

Please post a photo of the connection of the servo on the RAMPS board, or describe how/where it is connected.


-David

Find me online at:
Thingiverse
Instructables.com
LinkedIn
Facebook

Check out my FolgerTech Prusa i3 (plexi) at MindRealm.net
Re: Auto bed levelling? am im doing it the wrong way?
February 07, 2015 11:34PM
servo is connect to the pin next to the reset button that the orange colour wire is near the x axis side and brown wire is facing out,
also connect the jumper pin that locate between reset button and the yellow thing on 5v and vcc

am i doing it the correct way?
Re: Auto bed levelling? am im doing it the wrong way?
February 07, 2015 11:53PM
Sounds fine...as long as the servo wiring is Brown=GND, Red=5v, Orange=signal. The Chinese-sourced parts have been known to have things wired backwards or shorted, etc. You can identify the correct wiring connections inside the servo very easily, since the housing is clear.

The servo info in your link shows that it should only draw 300mA max, and the Arduino Mega2560 can handle around 1500mA before killing the 5v regulator.

I'm running a similar (different wiring colors) servo and a relay module on the power and ground in the servo section without any problems.


-David

Find me online at:
Thingiverse
Instructables.com
LinkedIn
Facebook

Check out my FolgerTech Prusa i3 (plexi) at MindRealm.net
Re: Auto bed levelling? am im doing it the wrong way?
February 08, 2015 12:29AM
i see on your blog that you connect 2 pin on the Gnd and 5v and 1 pin next to jumper wire it seem different from my setup
Re: Auto bed levelling? am im doing it the wrong way?
February 08, 2015 10:42AM
Update

I dont know why but suddenly it works and my i3 now has auto bed levelling drinking smiley

i use same setting as i post above and before i connect the servo pins and jumper pin i open the servo bottom cover to check if there got loose wire and then close it again and magically it works fine now.

sometimes the servo keep turn up and down sometimes viberate before it stop like where i wanted in the marlin, is it normal behaviour? or it the servo problem.
Re: Auto bed levelling? am im doing it the wrong way?
February 08, 2015 04:44PM
Quote

i see on your blog that you connect 2 pin on the Gnd and 5v and 1 pin next to jumper wire it seem different from my setup

That's where I am picking up power (the two pins in the servo section) and control (PS-ON) for a relay to control my power supply using G-Code! The instructions are in my Thingiverse and Instructables profiles.


-David

Find me online at:
Thingiverse
Instructables.com
LinkedIn
Facebook

Check out my FolgerTech Prusa i3 (plexi) at MindRealm.net
Re: Auto bed levelling? am im doing it the wrong way?
February 08, 2015 09:56PM
I got mine working already smiling bouncing smiley but sometimes the servo keep going up and down and sometimes viberate before it stop in the position where i wanted, is it normal?
Re: Auto bed levelling? am im doing it the wrong way?
February 09, 2015 10:31AM
You could try changing the angles a degree or two in the following line:

#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 165,65} // X,Y,Z Axis Extend and Retract angles

...and definitely change the following line:

// #define PROBE_SERVO_DEACTIVATION_DELAY 300

to

#define PROBE_SERVO_DEACTIVATION_DELAY 300


-David

Find me online at:
Thingiverse
Instructables.com
LinkedIn
Facebook

Check out my FolgerTech Prusa i3 (plexi) at MindRealm.net
Re: Auto bed levelling? am im doing it the wrong way?
February 09, 2015 10:25PM
Done that and no viberate and servo turn up and down anymore but every time the servo put down the limit switch and the retract the corner of my limit switch touch the bed before servo retract and it didnt home the swich properly, how can i make the Z axis going up a little before the servo retract the limit switch
Re: Auto bed levelling? am im doing it the wrong way?
February 10, 2015 09:30AM
I would also like to raise the Z-axis before retracting the probe.

The normal sequence is:

1. Raise Z-axis
2. Extend the probe
3. Lower the Z-axis until the switch is activated
4. Raise the Z-axis
5. Lower the Z-axis until the switch is activated again
6. Retract the probe
7. Raise the Z-axis
8. Move to the next probe location, then repeat the sequence (...)

You're looking to swap 6 and 7... I'm sure this can be done. Give me a little while to look into the coding smiling smiley


-David

Find me online at:
Thingiverse
Instructables.com
LinkedIn
Facebook

Check out my FolgerTech Prusa i3 (plexi) at MindRealm.net
Re: Auto bed levelling? am im doing it the wrong way?
February 10, 2015 09:56AM
ok thank you for replying smileys with beer my printed item look better now

i waiting for the thermistor to come in this few days, right now i didnt use heatbed cause i took the heatbed thermistor and use it on the hotend cause my hotend thermistor broke it leg, because of that when i printing bigger object it will wrap at the corner sad smiley
Sorry, only registered users may post in this forum.

Click here to login