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

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,868
    Location:
    Portugal
    Balance:
    14,203Coins
    Ratings:
    +2,181 / 16 / -0
    My Motion Simulator:
    6DOF
    Are you using the latest code?
    It's this one: https://www.xsimulator.net/communit...hless-diy-actuators.10799/page-18#post-186795

    Give me some days, I need to update this thread...
  2. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    Yes i use your latest code .
  3. robjos1

    robjos1 Member

    Joined:
    Jun 17, 2018
    Messages:
    51
    Occupation:
    Flying about
    Location:
    United Kingdom
    Balance:
    30Coins
    Ratings:
    +39 / 0 / -0
    My Motion Simulator:
    6DOF
    You need to change these lines in the code:

    #define NUMBERACTUATORS 3

    for testing needs to be

    #define NUMBERACTUATORS 1

    If you are using just one actuator - this is contrary to the comment on this line

    Also check:

    #define UP HIGH // Define to set up direction as HIGH
    #define DOWN LOW // Define to set down direction as LOW

    You may need to reverse these.. Best of luck
    • Like Like x 2
  4. robjos1

    robjos1 Member

    Joined:
    Jun 17, 2018
    Messages:
    51
    Occupation:
    Flying about
    Location:
    United Kingdom
    Balance:
    30Coins
    Ratings:
    +39 / 0 / -0
    My Motion Simulator:
    6DOF
    Also run these handy test programs to test the switches

  5. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,868
    Location:
    Portugal
    Balance:
    14,203Coins
    Ratings:
    +2,181 / 16 / -0
    My Motion Simulator:
    6DOF
    Thank's @robjos1 ,

    Forgot about the one actuator.
    Direction might be correct, if it moves in the direction of the minimum switch when starting
  6. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    Thanks !

    Tested and i 've got the sequence calibration but as flypt described :

    I changed for one actuator and i changed the direction as you said define UP LOW and define DOWN HIGH

    Led blinks for 5 seconds before starting calibration
    - Actuator goes down looking for minimum
    - Actuator goes up looking for maximum
    - Actuator goes to the middle really fast (position zero) and waits for serial commands

    I haven't got the actuator which goes to the middle position . It still stays on the second switch and doens't go to the middle position .

    For the other program to test limit switch value did you use an esp32 because when compiling arduino software says that this program isn't for en esp32 .
  7. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,868
    Location:
    Portugal
    Balance:
    14,203Coins
    Ratings:
    +2,181 / 16 / -0
    My Motion Simulator:
    6DOF
    Wait, I'm inducing you in error.
    Sequence is (in new code):

    Go to max
    Got min
    Stop at min

    After the sequence, can you send positions to it and does it move?
  8. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    Ok that means that the sequence is correct right ?
    ok i will test this after , could you point me a post where i can watch how to send positions pls ?

    Edit : but for exemple if i go out of the min position by rotating the motor shaft with my hand ( psu switched off / usb esp connected). and after i switch on the motor is looking for a position (i don't know which one ) at full speed and limit switch won't stop the motor (emergency stop ) . i don't know if i' m described what happened but i was surprised .
    Last edited: Apr 1, 2020
  9. robjos1

    robjos1 Member

    Joined:
    Jun 17, 2018
    Messages:
    51
    Occupation:
    Flying about
    Location:
    United Kingdom
    Balance:
    30Coins
    Ratings:
    +39 / 0 / -0
    My Motion Simulator:
    6DOF
    I have this as well but it as soon as connected to Mover it all works fine. Try connecting to mover and it should re calibrate and move to the centre fine.

    Just to note the switch test code is simply to check the switches are working - which it appears they are otherwise the actuator would not reverse/stop on the switch so disregard this for now. The code may be for arduino but only requires a few minor syntax changes to compile on the ESP
    • Like Like x 1
  10. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    Thanks ! will connect Mover to test !
  11. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,868
    Location:
    Portugal
    Balance:
    14,203Coins
    Ratings:
    +2,181 / 16 / -0
    My Motion Simulator:
    6DOF
    @benmax and @robjos1

    The ESP32 code, re calibrates the actuator each time you touch the limit switches.

    When you make the first calibration, the code knows where is zero and where is maximum in steps.
    Since we could loose some counts, the code tests the switches, and when they are pressed, it corrects the position.

    So if you press the maximum and the actuator is not at maximum, the code is going to think it was at maximum and since he want to go to zero, he moves fast to zero thinking it's correct.
    So, don't touch the switches!

    In the download of Mover, inside the examples folder you have some of my examples, you can open them and see the serial string and settings.
    • Like Like x 1
  12. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    Thx for these great clarifications !!

    I’m a real beta tester ! I test all i can test lol ahah i know it’s not supposed to do such stupid things !
  13. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    Just connected Mover but after the calibration setup , when the second limit switch was pushed the motor goes at the full speed but not in the middle position but he continues after the limit switch . it's like the stroke is outside the limit switch ...
    There is something also not good !
    I could also change the limit switch , invert physically their position !
  14. Flymen

    Flymen Flymen Gold Contributor

    Joined:
    May 19, 2018
    Messages:
    335
    Location:
    Montreal, Canada
    Balance:
    2,415Coins
    Ratings:
    +191 / 2 / -0
    My Motion Simulator:
    DC motor, 6DOF
    Hi ,
    I would like to do some ajustements (P.I.D) on my Rig because some actuators oscillates again a little bit .
    With your code , I have only the option with P.I.D or I can change something elses like SMc3 ( Fpwm ,F p.i.d , PWM rev, Dead Zone ) .
    Thanks !
  15. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    Hi ,
    I will test switch off the limit switch mini & maxi , because my setup is not correct according logical actuator movement !
    For my mounting i put the mini limit switch when the actuator is a his maximum stroke , so it’s not correct and it’s the reason why it doesn’t work.
    I will make a try and report here !
    Finally I just have to change the wiring lol i’m crazy !
    Last edited: Apr 2, 2020
  16. 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 changed my wiring to make it matching to the drawing !
    I had to change the define UP and DOWN and the new sequence is :

    - test the min
    - test the Max
    -stop at the Max after went a little bit out of the Max limit switch direction inside the stroke

    It’s where I am , tried to connect mover and it works but can’t move the actuator .Used as rig the actuator ( new feature) . Connection with board is ok ( esp 1 for 3 axis but only one existing Axis1a )

    any help or advice thx !
  17. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,868
    Location:
    Portugal
    Balance:
    14,203Coins
    Ratings:
    +2,181 / 16 / -0
    My Motion Simulator:
    6DOF
    Use this settings:

    Code:
    // ===========================
    // 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

    In the string, send the 3 actuators, but since you have only one, send this: <255><255><Axis1a><Axis1a><Axis1a> or <255><255><Axis1a><0><0><0><0>
  18. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    Tested both without succes .

    For the second string it's 4 <0><0><0><0> not only 3 <0><0><0> ?

    in the Mover 295 when you choose linear actuator from DOF I setup bit output 15 like your 6dof rig is it correct ?

    In this window linear actuator from dof there is no image and when you click on the arrow to view other image like in the 6 dof for the three images to watch dimensions , an error occurs '' unhandled exception blabla ''

    Edit : in fact the motor go forward and reverse continuously on the max limit switch and jerky ( not smooth )
    Last edited: Apr 2, 2020
  19. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,868
    Location:
    Portugal
    Balance:
    14,203Coins
    Ratings:
    +2,181 / 16 / -0
    My Motion Simulator:
    6DOF
    Yes, use 15 bits
    Yes, images are still missing... forgot to hide the buttons. Amateurish work. ;)

    The values are 15 bits, that requires two bytes, tha's why we send two zeros for each unused value.
    So the string should be:
    <255><255><Axis1a><0><0><0><0>

    Mover allows you to use also this:
    <255><255><Axis1a><<0><<0>

    The two << means two bytes for the described number

    Is speed correct? Code should match what you have in the serial.
  20. benmax

    benmax Active Member Gold Contributor

    Joined:
    Oct 15, 2013
    Messages:
    188
    Balance:
    1,551Coins
    Ratings:
    +59 / 0 / -0
    My Motion Simulator:
    2DOF
    #define CALIBRATION_SPEED 50

    As i said the motor oscillate very slow and like step by step around the limit switch . a few step CW hits the limit switch , reverse CCW .
    Now playing with the rig with the slider (actuator test ) i can stop the oscillation , but the actuator doesn't go to the middle stroke .
    My actuator has 100 mm stroke could you send me how you will setup such an actuator .