A surgical instrument includes a handle assembly and an adapter assembly. The handle assembly includes a handle housing and a processor disposed within the handle housing. The adapter assembly includes a knob housing, an elongate body, a plurality of electrical components, and a flex circuit. The knob housing is configured to be connected to the handle housing. The elongate body extends distally from the knob housing and has a distal end configured to be coupled to an end effector. The electrical components are disposed within the elongate body. The flex circuit has a proximal end configured to be electrically connected to the processor, and a distal end configured to be electrically connected to the electrical components.