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. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    [​IMG]

    Attached Files:

  2. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    back to original string and the same , the actuator doesn't move . Is it also right when i play with the slider in actuator position test the 3D view of the actuator doesn't move , any movement ?
    When i put a loop with sine input the 3D view moves also and not the actuator obviuosly .
  3. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    you was speaking from the serial speed ? I think yes ...

    And in Mover the same 921600 as the pic shows above , my previous screen shots

    // ===========================
    // Serial output configuration
    // ===========================
    // Interface Type: Serial
    // ComPort: The one used by your ESP32
    // BitsPerSec: 921600 - If you want feedback on the serial monitor of the Arduino IDE, you have to change this to 500000 in the defines
    // Data Bits: 8
    // Parity: None
    // Stop Bits: 1
    // Bit Range: 15
    // Type: Binary
    // Interface string format: <255><255><Axis1a><Axis2a><Axis3a>
    /// Output Rate: Can be down to 1 ms
    Last edited: Apr 2, 2020
  4. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,870
    Location:
    Portugal
    Balance:
    14,218Coins
    Ratings:
    +2,188 / 16 / -0
    My Motion Simulator:
    6DOF

    Moving the actuator in the rig modules has no effect on the 3D view, it's just to know which one is which.
    I don't see anymore problems, are you sure you have all the wires correct?

    From what you say, the actuator calibrates, then stops near a limit switch right?
    It should be the minimum switch.
    That behaviour is correct until you connect it to Mover.

    You could try this:

    Change speed in the code to 500000, same in the Arduino interface (or lower to allow the IDE to receive serial).
    Close Mover.
    Open the serial from the Arduino IDE.
    After calibration it should show a message with minimums and maximums.
    Tell me what it shows.
  5. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    Ok Thanks ,will check as you ask for !
    But it’s not the minimum switch , the actuator stays on the maximum switch !
    I changed the wiring to be like your drawing !
    I will try one more time to change the UP and DOWN level into code to start the calibration sequence with going first to the maximum limit switch .For my setup to hit first the maximum limit switch for calibration sequence the motor must turn CW !
  6. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,870
    Location:
    Portugal
    Balance:
    14,218Coins
    Ratings:
    +2,188 / 16 / -0
    My Motion Simulator:
    6DOF
    That's what the code expects.
    Alternatively maybe change the code in the calibration fuction:

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

    To

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

    It's just the signal of the maximum position.
    • Like Like x 1
  7. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    so i tested for tthe communication and below the result .
    The motor turns CW , hit the max switch , begin to turn CCW for the second switch but sudenly stops .The Motor doens't hit the minimum switch
    The information limit switch are following , see pic attached
    Is it correct ?
    Edit : forgot the first one 0 and 0 min= max
    Look at the second one min -15 and max +15

    Attached Files:

    Last edited: Apr 2, 2020
  8. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,870
    Location:
    Portugal
    Balance:
    14,218Coins
    Ratings:
    +2,188 / 16 / -0
    My Motion Simulator:
    6DOF
    Something is wrong
    15 is to low!
    Are you sure you have the hall sensors connected the right way?
    What motors do you have?
  9. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    I have no error from the driver and the speed during calibrating seems to be ok . I tested with speed 100 for calibration and it was for me correct .
    How could i check if they are well connected ?
    My motor see the pic attached.
    But we progress you say that 15 is wrong ;-)
    They are connected like this drawing , could you check your wiring .
    Yellow = HU = Hall 1 blue wire in your wiring
    Green =HV = Hall2 same green
    Blue = HW = Hall3 white wire in your wiring

    Attached Files:

  10. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    In your schematic you connected hall as follow and the driver .

    Wire blue = GPIO27 = HU = Hall 1
    Wire white = GPIO26 = HW = Hall 2
    Wire green = GPIO25 = HV = Hall3

    Ok Hall2 and Hall3 are inverted in my wiring i think will check and test
  11. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,870
    Location:
    Portugal
    Balance:
    14,218Coins
    Ratings:
    +2,188 / 16 / -0
    My Motion Simulator:
    6DOF

    I have to look at it, but colours are not the same!
    You should have 24 steps per revolution. In a 1605 scre thats almost 2400 for 100mm travel.

    So something is wrong in the step counting
  12. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    So i inverted the hall 2 and 3 and now i have min - 25 and max 25 .
    But sorry i have to tell you that i have not a ball screw like you . My pneumatic actuator has trapezoidal screw with 2 mm pitch . But 25 is not good also
  13. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    i setup 9600 bauds in program and arduino software , did it change the values ?
  14. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    To have a correct number it counts when he hits the max limit and during the complete stroke until he hits the minimum limit switch . He has to count haow many motor rotations between the 2 limit switches .
    But in my case as the calibration process stops after he hits the first max limit switch , it's normal that this number is completly wrong .
    I didn't achieve now to have this calibration process .
    First i have to get this calibration process complete ! No ?

    Ok i found the mistake for my wiring i forgot to take the one modified for 10k resistors and I was using your Flypt who definitely doesn't work .
    Last edited: Apr 3, 2020
  15. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    so yes now i 've got the great sequence and the values are below
    min -538 and max 538
    is it better ?

    Attached Files:

  16. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    Hi Flypt ,
    Some news .
    So now the calibration sequence is ok . Max and min and stop .
    Is it ok for the limit switch values ? min -538 Max 538
    I tried the strings one more time with mover but without succes . <255><255><Axis1a><Axis1a><Axis1a> or <255><255><Axis1a><<0><<0>
    the actuator doesn't want to move .
    I will check once my wiring.
  17. Adrian Culda

    Adrian Culda Member Gold Contributor

    Joined:
    Apr 3, 2020
    Messages:
    60
    Occupation:
    Jack of all, Master of a Few
    Location:
    Leduc, Alberta
    Balance:
    647Coins
    Ratings:
    +67 / 0 / -0
    Hey pmvcda,
    I went through your build thread and then read this one my heads about to explode LOL but I'm getting a ton of info. I hear Odrive is a tad bit of learning curve to figure out and setup but still not understanding how it works. Do i need an ESP module to control them or do they individually connect up to the PC ??

    Can you please chime in ??
  18. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    So i checked my wiring and didn't see something wrong but maybe there is something wrong , can't say more now.

    I always have the calibration which is for me as you describe , go max switch , back min switch and stop .
    The values i got always the same tested three times , min -561 and Max 561 Actuator 0 .
    The connection with Mover is ok . I can watch data send through the interface but no movement .
    Normally when connecting Mover the actuator should go to the middle position because that's the setup for the waiting data position.
  19. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,870
    Location:
    Portugal
    Balance:
    14,218Coins
    Ratings:
    +2,188 / 16 / -0
    My Motion Simulator:
    6DOF
    What is your travel and screw? (mm/rotation)

    Wait, sorry, 2mm/rotation
  20. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,870
    Location:
    Portugal
    Balance:
    14,218Coins
    Ratings:
    +2,188 / 16 / -0
    My Motion Simulator:
    6DOF
    If 100 mm travle, that's 50mm range
    50/2=25 turns 25*24steps=600 total steps

    It matches what you have

    You have the schematic I use right.
    And changed the number of actuators to 1 in the code?