Filtering noise from a wire


+ Reply to Thread
Results 1 to 31 of 31

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    453


    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.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    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 05: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!

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


    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 05: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!

  4. #4
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: Filtering noise from a wire

    Quote Originally Posted by Demon View Post
    The graph at the bottom of page 1 of the LTC4311 shows a total rise-time of about 1uS.
    That graph shows a rise time of 1uS by only using a 15.8k pull-up resistor. It also shows that by using the LTC4311 you get an almost perfect waveform. It looks like this LTC4311 chip is exactly what you need for your application. I would pay special attention to where this chip should be placed in the PCB board. Example, closer to the PIC, or closer to the I/O expander, or closer to the resistors, etc. If you find the answer to this question please let us know.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

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


    Did you find this post helpful? Yes | No

    Default Re: Filtering noise from a wire

    Thanks, that's what I was hoping.

    Just checked and JLCPCB doesn't have any in stock. They don't have any other I2C accelerator chips (that I can see). Now I understand the gripes on the interwebs about the cost of this chip.

    I can get it by JLCPCB's global purchase program, but I won't be paying that "JLCPCB price".


    And it doesn't exist in DIP format, so I can't do a quickie test.
    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
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Filtering noise from a wire

    Quote Originally Posted by rsocor01 View Post
    ...I would pay special attention to where this chip should be placed in the PCB board. Example, closer to the PIC, or closer to the I/O expander, or closer to the resistors, etc. If you find the answer to this question please let us know.
    My plan was to keep the resistors and accelerator chip right up against the PIC.

    I don't recall seeing location requirements, but I wasn't looking for that info last night either.
    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
    May 2013
    Location
    australia
    Posts
    2,643


    Did you find this post helpful? Yes | No

    Default Re: Filtering noise from a wire

    what problem is the active pullup bus chip going to solve ?
    it will make zero difference to pbp's bit-banged commands and the mssp port would have no issues at 400kHz bus speed anyway [providing bus length and load is within reason] using the usual pullup resistors.
    Warning I'm not a teacher

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: Filtering noise from a wire

    Quote Originally Posted by richard View Post
    what problem is the active pullup bus chip going to solve ? ...
    I was hoping:

    - it would allow me to use the MCP23017 at 400MHz,
    - it would be enough to read rotary encoders with an MCP23017,
    - it would work using I2CREAD command.

    But that's too many IFs. The chip is not available in DIP package for me to test.

    I've since decided to go with a dedicated 16F1937 TQFP-44 at 32MHz with 36 IOC pins to manage my encoders. I have room for 14 encoders on this secondary PIC (primary is a USB PIC), and the jumper at bottom right will permit me to use a 2nd circuit if needed in the future.

    I only need 13 for this first project. I could use the 2 pins for encoder #14 to create a 3 bit jumper, giving me addressing for 8 circuits (total of 103 encoders). I'll most likely make the change now that I've thought about it.

    Name:  PCB Encoders.png
Views: 5364
Size:  161.9 KB


    EDIT: I didn't forgetting mounting holes. The PCB will be mounted vertically along the perimeter of the enclosure with the pins pointed inwards. The high-mounted header pins will be easy to access. and a single line of hot-glue will secure the connectors.
    Last edited by Demon; - 17th May 2024 at 20:43.
    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, 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 : 8

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