I have a simple circuit, where a use tone in order to send a melody to a speaker. Then I added a 10k potentiometer, along with a BJT, in order to control the volume. This is the schematic:
A weird thing happens when i set the pot to the max value (move the wiper in the rightmost position). The music stops playing, and a clicking sound happens every half second.
If I move the wiper to the left, the music starts playing but from the beginning. Implying that the Arduino resetted - most probably the periodic clicking sounds were continuous resets.
Why this happens and how can I mitigate it?
EDIT: I performed further experiments, using two different
10k potentiometers, as well as one
50k one. I can confirm that this happens with ALL of them. It even happens about the same angle, when the pot is nearing its rightmost position - even in the