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

    minsu New Member

    Joined:
    Feb 9, 2019
    Messages:
    4
    Balance:
    94Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    Arduino
    Sure. You don't have responsibility about them.
    I wondered if the 3D printed parts worked well.:thumbs
  2. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,532 / 17 / -0
    My Motion Simulator:
    6DOF
    Just received this on the mail:

    WP_20190212_12_13_49_Pro.jpg

    Expect some changes soon.
    Not only in hardware, but also on the interface... ;)
    • Like Like x 2
  3. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    Is that for an all in one controller of some sort ?
  4. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,532 / 17 / -0
    My Motion Simulator:
    6DOF
    Well, the idea is to replace both ESP32. That way, I can calculate speed on the board instead of the interface.
    After testing a new code, with speed calculation on the ESP32 boards, everything seems smoother, but since there's no connection between both boards, I can't calculate speed as I wished.
    It's possible to connect both, but I'm feeling lazy for that, and the STM32 opens new opportunities.
    I might add wind and if possible seat flaps (at the speed I implement things, it will take some time...). Let's see what is available after controlling the hexapod.

    By the way, this is the code I tested with the ESP32:
    Code:
    // ============================
    // DIY 6DOF Motion Sim by FlyPT
    // ============================
    // SimTools2 ESP32 code to control actuators
    // Actuators use brushless motors controlled by BLDC8015A drivers
    // Position is obtained from internall hall sensors
    // This code is made to handle 3 actuators in one board and also made to support 6 in two boards.
    //
    // This code uses the FlyPT Hexapod Interface in standard serial mode without receiving speed or sending current position.
    // It just receives position and everything will be handled internally.
    // So, it's also possible to use this directly with Simtools.
    
    
    
    // ==================================
    // Current: Version 7 from 11/02/2019
    // ==================================
    
    
    
    // ==================================
    // SimTools2 configuration should be:
    // ==================================
    // Interface settings:
    // Interface Type: Serial
    // ComPort: The one used by your ESP32
    // BitsPerSec: 115200 (You can change the define to use another speed)
    // Data Bits: 8
    // Parity: None
    // Stop Bits: 1
    // Output - Bit Range: 10
    // Output - Type: Binary
    // Startup - Output: -
    // HW Start: -
    // Interface output for board 1: [1<Axis1a>][2<Axis2a>][3<Axis3a>]
    // Interface output for board 2: [4<Axis4a>][5<Axis5a>][6<Axis6a>]
    // Output Rate: 10ms
    // Shutdown - Output: -
    // HW Stop: -
    
    
    
    // =======
    // Defines
    // =======
    #define SERIAL_SPEED 115200 // Define to set up the serial speed comunication
    #define CALIBRATION_SPEED 50 // Speed used to search for minimum and maximum values
    #define UP HIGH // Define to set up direction as HIGH
    #define DOWN LOW // Define to set down direction as LOW
    #define PWM_RESOLUTION 8
    #define PWM_FREQUENCY 5000
    #define LIMITS_PIN 0           // Pin to capture position from pot wich defines the limits
    #define HALL_1_PIN 1           // Pin used for hall 1 interrupt
    #define HALL_2_PIN 2           // Pin used for hall 2 interrupt
    #define HALL_3_PIN 3           // Pin used for hall 3 interrupt
    #define LAST_ANGLE 4           // Last angle that was detected
    #define LAST_SUM 5             // Last sum to know last direction it took
    #define DIRECTION_PIN 6        // Pin to se direction
    #define SPEED_PIN 7            // Pin to set speed with PWM
    #define PWM_CHANNEL 8          // Channel used to generate PWM
    #define MINIMUM_POSITION 9     // Minimum position
    #define MAXIMUM_POSITION 10    // Maximum position
    #define CURRENT_POSITION 11    // Current position
    #define PRETENDED_POSITION 12  // Pretended position
    #define P_PID 13               // P from PID
    #define I_PID 14               // I from PID
    #define D_PID 15               // D from PID
    #define INTEGRATED_ERROR 16    // Sum of differences between pretended and current position
    #define LAST_ERROR 17          // Last difference between pretended and current position
    #define SPEED 18               // Speed of motor rotation
    #define FOUND 19               // For help. Used for example in actuator calibration
    #define NUMBERACTUATORS 3      // Number of actuators (for one board)
    #define P 256
    #define I 0
    #define D 100
    
    
    
    // ======================
    // Actuators information:
    // ======================
    // 0  - LIMITS_PIN          - Pin to capture position from pot
    // 1  - HALL_1_PIN          - Pin used for hall 1 interrupt
    // 2  - HALL_2_PIN          - Pin used for hall 2 interrupt
    // 3  - HALL_3_PIN          - Pin used for hall 3 interrupt
    // 4  - LAST_ANGLE          - Last angle that was detected
    // 5  - LAST_SUM            - Last sum to know last direction it took
    // 6  - DIRECTION_PIN       - Pin to se direction
    // 7  - SPEED_PIN           - Pin to set speed with PWM
    // 8  - PWM_CHANNEL         - Channel used to generate PWM
    // 9  - MINIMUM_POSITION    - Minimum position
    // 10 - MAXIMUM_POSITION    - Maximum position
    // 11 - CURRENT_POSITION    - Current position
    // 12 - PRETENDED_POSITION  - Pretended position
    // 13 - P_PID               - P from PID
    // 14 - I_PID               - I from PID
    // 15 - D_PID               - D from PID
    // 16 - INTEGRATED_ERROR    - Sum of differences between pretended and current position
    // 17 - LAST_ERROR          - Last difference between pretended and current position
    // 18 - SPEED               - Speed of motor rotation
    // 19 - FOUND               - Used as help for calibraion
    static int actuator[3][20] ={   {  4, 27, 26, 25,  5,  0, 32, 33,  0, -1, -1, 0, 0, P, I, D, 0, 0, 0, 0 },
                                    { 36, 35, 34, 39,  5,  0, 18,  5,  1, -1, -1, 0, 0, P, I, D, 0, 0, 0, 0 },      
                                    { 15, 23, 22, 21,  5,  0, 19, 17,  2, -1, -1, 0, 0, P, I, D, 0, 0, 0, 0 } };                    
    static int bufferCurrent = 0; // To hold current read fom SimTools command
    static int bufferCount = -1; // To hold position in bufferCommand array
    static int bufferCommand[5] = {0}; // To hold command info from SimTools
    // Maps to get increment off position from comparing previous hall sensor state with current state
    // Vertical, the new value, horizontal, the old one
    // Stores for 0 and 7, althought they should not ocurr, digital read might get them. They are ignored with zero change.
    // State sequence going up
    // 5=101
    // 1=001
    // 3=011
    // 2=010
    // 6=110
    // 4=100
    // First index for new state, second for old state ([new][old])
    static int slowSpeedUp[8][8] =      { { 0,  0,  0,  0,  0,  0,  0, 0},
                                          { 0,  0, -2, -1,  2,  1,  3, 0},
                                          { 0,  2,  0,  1, -2,  3, -1, 0},
                                          { 0,  1, -1,  0,  3,  2, -2, 0},
                                          { 0, -2,  2,  3,  0, -1,  1, 0},
                                          { 0, -1,  3, -2,  1,  0,  2, 0},
                                          { 0,  3,  1,  2, -1, -2,  0, 0},
                                          { 0,  0,  0,  0,  0,  0,  0, 0} };
                      
    static int slowSpeedDown[8][8] =    { { 0,  0,  0,  0,  0,  0,  0, 0},
                                          { 0,  0, -2, -1,  2,  1, -3, 0},
                                          { 0,  2,  0,  1, -2, -3, -1, 0},
                                          { 0,  1, -1,  0, -3,  2, -2, 0},
                                          { 0, -2,  2, -3,  0, -1,  1, 0},
                                          { 0, -1, -3, -2,  1,  0,  2, 0},
                                          { 0, -3,  1,  2, -1, -2,  0, 0},
                                          { 0,  0,  0,  0,  0,  0,  0, 0} };
    
    
                                                      
    // ==============
    // Initialization
    // ==============
    void setup()
    {
      // Setup communication
      Serial.begin(115200, SERIAL_8N1);
    
      for(int n=0;n<NUMBERACTUATORS;n++)
      {
        // Initialize pins
        pinMode(actuator[n][LIMITS_PIN], INPUT);
        pinMode(actuator[n][HALL_1_PIN], INPUT);
        pinMode(actuator[n][HALL_2_PIN], INPUT);
        pinMode(actuator[n][HALL_3_PIN], INPUT);
        pinMode(actuator[n][DIRECTION_PIN], OUTPUT);
        pinMode(actuator[n][SPEED_PIN], OUTPUT);
    
        // Setup PWM
        ledcSetup(actuator[n][PWM_CHANNEL], PWM_FREQUENCY, PWM_RESOLUTION);
        ledcAttachPin(actuator[n][SPEED_PIN], actuator[n][PWM_CHANNEL]);
        ledcWrite(actuator[n][PWM_CHANNEL], 0);
      }
    
      // Initialize pin to light up onboard led
      pinMode(2, OUTPUT);
      // Countdown of 5 seconds before calibration, making internal led flash at half a second
      for(byte n=5; n>0; n--)
      {
        delay(500);
        digitalWrite(2, HIGH);
        delay(500);
        digitalWrite(2, LOW);
      }
      digitalWrite(2, LOW);
    
      // Calibrate actuators, searching for minimums and maximums
      calibrate();
      // Put actuators in the middle after calibration
      for(int n=0;n<NUMBERACTUATORS;n++) actuator[n][PRETENDED_POSITION]=actuator[n][MAXIMUM_POSITION]/2;
      // Create thread that gets position from hall sensors to run in the core 0
      // It will run in paralell with the main loop that uses core 1 by default
      xTaskCreatePinnedToCore(
        TaskUpdatePositions,  // Task function
        "UpdatePositions",    // Name    
        10000,                // Stack size
        NULL,                 // Task input parameter
        1,                    // Priority of the task
        NULL,                 // Task handle
        0);                   // Core
    }
    // ======================
    // Update actuator action
    // ======================
    // Here we calculate the PID depending of desired vs current position and send respective signal to motor controller
    // Definitions to avoid repeated definitions in functions
    static int limitValue=1023;
    static int error=0;
    static int p=0;
    static int i=0;
    static int d=0;
    void updateActuator(byte n)
    {
      // Calculate pid
      // =============
      error=actuator[n][PRETENDED_POSITION]-actuator[n][CURRENT_POSITION];
      //  actuator[n][INTEGRATED_ERROR]+=error;  // <<<<<<< commented for speed, not in use (i from pid)
      p=actuator[n][P_PID] * error;
      //  i=actuator[n][I_PID] * constrain(actuator[n][INTEGRATED_ERROR], -100, 100); // <<<<<<< commented for speed, not in use (i from pid)
      d=actuator[n][D_PID] * (error - actuator[n][LAST_ERROR]);
      actuator[n][LAST_ERROR]=error;
      //  actuator[n][SPEED]=constrain((p+i+d)/100, -255, 255);  // <<<<<<< commented for speed, not in use (i from pid)
      actuator[n][SPEED]=FlyPTConstrain((p+d)>>7, -255, 255); // 2 4 8 16 32 64 128 Divide by 128
      // Apply changes to motor controller
      // =================================
      if(actuator[n][SPEED]>0)
      {
        ledcWrite(actuator[n][PWM_CHANNEL], actuator[n][SPEED]);
        digitalWrite (actuator[n][DIRECTION_PIN], UP);
      }
      else
      {
        ledcWrite(actuator[n][PWM_CHANNEL], -actuator[n][SPEED]);
        digitalWrite (actuator[n][DIRECTION_PIN], DOWN);
      }
      // Check limits
      // ============
      // Adjust position if minimum or maximum switch is activated in case of a drift in position calculation
      // WITH A FIXED RESISTANCE IT WILL BE CHANGE TO A RANGE WITH ONLY 1 READ and 2 IF'S
      limitValue=(analogRead(actuator[n][LIMITS_PIN])+analogRead(actuator[n][LIMITS_PIN])+analogRead(actuator[n][LIMITS_PIN])+analogRead(actuator[n][LIMITS_PIN]))>>2;
      // If they are actuated, recalibrate position
      if(limitValue>=4095) actuator[n][CURRENT_POSITION]=actuator[n][MAXIMUM_POSITION];    // We are at maximum position
      else if (limitValue<=0) actuator[n][CURRENT_POSITION]=actuator[n][MINIMUM_POSITION]; // We are at minimum position
    }
    
    // ============================================================================================================================
    // REPLACEMENT FOR CONSTRAIN
    // ============================================================================================================================
    // Problems using constrain with negative numbers and serial.read ... ???
    int FlyPTConstrain(int value, int low, int high)
    {
      return (value < low) ? low : (value > high) ? high : value;
    }
    
    // ====================================
    // Update current position of actuators
    // ====================================
    // Definitions to avoid repeated definitions in functions
    static int angle=0;
    void updatePositions(byte n)
    {
        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]=slowSpeedUp[angle][actuator[n][LAST_ANGLE]];
        else actuator[n][LAST_SUM]=slowSpeedDown[angle][actuator[n][LAST_ANGLE]];
        actuator[n][LAST_ANGLE]=angle;
        actuator[n][CURRENT_POSITION]+=actuator[n][LAST_SUM];
    }
    // =============================
    // Get information from SimTools
    // =============================
    void getSimToolsCommands()
    {
      // Look for start and finish of a command on the serial
      // When we have a command send it for analyze
      if (Serial.available()) // Using if instead of while to avoid the code to stop here for to long
      {
        bufferCurrent = Serial.read();
        if (bufferCount == -1)
        {
          if (bufferCurrent != '[') bufferCount = -1;
          else bufferCount = 0;
        }
        else
        {
          bufferCommand[bufferCount] = bufferCurrent;
          bufferCount++;
          if (bufferCount > 3)
          {
            if (bufferCommand[3] == ']') analyzeSimToolsCommand();
            bufferCount = -1;
          }
        }
      }
    }
    // ================================
    // Analyze command sent by SimTools
    // ================================
    void analyzeSimToolsCommand()
    {
      // Analyze command, see if it's a command and wich actuator is affected
      // Since we need to use 2 boards for 6 actuators, there are two cases
      // So board 1 is used for actuator 1, 3 and 5 and board 2 for 2, 4 and 6
      // For board 1, actuators 1, 3 and 5
      // actuator 1 = index 0
      // actuator 3 = index 1
      // actuator 5 = index 2
      // For board 2, actuators 2, 4 and 6
      // actuator 2 = index 0
      // actuator 4 = index 1
      // actuator 6 = index 2
      switch (bufferCommand[0])
      {
        case '1':
        case '4':
          actuator[0][PRETENDED_POSITION] = map((bufferCommand[1] * 256) + bufferCommand[2], 0, 1023, actuator[0][MINIMUM_POSITION], actuator[0][MAXIMUM_POSITION]);
          break;
        case '2':
        case '5':
          actuator[1][PRETENDED_POSITION] = map((bufferCommand[1] * 256) + bufferCommand[2], 0, 1023, actuator[1][MINIMUM_POSITION], actuator[1][MAXIMUM_POSITION]);
          break;
        case '3':
        case '6':
          actuator[2][PRETENDED_POSITION] = map((bufferCommand[1] * 256) + bufferCommand[2], 0, 1023, actuator[2][MINIMUM_POSITION], actuator[2][MAXIMUM_POSITION]);
          break;
        default:
          return;
          break;
      }
    }
    // =========
    // Calibrate
    // =========
    void calibrate()
    {
      // Move all actuators away from the minimum until we have no minimum switch return
      // ===============================================================================
      for(int n=0;n<NUMBERACTUATORS;n++)
      {
        digitalWrite (actuator[n][DIRECTION_PIN],UP);
        ledcWrite(actuator[n][PWM_CHANNEL], CALIBRATION_SPEED);
        actuator[n][FOUND]=false;
      }
      int found=0;
      while (found<NUMBERACTUATORS)
      {
        for(int n=0;n<NUMBERACTUATORS;n++)
        {
          // Read limit switch position (we are looking for more than zero)
          // We read more than one time to be sure (4 times in this case)
          if(!actuator[n][FOUND] && analogRead(actuator[n][LIMITS_PIN])>0 && analogRead(actuator[n][LIMITS_PIN])>0 && analogRead(actuator[n][LIMITS_PIN])>0 && analogRead(actuator[n][LIMITS_PIN])>0)
          {
            ledcWrite(actuator[n][PWM_CHANNEL], 0);
            actuator[n][FOUND]=true;
            found++;
          }
        }
      }
    
      // 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)
          // We read more than one time to be sure (4 times in this case)
          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][MINIMUM_POSITION]=0;
            actuator[n][CURRENT_POSITION]=0;
            actuator[n][FOUND]=true;
            found++;
          }
        }
      }
      // Search for maximums
      // ===================
      for(int n=0;n<NUMBERACTUATORS;n++)
      {
        digitalWrite (actuator[n][DIRECTION_PIN],UP);
        ledcWrite(actuator[n][PWM_CHANNEL], CALIBRATION_SPEED);
        actuator[n][FOUND]=false;
      }
      found=0;
      while (found<NUMBERACTUATORS)
      {
        for(int n=0;n<NUMBERACTUATORS;n++)
        {
          // Update position of actuator
          updatePositions(n);
          // Read limit switch position (we are looking for big value 4095)
          if(!actuator[n][FOUND] && (analogRead(actuator[n][LIMITS_PIN])+analogRead(actuator[n][LIMITS_PIN])+analogRead(actuator[n][LIMITS_PIN])+analogRead(actuator[n][LIMITS_PIN]))/4>=4095)
          {
            ledcWrite(actuator[n][PWM_CHANNEL], 0);
            updatePositions(n);
            actuator[n][MAXIMUM_POSITION]=actuator[n][CURRENT_POSITION]/2;
            actuator[n][MINIMUM_POSITION]=-actuator[n][MAXIMUM_POSITION];
            actuator[n][FOUND]=true;
            found++;
          }
        }
      }
    }
    // =========
    // Main loop
    // =========
    // Here we get the simtools commands and make the actuator move
    void loop()
    {
        getSimToolsCommands();
        for(int n=0;n<NUMBERACTUATORS;n++) updateActuator(n);
    }
    // ============================
    // Update positions thread loop
    // ============================
    // This thread updates the actuators positions reading the hall sensors
    void TaskUpdatePositions(void * parameter)
    {
      while (true)
      {
        delay(1); // To give ESP32 interrupts a chance to run or they will generate a boot
        for(int n=0;n<NUMBERACTUATORS;n++) updatePositions(n);
      }
    }
    
    This code works like using SMC.
    We just send the pretended position of the actuator and PID is handled on the ESP boards.
    Serial settings on the interface/Simtools, should be:

    Sem nome.jpg

    I will add this solution on the first page of the thread when I can.
    • Informative Informative x 2
    • Like Like x 1
    • Creative Creative x 1
  5. hannibal

    hannibal Active Member

    Joined:
    Sep 29, 2018
    Messages:
    677
    Balance:
    4,490Coins
    Ratings:
    +297 / 4 / -0
    My Motion Simulator:
    6DOF
    just downloaded your 3d printer plans for your actuator accessories parts... thank you <3
    • Like Like x 1
  6. hannibal

    hannibal Active Member

    Joined:
    Sep 29, 2018
    Messages:
    677
    Balance:
    4,490Coins
    Ratings:
    +297 / 4 / -0
    My Motion Simulator:
    6DOF
    may i ask what your range of effective actuator travel? what is the distance between your limit switches? and when you use games, what percent of the range the game actually travels from?
  7. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,532 / 17 / -0
    My Motion Simulator:
    6DOF
    My total mechanical travel is 450 mm.
    But I loose near 35 mm on top and bottom before activating the switches (could be less).
    Since we don't want to activate switches, I remove around 5 mm top and bottom (by software).
    So total travel is 370 mm or 185 mm to each side, from the middle.

    Until now, I only used it for cars, but I would say that:
    -For racing games I use small travels and more aggressive movements.
    -For air planes, longer travels and softer movements.

    Having more travel available is better, but cost increases.
    When we compose all movements to produce a pose, you reach limits really fast.
    While Yaw can be near 80º departing from middle position on all actuators, it might be reduced to 10º when you have sway + heave + pitch...

    You can test it with the interface I made. (https://www.xsimulator.net/communit...face-for-linear-and-rotating-actuators.12859/)
    -Select linear actuators
    -Put the dimensions (there's actuator range in there, but you need others)
    -On the main screen, use big pose ranges to let actuators reach range limit
    -Uncheck the "Stay in last possible pose" to see the 3D view moving
    -Now try to move the sliders.

    Sem nome.jpg

    If you receive the "POSE BEYOND LIMITS" message, it's because we are requesting an actuator position beyond the range we have.
    Look at actuators output and you can see in red the actuators that go beyond the range (in the picture, range was 180 mm).
    • Informative Informative x 1
    • Friendly Friendly x 1
  8. 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
    Hi ,
    Need more info of your problem you had !!!
    On my Rig , now that I have more load with all stuff on it , some drive give me some faults ( red light on my drive) because I have a lot EMF or regeneration problem ! MY QUESTION IS : Can I do the same thing as you ( diode) or I must put a shunt regulator ?
    Thanks!

    Info that I found from Advanced Motion compagny ;

    During motor deceleration or a downward motion of the motor load, conversion of the system’s mechanical
    energy (kinetic and potential) will be regenerated via the servo amplifier back onto the supply in the form of
    electrical energy.
    This regenerative process can charge the capacitors in the power supply to potentially dangerous voltages
    or voltages that may cause an amplifier over-voltage shutdown. Consequently, power supplies should have
    sufficient capacitance to absorb this energy without causing an over-voltage fault. If it is not practical to
    supply enough capacitance, use of a "shunt regulator" may be necessary to dissipate the kinetic and
    potential energy of the load. The shunt regulator is connected to the DC power supply to monitor the
    voltage. When a preset trip voltage is reached, a power resistor R is connected across the DC power
    supply by the shunt regulator circuit to discharge the power supply capacitor. The electric energy, stored in
    the capacitor, is thereby transformed into heat (I2R).

    web info from Advanced Motion ( see section Regeneration) :

    We have a application note 009 that works you through diagnosing a red LED. https://info.a-m-c.com/acton/attachment/33817/f-0035/0/-/-/-/-/AMC_AppNote_009.pdf

    images.png
    Last edited: Mar 9, 2019
  9. hannibal

    hannibal Active Member

    Joined:
    Sep 29, 2018
    Messages:
    677
    Balance:
    4,490Coins
    Ratings:
    +297 / 4 / -0
    My Motion Simulator:
    6DOF
    most appreciated reply. 385mm is very good resolution!
    i only can hope that sometime this year i can use your software!

    reading your post about servos and regenerative feedback.. i dont know..
    it seems like pots and motors seem much simpler and easier than servo systems..
    but obviously its nice not to have a pulley in the design with the pot...
  10. luky_90

    luky_90 Member

    Joined:
    Mar 3, 2016
    Messages:
    106
    Location:
    Italy
    Balance:
    276Coins
    Ratings:
    +16 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    hello guys, I found a motor with integrated driver, with overload protections, overcurrents and overheating, the 8 wires are not as shown in the diagram shown here but there are 6 can someone help me to understand the connections?
    1Pin: Red: positive power supply
    2Pin: black: negative power supply
    3Pin: Blue: + 5v analog potentiometer
    4Pin: Green: speed signal
    5Pin: White: GND analog potentiometer
    6Pin: Yellow: rotation inversion
  11. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,532 / 17 / -0
    My Motion Simulator:
    6DOF
    Need a reference of that motor. It's impossible to say anything with just that info.
    • Agree Agree x 1
  12. Ryan Tanto

    Ryan Tanto New Member

    Joined:
    Jan 21, 2019
    Messages:
    1
    Balance:
    89Coins
    Ratings:
    +0 / 0 / -0
    Hi, FlyPT. Do you happen to have the non-potentiometer 3d files?

    Thanks,
    Ryan
  13. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,532 / 17 / -0
    My Motion Simulator:
    6DOF
    No, never made them. Still using the same parts.
  14. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,532 / 17 / -0
    My Motion Simulator:
    6DOF
    Sorry, missed your post.
    I'm using one diode between controllers and PSU.
    Idea is to put one between motor and controller. Don't know what is going to happen... They will heat up, but not as much as the single one I have.

    The best solution is to use the batteries, but expensive.
  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
    Yes , Batterie will be expensive too for me ! I wil buy one of those SRST80 and see what happen if it good or no for my case .
    I send you this info from (Advanced Motion ) who tell this :

    Hello Eric,
    If your issues are happening during regeneration I would recommend using a shunt regulator. You can place a fuse in the DC mains, but in general we do not recommend a diode in series with it. The fuse should be a slow blow fuse rated for the max power of the lowest power device in the system (power supply, drive, or motor). For the diode we don’t recommend it because it would first need to be a giant diode to handle up to 1.2KW continuous, and also it is going to effectively cut off the power supply capacitance from the drive capacitance during regeneration, causing an unclamped voltage to rise faster.

    For a shunt regulator that clamps at 80VDC please take a look at the SRST80 which can dissipate up to 95W.
    https://www.a-m-c.com/products/?page=product&id=SRST80
    • Like Like x 1
  16. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,621Coins
    Ratings:
    +1,835 / 32 / -1
    By definition any suitable motor with a position feedback sensor and a closed loop control mechanism is a servo motor. It's just some types are more expensive than others and some types do a better job than others. But totally with you about not wanting to use a pulley.
    • Like Like x 1
    Last edited: Mar 14, 2019
  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
    I found this one ... good for 3 drive and less expensive :
    https://www.applied-motion.com/products/accessories/rc880
    • Like Like x 1
  18. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,532 / 17 / -0
    My Motion Simulator:
    6DOF
  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
  20. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    2,158
    Location:
    Portugal
    Balance:
    15,264Coins
    Ratings:
    +2,532 / 17 / -0
    My Motion Simulator:
    6DOF
    Yes, can forget them...
    One day I will get the batteries.