Shop OBEX P1 Docs P2 Docs Learn Events
Help with Filtering, please — Parallax Forums

Help with Filtering, please

ArchiverArchiver Posts: 46,084
edited 2002-12-10 23:11 in General Discussion
Was wondering if anyone can point me to a good article (or better
yet, provide me via this forum) on basic filtering techniques. I am
building a robot with a bunch of sensors that seem to be acting
erratically. I am pretty sure that it is because I have signal
leakage all over. Any good tips on what value and type capacitors I
should use, where they should go, and other "best practices" I should
be using.

Thanks,

Steve

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-12-10 13:57
    Art of Electronics has the basics.

    Are you taling about spurious signals ? cross talk on leads or really
    noisy input signals ?


    If you are talking about the noisy input Tracy has stuff on his site
    for software filters. average/mean stuff like that.

    Dave






    --- In basicstamps@yahoogroups.com, "sjoblin001 <steven_joblin@h...>"
    <steven_joblin@h...> wrote:
    > Was wondering if anyone can point me to a good article (or better
    > yet, provide me via this forum) on basic filtering techniques. I
    am
    > building a robot with a bunch of sensors that seem to be acting
    > erratically. I am pretty sure that it is because I have signal
    > leakage all over. Any good tips on what value and type capacitors
    I
    > should use, where they should go, and other "best practices" I
    should
    > be using.
    >
    > Thanks,
    >
    > Steve
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-10 14:24
    I normally put a 1k resistor in from my "sensor" to the input of an A/D
    converter, then a capacitor from the input to ground. The size of the
    capacitor depends on how quickly I expect the "sensor" output to change.
    Most of the stuff I've been working on is very slowly changing inputs, so I
    tend to use 10uf. This gives a time constant of 10 milliseconds, and will
    filter out a lot of junk. If you are getting high frequency noise as well
    (such as from a small transmitter), putting a small disc ceramic capacitor
    across the input as well (0.001 or 0.01 uf) may help.

    Make sure that the power supply for the PIC and any analog circuitry is
    well isolated from any motor power. Be real careful with grounding. The
    analog and digital circuitry should have separate grounds, tied together at
    the -ve power supply point. Use capacitors from the power lead to ground
    (0.1uf to 1uf) close to each chip to help filter out power supply
    noise. Take care with layout to keep "sensor" wiring away from motor wiring.

    Digital filters are best used to remove "noise" that is inherent to the
    signal, rather than noise from layout and power problems. I've used Tracy's
    digital filter ideas, and they work well, but you should still start out
    with the cleanest signals you can.

    Larry

    At 01:57 PM 12/10/2002 +0000, you wrote:
    >Art of Electronics has the basics.
    >
    >Are you taling about spurious signals ? cross talk on leads or really
    >noisy input signals ?
    >
    >
    >If you are talking about the noisy input Tracy has stuff on his site
    >for software filters. average/mean stuff like that.
    >
    >Dave
    >
    >
    >
    >
    >
    >
    >--- In basicstamps@yahoogroups.com, "sjoblin001 <steven_joblin@h...>"
    ><steven_joblin@h...> wrote:
    > > Was wondering if anyone can point me to a good article (or better
    > > yet, provide me via this forum) on basic filtering techniques. I
    >am
    > > building a robot with a bunch of sensors that seem to be acting
    > > erratically. I am pretty sure that it is because I have signal
    > > leakage all over. Any good tips on what value and type capacitors
    >I
    > > should use, where they should go, and other "best practices" I
    >should
    > > be using.
    > >
    > > Thanks,
    > >
    > > Steve
    >
    >
    >To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    >from the same email address that you subscribed. Text in the Subject and
    >Body of the message will be ignored.
    >
    >
    >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

    Larry Bradley
    Orleans (Ottawa), Ontario, CANADA
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-10 23:11
    The resistor is also a good idea for any external inputs to the Stamp, in
    case you accidentally make the pin an output. On the Atmel processors with
    onboard A/D, they suggest an LC filter on the analog power. They also have a
    way to shut down the processor while the A/D conversion is going on -- this
    may work for a Stamp as well? Maybe put it to sleep while the A/D is doing
    its thing? Having access to an oscilloscope would be good too.

    I try to run a separate battery for motors, amd use a low-dropout regulator
    with extra filtering for the processor and anything else that needs 5 volts.

    Original Message

    > I normally put a 1k resistor in from my "sensor" to the input of an A/D
    > converter, then a capacitor from the input to ground. The size of the
    > capacitor depends on how quickly I expect the "sensor" output to change.
    > Most of the stuff I've been working on is very slowly changing inputs, so
    I
    > tend to use 10uf. This gives a time constant of 10 milliseconds, and will
    > filter out a lot of junk. If you are getting high frequency noise as well
    > (such as from a small transmitter), putting a small disc ceramic capacitor
    > across the input as well (0.001 or 0.01 uf) may help.
    >
    > Make sure that the power supply for the PIC and any analog circuitry is
    > well isolated from any motor power. Be real careful with grounding. The
    > analog and digital circuitry should have separate grounds, tied together
    at
    > the -ve power supply point. Use capacitors from the power lead to ground
    > (0.1uf to 1uf) close to each chip to help filter out power supply
    > noise. Take care with layout to keep "sensor" wiring away from motor
    wiring.
    >
    > Digital filters are best used to remove "noise" that is inherent to the
    > signal, rather than noise from layout and power problems. I've used
    Tracy's
    > digital filter ideas, and they work well, but you should still start out
    > with the cleanest signals you can.
Sign In or Register to comment.