Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
custom build
11-11-2019, 12:31 PM (This post was last modified: 11-11-2019 01:28 PM by dmkmedia.)
Post: #1
Question custom build
am doing a custom build made from 20x20 ali extrution with more powerfull motors but when i set it going its really overcompensates and falls over whats wrong
image included

[Image: rGUuC9X]
image url https://imgur.com/a/rGUuC9X
Find all posts by this user
Quote this message in a reply
11-11-2019, 05:59 PM
Post: #2
RE: custom build
Try increase your #define KD_RAISEUP . I needed to double mine
Find all posts by this user
Quote this message in a reply
11-12-2019, 05:23 AM (This post was last modified: 11-12-2019 10:25 AM by dmkmedia.)
Post: #3
RE: custom build
(11-11-2019 05:59 PM)justjason Wrote:  Try increase your #define KD_RAISEUP . I needed to double mine

thanks i set it to #define KD_RAISEUP 0.32
from 0.16 and still the same

its just so hard to get to balance and when i do get it steady and let go it just falls on its face a few second later





my setup code is

Code:
// Uncomment this lines to connect to an external Wifi router (join an existing Wifi network)
//#define EXTERNAL_WIFI
//#define WIFI_SSID "YOUR_WIFI"
//#define WIFI_PASSWORD "YOUR_PASSWORD"
//#define WIFI_IP "192.168.1.101"  // Force ROBOT IP
//#define TELEMETRY "192.168.1.38" // Tlemetry server port 2223

#define TELEMETRY "192.168.4.2" // Default telemetry server (first client) port 2223

// NORMAL MODE PARAMETERS (MAXIMUN SETTINGS)
#define MAX_THROTTLE 480
#define MAX_STEERING 130
#define MAX_TARGET_ANGLE 8

// PRO MODE = MORE AGGRESSIVE (MAXIMUN SETTINGS)
#define MAX_THROTTLE_PRO 680   // Max recommended value: 860
#define MAX_STEERING_PRO 250   // Max recommended value: 280
#define MAX_TARGET_ANGLE_PRO 20   // Max recommended value: 32

// Default control terms for EVO 2
#define KP 0.20      
#define KD 0.10    
#define KP_THROTTLE 0.7
#define KI_THROTTLE 0.4
#define KP_POSITION 0.06  
#define KD_POSITION 0.45  
//#define KI_POSITION 0.02

// Control gains for raiseup (the raiseup movement requiere special control parameters)
#define KP_RAISEUP 0.16  
#define KD_RAISEUP 30  
#define KP_THROTTLE_RAISEUP 0   // No speed control on raiseup
#define KI_THROTTLE_RAISEUP 0.0

#define MAX_CONTROL_OUTPUT 500
#define ITERM_MAX_ERROR 30   // Iterm windup constants for PI control
#define ITERM_MAX 10000

#define ANGLE_OFFSET 2.8  // Offset angle for balance (to compensate robot own weight distribution)

// Servo definitions
#define SERVO_AUX_NEUTRO 1500  // Servo neutral position
#define SERVO_MIN_PULSEWIDTH 650
#define SERVO_MAX_PULSEWIDTH 2600

#define SERVO2_NEUTRO 1500
#define SERVO2_RANGE 1400

// Telemetry
#define TELEMETRY_BATTERY 1
#define TELEMETRY_ANGLE 1
//#define TELEMETRY_DEBUG 1  // Dont use TELEMETRY_ANGLE and TELEMETRY_DEBUG at the same time!

#define ZERO_SPEED 65535
#define MAX_ACCEL 8 //14     // Maximun motor acceleration (MAX RECOMMENDED VALUE: 20) (default:14)

#define MICROSTEPPING 16   // 8 or 16 for 1/8 or 1/16 driver microstepping (default:16)

#define DEBUG 1   // 0 = No debug info (default) DEBUG 1 for console output

im also using NEMA 23 2 Phase Mill Robot Lathe CNC Stepper Motor 51mm 2.5A 156oz.in motors in the build as well
Find all posts by this user
Quote this message in a reply
11-12-2019, 05:39 PM (This post was last modified: 11-12-2019 05:41 PM by justjason.)
Post: #4
RE: custom build
What stepper drivers are you using? And in your code kd raisup is 30 not 0.32
Find all posts by this user
Quote this message in a reply
11-13-2019, 05:51 AM
Post: #5
RE: custom build
(11-12-2019 05:39 PM)justjason Wrote:  What stepper drivers are you using? And in your code kd raisup is 30 not 0.32

i stripped down a 3d printer i built last year and took the drivers and motors out of it they are matched 2.5 amp
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)