where did all the noise come from?

hey there.

i thought i was in the clear when i learned how to use a threshold at higher math to eliminate jittering output of a potentiometer, and a "value != prevvalue" to eliminate identical data output.

suddenly, however, i am dealing with a great deal more noise than i was previously. sensors that i thought i'd dealt with using the above techniques are suddenly noisier than ever.

what introduces noise into an arduino system? how can i prevent this?

i'd be happy to provide any pertinent info.

thanks
nym

what introduces noise into an arduino system? how can i prevent this?

  1. Poor earthing, poor connections, long wires, lack of decoupling. Lots of stuff.

  2. Good earthing, soldered connections, short wires, lots of decoupling.

i thought i was in the clear when i learned how to use a threshold at higher math to eliminate jittering output of a potentiometer

What does this mean?

it means the threshold part of the code below:

mappedccminval = map(ccminval, 0, 1023, 255, 0);               // <= maps the analog data to 0-255 (twice the final output range)
if(mappedccminval != lastccminval){
  if(abs(mappedccminval - prevccminval) >=THRESHOLD){

i have not decoupled anything thus far. i hope to decouple my IR sensor, but would rotary potentiometers also benefit from this?

in my case, the noise is on all of the analog inputs. i feel like i didn't have this before i put in my footswitch button, but it's impossible to tell really.

the case of the unit itself is not grounded. i will try this first to see if that makes a difference. otherwise, i'm using a screwshield for terminals, but everything else is soldered.

any further suggestions would be very appreciated.

but it's impossible to tell really

Yeah, me too - first time I've heard about the footswitch.
Have I missed something, like a schematic?

maps the analog data to 0-255 (twice the final output range)

Incorrect - maps the analogue data to 255-0.

no schematic. yet.
i ran a wire from the metal case to the arduino's ground, with no added success. the noise isn't coming from the case not being grounded.

i'm thinking about replacing the arduino dem with a rbbb arduino because there'd be more room in there for decoupling, etc...

the noise isn't coming from the case not being grounded.

How is it wired? Maybe the problem is that you've added a big noise antenna to your setup.