I have a chip that I use Arduino to program. The chip takes the voltage as an input. I have 10 lights as an output according to the range of the voltage one of the light turns on and the other ones turn off. example from v=1 to v<2 lamp 1 turns on and all lamps off, from v=2 to v<3 lamp 2 turns on and all lamps turn off and so on.

The problem I am facing is that when the signal gets close to the border of two ranges the example v=2.95 lamp 1 and lamp 2 starts turning off and on.

So I figured that there is some sort of noise in the signal so I used capacitors and resistors to reduce the noise. however, this creates a large delay when I want to switch down.

Any suggestions on how to solve my problem so that the response stays fast?

  • \$\begingroup\$ Part number at least would be helpful, a circuit even more so. Is the voltage produced by the Arduino?? ...if so how? \$\endgroup\$ – Jack Creasey May 4 '17 at 16:40
  • \$\begingroup\$ Are you 100% sure that the two lights being on at the same time is a bug, and not a feature? It practically almost doubles your resolution. \$\endgroup\$ – Dampmaskin May 4 '17 at 16:47
  • \$\begingroup\$ Are you talking about a LED bar graph IC chip? YOur question is meaningless without some circuit references \$\endgroup\$ – Sunnyskyguy EE75 May 4 '17 at 16:58
  • \$\begingroup\$ just use smaller caps \$\endgroup\$ – dandavis May 5 '17 at 6:21

It's not just noise, digital circuits do not do analog = very well.. Think about what exactly does equal mean? <1mw, <1uV, <1pV....

Some of that is noise, and if the noise is really bad you should try to filter it, but you will always have the "Equals" problem

As such, if you only use simple level comparison in your code, lights will always flicker when the inputs are close to a step value.

Instead use hysteresis and possibly averaging in your code.

Use non-crossing threshold ranges e.g. V < 2.6 to V < 3.4 for the 3V level... so there is a gap and maintain that output till the signal enters the next range.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.