I am trying to choose a wire encoder for my project. So far, I found this wire encoder (see link). Assuming the measurement range of my cylinder is 1 m. Then, with a 10 bit ADC converter of my Arduino Mega2560, I would have a resolution of 0.09cm (= 100cm/1024). But, lets say some cylinder only have a measurement range of 0.5m. Then the resolution would be 0.048 (=50cm/1024).

I can see that I am missing something here, because the resolution of the later case should be worse than the case with the full measurement range 1m. I would be appreciate for any tipps.

Edit:

• Cylinder's movement range 0~1m
• Wire encoder's measurement range 0~1.25m
• Wire encoder's analog output 0~10v
• I guess with "range of my cylinder" you mean its circumference. Then your calculation is right and logical. The ADC has a fixed resolution of 1024 steps. If you distribute these steps onto a smaller range, then it means, that the steps are closer together, thus you are getting a better resolution. Basically you are trading the distance, which is covered by one rotation, for resolution. Higher distance gives a lower resolution and vice versa. I don't see, why this should be different. If this argument didn't convince you, can you explain further, why you think it should be worse? Apr 30, 2021 at 7:56
• I meant with "range of my cylinder" the movement range of my cylinder. I added more information. But still not sure, how one should map the encoder movement to the cylinder movement...Could you guide me here a little bit?
– Joe
Apr 30, 2021 at 8:24
• Ok, now I don't understand your application. What actually is that cylinder? What are you trying to achieve? What is your project setup? I need a more detailed description to understand, what you are trying to do. Apr 30, 2021 at 8:30
• I added some picture to clarify further. Basically, I want to measure the cylinder movement with a wire encoder and since the output of my encoder is voltage, I would like to read in the value using an ADC converter of Arduino Mega2560. And I would like to estimate the resolution in this case...
– Joe
Apr 30, 2021 at 8:44
• Ah, ok, with cylinder you mean hydraulic cylinder. Haven't thought of that. Apr 30, 2021 at 8:46

Your calculation is not correct. The encoder has its 0 to 10V output voltage distributed over the whole distance, that the cable can reach, so 1.25m. And that gives you the resolution: `1.25m/1024 = 1.22mm`. The resolution doesn't change, if you use less than the maximum length. It's still the same resolution of about 1.22mm. The encoder doesn't care, if you are only using 1m of its range.