Distance Per Rotation No Changing

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.

Any idea why my feed distance refuses to change?

That is strange! What firmware/ground control versions are you using?

Firmware 0.80

I just realized my git pull obviously didn’t work as current version is 0.89.

Can I leave all the firmware settings stock and just change my numbers in GroundControl?

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.

Let me know if that fixes the issue

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.

Any ideas what to check?

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?

#25 chain, yup. I have tried a wide range of settings in GC’s “encoder steps” field.

10, 1000, 8000 all result in the same 470mm feed. I even tried restarted GC between settings changes as well as without restarting. No change.

I verified my encoders are solid and no wiggle to give odd feedback even. The fact its 470mm EVERY time makes me think something is stuck in firmware.

Does FW 0.89 still read the settings from EEPROM or just keep them in RAM? I may have a stuck bit or something in memory.

Which settings do you mean? The settings in the Advanced Settings page are sent to the Firmware from GC.

Could you .zip your groundcontrol.ini file and post it here?

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.

Next time I am in the garage I will post the .ini

1 Like

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?

Here is what GC is set up as with my 1000PPR encoder on the same shaft as the 15 tooth sprocket.

Sending: B12 I0 J1000 K15 M6.35 N3.17 P2000 S400 T5 U10 V20 W1 X0 

groundcontrol.ini:


[Maslow Settings]
openfile = 
motoroffsety = 463
sledwidth = 310
bedwidth = 2438.4
comport = /dev/ttyACM0
zaxis = 0
sledcg = 79
zdistperrot = 3.17
bedheight = 1219.2
sledheight = 139
macro2 = 
macro1 = 
motorspacingx = 3018

[Advanced Settings]
digits = 4
kinematicstype = Quadrilateral
rotationradius = 100
kppos = 400
encodersteps = 1000
zencodersteps = 2000
enablepospidvalues = 0
homex = 0.0
homey = 0.0
kiv = 1
enablevpidvalues = 0
gearteeth = 15
kipos = 5
kdpos = 10
truncate = 0
kdv = 0
kpv = 20
chainpitch = 6.35

[Ground Control Settings]
zoomout = pagedown
zoomin = pageup
validextensions = .nc, .ngc, .text, .gcode

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? ?

This is the line that I have changed from 10, 1000, 4000, 8000, 10000 and all give the same 470mm result.

I can jog with the arrows. When I change the encodersteps value nothing changes on any axis. (I only have X&Y)

I go get the machine position error as I have not been able to calibrate from day one. I don’t remember the 4 numbers though.

Forgive me if you’ve already answered this, but what happens when you use Actions/testmotors-encoders?

Until you calibrate, no movement can be trusted.

What is going wrong when you try to calibrate? let’s get that fixed first.

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.

Encoders are ABB 1000PPR and are brand new.

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?

Yup, they say passed.

1 Like

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?