MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.25k stars 19.23k forks source link

Problem with servo on AT90USB1287 #690

Closed GigaBajcior closed 9 years ago

GigaBajcior commented 10 years ago

Hello,

I have problem with servo connected to board with AT90USB1287. http://www.youtube.com/watch?v=Ybvy5fhhgEM As you can see servo works but very, very slow, and a position is unstable. I am using pin C5 to connect servo.

Configuration.h:

define NUM_SERVOS 1

define SERVO_ENDSTOPS {-1, -1, 0}

define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 170,10}

pins.h:

ifdef NUM_SERVOS

define SERVO0_PIN 15

endif

Do you have any idea what it can be?

Greetings

Artur

codexmas commented 10 years ago

A few things to try: Check the voltage levels on the +5 going to the servo with a multimeter, is it dipping below 5 volts? Another servo, determine if the one you tried was bad or not. Use another pin, does the issue follow it? If you have an arduino handy get the Servo demo script uploaded to it to isolate your 3d Printer electronics.

Cheers, Gord.

Cheers, Gord.

On Fri, Dec 20, 2013 at 3:27 AM, GigaBajcior notifications@github.comwrote:

Hello,

I have problem with servo connected to board with AT90USB1287. http://www.youtube.com/watch?v=Ybvy5fhhgEM As you can see servo works but very, very slow, and a position is unstable. I am using pin C5 to connect servo.

Configuration.h:

define NUM_SERVOS 1

define SERVO_ENDSTOPS {-1, -1, 0}

define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 170,10}

pins.h:

ifdef NUM_SERVOS

define SERVO0_PIN 15

endif

Do you have any idea what it can be?

Greetings

Artur

— Reply to this email directly or view it on GitHubhttps://github.com/ErikZalm/Marlin/issues/690 .

GigaBajcior commented 10 years ago

Hello,

the same servo on the same pin with the same power supply works very good with standard "sweep" example from arduino.

I tried other pins of course, B4 with PWM, and F0, F1, F2 without PWM. But only on C5 servo coresponds.

Greetings

Artur

Wiadomość napisana przez Gord Christmas notifications@github.com w dniu 20 gru 2013, o godz. 15:56:

A few things to try: Check the voltage levels on the +5 going to the servo with a multimeter, is it dipping below 5 volts? Another servo, determine if the one you tried was bad or not. Use another pin, does the issue follow it? If you have an arduino handy get the Servo demo script uploaded to it to isolate your 3d Printer electronics.

Cheers, Gord.

Cheers, Gord.

On Fri, Dec 20, 2013 at 3:27 AM, GigaBajcior notifications@github.comwrote:

Hello,

I have problem with servo connected to board with AT90USB1287. http://www.youtube.com/watch?v=Ybvy5fhhgEM As you can see servo works but very, very slow, and a position is unstable. I am using pin C5 to connect servo.

Configuration.h:

define NUM_SERVOS 1

define SERVO_ENDSTOPS {-1, -1, 0}

define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 170,10}

pins.h:

ifdef NUM_SERVOS

define SERVO0_PIN 15

endif

Do you have any idea what it can be?

Greetings

Artur

— Reply to this email directly or view it on GitHubhttps://github.com/ErikZalm/Marlin/issues/690 .

— Reply to this email directly or view it on GitHub.

codexmas commented 10 years ago

It may be that your board is sharing a Timer. What motherboard do you have specified in your configuration?

Cheers, Gord.

Cheers, Gord.

On Fri, Dec 20, 2013 at 7:50 AM, GigaBajcior notifications@github.comwrote:

Hello,

the same servo on the same pin with the same power supply works very good with standard "sweep" example from arduino.

I tried other pins of course, B4 with PWM, and F0, F1, F2 without PWM. But only on C5 servo coresponds.

Greetings

Artur

Wiadomość napisana przez Gord Christmas notifications@github.com w dniu 20 gru 2013, o godz. 15:56:

