Servo doesn't work after launching print

Hi, I built a 3 axis cnc-style drawing machine and I mounted a servo controlled grip in order to pick up and release different tools while drawing. The servo motor is independently powered by a 7805 chip that provide stable 5V 1.5A and connected to D11 as P0. When I check the servo from the LCD pad or from terminal it worsk fine and stable with M340 P0 S<500-2500> command but if I launch a print from SD or from a g-code sender it only set the first (at 500) position and moves anymore during the execution. 

Since I don't use an actual extruder I set EXT0 with a fake thermistor (25°). I use EXT1 mirrored with Yaxis (in this case I had a problem with the FW setting of reverse direction but I solved reversing the wiring on ext1)

Servo support is enable. Z-probe disable(might be the reason? I haven't tried enable yet)

My configuration is: Arduino Mega 2560 + RAMPS 1.4 + DRV8825 + RepRapDiscount Full Graphic Smart Controller

Comments

  • > it only set the first (at 500) position and moves anymore during the execution. 

    So xy moves do not work when servo is enabled? Do commands still get send? Anything in log? I think your sentence is likely to be misunderstood.
  • Steppers on X/Y/Z move perfectly. I tried to perform a drawing and everything goes fine apart from the servo motor. The machine is programmed to reach a x/y/z position, at that point it should open, grab a tool and go back to the drawing, but this never happen. It only moves once at the beginnig of the gcode stream, when it probably set the servo to 500 pulse as specified on the FW. If I send some gcode manually it works fine, same if I do on the control pad, open and close perfecly without shaking or doing something weird.
    I tried different servo. I added the 7805 chip because I originally thought it was a matter of current. It looks like the servo is disabled while steppers are moving. is there something that prevent servo from moving? do servo need zprobing enable to work during printing normally? is there any chance thermistor (that I dont use) prevent servo from moving?
  • Servo and z probe are completely independent. In fact servos are completely independent from anything. They even do not interrupt or wait for moves to finish, so you need to sync this yourself with M400 if required. They normally also do not wait for servo position to be reached (they even do not know real position since servos have no feedback. That is why you can also add a wait in the servo command so you know it has position when finished.

    So in general if it works manually it also should work in more complex code. But without waits it might not be visible since it might have already send all moves and all servo commands if it is a short test sketch so you might not see what you expect.
  • > it only set the first (at 500) position and moves anymore during the execution. 

    So xy moves do not work when servo is enabled? Do commands still get send? Anything in log? I think your sentence is likely to be misunderstood.
    Thank you! I solved with a M400 before the servo call and a G4 with some milliseconds after in order to obtain a smoother result.
Sign In or Register to comment.