1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Showroom FlyPT - 6DOF Brushless DIY Actuators

Discussion in 'DIY Motion Simulator Projects' started by pmvcda, Aug 29, 2017.

  1. Flymen

    Flymen Flymen Gold Contributor

    Joined:
    May 19, 2018
    Messages:
    336
    Location:
    Montreal, Canada
    Balance:
    2,423Coins
    Ratings:
    +191 / 2 / -0
    My Motion Simulator:
    DC motor, 6DOF
    you have the 3D in Mover moving and the output shows values changing? yes

    Are you sure the serial speed is correct? yes !
    Should be the same you have in the sketch. yes

    Last edited: Nov 21, 2019
  2. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,531 / 17 / -0
    My Motion Simulator:
    6DOF
    @Flymen ,

    I'm without ideas... o_O

    So Mover sends data...
    Calibration is made...

    What happens after calibration?
    Do the actuators stay at minimum travel, middle or maximum travel?

    Try with and without Mover output connected
  3. Flymen

    Flymen Flymen Gold Contributor

    Joined:
    May 19, 2018
    Messages:
    336
    Location:
    Montreal, Canada
    Balance:
    2,423Coins
    Ratings:
    +191 / 2 / -0
    My Motion Simulator:
    DC motor, 6DOF
    What happens after calibration?
    Do the actuators stay at minimum travel, middle or maximum travel?
    Answer : when the calibration is finish ( actuator down) I have no more power on them , but after , when I put serial outputs * connect * on Flypt Mover 2.7.4 automatically I have power active on each actuators ( they want to go down again ) .

    I will try your sketch before the new one 11.0 if the actuators return in the middle !
    • Like Like x 1
  4. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,531 / 17 / -0
    My Motion Simulator:
    6DOF
    @Flymen,

    Looking at your images, the output from limits is inverted...

    Maximum is negative.

    Try changing direction up and down.
    Swap the low with high just to test (in the sketch)

    Need to think better about it..., but try it.
    • Like Like x 1
  5. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,531 / 17 / -0
    My Motion Simulator:
    6DOF
    No, please try what I said above before going to an old sketch
  6. Flymen

    Flymen Flymen Gold Contributor

    Joined:
    May 19, 2018
    Messages:
    336
    Location:
    Montreal, Canada
    Balance:
    2,423Coins
    Ratings:
    +191 / 2 / -0
    My Motion Simulator:
    DC motor, 6DOF
    like this :
    flypt mover 7.png
  7. Flymen

    Flymen Flymen Gold Contributor

    Joined:
    May 19, 2018
    Messages:
    336
    Location:
    Montreal, Canada
    Balance:
    2,423Coins
    Ratings:
    +191 / 2 / -0
    My Motion Simulator:
    DC motor, 6DOF
    Swap the low with high just to test (in the sketch) :
    No , nothing move like this !
    I will swapp back in the sketch
  8. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,531 / 17 / -0
    My Motion Simulator:
    6DOF
    Edit: Ignore this one, see two posts bellow

    Wait, thought better.

    This is going to make it go up instead of bottom. Change this instead:

    Code:
     // Move all actuators to minimum
      // =============================
      for (int n = 0; n < NUMBERACTUATORS; n++)
      {
        digitalWrite (actuator[n][DIRECTION_PIN], DOWN);
        ledcWrite(actuator[n][PWM_CHANNEL], CALIBRATION_SPEED);
        actuator[n][FOUND] = false;
      }
      found = 0;
      while (found < NUMBERACTUATORS)
      {
        for (int n = 0; n < NUMBERACTUATORS; n++)
        {   
          // Read limit switch position (we are looking for zero)
          if (!actuator[n][FOUND] && (analogRead(actuator[n][LIMITS_PIN]) + analogRead(actuator[n][LIMITS_PIN]) + analogRead(actuator[n][LIMITS_PIN]) + analogRead(actuator[n][LIMITS_PIN])) <= 0)
          {
            ledcWrite(actuator[n][PWM_CHANNEL], 0);
            actuator[n][MAXIMUM_POSITION] = -actuator[n][CURRENT_POSITION] / 2; // <<<<<<<<<<<<<<<<<<<< REMOVE THE - <<<<<<<<<<<<<<<<<<
            actuator[n][MINIMUM_POSITION] = -actuator[n][MAXIMUM_POSITION];
            actuator[n][CURRENT_POSITION] = actuator[n][MINIMUM_POSITION];
            actuator[n][FOUND] = true;
            found++;
    
            // Send info to serial monitor for debug (use 500000 in serial speed to work with the Arduino IDE)
            Serial.println();
            Serial.print("Actuator ");
            Serial.print(n);
            Serial.print(":  Minimum=");
            Serial.print(actuator[n][MINIMUM_POSITION]);
            Serial.print("  Maximum=");
            Serial.println(actuator[n][MAXIMUM_POSITION]);
          }
        }
      }
    }
    Last edited: Nov 21, 2019
  9. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,531 / 17 / -0
    My Motion Simulator:
    6DOF
    EDIT: Ignore this one, see next post

    In the marked line with REMOVETHE -,

    Remove that minus signal

    Keep the rest equal


    actuator[n][MAXIMUM_POSITION] = -actuator[n][CURRENT_POSITION] / 2;

    should be

    actuator[n][MAXIMUM_POSITION] = +actuator[n][CURRENT_POSITION] / 2;

    But that is not really correct. the problem is that it's counting steps backwards
    • Informative Informative x 1
    Last edited: Nov 21, 2019
  10. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,531 / 17 / -0
    My Motion Simulator:
    6DOF
    @Flymen

    OR WAIT AGAIN!

    sorry, but even better, just change this function in the sketch:
    Code:
    // ====================================
    // Update current position of actuators
    // ====================================
    void updateCurrentPosition(byte n)
    {
      int angle = digitalRead(actuator[n][HALL_1_PIN]) * 4 + digitalRead(actuator[n][HALL_2_PIN]) * 2 + digitalRead(actuator[n][HALL_3_PIN]);
      if (actuator[n][LAST_SUM] > 0) actuator[n][LAST_SUM] = stepUp[angle][actuator[n][LAST_ANGLE]];
      else actuator[n][LAST_SUM] = stepDown[angle][actuator[n][LAST_ANGLE]];
      actuator[n][LAST_ANGLE] = angle;
      actuator[n][CURRENT_POSITION] += actuator[n][LAST_SUM];
    }
    To:

    Code:
    // ====================================
    // Update current position of actuators
    // ====================================
    void updateCurrentPosition(byte n)
    {
      int angle = digitalRead(actuator[n][HALL_1_PIN]) * 4 + digitalRead(actuator[n][HALL_2_PIN]) * 2 + digitalRead(actuator[n][HALL_3_PIN]);
      if (actuator[n][LAST_SUM] > 0) actuator[n][LAST_SUM] = stepUp[angle][actuator[n][LAST_ANGLE]];
      else actuator[n][LAST_SUM] = stepDown[angle][actuator[n][LAST_ANGLE]];
      actuator[n][LAST_ANGLE] = angle;
      actuator[n][CURRENT_POSITION] += -actuator[n][LAST_SUM];
    }
    
    Just change the signal in that last line of code to minus.
    I think like that it should be correct and you get calibration as it should.
    • Funny Funny x 1
    • Informative Informative x 1
  11. Flymen

    Flymen Flymen Gold Contributor

    Joined:
    May 19, 2018
    Messages:
    336
    Location:
    Montreal, Canada
    Balance:
    2,423Coins
    Ratings:
    +191 / 2 / -0
    My Motion Simulator:
    DC motor, 6DOF
    flypt mover 8.png
  12. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,531 / 17 / -0
    My Motion Simulator:
    6DOF
    Please, see my last post. With that solution it keeps counting steps in the wrong direction.
    It's not going to work, try what I have in the last post and put that one back to a minus sign.

    Sorry for so many changes...
    But let's put it working!
    • Funny Funny x 1
  13. Flymen

    Flymen Flymen Gold Contributor

    Joined:
    May 19, 2018
    Messages:
    336
    Location:
    Montreal, Canada
    Balance:
    2,423Coins
    Ratings:
    +191 / 2 / -0
    My Motion Simulator:
    DC motor, 6DOF
    67202
    I swapp back !
    Look good too !:thumbs

    flypt mover 9.png
  14. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,531 / 17 / -0
    My Motion Simulator:
    6DOF
    So you see the actuator go up, then down and stop at low, with those results.

    Test now with mover :think
    • Like Like x 1
  15. Flymen

    Flymen Flymen Gold Contributor

    Joined:
    May 19, 2018
    Messages:
    336
    Location:
    Montreal, Canada
    Balance:
    2,423Coins
    Ratings:
    +191 / 2 / -0
    My Motion Simulator:
    DC motor, 6DOF

    Good news !
    I can see move now ! with Flypt mover shine !:cheershug:
  16. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,531 / 17 / -0
    My Motion Simulator:
    6DOF
    :cheers Finally!!!

    Was thinking on what can cause this inverted counting. Can be:

    - Different arrangement of the coils in the motor
    - Wrong connection order of the wires from the hall sensors

    Can you measure the travel you have in the actuator? From minimum calibration point to maximum calibration point in mm.
    Want to know how many steps you have for each rotation (5 mm if you are using 1605 ball screw)
    • Like Like x 1
  17. Flymen

    Flymen Flymen Gold Contributor

    Joined:
    May 19, 2018
    Messages:
    336
    Location:
    Montreal, Canada
    Balance:
    2,423Coins
    Ratings:
    +191 / 2 / -0
    My Motion Simulator:
    DC motor, 6DOF
    For the moment , it 's only one who move up and down !! (actuator number two ) .
    actuator 1 goes up and stay there and number 3 goes down and stay there …
    Give me more time to analyse this !
    Thanks a lot !
  18. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,531 / 17 / -0
    My Motion Simulator:
    6DOF
    For 810 steps on each direction, you have 2x810=1620 steps travel.
    @ 6 steps per turn you get 1620/6=270 turns each 5mm, so 5*270 = 1350 mm WRONG

    You don't have 1.35 m travel do you?
    So something is wrong there. Do you have a link for your motor specs? I will look for it.
    Take a look at the halls connections, they can be swapped.

    EDIT:

    We need to know the number of poles/phases of the motor.
    Just to know the resolution you get.


    Steps per revolution are given by:
    Electrical_angle = Number_of_poles/2 * Mechanical_angle
    In a 6 pole motor we have 6/2*360º = 3*360º = 3 electrical angles per mechanical revolution
    Since we have 6 step in each electrical revolution, we have 3*6=18 steps in each electrical revolution
    Nanotec DB59 - 6 poles - 18 steps per revolution (the motor I use)
    ACT/Longs/Wantai 57BLF03 - 8 poles - 24 steps per revolution (alternative cheaper motor, more resolution, but slower)
    So in reality, I have 18 steps for 5mm travel witch is a resolution of 0.28mm.

    So if that's the same you have, the above calculations are wrong. You have:
    1620/18=90 turns @ 5mm = 450mm More realistic
    Last edited: Nov 22, 2019
  19. Flymen

    Flymen Flymen Gold Contributor

    Joined:
    May 19, 2018
    Messages:
    336
    Location:
    Montreal, Canada
    Balance:
    2,423Coins
    Ratings:
    +191 / 2 / -0
    My Motion Simulator:
    DC motor, 6DOF

    spec motor :H-344-H-0000 - KOLLMORGEN
    https://www.kollmorgen.com/sites/default/files/public_downloads/Silverline Motor Catalog.pdf

    Spec Kolmorgen H-344.png
    Last edited: Nov 22, 2019
  20. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,531 / 17 / -0
    My Motion Simulator:
    6DOF
    It has 3 pairs of poles, so 6 poles. Same has I have. So you should get the 18 steps per revolution.
    That's 0.28 mm resolution in a SFU1605 and it makes you values realistic.