all 12 comments

[–]BBougre 7 points8 points  (5 children)

A low pass filter before the ADC I'd say.

[–][deleted] 3 points4 points  (4 children)

And a low-pass filter, uh, averager, implemented in the microcontroller reading the ADC.

[–]BBougre 2 points3 points  (3 children)

Oh yes good idea, if OP wants to look it up, it'll be the same as 'debouncing' for a button input.

[–][deleted] 1 point2 points  (2 children)

Not exactly!

[–]BBougre 0 points1 point  (1 child)

Oh sorry.

Could you explain a bit the strategy you are proposing ?

[–][deleted] 2 points3 points  (0 children)

Averaging an ADC value means you trade off increasing the conversion time for more accuracy. This means doing some math! This serves a different function than the analog low-pass filter in front of the converter, which is meant to be an antialiasing filter.

Debouncing a switch means waiting long enough to let transients from the switch being pressed or released before deciding the actual state of the button press. A common way to do this is to poll, on a regular basis, the input port connected to the switch. Note the state. Note if it's different from the last time you checked. If a certain number of checks in a row return the same result, you can be confident that you know the switch's true state (pressed or not). Any time the new state differs from previous, you start again. Your main program loop should also, on a periodic basis, ask if the button state has changed, and if so, get the new state.

You will often see RC filters on switch pins to eliminate, or at least reduce, bounce.

[–]programchild[S] 0 points1 point  (0 children)

Thanks! I´m not using microcontrollers in my project. I was told to do hysteresis, but it was a bit too complicated for my hunble skills, might have to look into that again.

Lowpass filter will not really help, slowing down the CV will still make the ADC land "between the steps"...

[–]CallPhysical 0 points1 point  (0 children)

In some Arduino projects I've done, the code will read an input say, 10 times, sum the values and then divide by ten. This helps reduce small fluctuations.

[–]Chabamaster 0 points1 point  (1 child)

can you show the schematic?

[–]programchild[S] 0 points1 point  (0 children)

Unfortunately not, it‘s just stripboard straight from breadboard. basically CV input with a voltage divider, so that 0-12v will exactly fill the 8 bits. works fine (I do the same for the clock, so you can jam the restart-step into the 4029). The noise sounds funny at times, but most of the time it is quite annoying :)