A Heartbeat Sensor consists of an infrared LED and an infrared phototransistor.
Working Principle:
The heartbeat sensor works by using the skin as the infrared reflecting surface. What’s more, its infrared reflection mainly depends on the concentration of blood in skin. Since the blood density is fluctuant as the heart beats.
Besides, the LED embeded into the heartbeat sensor can flash hundreds of times per second, which is able to calculate the heartbeat per minute by tracking the reflection of visible light.