K8200 - Servo+auto bed leveling

Hello everybody

I have some trouble with my printer configuration…
I wanted to add a servomotor for the Z probe, and use it with the auto bed leveling.
The wiring is normally correct (servo to ground/5V/SSpin 53)
I have uploaded the firmware (https://github.com/magu/Marlin)

But no response of Repetier host when I send the commands:
M401 or 402, no even a echo
Same for the M280 P1 S90 - sometime I get a Servo 1 out of range (?), but most of the time, it’s no answer…
When I get the G29 command for the autobed leveling, it does the work, but without moving the servo…

can someone help me to find out the problem?

thanks in advance!

Gilles

Hi, have you seen this section in configuration.h

// Support for a dedicated Z PROBE endstop separate from the Z MIN endstop. // If you would like to use both a Z PROBE and a Z MIN endstop together or just a Z PROBE with a custom pin, uncomment #define Z_PROBE_ENDSTOP and read the instructions below. // If you want to still use the Z min endstop for homing, disable Z_SAFE_HOMING above. Eg; to park the head outside the bed area when homing with G28. // WARNING: The Z MIN endstop will need to set properly as it would without a Z PROBE to prevent head crashes and premature stopping during a print. // To use a separate Z PROBE endstop, you must have a Z_PROBE_PIN defined in the pins.h file for your control board. // If you are using a servo based Z PROBE, you will need to enable NUM_SERVOS, SERVO_ENDSTOPS and SERVO_ENDSTOPS_ANGLES in the R/C Servo below. // RAMPS 1.3/1.4 boards may be able to use the 5V, Ground and the D32 pin in the Aux 4 section of the RAMPS board. Use 5V for powered sensors, otherwise connect to ground and D32 // for normally closed configuration and 5V and D32 for normally open configurations. Normally closed configuration is advised and assumed. // The D32 pin in Aux 4 on RAMPS maps to the Arduino D32 pin. Z_PROBE_PIN is setting the pin to use on the Arduino. Since the D32 pin on the RAMPS maps to D32 on Arduino, this works. // D32 is currently selected in the RAMPS 1.3/1.4 pin file. All other boards will need changes to the respective pins_XXXXX.h file. // WARNING: Setting the wrong pin may have unexpected and potentially disastrous outcomes. Use with caution and do your homework.

Thanks for your interest in my problem.

I did no found the code you mentioned in the config.h

For the servo, I only got this :

[code]/*********************************************************************\

  • 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, 116,30} // X,Y,Z Axis Extend and Retract angles

#include “Configuration_adv.h”
#include “thermistortables.h”

#endif //__CONFIGURATION_H[/code]

[quote=“aliengilles”]Hello everybody


The wiring is normally correct (servo to ground/5V/SSpin 53)


Gilles[/quote]

Hy,
I’m interested in how did you connect the wires to the main board ? As I have 2 left hands, I don’t want to make mistakes and badly connect the wires…
I saw many HowTo about this topic, but poor Electronic explanations or pictures, there are only results and no making off.
Can you share a pic showing how you did the solders of the servo on the MB.
Tks in advance

Here you go

Yellow is the data pin of the servo (SS pin on MB)
Orange is +5V
Black is ground

Double check on the MotherBoard. The pins name are written on the other side :slight_smile:

I recently thought about a “servo driven” z endstop also.

I didn’t have the time yet to look at the LCD schematics, so:
Does anyone (probably Velleman) know if that is possible with the LCD controller attached?
Are there any PWM pins left to control the servo with the LCD connected?

[quote=“ichbinsnur”]I recently thought about a “servo driven” z endstop also.

I didn’t have the time yet to look at the LCD schematics, so:
Does anyone (probably Velleman) know if that is possible with the LCD controller attached?
Are there any PWM pins left to control the servo with the LCD connected?[/quote]

Normaly the SS pin is a free PWM pin, not used by the LCD.
I think it’s the case because I have seen k8200 working with the original board, with an LCD, and with a servo for the Z endstop.

Ah! Thanks gilles!
I’ll have a look at that when i have some time!

cheers,

Christian

Thks very much aliengilles
I was a little bit affraid to solder on the back side, but I see that’s not so difficult :wink:
Good prints

[quote=“Tag”]Thks very much aliengilles
I was a little bit affraid to solder on the back side, but I see that’s not so difficult :wink:
Good prints[/quote]

Please let me know if it’s working on your side, to know if my problem comes from my configuration or from somewhere else.

Hi, about half way through the second page of the post below ‘donboy’ details how to set the SS (pin53) to digital, in “Marlin_main.cpp”
http://forum.velleman.eu/viewtopic.php?f=48&t=11194

[quote=“Barnabybear”]Hi, about half way through the second page of the post below ‘donboy’ details how to set the SS (pin53) to digital, in “Marlin_main.cpp”
http://forum.velleman.eu/viewtopic.php?f=48&t=11194[/quote]

"[…]if you want to use your free SS Connector (PIN 53) in digital than in PWM- Mode,[…]

That proves that the SS pin (pin 53) is already in PWM mode no?
To connect a Servo, we need a PWM pin correct?

Finally succeed to make it work :slight_smile:

The problem was coming from the connector I used between the motherboard and the servo, I inverted 2 wires … Stupid mistake.
So now, everything is working properly :slight_smile:

If you want some question, I can help you here :slight_smile:

[quote=“aliengilles”]Finally succeed to make it work

If you want some question, I can help you here :-)[/quote]

Hi, having a nightmare trying to get this upgrade working. Have the servo installed and have worked out the retraction and extension angles, also got the offer for the Hotend/probe

Everytime I try a test print, after uploading and using M500 M501 the hot end hits he heated bed after using the G28 command

HELP,!!

hi…
how did you guys get the servo working…

everytime i send an m280 command the servo didnt move…

auto bed leveling works… but the servo doesnt move…

servo is connected to 5v, ground and to the SS pin…

where did i make the mistake…