The series of events that contribute to the perception of pain in which an electrical stimulus is received and converted into a molecular signal.
detection of electrical stimulus during sensory perception of pain