My question was, how to generate a cheap continious full abolute 360° resistive encode and I came up with a nice hack; using a dual potentiometer (<1€ per piece, aliexpress).

When opening it, you see the base components of a single potentiometer. There are basically two simple steps to apply:
- You can easily bend the rotation stop back, so the axis can rotate by 360°
- You can mount the top white pick up (with the springs) by 180°. To do so, you need to cut of a little bit of the white plastic that the pokayoke pin fits in oposite direction.
Then put everything back togeter and you have synchronized dual potentiometers with 180° phase shift. A single potentiometer has the following behavior without the rotation blocker:
- When the center tap does not touch the outer tap, the resistance between the left and middle tap is infinity.
- As soon as the center tap hits the metalization of the left tap, the resitance goes instantaniously to zero and starts to increase as soon as the center tap reaches the resistive area.
- During the last part where the center tap touches the metallic connection at the end of the resistive layer, the resistance stays constant
- Finally, the resistance goes to infinity again.

To get a 360° rotational postion, the easiest way is two use two ADC converters and two pull up resistors as shown in the next figure. If the ADCx voltage is between 0.1 and 0.9 VDD for example, the measurement can be taken to calculate the rotation angle. There will be at lease one of these measurements for each angle and in several cases both ADCs will show a valid measurement and both values can be averaged to increase the performance.

I was thinking a lot if one could find an easy circuit which could achieve this with a single ADC measurement (without using further ICs like an opamp). The only thing I come up was using a digital output switching from high impedance to ground and a single channel ADC. With the following setup only one ADC channel would be needed with two measurements to get the absolute anlge. It involves a (float) division in software.

So far I have not tested it with real software, but this is to come. Any ideas of an even more elegant readout are welcome!
BastelBaus
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.