Pull unused analog pins to gnd to help minimize noise? #1468
Replies: 9 comments
-
Posted at 2015-05-04 by d0773d Also, out of curiousity I cut the old leads off the cable to strip new leads since the leads looked dirty and corroded. I noticed a red, black, white, a bare wire and the foil shield. What do I hook the bare wire too? Or is that wire a rip cord? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-04 by DrAzzy A bypass cap goes between supply and ground, right next to the device in question. Sometimes people also put a small cap between an analog input and ground, to smooth out noise; this isn't appropriate for all sources of analog input, though. Finally - you realize there will always be jitter of at least 1/4096, as it's a 12-bit dac, right? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-04 by d0773d
I do now :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-04 by tage The bare wire is the electrical connection to the shield. You should connect it to signal GND at one end (the Espruino) and leave it unconnected at the other end. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-05 by d0773d I made the leads as short as possible and I am getting better readings without using a bypass cap or a RC low pass filter. I will need to go to frys electronics tomorrow to pickup some caps and resisters. I freaking hate analog :-/ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-05 by @gfwilliams Another thing to add - As you're not expecting that to change much, you could just keep some kind of running average of it:
You could also experiment with just using a constant value instead, like |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-05 by d0773d
Right, I will expect the temperature of my aquaponics fish tank to be: 72-74 degrees F. What I am afraid of is, turning the water heater on or off when its not supposed to due to the fluctuations and then in-turn causing the heater to break :-/ I'm getting values between 104F - 110F(Hot water demo) The values that I am getting(using hot water as a demo): Temp in F: 105.52142546252 Temp in F: 106.42375469248 Temp in C: 41.30234757616 Temp in C: 41.51487649546 Temp in C: 41.55840707979 Temp in C: 41.22329070578 Temp in C: 40.82283922169 Temp in C: 42.56068147354 Temp in C: 41.90883827124 Temp in C: 42.11013715285 Temp in C: 41.61748517983 Temp in C: 41.74432203951 Temp in C: 41.35120766480 Temp in C: 41.92938665155 Temp in C: 41.80511869209 Temp in C: 41.53246010569 Temp in C: 43.58086790083 Temp in C: 41.64385517750 Temp in C: 41.74612988558 Temp in C: 41.99619187463 Temp in C: 41.66354537383 Temp in C: 40.64783023314 Temp in C: 41.62779064556 Temp in C: 41.50174732836 Temp in C: 40.55533498825 Temp in C: 41.71990880225 Temp in C: 43.50436386718 Temp in C: 41.60630366626 Temp in C: 41.74936786270 Temp in C: 41.39160510339 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-05 by d0773d Well, using 3.3 seems to be steady. My water temp, as it is much cooler now, is staying at a 95 - 96F range. I |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-05 by @gfwilliams Great! I'll update the docs on it so others don't fall into the same trap :) It's actually reading the value of an internal (1.6v?) voltage reference with the ADC to give you that value, so unfortunately it's just as noisy as everything else! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-05-04 by d0773d
I believe I have done everything I can in software to minimize the temp fluctuations. Does anyone have any ideas obout how to minimize analog noise? I did search Google and multiple people recommended to pull all the unused analog pins to gnd. Also people recommended to use a 0.1 bypass cap. However Im not sure where to place the cap..? Does anyone have recommondations?
Code:
Beta Was this translation helpful? Give feedback.
All reactions