Pages: [1]   Go Down
Author Topic: what's the suggested maximum potentiometer resistance to use with due?  (Read 378 times)
0 Members and 1 Guest are viewing this topic.
Athens
Offline Offline
Full Member
***
Karma: 0
Posts: 103
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying out some things on a Udoo (http://www.udoo.org/), which has an Arduino Due embedded and when I'm plugging in a 10k potentiometer I get a lot of jitter.
In this example http://arduino.cc/en/Tutorial/DueSimpleWaveformGenerator the circuit for the potentiometer is exactly the same I'm using. But comparing the results of this circuit, to the results of a similar circuit on an Arduino Uno, only supplying the knob with 5V instead, with the Uno the values are very stable (a little bit of flickering of a one value range) and with the Due, it's terribly flickering.
I kind of have the same issue with a Teensy 3.1, which also provides 3.3V. Should I be using a different potentiometer? Can't find enough information on this.

I'm posting here cause Udoo'd forum doesn't provide any answers to this...
Logged

Earth
Offline Offline
Sr. Member
****
Karma: 14
Posts: 325
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Unfortunately there probably isn't an easy answer here. Do you have the Cortex M3 documentation for the processor? In section 46.7 you'll find a discussion of ADC performance. Table 46-35 seems to suggest that 10K ohms is at the high end of what is possible if the ADC clock is running full blast with 12 bit resolution. I've had jitter troubles with this processor in another design I'm working on so I feel your pain. You can make it work better by slowing down the ADC readings but that can be complicated. You could also take several samples and average them. Search the forums for DMA driven ADC if you want to roll your own ADC code to fix this up.
Logged

0
Offline Offline
Shannon Member
****
Karma: 199
Posts: 11639
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just add 100nF between analog pin and ground to soak up any noise and provide
a low-impednace to the ADC.  Then you can use 1M even.

Note that the Due analog stuff is poor, especially as the 3.3V rail is generated by
a switch-mode regulator and is very noisy.
Logged

[ I won't respond to messages, use the forum please ]

Venezuela
Offline Offline
Sr. Member
****
Karma: 14
Posts: 488
Ground.......ground........always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Alexandros301,
Can you use an encoder instead of a pot? Regards,

p

Logged

Pages: [1]   Go Up
Jump to: