I2C 8+8 expander with extra features


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Improved triangolar profile

    The profile algorithm transforms the travel command (steps) into three vector quantities:

    Vector A Acceleration from rest to fixed speed (vector slope defined by ramp)
    Vector B travel at fixed speed from end of vector A to begining of vector C
    Vector C Deceleration from fixed speed to rest at target point (Vector A inverted)

    This technique is known as "TRAPEZOIDAL PROFILE".

    When the travel command is equal or less than vector A + vector B
    the algorithm convert the trapezoidal profile into "TRIANGULAR PROFILE"
    calculating new vectors A & B with different slopes as function of the given travel command

    For small travel command (few steps) the algorithm was yielding incorrect sharp slopes that
    could stall the motor if requested to turn at high speed.

    The bug has been found and removed!

    Now the motor turns smootly also with few steps travel command at high speed setting.

    The new version software (IO_Expander_new) is attached, as a zipped file, to this post.
    Attached Files Attached Files
    All progress began with an idea

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default

    Great project! Congratulations and a big thank you for sharing your project with us.

    I'd like to ask about the reliability of the I2C in the industrial environment. Is robbust enough to trust it in a place that are interference of every kind around?

    I prefered to use the old classic SIPO and PISO chips and techniques, but I am willing to change into I2C if it is at least at the same level too.

    Ioannis

  3. #3
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Ioannis , I have more than 20 automations working with I2C installed in different places and all works pretty well. If you want give a try do it, providing that you optoisolate the digital part (inputs & outputs) from the external power devices (motor; valves; relays and sensors of any type).

    Al.
    All progress began with an idea

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default

    Thanks for the reply.

    I have some projects where the inputs are optoisolated, outputs are relays and analog drive directly the PIC inputs through some sort of zener diode protection.

    For the digital part I use the Parallel input-Serial Output and the reverse, Serial Input-Parallel Output registers like the 4021 and 4094 or the A6841/MIC6841 that drives relays directly. Especially the latter is a good IC and drives relays with no need for other components. I wonder if there is an equivalent in I2C.

    This registers need at least 5 lines for data-in, data-out, clock, strobe and load. That is why I think to jump into I2C.

    Regards,
    Ioannis

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  3. Another I2C Slave Routine Problem
    By DanPBP in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th February 2009, 05:50
  4. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  5. Disable MCU Extra Features
    By cjurczak in forum General
    Replies: 2
    Last Post: - 17th November 2006, 17:51

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