Hei there,
I searched the forum but couldn't find this topic anywhere. So this is my problem I'm just facing:
I'm in the process of building a multi effect board. Already designed a pcb and soldered the parts:
Since now, everything worked fine. I managed to get discrete values from the analog Ins (pots) by adding a small moving average filter to each input and also by checking if the difference between new averaged input and last value is higher than a certain amount of POT_NOISE. This way I only received changes when the pot is actually moved without having too much delay.
Now, when I also run my 6 LEDs, all this code seems to be senseless. Pots are really reacting strangely. On higher values around MAX_VOLTAGE the code still works fine. On lower values I get a lot of jumps, and also my MIN_VOLTAGE is a little higher than 0.
So my guess is, that the LEDs influence the ground somehow?
Attached see my schematic for the PCB. I used 220 Ohm resistors for each LED. All parts are using the same ground PIN and the same 3.3V PIN.
I hope there is some simple solution to this...? It would be really nice if I could solve it via code rather than rearranging the pcb or even redesigning it. I'd be very grateful for any good guesses!!
Thanks in advance, Julian