A few things to try: Check the voltage levels on the +5 going to the servo with a multimeter, is it dipping below 5 volts? Another servo, determine if the one you tried was bad or not. Use another pin, does the issue follow it? If you have an arduino handy get the Servo demo script uploaded to it to isolate your 3d Printer electronics.

Cheers, Gord.

Cheers, Gord.

On Fri, Dec 20, 2013 at 3:27 AM, GigaBajcior notifications@github.comwrote:

Hello,

I have problem with servo connected to board with AT90USB1287. http://www.youtube.com/watch?v=Ybvy5fhhgEM As you can see servo works but very, very slow, and a position is unstable. I am using pin C5 to connect servo.

Configuration.h:

define NUM_SERVOS 1

define SERVO_ENDSTOPS {-1, -1, 0}

define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 170,10}

pins.h:

ifdef NUM_SERVOS

define SERVO0_PIN 15

endif

Do you have any idea what it can be?

Greetings

Artur

— Reply to this email directly or view it on GitHub< https://github.com/ErikZalm/Marlin/issues/690> .

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/ErikZalm/Marlin/issues/690#issuecomment-31018716 .

GigaBajcior commented 10 years ago

I made my own configuration:

/****

ifndef AVR_AT90USB1286

error Oj Oj! Upewnij sie ze masz wybrane 'Teensy++ 2.0' w menu 'Tools -> Boards'.

endif

//#define LARGE_FLASH true

define X_STEP_PIN 28

define X_DIR_PIN 29

define X_ENABLE_PIN 19

define X_STOP_PIN 25

define Y_STEP_PIN 30

define Y_DIR_PIN 31

define Y_ENABLE_PIN 18

define Y_STOP_PIN 26

define Z_STEP_PIN 32

define Z_DIR_PIN 33

define Z_ENABLE_PIN 17

define Z_STOP_PIN 27

define E0_STEP_PIN 34

define E0_DIR_PIN 35

define E0_ENABLE_PIN 12

define HEATER_0_PIN 8

define TEMP_0_PIN 5

define E1_STEP_PIN 14

define E1_DIR_PIN 13

define E1_ENABLE_PIN 11

define HEATER_1_PIN 9

define TEMP_1_PIN 6

define E2_STEP_PIN -1

define E2_DIR_PIN -1

define E2_ENABLE_PIN -1

define HEATER_2_PIN -1

define TEMP_2_PIN -1

define HEATER_BED_PIN 10

define TEMP_BED_PIN 7

define FAN_PIN 16

define SDSS 20

define SDPOWER -1

define SDCARDDETECT -1

ifndef SDSUPPORT

define SCK_PIN 21

define MISO_PIN 22

define MOSI_PIN 23

endif

define LED_PIN -1

define PS_ON_PIN -1

define KILL_PIN -1

define ALARM_PIN -1

//#define PHOTOGRAPH_PIN 10

define BEEPER 30

define LCD_PINS_RS 1

define LCD_PINS_ENABLE 41 //bylo 3

define LCD_PINS_D4 0

define LCD_PINS_D5 38 //bylo 2

define LCD_PINS_D6 4

define LCD_PINS_D7 6

define BTN_EN1 5

define BTN_EN2 7

define BTN_ENC 39 //the click

ifdef NUM_SERVOS

define SERVO0_PIN 15

endif

endif // MOTHERBOARD == 84

Greetings

Artur

Wiadomość napisana przez Gord Christmas notifications@github.com w dniu 20 gru 2013, o godz. 17:00:

It may be that your board is sharing a Timer. What motherboard do you have specified in your configuration?

Cheers, Gord.

Cheers, Gord.

On Fri, Dec 20, 2013 at 7:50 AM, GigaBajcior notifications@github.comwrote:

Hello,

the same servo on the same pin with the same power supply works very good with standard "sweep" example from arduino.

I tried other pins of course, B4 with PWM, and F0, F1, F2 without PWM. But only on C5 servo coresponds.

Greetings

Artur

Wiadomość napisana przez Gord Christmas notifications@github.com w dniu 20 gru 2013, o godz. 15:56:

A few things to try: Check the voltage levels on the +5 going to the servo with a multimeter, is it dipping below 5 volts? Another servo, determine if the one you tried was bad or not. Use another pin, does the issue follow it? If you have an arduino handy get the Servo demo script uploaded to it to isolate your 3d Printer electronics.

Cheers, Gord.

Cheers, Gord.

On Fri, Dec 20, 2013 at 3:27 AM, GigaBajcior notifications@github.comwrote:

Hello,

I have problem with servo connected to board with AT90USB1287. http://www.youtube.com/watch?v=Ybvy5fhhgEM As you can see servo works but very, very slow, and a position is unstable. I am using pin C5 to connect servo.

Configuration.h:

define NUM_SERVOS 1

define SERVO_ENDSTOPS {-1, -1, 0}

define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 170,10}

pins.h:

ifdef NUM_SERVOS

define SERVO0_PIN 15

endif

Do you have any idea what it can be?

Greetings

Artur

— Reply to this email directly or view it on GitHub< https://github.com/ErikZalm/Marlin/issues/690> .

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/ErikZalm/Marlin/issues/690#issuecomment-31018716 .

— Reply to this email directly or view it on GitHub.

codexmas commented 10 years ago

So that means you are defaulting to a single timer option: https://github.com/ErikZalm/Marlin/blob/Marlin_v1/Marlin/Servo.h

Your board will end up in the "everything else" branch.

Cheers, Gord.

Cheers, Gord.

On Fri, Dec 20, 2013 at 8:03 AM, GigaBajcior notifications@github.comwrote:

I made my own configuration:

/****

  • Unique One pin assignments (AT90USB1286)
  • Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE! ****/

