             digitalWrite(pin_shutdown,HIGH);
           }
         }else{
-          if(shtdwn_delay_count>20*30){ //50*20 * 30 msec (30sec)
+          if(shtdwn_delay_count>20*20){ //50*20 * 20 msec (20sec)
             raspi_stat = RPI_STAT_SHUTDOWN;
             Serial.println("*** TURN OFF power successfully ***");
             turn_off();

}


const int  CMD_SET_WAKUP_TIMER01    = 0x11;
const int  CMD_SET_WAKUP_TIMER02    = 0x12;
const int  CMD_CLEAR_TIMER          = 0x40;
const int  CMD_SHUTDOWN_NOW         = 0xFF;


      }
      break;
    case RPI_STAT_RUNNING:
      if(loop_count % 20 == 0){ check_expired_timer(); }
      break;
    case RPI_STAT_WAIT_SHUTDOWN:
      static int shtdwn_delay_count=0;
