A sensory receptor that sends signals that cause the perception of pain in response to a potentially damaging stimulus.