A surgical stapler. The surgical stapler includes a drive system, an electric motor, a battery and a control system. The electric motor is mechanically coupled to the drive system. The battery is electrically couplable to the electric motor. The control system is electrically connected to the electric motor and includes an H-bridge circuit and a current mirror circuit. The H-bridge circuit includes a plurality of switching devices. The current mirror circuit is electrically connected to the H-bridge circuit. The control system is configured to control a force applied to the drive system based on a current measured at a node of the current mirror circuit. The node is electrically connected in parallel with the H-bridge circuit.