Go Down

Topic: Potentiometers unstable values (Read 5465 times) previous topic - next topic


An LED looks like this:-

The long thin end is the cathode and the triangle end is the anode. The way you have drawn it you can't tell what wire is connected to what as you have both wires going into the triangle end.

darko romanov

I know, I know.. but especially because the LEDs are working we can suppose the legs are correctly wired, despite my schematics.

darko romanov

Ok.. I'm going to start the "refactoring". I have a doubt, is it correct if I wire the grounds in this way?


Tim Williams

Ok.. I'm going to start the "refactoring". I have a doubt, is it correct if I wire the grounds in this way?

That will likely work. There is nothing 'wrong' with it, but if we take some time we can do better and learn a few things about grounding along the way.

There have been volumes of work dedicated to proper grounding techniques. In an ideal world, connecting any ground to another ground will work. Daisy-chain, ground plane, grids, star networks, they should all work the same. The ground should have the same potential everywhere and no signal will influence another.

Of course in practice it isn't that easy. Even short traces (or wires) have some inherent resistance. They also cause inductive cross talk between signals i.e. two wires side-by-side act as a tiny transformer so that the signal on one causes noise on the other and vice versa.

One method for minimizing this for sensitive signals (our analog in this case) is to create a seperate single-point gound. All analog grounds should tie to this point directly via the shortest route. AGND of the ATMega should also tie to this point. Then a single wire should be connected directly to the power supply.

Note in the drawing that the digital items run on seperate return wires but we don't worry about daisy-chaining the grounds together, as digital signals are less sensitive to issues with noise.

A similar technique can be used for the +5V and the pots and AVcc . As I mentioned earlier, you would want a ferrite bead between Vcc and AVcc to help filter the noise.

darko romanov

Oct 29, 2010, 05:21 pm Last Edit: Oct 29, 2010, 05:24 pm by darko.romanov Reason: 1
Hi Tim,

many thanks for the explanation, it's really clear and unravels some doubts I had. I've started to apply your mods, firstly I unplugged all LEDs and all pots except one. I wired the 100n capacitor and the sound frequency now is constant, but on low frequencies it sounds "rough" (I'll record it to let you hear it) but I think it could be improved using a LPF (correct?).

The meaning of the capacitors before the pots is a sort of filter to cut off peaks, is it right?

Tim Williams

Oct 29, 2010, 08:43 pm Last Edit: Oct 29, 2010, 09:46 pm by timmyw Reason: 1
The meaning of the capacitors before the pots is a sort of filter to cut off peaks, is it right?
Right, it is a filter, it doesn't really cut off peaks but rather smooths out the peaks and valleys. It serves to average the voltage.

I say this because there are circuits and components that can be used to 'clamp' a voltage such as a 'clipper' which does cut off the peaks (above a certain level) but otherwise doesn't affect the signal.

Also, you say "before the pots," and I got to thinking I might not have been completely clear that if you have to make a choice between mounting the capacitor at the ATMega or the pot because of the location of the pot, the closer to the ATMega is best.

I would go ahead and try the low-pass filter as it won't hurt your audio and might improve it. I really haven't done anything with audio and arduino so someone else might be able to answer your question better.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131