PS-ON activates automatically without instructions

I have troubles with the PS-ON option on a ramps1.4 board: the pin go on high value about 10 minutes after powering the arduino.
It seems to be related to the "deactivate steppers after a period of inactivity of 360s" option, i'm not good at c/c++ code reading (i am a mechanical designer), so i'm unable to find the code line which is responsible of this pin to get high after a certain period of time.
I really need to have a low state on my printer, I work at 35V, which can cause fire (8 extruders, high mass moving on x/y axes, and i use a ball screw on the z axis).
so, if you have an idea about how to fix this, i am really interested.

Comments

  • In kill function in printer.cpp the ps on gets disabled

    #if defined(PS_ON_PIN) && PS_ON_PIN>-1
            //pinMode(PS_ON_PIN,INPUT);
            SET_OUTPUT(PS_ON_PIN); //GND
            WRITE(PS_ON_PIN, (POWER_INVERTING ? LOW : HIGH));
            Printer::setPowerOn(false);

    and on startup it might get set

    #if defined(ENABLE_POWER_ON_STARTUP) && ENABLE_POWER_ON_STARTUP && (PS_ON_PIN>-1)
        SET_OUTPUT(PS_ON_PIN); //GND
        WRITE(PS_ON_PIN, (POWER_INVERTING ? HIGH : LOW));
        Printer::setPowerOn(true);
    #if PS_ON_PIN > -1
        SET_OUTPUT(PS_ON_PIN); //GND
    WRITE(PS_ON_PIN,(POWER_INVERTING ? LOW : HIGH));
        Printer::setPowerOn(false);
        Printer::setPowerOn(true);

    so my guess is POWER_INVERTING is set wrong in your case so on is off.
  • I did not have the bold part in my code :

    #if defined(ENABLE_POWER_ON_STARTUP) && ENABLE_POWER_ON_STARTUP && (PS_ON_PIN>-1)
        SET_OUTPUT(PS_ON_PIN); //GND
        WRITE(PS_ON_PIN, (POWER_INVERTING ? HIGH : LOW));
        Printer::setPowerOn(true);
    #if PS_ON_PIN > -1
        SET_OUTPUT(PS_ON_PIN); //GND
    WRITE(PS_ON_PIN,(POWER_INVERTING ? LOW : HIGH));
        Printer::setPowerOn(false);
        Printer::setPowerOn(true);

    I have killed the PS-on output by the way, I have used a relay which I believed to have its own free wheeling diode. I'll try in the next days to confirm if it resolved the issue (i have ordered a new arduino)
  • That part is at another function in printer.cpp and not in kill function! Search ENABLE_POWER_ON_STARTUP and you should find it.
Sign In or Register to comment.