oddson
Well-known member
If your potentiometer's resistance is too large it won't work reliably, too small and you can burn something out (hopefully just the pot!) but anything in the 1-50 KOhm range seems to work fine....had trouble with my rotary style pots( Not sure what size they where. do they have to be a certain ohm?) ...
Any potentiometer will work as long as the pin can sense the voltage coming from the voltage divider (which is what a potentiometer is when wired between a voltage and ground - the wiper gives a voltage proportional to its position regardless of the overall resistance). For it to work accurately and reliably the current moving into the Teensy instead of flowing to the ground should be insignificant to avoid having the process of measuring the voltage causing the voltage to drop. I would guess that anything above 100K would be dodgy.
The pictured trimmers were 50K and they work fine on the on the T3.0... I'm pretty sure I've used 100K too which is 10-times the Arduino board recommendation of 10K or smaller but I suspect Paul's boards are better than that.
If your pots have a three-digit number on them you can find their values -- 102 = 1KOhm, 502 = 5KOhm, 103 = 10KOhm, 503 = 50KOhm are standard pot values that seem to work. The smallest implies a current of 3.3 mA which doesn't sound like much but some people talk about 64 pots powered off the 3.3 volt supply on the Teensy which is >200mA on its own.
If your pots are small enough and there is still a problem you may have crappy pots (they may just be old and there is oxidization where the wiper contacts the resistive surface) or some other source of noise like poor solder joints or loose breadboard connections.
But the great thing about the ResponsiveAnalgoRead algorithm is that you can adjust parameters and change its responsiveness... more forgiving of noise vs. quicker response is the major trade-off but it's more complex than just that.... (see 'other methods' on the gitHUB page: https://github.com/dxinteractive/ResponsiveAnalogRead )
Given these problems are far-and-away the biggest hurdle for those making analog MIDI controllers I think Paul is hoping an example sketch with some of these advanced features exposed will help noobs resolve with these difficulties when they arise.
But this 'simple' version is a nice first step as it seems to tame run-of-then-mill pot-noise quite nicely with stock settings.... but especially when then dropping to 7-bit afterwards.
I do want to check to see if bit reduction is something the algorithm already handles as it may simplify the sketch further.
Adding thee simple buttons with hard-coded behaviour would be trivial but I'd like to do it correctly so that changing the number of buttons is handled simply (if not elegantly).
In the final version I'd also like to make various behaviours possible such as a latched mode (toggle) as well as making both CC and note-on/off messages user configurable.
Last edited: