Filtering noise from a wire


Closed Thread
Results 1 to 31 of 31

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    460


    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!

  2. #2
    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!

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


    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

  4. #4
    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: 7874
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!

  5. #5
    Join Date
    Aug 2011
    Posts
    460


    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.

  6. #6
    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 tumbleweed View Post
    ...You won't get I2C to run that fast without active pullups...
    What do you mean by active pull-ups? I couldn't see a meaningful description on google.

    I'm not using weak internals, I'm using 4K7 externals.


    EDIT: ... aaaaaand .......


    This pops up as soon as I posted my question:

    For the next guy, this is active pull-ups.

    https://picaxeforum.co.uk/threads/i2...-values.32111/
    Last edited by Demon; - 15th May 2024 at 06:02.
    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!

  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

    The graph at the bottom of page 1 of the LTC4311 shows a total rise-time of about 1uS.

    https://www.analog.com/media/en/tech...ets/4311fa.pdf

    Would a LTC4311 be enough to process a rotary encoder with an MCP23017?

    Would I be able to use I2CRead and I2CWrite with this device, or would I have to use another technique?


    The 16F1946 is rated up to 400kHz according to Table 24-4, but there's this note under the table:

    Note 1: The interface does not conform to the 400 kHz specification (which applies to rates greater than 100 kHz) in all details, but may be used with care where higher rates are required by the application.

    https://ww1.microchip.com/downloads/.../40001414E.pdf


    (I'm using MCP23017 which are rated for 100kHz, 400kHz and 1.7 MHz)
    Last edited by Demon; - 15th May 2024 at 06:34.
    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!

Similar Threads

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