Marlin config for Servo


#1

I purchased a Wilson II kit and had to swap out my Ramps board. While swapping it i decided to setup a new Arduino but I am encountering issues with my servo. If i use the original Arduino supplied by Marty it works as its supposed to but using the new one with Marty’s version of Marlin installed the servo is always on. From the time the printer powers up the servo is trying to retract so the arm is locked in the up position. I’m assuming that i missed something in the configuration.h but I’m not sure what.

Does anyone know what i may need to change?


#2

Are you building Marlin from my fork (https://github.com/mjrice/Marlin) or the main code line?


#3

I used your version of Marlin.


#4

If it will help, i can send you the configuration.h i used.


#5

Up toward the top then there should be a section like below. This is where most of the settings for the servo happen. Does this look like yours?

#define WILSON_II_TYPE // comment this out if not wilson ii 
#define MY_BEDLEVELING_DEFAULTS // comment this out to strip out all the bed leveling stuff 
#ifdef MY_BEDLEVELING_DEFAULTS 
#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) 
#define MANUAL_BED_LEVELING // Add display menu option for bed leveling 
#define NUM_SERVOS 3 // 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, 0,90} // X,Y,Z Axis Extend and Retract angles 

#6

Mine looks different. This is what i have at the top.

// @section info
//#define WILSON_TYPE // comment this out if not wilson
#define WILSON_II_TYPE // comment this out if not wilson ii
#define MY_BEDLEVELING_DEFAULTS // comment this out to strip out all the bed leveling stuff

// User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_VERSION “1.0.3 dev”
#define STRING_VERSION_CONFIG_H DATE " " TIME // build date and time
#define STRING_CONFIG_H_AUTHOR “(mrice, default config)” // Who made the changes.

I did find most of what you had but not all together. This SERVO line has a 2 and your post has a 0. This was the only difference i see.
#define SERVO_ENDSTOPS {-1, -1, 2} // Servo index for X, Y, Z. Disable with -1
#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 0,90} // X,Y,Z Axis Extend and Retract angles


#7

The “2” in your version means that the firmware will expect the servo to be plugged into servo position “2”, which is the third from the bottom on the row of servo connections on the right side of the RAMPS board.


#8

Thanks for the explanation! I have made the change to my config to reflect the port the servo is connected to and will test it out tomorrow.


#9

Thanks! I had this problem aswell.