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

4Dof-Controller code for arduino mega for AASD-15A and similar driver

Discussion in 'SimTools compatible interfaces' started by cubexxx, Mar 19, 2020.

  1. zhai1987

    zhai1987 Member

    Joined:
    Sep 7, 2021
    Messages:
    96
    Balance:
    320Coins
    Ratings:
    +11 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, AC motor
    brother. Thank you very much for your modification. There is no problem with flypt settings. Can you also modify simtools? Every time you change the game, it will return to the original point and drive it again, it will rise quickly!
  2. GerritSTI

    GerritSTI New Member

    Joined:
    Feb 10, 2021
    Messages:
    4
    Balance:
    - 23Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino
    Is there anyone who can help me with adding a home sensor in the arduino code?
    I would like to start up with it moving to a home sensor and then go 90 degrees.

    When connecting FLYpt and arduino it runs a long way.
  3. tatabrada

    tatabrada New Member

    Joined:
    Dec 17, 2022
    Messages:
    2
    Balance:
    - 20Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    3DOF
  4. d4m

    d4m New Member

    Joined:
    Nov 23, 2021
    Messages:
    14
    Balance:
    51Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    AC motor, Arduino, 4DOF
    I very much doubt it but you could ask Thanos about it since no pinout or source code is offered, just the hardware.
    I doubt it because the wiring from the AASD controller interface to Arduino would be quite different.
  5. tatabrada

    tatabrada New Member

    Joined:
    Dec 17, 2022
    Messages:
    2
    Balance:
    - 20Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    3DOF
    OK, thankyou. I didn't get the board yet ( and the soldering is not done :(), but as I could see on some pictures, wiring is very similar. Maybe I could adapt your code, but I am new to all this stuff and don't want to destroy something :)
  6. Nujj

    Nujj New Member

    Joined:
    Apr 16, 2016
    Messages:
    4
    Location:
    USA
    Balance:
    317Coins
    Ratings:
    +0 / 0 / -0
    I have been using flypt for the last six months with no issues using a windows 10 PC.

    I just built a new Win 11 PC and I am having lockup issues with the program.

    Any help would be appreciated,
  7. wingert

    wingert Active Member

    Joined:
    Aug 10, 2020
    Messages:
    112
    Balance:
    642Coins
    Ratings:
    +89 / 0 / -0
    My Motion Simulator:
    4DOF
    what are lockup issues ?
  8. JCM

    JCM New Member

    Joined:
    Nov 19, 2022
    Messages:
    8
    Location:
    France
    Balance:
    48Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF
    Great work.

    For a new rig that I am designing, I would need to tweak the code to control the servomotor's speed not their position.

    For example, lets say FlyPTmover sends some number representing 100% surge forward, then I would need the servo to spin at their max speed, say 3000 RPM clockwise

    Any idea how it could be done ? Thanks for your help
  9. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,307
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,490Coins
    Ratings:
    +5,109 / 18 / -0
    Disconnect the "pot" from the motor, and leave it centered, I believe that's all you have to do?
    Now the further the input is away from center the faster it will turn toward center.
    So maybe not much to edit in the code really.
    • Like Like x 1
  10. JCM

    JCM New Member

    Joined:
    Nov 19, 2022
    Messages:
    8
    Location:
    France
    Balance:
    48Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF
    Thanks for your help Yobuddy. I am unsure how to do that with those servo motors and their AASD15 drivers, which are connected to the Arduino.

    I am trying to wrap my head around the Arduino code written by @cubexxx and find an easy solution so that pulses are generated to mimic a speed proportional to the input sent by FlyPtmover.
  11. wingert

    wingert Active Member

    Joined:
    Aug 10, 2020
    Messages:
    112
    Balance:
    642Coins
    Ratings:
    +89 / 0 / -0
    My Motion Simulator:
    4DOF
    The AASD15 has according the manual different control modes, torque,speed and position. I suggest you have to take the speed instead position mode and find the proper signal maybe analog.Look at Pn158 description.
    • Like Like x 2
  12. wingert

    wingert Active Member

    Joined:
    Aug 10, 2020
    Messages:
    112
    Balance:
    642Coins
    Ratings:
    +89 / 0 / -0
    My Motion Simulator:
    4DOF
    look at 2.3.2 Speed, torque control wiring diagram, pin 25/13 shows a speed/torque analog directive +/- 10V.
    • Like Like x 2
  13. JCM

    JCM New Member

    Joined:
    Nov 19, 2022
    Messages:
    8
    Location:
    France
    Balance:
    48Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF
    Thank you so much Wingert for this. I had not thought of the AASD15 controller various modes to solve this. If the speed mode requires a +10/-10V analog directive, I am not sure how to program the Arduino to output this.

    I will experiment with this, thanks again
  14. JCM

    JCM New Member

    Joined:
    Nov 19, 2022
    Messages:
    8
    Location:
    France
    Balance:
    48Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF
    I could play with Pn158 parameter to bring the voltage requirement in the 0 to +5V range but then I believe I am stuck when it comes to generating a negative voltage with the Arduino ?
  15. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,307
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,490Coins
    Ratings:
    +5,109 / 18 / -0
    • Like Like x 1
  16. JCM

    JCM New Member

    Joined:
    Nov 19, 2022
    Messages:
    8
    Location:
    France
    Balance:
    48Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF
    Thank you, I will try this.

    Too bad there is no straightforward digital solution for speed control of the servo motor, only an analog one AFAICT
  17. wingert

    wingert Active Member

    Joined:
    Aug 10, 2020
    Messages:
    112
    Balance:
    642Coins
    Ratings:
    +89 / 0 / -0
    My Motion Simulator:
    4DOF
    I have just checked it with my spare parts.
    PN002 set to 1 speed mode , PN003=1 (motor enable ) analog Voltage on Pin 13/25 motor spins proportional in one direction , Voltage Reverse on Pin 13/25 Motor spins opposite direction.
    With no signal motor has even a idle spin with can be corrected with PN159.
    • Like Like x 1
  18. JCM

    JCM New Member

    Joined:
    Nov 19, 2022
    Messages:
    8
    Location:
    France
    Balance:
    48Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF
    Thank you so much Wingert for making the experiment. This speed control mode feature might well work for my needs. I will try and report.
  19. wh5220

    wh5220 New Member

    Joined:
    Jun 12, 2022
    Messages:
    1
    Balance:
    17Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Arduino, 4DOF
    Im trying to make your code work with 3 sfx100 actuators what string do i need to use ive tried every string i can think of or will this not work with 3 actuators?
  20. Krzysztof Dej

    Krzysztof Dej Active Member

    Joined:
    Jun 3, 2020
    Messages:
    311
    Location:
    Poland
    Balance:
    1,086Coins
    Ratings:
    +73 / 0 / -0
    My Motion Simulator:
    2DOF
    Hi I made 2dof sest with smc3 code for DC motors on arduino. I want to try this stepper motors but I'm totally newbie with this stuff and lack of English words sometimes so my 1 st questions is i can buy this cheap one and make some tests:
    https://a.aliexpress.com/_EJmbXCt
    Thanos is to expensive for me and I don't know is this motion type is for me. And how it's working how is noisy and how much my bills will rise with this type of motors so I want to make some tests