Z-Probe Servo doesn't move for Homing

Hi, coming from the Marlin world and trying to set up Repetier Firmware on an i3 type machine. A lot of the setup has gone OK but I am stuck with the Servo for the Z homing. I have a servo arm with a micro switch on the end connected to Digital Pin 5 on the RUMBA board.

Below are excerpt from my Configuration.h file.

Features

Enable Z Probing
Enable servo support
Memory position/move to memory position (M401/M402)

Features / Z-Probing

Z-probe pin Z min endstop

Probe start script M340 S0 P2125
Probe finished script M340 S0 P1000

Features / Servo configuration

Servo 0 Digital Pin 5 1000 (Start Position)

Every time I try to home the servo does not extend.
When I power the machine up the servo goes to its Start Position of 1000, I can control the Servo via the UI on the LCD and if I select Z Home the head starts moving down with the servo retracted. If I manually push the micro switch on the end of the servo arm the Z axis changes direction, rises a bit and then comes down again until I hit the micro switch. All works well except the servo. I am sure I have overlooked something very simple, can anyone help please?

Comments

  • Forgot to add, any commands from the Repetier Host software in the form of M401/M402 or M340 S0 P2125 does nothing

    G32 S0 will start the Z axis moving down, but afain no servo deployment
  • OK, found one problem which I had hoped would solve the problem, but no luck.

    I had the M340 code parameters the wrong way round (in my mind P was for Pulse length and S was for Servo), alas logic let me down again.

    I have now rewritten 

    Probe start script M340 S0 P2125    --> Probe start script M340 P0 S2125
    Probe finished script  M340 S0 P1000    -->         Probe finished script  M340 P0 S1000

    Even with this change the Servo will not deploy for homing, however I can now send M340 P0 S2125 from the host and the servo responds.

    There must be a line of code in there somewhere that is preventing the servo from deploying.... back to the hunt


  • edited December 2016
    Summary to date:

    Z_PROBE_START_SCRIPT "M340 P0 S2125"
    Z_PROBE_FINISHED_SCRIPT "M340 P0 S1000"

    G28 Homes X and Y correctly but does NOT deploy servo to lower the Z Probe. If Z probe is triggered manually it appears to work correctly.

    G29 Works correctly servo is deployed and retracted
    G30 Works correctly servo is deployed and retracted
    G32 Works correctly servo is deployed and retracted

    M340 P0 S2125 deploys servo correctly
    M340 P0 S1000 retracts servo correctly

    So, my question is, what is different about G28, what needs to be changed so that the servo deploys in Z Homing or  is it the case that the servo mounted switch cannot be used for homing, just for probing, and I need a physical end stop switch on the Z Axis just for homing?

    I guess and alternative could be to Home X and Y, then then go straight into probing with a G30 or G32, but I'd always be a bit worried about reverting back to HOME ALL or HOME Z with the possibility of a head crash

    Thanks for any input.

  • Your scrips should also consider R parameter:
     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.

    and maybe add a G4 P200 to wait for the servo to go into position.

    Homing Z with z probe requires to have z min hardware endstop enabled and the pin must be the same as z probe. Otherwise it will not do anything extra with your z probe. Also the probe must not be triggered when starting homing. Maybe I can add a z move before starting in that case.
  • Thanks for the response Repetier. Adding R to the script makes sense ....as does the G4 command.

    Is there any reason the code only supports a fixed z-min endstop and not a servo mounted one?

    Thanks

  • It does support servo as well. At least the dev version does. Support for z probe as z min is quite new so not sure if 0.92.9 has it already.
  • Thanks Repetier,

    Just tried the Dev version and it works perfectly with the Servo. Now to continue exploring the progremme.


Sign In or Register to comment.