It is a well built potentiometer, but it is not a precise angle position sensor.
I read that the linearity is +/- 2%.
So for a 16-bit ADC, only 7 or 8 bits are accurate.
The Arduino has a few 10-bit ADC inputs. That is more than enough for that potentiometer.
Also note it comes in two flavors, one with mechanical stops and one with no stops. Nether gives true 360 mechanical travel Vs degree electrical range if that is important to your application.
There are 10-turn precision pots (not those smaller ones, but just or bigger than the one in the link), though I never personally used them. I think the part number starts like 3450S-(resistance value) made by Bourns.
Erdin:
It is a well built potentiometer, but it is not a precise angle position sensor.
I read that the linearity is +/- 2%.
So for a 16-bit ADC, only 7 or 8 bits are accurate.
The Arduino has a few 10-bit ADC inputs. That is more than enough for that potentiometer.
That's rather an assumption - you would lose resolution with fewer bits - linearity isn't everything.
Am I reading this right, non-linearity is 1/2 of the LSB so it's accurate to one part in 512? About 0.2%? Plus you lose an expensive part and can digitally control it. Why do you need that pot anyway? It's a 2 watt pot you are using for a signal, total overkill.
Am I reading this right, non-linearity is 1/2 of the LSB so it's accurate to one part in 512? About 0.2%? Plus you lose an expensive part and can digitally control it. **Why do you need that pot anyway? ** It's a 2 watt pot you are using for a signal, total overkill.
Won't work.
First OP post:
I need a pot that will work as a precise rotary position sensor
I misunderstood at first that this is more about sensing the position of a knob that actually varying the resistance on a wire.
I need a pot that will work as a precise rotary position sensor, it will be connected to a 16bit ADC.
Anyway, if I read this right all he wants to do is connect a digipot to a ADC to get a value 0-65535 and use that as a human interface to something else. Isn't that a bit of a Rube Goldberg solution? I don't see why he doesn't use a good quality rotary encoder like this:
If, as the other poster said, "only 7 or 8 bits are accurate" (for the pot) then this is actually more precise anyway, and you do away with all the analog BS.
JoeN:
I misunderstood at first that this is more about sensing the position of a knob that actually varying the resistance on a wire.
I need a pot that will work as a precise rotary position sensor, it will be connected to a 16bit ADC.
Anyway, if I read this right all he wants to do is connect a digipot to a ADC to get a value 0-65535 and use that as a human interface to something else. Isn't that a bit of a Rube Goldberg solution? I don't see why he doesn't use a good quality rotary encoder like this:
If, as the other poster said, "only 7 or 8 bits are accurate" (for the pot) then this is actually more precise anyway, and you do away with all the analog BS.
That optical encoder is interesting. Does it give you "absolute" position or just pulses when it rotates?
That optical encoder is interesting. Does it give you "absolute" position or just pulses when it rotates?
Just a 2 channel quadrature encoder. You would need another independent once a rotation pulse reference detector to be able to compute absolute position.
JoeN:
I misunderstood at first that this is more about sensing the position of a knob that actually varying the resistance on a wire.
I need a pot that will work as a precise rotary position sensor, it will be connected to a 16bit ADC.
Anyway, if I read this right all he wants to do is connect a digipot to a ADC to get a value 0-65535 and use that as a human interface to something else. Isn't that a bit of a Rube Goldberg solution? I don't see why he doesn't use a good quality rotary encoder like this:
If, as the other poster said, "only 7 or 8 bits are accurate" (for the pot) then this is actually more precise anyway, and you do away with all the analog BS.
That optical encoder is interesting. Does it give you "absolute" position or just pulses when it rotates?
Just pulses, but that is very easy to turn into a numeric position in software and there are a number of sketch examples. See Arduino Playground - HomePage . I have one I know works with this encoder and I can post it. I also have a Xilinx project (as a schematic unfortunately - I didn't know VHDL very well when I did it) that decodes these encoders into a 15 bit counter with the counter pins as outputs and 3 channels of rotary encoders as inputs plus a channel selector, this on a relatively small Xilinx CPLD.
But when it powers down and powers back up, what happens? A pot position can be read after power cycle.
I disassembled a 20 position mechanical rotary encoder before, it really is nothing more than two contacts arranged in a way that you can tell the direction. I assume optical ones would be the same, but could be made to have much more resolution . . . I had an optical wheel encoder that has 100 slots for one of my PID project, not good enough but works fine -- the robots "runs" funny initially
But when it powers down and powers back up, what happens? A pot position can be read after power cycle.
I disassembled a 20 position mechanical rotary encoder before, it really is nothing more than two contacts arranged in a way that you can tell the direction. I assume optical ones would be the same, but could be made to have much more resolution . . . I had an optical wheel encoder that has 100 slots for one of my PID project, not good enough but works fine -- the robots "runs" funny initially
No problem, but one last thing to consider. Atmel microcontrollers all have EEPROM. You can save the current position a second after the most recent change or so and you won't overburden the EEPROM write limits and read it back at power on. The code is around here on this site and it's easy to use.
But when it powers down and powers back up, what happens? A pot position can be read after power cycle.
I disassembled a 20 position mechanical rotary encoder before, it really is nothing more than two contacts arranged in a way that you can tell the direction. I assume optical ones would be the same, but could be made to have much more resolution . . . I had an optical wheel encoder that has 100 slots for one of my PID project, not good enough but works fine -- the robots "runs" funny initially
No problem, but one last thing to consider. Atmel microcontrollers all have EEPROM. You can save the current position a second after the most recent change or so and you won't overburden the EEPROM write limits and read it back at power on. The code is around here on this site and it's easy to use.
360/256 = 1.40625 Deg/Step is the only real problem that I see and as to storage a 24C02 would be more than enough external storage and relieve the 328's eeprom cheap and easy to use too.
Docedison:
360/256 = 1.40625 Deg/Step is the only real problem that I see and as to storage a 24C02 would be more than enough external storage and relieve the 328's eeprom cheap and easy to use too.
Bob
Like I said in my prior brainstorming thread, I wouldn't write the new rotary encoder position to the 328's EEPROM until a second or so has expired. So you probably want to have an interrupt handler calculate the new position and set a flag saying the position is dirty and the time it became dirty. Then somewhere in the main loop check that and after a second expires write it out. If another interrupt comes in in under a second, the time is updated so the write never occurs until a second has passed. This should cut down on the number of writes dramatically.