A power tool, comprising: a main body comprising a housing and a motor, a switch assembly, and an electronic control assembly which are mounted in the housing, wherein the electronic control assembly is electrically connected to the switch assembly and the motor, separately; and a battery pack detachably coupled to the main body and having a connection state in which the battery pack is electrically conductive with the electronic control assembly and a separate state in which the battery pack is disconnected from the electronic control assembly; wherein the electronic control assembly comprises: an electronic control unit comprising a power circuit board which is made of a metal substrate; a mounting base wherein the power circuit board is in contact with the mounting base which is a metal base and provided with an opening; and a connecting unit for conductively connecting the battery pack to the electronic control unit, connected to the mounting base via the opening, and mating with the mounting base to form a mounting space in which the electronic control unit is mounted; characterised in that the electronic control unit further comprises a control circuit board, and the control circuit board and the power circuit board are stacked within the mounting base. a main body comprising a housing and a motor, a switch assembly, and an electronic control assembly which are mounted in the housing, wherein the electronic control assembly is electrically connected to the switch assembly and the motor, separately; and a battery pack detachably coupled to the main body and having a connection state in which the battery pack is electrically conductive with the electronic control assembly and a separate state in which the battery pack is disconnected from the electronic control assembly; wherein the electronic control assembly comprises: an electronic control unit comprising a power circuit board which is made of a metal substrate; a mounting base wherein the power circuit board is in contact with the mounting base which is a metal base and provided with an opening; and a connecting unit for conductively connecting the battery pack to the electronic control unit, connected to the mounting base via the opening, and mating with the mounting base to form a mounting space in which the electronic control unit is mounted; characterised in that the electronic control unit further comprises a control circuit board, and the control circuit board and the power circuit board are stacked within the mounting base. an electronic control unit comprising a power circuit board which is made of a metal substrate; a mounting base wherein the power circuit board is in contact with the mounting base which is a metal base and provided with an opening; and a connecting unit for conductively connecting the battery pack to the electronic control unit, connected to the mounting base via the opening, and mating with the mounting base to form a mounting space in which the electronic control unit is mounted; characterised in that the electronic control unit further comprises a control circuit board, and the control circuit board and the power circuit board are stacked within the mounting base.