Filtering noise from a wire


Closed Thread
Results 1 to 31 of 31

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Filtering noise from a wire

    Quote Originally Posted by richard View Post
    what is the shortest switch activation period that you would expect to need to detect and how quickly do you need to respond ?
    generally any key press under 50mS i would just ignore . for basically "static" switches 200 0r 300 mS would be more than adequate

    why care about noise and debouncing if quick responses are not required

    The only issue I can think of is that I have rotary encoders. Nothing is preventing the user from turning 2 encoders at the same time while on auto-pilot.

    There's also the possibility of someone flying with a co-pilot/navigator; that could mean the "possibility" of up to 4 encoders moving at the same time. I want to be ready for that.


    My goal is to undercut the market by a wide margin. It's very possible someone with vested interests would try their best to find "bugs" with my product, and drag my name on flight sim groups.

    For example: back in college during the late 70ies, Burroughs brought in a main-frame but we thought it sucked. So most a lot of computer students flooded the queues with duplicates of their jobs. The techs from Burroughs were not prepared; the machine failed, badly, and IBM came back. We didn't have vested interests, we were just goofballs, but we did crash the system.

    Just look at this thing; couple of switches and 3 LEDs for $140CAD. That's insane. That's worth something like $20 at most. There's very few competition, so they pretty much do as they please.

    I'm not the next Delorean, but I still expect resistant.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,728


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Filtering noise from a wire

    I have rotary encoders. Nothing is preventing the user from turning 2 encoders at the same time while on auto-pilot.
    rotary encoders are a completely different story to switches, you have virtually no chance of reading multiple re's via i/o extenders with any confidence that steps and direction changes won't be missed
    Warning I'm not a teacher

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,184


    Did you find this post helpful? Yes | No

    Default Re: Filtering noise from a wire

    Regarding the Rotary encoders Richard covered it 100%.

    With shielded wires I am pretty sure you won't have any problems. Forget about R's and C's, just read two times the switch state and your are done with debounce.

    As for long or short wires acting like antennas, well, the general statement "long wires act like antenna" is not quite right. It depends on the frequency we are talking about. For example, 10cm may seem very short, but this is an antenna for 750MHz and the 10m is an antenna for 7.5Mhz. So, which one may be a problem for you? It depends on what signal sources you have nearby, right?

    Best way to deal with all frequencies is both cable shielding and metal case box wherever there is a possibility of interference.

    But I think we are getting crazy on this...

    Ioannis

  4. #4
    Join Date
    Aug 2011
    Posts
    461


    Did you find this post helpful? Yes | No

    Default Re: Filtering noise from a wire

    Quote Originally Posted by richard View Post
    rotary encoders are a completely different story to switches, you have virtually no chance of reading multiple re's via i/o extenders with any confidence that steps and direction changes won't be missed
    +1

    If you're trying to use an IO expander to do that good luck!

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Filtering noise from a wire

    Challenge accepted 😁
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,184


    Did you find this post helpful? Yes | No

    Default Re: Filtering noise from a wire

    Even if you have the fastest MCU to decode rotary encoder, the bottleneck is the I/O expander and will not be fast enough to follow users speedy fingers!

    Ioannis

  7. #7
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Filtering noise from a wire

    Quote Originally Posted by Ioannis View Post
    Even if you have the fastest MCU to decode rotary encoder, the bottleneck is the I/O expander and will not be fast enough to follow users speedy fingers!

    Ioannis

    This is a signal from an EC11 rotary encoder.

    5vdc with 10:1 probe
    .1 volt / division
    .2 ms / division


    Name:  EC11 SPST at 0.2ms on PCB.jpg
Views: 9981
Size:  132.5 KB


    It takes about 2.5 time divisions to activate; so about 0.5ms.

    MCP23017 I/O Expanders can run up to 1.7 MHz in I2C mode.
    MCP23018 I/O Expanders can run up to 3.4 MHz in I2C mode.
    MCP23S17 I/O Expanders can run up to 10 MHz in SPI mode.

    I'm not keen on the new addressing mode on the MCP23018 version. I'm hoping the MCP23017 is fast enough at 1.7 MHz in I2C mode. At worse, I'll learn how to use the MCP23017 at 10 MHz in SPI mode.

    (nope, haven't done any math to check if it's possible, mainly cause I have no clue how to do that properly )
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  8. #8
    Join Date
    Aug 2011
    Posts
    461


    Did you find this post helpful? Yes | No

    Default Re: Filtering noise from a wire

    Quote Originally Posted by Demon View Post
    MCP23017 I/O Expanders can run up to 1.7 MHz in I2C mode.
    MCP23S17 I/O Expanders can run up to 10 MHz in SPI mode.
    That's the wire speed... you'll never get the code to run anywhere near that fast except for a single byte transaction.
    You won't get I2C to run that fast without active pullups, and getting the PIC to do 10MHz SPI depends on your system clock.

Similar Threads

  1. Noise on input signal
    By fanman in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 28th February 2012, 02:55
  2. Notch filtering
    By SOMRU in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 23rd June 2010, 16:45
  3. Noise on OSC pins.
    By Tobias in forum General
    Replies: 0
    Last Post: - 31st December 2009, 01:29
  4. Input Noise
    By PJALM in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 28th February 2006, 19:26
  5. Loop noise
    By Jųan in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 20th October 2005, 12:19

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts