So I have my new MPCNC-inspired cartesian build up and running on the Jackpot controller. It’s going to be a laser engraver but for calibration and testing purposes I’m setting it up as a pen plotter.
So while X & YY axes are homing and working perfectly right now, for the life of me I cannot get my RC servo to move as a Z axis. I’m using this code in my config.yaml file:
The servo does nothing at all at power up or in response to movement commands from the WebUI. It does get hot AF though. It’s a cheap SG90 from Amazon, but it works fine when connected to receiver and in response to my radio.
Has anyone else gotten an RC servo working on the Jackpot?
I have an MG-90 on my Jackpot (should be the same as the SG), but it is configured as a spindle, not an axis motor. Anyways, here were the numbers that worked for me. Sorry I can’t be more help.
I don’t think most of my settings apply when configuring the servo as the z-axis motor. Just the pwm and pulse numbers, and yours look to be within acceptable limits.
I remember experiencing some weirdness when I was first configuring a servo. It worked sometimes and not others. To get it to work when it wasn’t, I would physically turn the servo arm and that would get it working for a while. Eventually I replaced it and haven’t had any problems.
The only other thing I can think of would be to test the servo using my configuration. You shouldn’t have to change the wiring. Just change the GPIO pin number in the “z motor0:” section of your config to an unused pin (or perhaps NO_PIN), then insert the “besc:” section as shown in my previous post. When you reboot the board, you should be able to move the servo with the M3Sx command where x is a number between 0 and 100. i.e. M3S0 will be one extreme and M3S100 will be about a 45 degree difference. If you change the max_pulse_us: from 1100 to 2000, you should get a bigger swing.
Be careful with the GPIO pin numbering in the config. If you use the same number in 2 places, the board will reject your config.yaml and boot to a generic instance.
I just went back to try my original z-axis config settings with one change - soft_limits: false. Now that I have a good servo connected that code works in addition to the besc spindle configuration.
Glad you got it working. I wouldn’t have thought of that, but I’m sure there is a good reason. I was thinking it might have something to do with the homing cycle, which I associate with limit switches. So if you home a servo without a limit switch, I assume it would run until the pre set max travel limit is reached which could account for some erratic behavior based on the settings. I’m sure you’ll figure it out as you experiment with your configuration. I only needed my servo arm to move 45 degrees and that took me over an hour experimenting with the different PWM and timing values. The motor values make perfect sense to me, but the servos… not so much.
Using the Bart Dring pen/laser board, I have a servo set up as the Z axis on my drag knife.
With no limit switch, $HZ moves the servo to the highest position, and sets the machine Z coordinate to 0. I have 5mm set as the movement limit (though it is actually more than this.) I use G92 to tell the machine to use 4mm as the home position. I have a macro defined that issues:
$HZ
G92 Z4
labelled as “Init Servo” so that I can call it whenever I need it. In Estlcam, I tell it to use 4mm as a clearance plane and 1mm DOC for the drag knife tool. This works we for me.
I don’t have a servo on my Jackpot, currently, but I expect it would work the same
Those settings I posted were actually an example from your board, but since they apply to FluidNC running on an ESP-32 (common to both boards) I assume they would be identical on the Jackpot.