I have a 1000PPR encoder on the output shaft of my motors. I have #define ENCODERSTEPS 1000*4 in the firmware as well as GroundControl’s settings. In the calibration screen “Feed 100mm” gives me 470mm of chain.
If I change the settings in firmware and re-upload nothing changes. Change the GroundControl setting nothing changes. I have tried 10PPR, 1000PPR, 10000PPR and no change which is really wierd.
When you change settings in GroundControl the console says “Machine Settings Updated” so I know the firmwares updateSettings() function is running.
I would start with updating both GC and the firmware. We’ve gotten rid of the numbers stored in the firmware at this point, and everything is set from Ground Control. Your Ground Control settings should be saved between updates.
Just updated to GC v0.89 and F v0.89 and nothing changes. 10,1000,8000 settings in GC still results in the same 470mm of movement in the “Feed 100mm” button in calibration.
Have the firmware calibration values been completely removed? Makes sence to load them every time you connect via the groundcontrol.ini settings file.
What value do you have for Advanced Settings - Encoder Steps per Revolution? That is where to make the adjustment. Judging by your statement that a request to move 100mm resulted in a move of 470mm, maybe try dividing whatever value you find there by four. On this same page you’ll find ‘Number of Gear Teeth’, which it would be good to check as well. These two values and ‘Chain Pitch’ are at the heart of converting motor rotations to chain distance. — You are using #25 chain, 0.25” per link, yes?
Yes, that’s where I have tried my wide range of encoder settings.
I am wondering if the firmware stores this value in EEPROM though still. I may have some damaged section of memory on my old Arduino2560. If the advanced settings are loaded into the firmware on boot from ground control then they should be in RAM.
While you’re at it, watch for the B12 command in GC, shortly after the connection is made - that’s how the values are sent each time GC makes a connection. The interesting values within the B12 line will be:
J - encoder steps
K - gear teeth
M - chain pitch
See them evaluated in Firmware/cnc_cntrl_v1/CNC_Functions.h in the function updateMotorSettings().
If those are present, they replace whatever any previous value was in use. What values do you see in the B12 line?
The first thing I’d try is changing the ‘encodersteps’ to 4000. Your encoder has a quadrature signal, yes? Chain pitch is correct for #25 chain, and you have a 15-tooth sprocket for #25 chain, so those values are as expected.
If you are able to move the sled with the arrows, try moving it vertically, say 10mm, then change the encodersteps value and compare the amount of movement. In my machine, halving the encodersteps value doubles the distance moved. Before you start in on this, get familiar with how to stop your sled if it goes ‘runaway’. I yank out the 12V cable from the motor board, as that’s mounted top-center on my setup and quickly available. Be careful that you don’t inadvertantly lose the decimal point in the encodersteps dialog (old eyes, tiny text, voice of experience).
Do you get the popup about “Unable to find valid machine position. Please calibrate chain lengths.”? If so, what are the 4 numbers at the end of the line: aChainError, bChainError, xGuess, yGuess? ?
Left rotates one way then the other, Right rotates one way then the other and Z gives an error as its not attached. (Z is disabled in GC settings)
Calibration is the issue. In the Calibration wizard step one is rotate one tooth to the top. Then hook on the chain. On that second page it says “Feed 1mm”, “Feed 100mm”, “Feed 1000mm” and pressing Feed 100mm always feeds 470mm.
I’m not sure how it can calibrate if it is not getting correct rotational math from the git-go. The “Rotate 1 deg CW/CCW” buttons also make the sprockets rotate 90 degrees. I figure it has to be an encoder or math issue as my encoders are on the same shaft as the sprocket and not the standard ones.
There should be text in GC
Testing L motor:
Direction 1 pass
Direction 2 pass
Testing R motor:
Direction 1 pass
Direction 2 pass
That would indicate that the encoder signals are working correctly. I don’t think that the pulse count matters, only that the transitions occur when the motor runs, and are reversed when the motor does. Do you get this result?
What is the maximum rpm of the output shaft on your gearbox? Do you have an oscilloscope or frequency counter, to characterize the encoder signal while the motor is measuring out the 470mm of chain?