News:

SMF for DIYStompboxes.com!

Main Menu

Pot override solution

Started by knutolai, April 23, 2020, 04:48:02 AM

Previous topic - Next topic

knutolai

Hi hope everyone is holding up OK

Been working on a FV1 / t84 (ATINY84) project and found an economic way to override a pot to both max and min. Thought I'd share it here as it might be a bit outside the norm.



The way it works is that we apply tristate logic to the t84 GPIO pin. When the pin is setup as an output (max/min) the potentiometer is overridden. The R1 resistor is then necessary to avoid shorting the power line if for instance the pot is set to max (3.3V) and the t84 outputs 0V. If the t84 GPIO pin is set as an input it's practically removed from the circuit (impedance of +100MOhm).

Hope I didn't reinvent the wheel here and that this is of some interest to some of you. Got the idea from reading about charlieplexing (https://en.wikipedia.org/wiki/Charlieplexing). Any feedback on the circuit is much appreciate :)

antonis

Quote from: knutolai on April 23, 2020, 04:48:02 AM
Hope I didn't reinvent the wheel here..

Is cogwheel the closer approach to "digital" wheel..??  :icon_lol:
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

potul

#2
Wow, what a coincidence.... I was working on the exact same thing. I have a tap-tempo controlled pedal and I want it to be compatible with non-tap tempo. My tap tempo circuit runs in an attiny, so I want the attiny (in my case an attiny84) to just step in when tap-tempo is needed, and leave the pot alone when a non-tap tempo effect is selected.

My approach was more of less the same, use the tri-state of the attiny to "leave the pot alone" if tap tempo is not needed.

To make it even more convoluted, I use the voltage coming from the same pot as well as an input to the attiny....

I have the idea drafted but I haven't tested it yet. Any insights of your implementation?




knutolai

Well it works, but not perfectly. If I have the pot at 0V and input 3.3V on the GPIO I end up with a ~2.9V reading on the ADC. Same with pot at 3.3V and GPIO at 0V I get 0.3V on ADC. I guess the impedance on the output isn't low enough. This was with a B10K pot and 10KOhm for R1. Everything works fine when I don't override it.

Alas it won't be applicable for my use after all, but could probably be useful for your tap tempo as you wont require exact input values (just "low range" / "high range")

potul

Right, I just need to distinguish hig/low when in tap tempo mode. But I would love to ve able to set max/min as well.

Did you try higher values for the resistor?

knutolai

I can try higher values tomorrow. As I said you still get the full pot range as long as the GPIO is set up as an input (high impedance).
I guess it would also be possible to add resistors between pin 1 and GND and pin 3 and 3.3V on the potentiometer to have fixed min and max voltages though the range would be smaller

potul

Ok, I will give it a try today with a 10k up to 100k resistor to see how it performs.

potul

I tried today with a 10k and it worked pretty well. Readings were pretty close to 3.3v and 0v when the GPIO was driving the FV1 input. Not much affected by the pot.
By increasing to 100k it's even better, although it has some impact on the voltages you get from the pot when not overriding it.

I still need to do some more testing, but I will probably use a 100k and  scale the pot in the spn to compensate the delta.