if MOTHERBOARD == 84 // Unique One

define KNOWN_BOARD 1

define AT90USB 1286 // Disable MarlinSerial etc.

ifndef AVR_AT90USB1286

error Oj Oj! Upewnij sie ze masz wybrane 'Teensy++ 2.0' w menu 'Tools ->

Boards'.

endif

//#define LARGE_FLASH true

define X_STEP_PIN 28

define X_DIR_PIN 29

define X_ENABLE_PIN 19

define X_STOP_PIN 25

define Y_STEP_PIN 30

define Y_DIR_PIN 31

define Y_ENABLE_PIN 18

define Y_STOP_PIN 26

define Z_STEP_PIN 32

define Z_DIR_PIN 33

define Z_ENABLE_PIN 17

define Z_STOP_PIN 27

define E0_STEP_PIN 34

define E0_DIR_PIN 35

define E0_ENABLE_PIN 12

define HEATER_0_PIN 8

define TEMP_0_PIN 5

define E1_STEP_PIN 14

define E1_DIR_PIN 13

define E1_ENABLE_PIN 11

define HEATER_1_PIN 9

define TEMP_1_PIN 6

define E2_STEP_PIN -1

define E2_DIR_PIN -1

define E2_ENABLE_PIN -1

define HEATER_2_PIN -1

define TEMP_2_PIN -1

define HEATER_BED_PIN 10

define TEMP_BED_PIN 7

define FAN_PIN 16

define SDSS 20

define SDPOWER -1

define SDCARDDETECT -1

ifndef SDSUPPORT

define SCK_PIN 21

define MISO_PIN 22

define MOSI_PIN 23

endif

define LED_PIN -1

define PS_ON_PIN -1

define KILL_PIN -1

define ALARM_PIN -1

//#define PHOTOGRAPH_PIN 10

define BEEPER 30

define LCD_PINS_RS 1

define LCD_PINS_ENABLE 41 //bylo 3

define LCD_PINS_D4 0

