Connecting potentiometers to the GPIO


#1

Hello ,

I made an attempt to connect a 22k potentiometer to the GPIO of the Axoloti.
Left pin of the potmeter is connected with the ground.
Right pin is connected to VDD.
Middle pin is connected to a analog in. PA0 - PA7.
I use the analog_in.axp file for testing.
When connected to PA0 - PA3 the potentiometer doesn't generate any activity on the scopes.
When connected to PA4 - PA7 the potentiometers shows excellent behavior on the scopes, except that scopes that monitor these connections all show more or less the same activity at once .
Changing the connection from PA-4 to PA-5 till PA-7 doesn't show any difference.
Any ideas what is happening ?

Thanks


How to add knobs to Axoloti board (Not in patcher)
#2

Your connections sound fine, I will try to reproduce this.
It's normal that unconnected adc inputs follow more or less the last connected input, but that is not what you are describing. PA0-PA3 not working may be due to debug code that is unintenionally still active.
Are you on the master or on the unstable branch?


#3

PA0-PA3 not defaulting to analog input was a bug in older firmware, and resolved on May 10.


#4

Thanks, all the potentiometers are working just fine now.

Cheers


#5

How do you know value must be 22k? And what kind of poti did you use, linear or log?


#6

If you dont wanna care about circuit itself, its always safe to start high, cause you will deliver a certain current to the input ports, depending on the resistance value. usually its the Vdd +3,3V and from my expirience a GPIO can safely sink about 5mA without getting hurt ( that can vary, you should read datasheet if its important )

And I guess its linear, since it should alter something that has not directly something to do with sound, but that is just a guess or how i would do it.


#7

Does not need to be 22k exactly. Too low and it will use more current than needed, too high and the readout will be noise or suffer crosstalk. I'd say anything between 2k2 and 47k is fine.

A log potentiometer will work too, but will give an uneven response, just use linear.