makerbase-mks / MKS-Power-Control

MKS PWC Power Monitoring auto power off Continued to Play Module automatically put off power detect 3D printer parts; MKS UPS12V/24V provide Z-AXIS move, the hight 20mm-200mm between
https://makerbase.aliexpress.com/store/group/Power-Control/1047297_516890609.html?spm=a2g0o.store_home.pcShopHead_8325768.1_2_2
GNU General Public License v3.0
24 stars 3 forks source link

PWC PS_OFF pulsing #13

Open tiagooliveira95 opened 2 years ago

tiagooliveira95 commented 2 years ago

I have a PWC and UPS, the PWC is wired as per instructions, and the UPS is connected to the MT_DET1

POWER_LOSS_PIN was set to PA4 (MT_DET1) PSU_CONTROL and MKS_PWC are enabled

When I turn the printer on the relay turns on, for a few seconds then it starts pulsing ON and OFF.

I suspect that PS_OFF is pulsing at some frequency, unfortunately, I don't have a scope to probe around.

Another weird behavior, is when I turn the power off in the middle of the print displays "PRINTED HALTED KILLED", and does not raise Z, and the Auto Power Off does not work when the print finishes

I'm pretty sure that I have a problem with my config, I hope someone can help me with this.

Board: Robin Nano V3 (STM32F4) UPS: 24v version PWC: V3

config_adv

#define POWER_LOSS_RECOVERY
    #if ENABLED(POWER_LOSS_RECOVERY)
    #define PLR_ENABLED_DEFAULT   false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500)
    #define BACKUP_POWER_SUPPLY       // Backup power / UPS to move the steppers on power loss
    #define POWER_LOSS_ZRAISE       20 // (mm) Z axis raise on resume (on power loss with UPS)
    #define POWER_LOSS_PIN         PA4 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
    #define POWER_LOSS_STATE     HIGH // State of pin indicating power loss
    #define POWER_LOSS_PULLUP         // Set pullup / pulldown as appropriate for your sensor
    //#define POWER_LOSS_PULLDOWN
    #define POWER_LOSS_PURGE_LEN   20 // (mm) Length of filament to purge on resume
    #define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power.

    // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
    // especially with "vase mode" printing. Set too high and vases cannot be continued.
    #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data

    // Enable if Z homing is needed for proper recovery. 99.9% of the time this should be disabled!
    //#define POWER_LOSS_RECOVER_ZHOME
    #if ENABLED(POWER_LOSS_RECOVER_ZHOME)
      //#define POWER_LOSS_ZHOME_POS { 0, 0 } // Safe XY position to home Z while avoiding objects on the bed
    #endif
  #endif

conf

   #define PSU_CONTROL
   //#define PSU_NAME "Power Supply"

   #if ENABLED(PSU_CONTROL)
  #define MKS_PWC                 // Using the MKS PWC add-on
  #define PS_OFF_CONFIRM          // Confirm dialog when power off
  //#define PS_OFF_SOUND            // Beep 1s when power off
  #define PSU_ACTIVE_STATE HIGH      // Set 'LOW' for ATX, 'HIGH' for X-Box

  //#define PSU_DEFAULT_OFF         // Keep power off until enabled directly with M80
  #define PSU_POWERUP_DELAY 250   // (ms) Delay for the PSU to warm up to full power

  //#define PSU_POWERUP_GCODE  "M355 S1"  // G-code to run after power-on (e.g., case light on)
  //#define PSU_POWEROFF_GCODE "M355 S0"  // G-code to run before power-off (e.g., case light off)

  //#define AUTO_POWER_CONTROL      // Enable automatic control of the PS_ON pin
  #if ENABLED(AUTO_POWER_CONTROL)
    #define AUTO_POWER_FANS         // Turn on PSU if fans need power
    #define AUTO_POWER_E_FANS
    #define AUTO_POWER_CONTROLLERFAN
    #define AUTO_POWER_CHAMBER_FAN
    #define AUTO_POWER_COOLER_FAN
    //#define AUTO_POWER_E_TEMP        50 // (°C) Turn on PSU if any extruder is over this temperature
    //#define AUTO_POWER_CHAMBER_TEMP  30 // (°C) Turn on PSU if the chamber is over this temperature
    //#define AUTO_POWER_COOLER_TEMP   26 // (°C) Turn on PSU if the cooler is over this temperature
    #define POWER_TIMEOUT              30 // (s) Turn off power if the machine is idle for this duration
    //#define POWER_OFF_DELAY          60 // (s) Delay of poweroff after M81 command. Useful to let fans run for extra time.
  #endif
#endif

pins_..._nano_V3.h Note: I'm using the H43 display (TFT_LVGL_UI is disabled)

#define SUICIDE_PIN                       PB2
#define LED_PIN                           PB2
#define KILL_PIN                          PA2
#define KILL_PIN_STATE                    LOW

//
// Power Supply Control
//
#if ENABLED(MKS_PWC)
  #if ENABLED(TFT_LVGL_UI)
    #undef PSU_CONTROL
    #undef MKS_PWC
    #define SUICIDE_PIN                     PB2
    #define SUICIDE_PIN_STATE               LOW
  #else
    #define PS_ON_PIN                       PB2   // PW_OFF
  #endif
  #define KILL_PIN                          PA13  // PW_DET
  #define KILL_PIN_STATE                    HIGH
#endif
quim71 commented 5 months ago

I have a similar problem, I think that my power supply is protected by overcurrent, has anyone found a solution?