Using a Servo
Hello all. I am an extreme Noobie and have a question for you gurus. I have built my own printer from scrap printers. I have the X,Y, and Z axis all set up and calibrated. Now my question is how could I set up a servo in Repetier-Firmware to activate a servo to control a cheap EBay 3d pen?
This is where I got the idea from; http://www.instructables.com/id/Super-Cheap-3D-Printer-From-CD-Rom-Drives/?ALLSTEPS
Thank you all for any help
Comments
- M340 P<servoId> S<pulseInUS> R<autoOffIn ms>: servoID = 0..3, Servos are controlled by a pulse with normally between 500 and 2500 with 1500ms in center position. 0 turns servo off. R allows automatic disabling after a while.
This is what I have in configuration.h . I am using a Mega 2560 with RAMPS 1.4 board.
/* ======== Servos =======
Control the servos with
M340 P<servoId> S<pulseInUS> / ServoID = 0..3 pulseInUs = 500..2500
Servos are controlled by a pulse width normally between 500 and 2500 with 1500ms in center position. 0 turns servo off.
WARNING: Servos can draw a considerable amount of current. Make sure your system can handle this or you may risk your hardware!
*/
#define FEATURE_SERVO 1
#define SERVO0_PIN 12
#define SERVO1_PIN -1
#define SERVO2_PIN -1
#define SERVO3_PIN -1
#define SERVO0_NEUTRAL_POS 1500
#define SERVO1_NEUTRAL_POS 0
#define SERVO2_NEUTRAL_POS 0
#define SERVO3_NEUTRAL_POS 0
#define UI_SERVO_CONTROL 1
#define FAN_KICKSTART_TIME 200
#define FEATURE_WATCHDOG 1
Am I missing anything else??
Leave it to me to break something that can't be broken, LOL
Thanks for all your help. I'll try and figure out what I broke.
I got it figured out.