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

DC Motor Control Accuracy.

Discussion in 'DIY Motion Simulator Building Q&A / FAQ' started by SIN3R6Y, Feb 16, 2018.

  1. SIN3R6Y

    SIN3R6Y New Member

    Joined:
    Feb 7, 2018
    Messages:
    1
    Location:
    Ohio
    Balance:
    137Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    6DOF
    So I've started my own 6DOF Stewart style project, most of the parts have still yet to arrive. I'm trying to plan out how to program the Arduino for controlling these motors with a Sabertooth controller.

    I'm assuming SimTools outputs a fixed position value per motor, for example something along the lines of a value between 0 and 255 with 127 being center position.

    Using limit switches and 360 potentiometers my idea is to have the Arduino test for top an bottom positions using the limit switches as end point points, then record the maximum and minimum values of the pot in memory as a reference for full bottom and full top. So something like full top / 2 would be theoretical center.

    The immediate issues that come to mind are debouncing the limit switches, which is likely solvable via a few ms delay on interrupt, and handling motor drift. Assuming the motor just dead stops as soon as you cut power is unwise, in the real world it will likely drift a bit. This can be an issue as the Arduino will try to hit a specific position point which the motor will likely overshoot by a very small amount causing the Arduino to pulse the motor back an forth between small values trying to get an exact position. How do you guys handle this? Adding a small error threshold?

    Secondly, motor ramping curves. Surely for small changes in position applying full power to a motor is not the best approach. I would imagine the right idea is to have some kind of ramping curve based of percent change in position?

    As a side note, dampers may help quite a bit with motor drift perhaps?
    Last edited: Feb 16, 2018
  2. bruce stephen

    bruce stephen Hammer doesnt fix it, must be electrical

    Joined:
    Jun 7, 2015
    Messages:
    1,286
    Occupation:
    general contractor
    Location:
    michigan
    Balance:
    9,110Coins
    Ratings:
    +1,237 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF