Jump to content

kadakada

Dormant
  • Posts

    2
  • Joined

  • Last visited

Personal Information

  • Country
    UZ

kadakada's Achievements

0

Reputation

  1. Thank you. 1000 mA is much closer to reality. The default current settings of latest firmware are: #define DEFAULT_PWM_MOTOR_CURRENT {1200, 1200, 1250} X,Y: 1200 mA Z: 1200 mA E: 1250 mA It's better, but still too high I think if interprets 1200 mA to real current of 1739 mA.
  2. I noticed a huge heating on the Ultimaker 2 board and tried to find the reason for this. As turned out the stepper motor drivers A4988 is heated to 70°C and more even in idle stay. Ambient temperature is 20°C. My settings (default) of stepper motors current are: for XYZ motor is 1300 mA and for Extruder motor is 1250 mA. Let's check it. Regarding A4988 data-sheet the motor current controlled by a fixed off-time PWM current control circuit inside IC that limits the load current to a desired value Itrip. The maximum value of current limiting is set by the selection of RSx (current sense resistor = 0.05 Ohm) and the voltage at the Vref pin. (1) I measured Vref voltage at TP403 test point which was 0.7374 V. Regarding to equation (1) the limiting current is: Itrip = 0.7374V / (8 x 0.05 Ohm) = 1.8435 A = 1843 mA The value of 1843 mA is much excessive of expected 1300 mA and it is close to the maximum rated current of 2000 mA for A4988. I tried decrease the current by changing settings of machine to 918 mA which leads to decrease Vref voltage to 0.5228 V and regarding to equation (1) the new actual limiting current value is 1300 mA as should be. The temperature of stepper drivers in this case is not exceed 37°C which is much better. The Vref voltage converted from PWM signal of microcontroller to DC voltage by two LPF filters R69 C46 and R70 C47 (for X and Y axis). In the meanwhile R69, R70 and R73 form the voltage divider. The transfer function of voltage divider is: H = Vout / Vin = ( R73 / (R69 + R70 + R73) ) (2) *Vin is PL5 point of the schematics above, Vout is TP403 point. Let's take a look to the firmware to find out how the PWM signal is generated. "stepper.cpp" file digipot_current() function: void digipot_current(uint8_t driver, int current){ #if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1 const uint8_t digipot_ch[] = DIGIPOT_CHANNELS; digitalPotWrite(digipot_ch[driver], current); #endif #if MOTOR_CURRENT_PWM_XY_PIN > -1 if (driver == 0) analogWrite(MOTOR_CURRENT_PWM_XY_PIN, (long)current * 255L / (long)MOTOR_CURRENT_PWM_RANGE); if (driver == 1) analogWrite(MOTOR_CURRENT_PWM_Z_PIN, (long)current * 255L / (long)MOTOR_CURRENT_PWM_RANGE); if (driver == 2) analogWrite(MOTOR_CURRENT_PWM_E_PIN, (long)current * 255L / (long)MOTOR_CURRENT_PWM_RANGE); #endif} "pins.h" file: #define MOTOR_CURRENT_PWM_RANGE 2000 The PWM value (let's call it Npwm) set to "(long)current * 255L / (long)MOTOR_CURRENT_PWM_RANGE" value. Npwm = (*current x 255) / MOTOR_CURRENT_PWM_RANGE (3) * "current" in mAmps The voltage at the point TP403 can be calculated as: Vout = Vcc x D x H = Vcc x (Npwm / 255) x H (4) Vcc - Power supply voltage of microcontroller (5V in our case) D - duty cycle of PWM signal H - divider's voltage ratio Regarding equation (1) and (4) the limit current Itrip is: Itrip = Vout / (8 x Rs) = (Vcc x (Npwm / 255) x H) / (8 x Rs) Regarding to equation (3) Itrip is: Itrip = (Vcc x ( ((current x 255) / MOTOR_CURRENT_PWM_RANGE) / 255) x H) / (8 x Rs) Itrip = (Vcc x (current / MOTOR_CURRENT_PWM_RANGE) x H) / (8 x Rs) Itrip = (Vcc x current x H ) / (8 x Rs x MOTOR_CURRENT_PWM_RANGE) Regarding to equation (2) we can calculate H value regarding actual resistor values: H = 604 / (604 + 1000 + 1000) = 0.2319 Now we can calculate real Itrip value if we set current = 1300 mA in the machine. Itrip = (5 x 1300 x 0.2319 ) / (8 x 0.05 x 2000) = 1.884 A = 1884 mA This is close to the value of 1843 mA I calculated from measured Vout voltage. The difference is the result of tolerance of resistors, power supply voltage, internal voltage reference of A4988, etc. So calculations are correct and conclusion is following: there is wrong current limiting transfer function of the firmware. There are two solutions to fix it: 1. Software: Change MOTOR_CURRENT_PWM_RANGE constant in the firmware to 2899 2. Hardware: Change divider's voltage ratio from 0.2319 to 0.16 by changing for example R73 to 381 Ohm The questions are: 1. Does anyone found considerable heating of the drivers? If so, does current decreasing to 918 mA in printer settings solve the problem? Does the printer works properly without steps skipping in this case? 2. Does the Ultimaker team aware of this issue? Thanks, Andrey.
×
×
  • Create New...