Hi!
I have a speaker on GND and D10 with a pot between D10 and the speaker.
When turning up the pot, the volume is raised but stays very low for most of the rotation. At the last fraction of the turn the volume jumps up to maximum. I have to adjust the knob in tiny, tiny increments to find a comfortable level between maximum volume and too quiet to hear properly.
Since I don’t know much about electronics, I’m hoping someone can suggest a way to spread the volume increase more evenly over the knob’s range.
BTW: I’ve tried this with two different brands, same thing.
You need a smaller value pot, likely. Resistance of your speaker is likely small in comparison to your pot value. What value are both? (e.g. Possibly 8 ohm speaker, 10 or 100kohm potentiometer).
You’re spot on. The Speaker is 8 ohm, and the pot is 10 kohm. What a thing not to pay attention to.
Will an extra resistor solve the problem or do I need to buy new pots?
- This is the wrong way to go about it as @camsysca already said. You should read the pot value with an analog pin and use that reading to adjust the speaker volume.
- Human hearing is logarithmic. A linear pot won't work well. You either need to use a log (audio) pot or (my preference) use the linear pot you have and calculate the log10( value of the reading and use that to adjust the speaker volume.
How you go about this probably depends on what the audio that you're feeding to the speaker consists of.
Thanks! I thought I could avoid going through the board and code it, but I see that that's the way to go. Thanks again for your input.