define LCD_PINS_D5 38 //bylo 2

define LCD_PINS_D6 4

define LCD_PINS_D7 6

define BTN_EN1 5

define BTN_EN2 7

define BTN_ENC 39 //the click

ifdef NUM_SERVOS

define SERVO0_PIN 15

endif

endif // MOTHERBOARD == 84

Greetings

Artur

Wiadomość napisana przez Gord Christmas notifications@github.com w dniu 20 gru 2013, o godz. 17:00:

It may be that your board is sharing a Timer. What motherboard do you have specified in your configuration?

Cheers, Gord.

Cheers, Gord.

On Fri, Dec 20, 2013 at 7:50 AM, GigaBajcior notifications@github.comwrote:

Hello,

the same servo on the same pin with the same power supply works very good with standard "sweep" example from arduino.

I tried other pins of course, B4 with PWM, and F0, F1, F2 without PWM. But only on C5 servo coresponds.

Greetings

Artur

Wiadomość napisana przez Gord Christmas notifications@github.com w dniu 20 gru 2013, o godz. 15:56:

A few things to try: Check the voltage levels on the +5 going to the servo with a multimeter, is it dipping below 5 volts? Another servo, determine if the one you tried was bad or not. Use another pin, does the issue follow it? If you have an arduino handy get the Servo demo script uploaded to it to isolate your 3d Printer electronics.

Cheers, Gord.

Cheers, Gord.

On Fri, Dec 20, 2013 at 3:27 AM, GigaBajcior < notifications@github.com>wrote:

Hello,

I have problem with servo connected to board with AT90USB1287. http://www.youtube.com/watch?v=Ybvy5fhhgEM As you can see servo works but very, very slow, and a position is unstable. I am using pin C5 to connect servo.

Configuration.h:

define NUM_SERVOS 1

define SERVO_ENDSTOPS {-1, -1, 0}

define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 170,10}

pins.h:

ifdef NUM_SERVOS

define SERVO0_PIN 15

endif

Do you have any idea what it can be?

Greetings

Artur

— Reply to this email directly or view it on GitHub< https://github.com/ErikZalm/Marlin/issues/690> .

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub< https://github.com/ErikZalm/Marlin/issues/690#issuecomment-31018716> .

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/ErikZalm/Marlin/issues/690#issuecomment-31019782 .

GigaBajcior commented 10 years ago

I think that my board is here:

elif defined(AVR_AT90USB646) || defined(AVR_AT90USB1286)

define _useTimer3

//#define _useTimer1 //typedef enum { _timer3, _timer1, _Nbr_16timers } timer16_Sequence_t ; typedef enum { _timer3, _Nbr_16timers } timer16_Sequence_t ;

Greetings

Artur

Wiadomość napisana przez Gord Christmas notifications@github.com w dniu 20 gru 2013, o godz. 17:26:

So that means you are defaulting to a single timer option: https://github.com/ErikZalm/Marlin/blob/Marlin_v1/Marlin/Servo.h

Your board will end up in the "everything else" branch.

Cheers, Gord.

GigaBajcior commented 10 years ago

This is a confirmation: beztytuu

So Timer3 should be used.

GigaBajcior commented 10 years ago

Hello,

I do not solve this problem till now :( But when I used newest Repetier 0.91 the servo works very good. So I hope the solution is inside a Repetier source code. I am starting to read :)

boelle commented 9 years ago

This one is created about a year ago and there have been a lot of changes, please download the latest copy of marlin and see if the problem is still there. Also you the latest arduino IDE to flash the marlin firmware. If you board files etc only work under old ide upgrade those first so they work under latest IDE.

If you create board files for hardware that are not in the https://github.com/ErikZalm/Marlin/tree/Marlin_v1/ArduinoAddons then please fork marlin and add the files and then create a pull request so that we can get the hardware supported. This will also give an idea what hardware people are using.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.