I am trying to use an analog potentiometer instead of an Encoder. With the following example the potentiometer just uses a tiny part of its movement, about 10 percent starting around 70% of it and only in one direction. I am guessing as DT or CLK.
I tried using a ADC for the speed and mapping for the dead zones but can't figure out as I'm a noob and found this post which I can't understand it all because of the amount of things it has use pot instead of encoder
The reason for a pot instead of the encoder is because of the 270º and smooth movement as I'd like it to have a fixed beginning and end to the movement rather than 360º
not clear what your application is? control surface suggests aircraft
can't imagine tracking speed over a partial rotation
encoders are often used to track the speed of a DC motor or measure full or fractional rotations for precise positioning. they are apparently also used with stepper motors for verifying their position
not sure if your application uses a DC, stepper or RC servo. and RC servo uses a pot to measure the limited range of a servo arm
you could use a pot to likewise measure the position of a stepper motor if its travel is limited to the range of the pot.
You have a pot. One end connected to 3.3 volts and the other end ground. Regardless of degrees of rotation your wiper with respect to ground will output 0 to 3.3 volts or 3.3 volts to ground. With a 3.3 volt uC and a 10 bit uC that will be 0 to 1023 bits or 1023 bits to 0.
I managed mapping the pot but as V_POT in that occasion should be used with an encoder that has +/-, the value I get back is only in one direction rather than values between 0 to 3.3v. the value I get back is 3.3V whenever I move de pot either left or right . If I invert the pot I get 0 no matter what side I move the pot
The example just maps a potentiometer for the right dead zones. using an ADC improves how fast it goes the potentiometer only moves either right or left with max value 3.3v or 0v