A surgical apparatus comprises an instrument body, an end effector, and a control module. The end effector is in communication with the handle assembly. The end effector is operable for use in a surgical procedure. The control module is in communication with the end effector. The end effector with the control module is able to deliver surgical energy as well as nerve excitation energy to a surgical site. A surgeon may detect stimulation of nervous tissue by visually observing the tissue twitch, and may adjust surgical technique accordingly. A sensor may be used to detect excitation of nervous tissue based on excitation caused by the nerve excitation energy.