Pages: 1 [2]   Go Down
Author Topic: Potentiometers unstable values  (Read 2098 times)
0 Members and 1 Guest are viewing this topic.
Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31411
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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



thanks
Logged

Somewhere in the Sonoran Desert
Offline Offline
Full Member
***
Karma: 1
Posts: 108
"This was not intended to be a factual statement."
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: October 29, 2010, 10:24:23 am by darko.romanov » Logged

Somewhere in the Sonoran Desert
Offline Offline
Full Member
***
Karma: 1
Posts: 108
"This was not intended to be a factual statement."
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
« Last Edit: October 29, 2010, 02:46:59 pm by timmyw » Logged

Pages: 1 [2]   Go Up
Jump to: