Servo control and automatic bed levelling August 27, 2012 07:29PM |
Registered: 12 years ago Posts: 46 |
Re: Servo control and automatic bed levelling August 27, 2012 07:35PM |
Registered: 12 years ago Posts: 46 |
#ifndef WIRING // Wiring pre-defines signal handlers so don't define any if compiling for the Wiring platform // Interrupt handlers for Arduino // #if defined(_useTimer1) // SIGNAL (TIMER1_COMPA_vect) // { // handle_interrupts(_timer1, &TCNT1, &OCR1A); // } // #endif
--- pins.h --- L303 #ifdef AUTO_BED_ADJUSTMENT #define SERVO_0 11 #define SERVO_1 6 #define SERVO_2 5 #define SERVO_3 4 #endif --- Configuration.h L203 #define AUTO_BED_ADJUSTMENT ---Marlin.pde L115 // M600 - move bed levelling servos plus or minus in degrees e.g. M600 -1 1 0 (m600 servo_1 servo_2 servo_3) // M601 - set servo_0 position/angular speed e.g. M601 S180 = full cw / M601 S90 = off / M601 S0 = full ccw // M602 - set servo_1 position/angular speed e.g. M602 S180 = full cw / M602 S90 = off / M602 S0 = full ccw // M603 - set servo_2 position/angular speed e.g. M603 S180 = full cw / M603 S90 = off / M603 S0 = full ccw // M604 - M604 - set servo_3 position/angular speed e.g. M604 S180 = full cw / M604 S90 = off / M604 S0 = full ccw // M605 - set all servos to 90, used for calibration, continuous servos should now be stationary, 180 degree servos should be at midpoint --Marlin.pde L41 #include "MarlinServo.h" -- Marlin.pde L140 #ifdef AUTO_BED_ADJUSTMENT Servo servoController_0; Servo servoController_1; Servo servoController_2; Servo servoController_3; #endif --Marlin.pde L318 #ifdef AUTO_BED_ADJUSTMENT servoController_0.attach(SERVO_0); servoController_1.attach(SERVO_1); servoController_2.attach(SERVO_2); servoController_3.attach(SERVO_3); // Set servos to midpoint - Important for continuous rotation servos so they are stationary initially servoController_0.write(90); servoController_1.write(90); servoController_2.write(90); servoController_3.write(90); #endif ---Marlin.pde :1295 #ifdef AUTO_BED_ADJUSTMENT case 600: // M600 - move bed levelling servos plus or minus in degrees e.g. M600 -1000 350 0 (m600 servo_1 servo_2 servo_3) { // TODO } break; case 601:// M601 - set servo_0 position/angular speed e.g. M601 S180 = full cw / M601 S90 = off / M601 S0 = full ccw { if (code_seen('S')) servoController_0.write(code_value()); } break; case 602: // M602 - set servo_1 position/angular speed e.g. M602 S180 = full cw / M602 S90 = off / M602 S0 = full ccw { if (code_seen('S')) servoController_1.write(code_value()); } break; case 603: // M603 - set servo_2 position/angular speed e.g. M603 S180 = full cw / M603 S90 = off / M603 S0 = full ccw { if (code_seen('S')) servoController_2.write(code_value()); } break; case 604: // M604 - set servo_3 position/angular speed e.g. M604 S180 = full cw / M604 S90 = off / M604 S0 = full ccw { if (code_seen('S')) servoController_3.write(code_value()); } break; case 605: // M605 - set all servos to 90, used for calibration, continuous servos should now be stationary, 180 degree servos should be at midpoint { servoController_0.write(90); servoController_1.write(90); servoController_2.write(90); servoController_3.write(90); } break; #endif
Re: Servo control and automatic bed levelling August 27, 2012 09:37PM |
Admin Registered: 15 years ago Posts: 1,470 |
Help improve the RepRap wiki!
Just click "Edit" in the top-right corner of the page and start typing. Anyone can edit the wiki! |
Re: Servo control and automatic bed levelling September 18, 2013 08:11PM |
Registered: 11 years ago Posts: 2 |
Re: Servo control and automatic bed levelling September 19, 2013 04:43PM |
Registered: 13 years ago Posts: 98 |
Re: Servo control and automatic bed levelling September 19, 2013 05:07PM |
Registered: 11 years ago Posts: 3 |
Re: Servo control and automatic bed levelling September 19, 2013 05:19PM |
Registered: 12 years ago Posts: 206 |
Re: Servo control and automatic bed levelling September 19, 2013 05:30PM |
Admin Registered: 15 years ago Posts: 1,470 |
Help improve the RepRap wiki!
Just click "Edit" in the top-right corner of the page and start typing. Anyone can edit the wiki! |
Re: Servo control and automatic bed levelling September 19, 2013 05:36PM |
Registered: 12 years ago Posts: 206 |
Re: Servo control and automatic bed levelling September 19, 2013 06:07PM |
Registered: 11 years ago Posts: 1,049 |
Re: Servo control and automatic bed levelling September 19, 2013 06:31PM |
Registered: 11 years ago Posts: 89 |
Re: Servo control and automatic bed levelling September 19, 2013 08:14PM |
Registered: 16 years ago Posts: 123 |
Re: Servo control and automatic bed levelling September 19, 2013 09:32PM |
Registered: 11 years ago Posts: 2 |
Re: Servo control and automatic bed levelling September 20, 2013 12:09PM |
Registered: 12 years ago Posts: 80 |
Re: Servo control and automatic bed levelling September 20, 2013 03:34PM |
Registered: 16 years ago Posts: 123 |
Anonymous User
Re: Servo control and automatic bed levelling February 26, 2015 07:39PM |
Re: Servo control and automatic bed levelling February 27, 2015 04:03PM |
Registered: 9 years ago Posts: 44 |
Quote
SheldonE
cozmicray Wrote:
-------------------------------------------------------
> Isn't this a bit absurd for a once a week
> adjustment?
Maybe, but I remember when printer paper came in perferated sheets with alignment holes on either side. Now the paper comes in single sheets and the printer aligns the paper automatically.
To get 3d printers to the level of a consumer device, automatic bed leveling is a must have.
Re: Servo control and automatic bed levelling October 13, 2015 03:56PM |
Registered: 9 years ago Posts: 3 |
Re: Servo control and automatic bed levelling October 13, 2015 04:06PM |
Registered: 10 years ago Posts: 14,684 |
Re: Servo control and automatic bed levelling October 16, 2015 04:50AM |
Registered: 9 years ago Posts: 18 |
Quote
dc42
I proposed a system for large CoreXY or HBot 3D printers a while back that used three Z stepper motors, driven independently, to do both Z movement and bed levelling. But nobody else.seemed to think it was a good idea.