Stufin
Home Quick Cart Profile

Eye Blink Sensor

Buy Now on Stufin

Operating Voltage

3.3V

Operating Current

10mA

Supply Frequency

50Hz/60Hz

Detection Range

1-5 cm

Accuracy

>95%

False Detection Rate

<5%

Response Time

10ms

Package Dimensions

12mm x 12mm x 3mm

Operating Temperature

-20C to 70C

Applications

  • Human-Computer Interaction: Enables innovative interfaces, such as blink-controlled gaming or navigation.
  • Accessibility: Assists individuals with disabilities, providing an alternative input method for communication or control.
  • Healthcare Monitoring: Tracks eye blink patterns to diagnose and monitor neurological disorders, such as blepharospasm or Parkinson's disease.
  • Wearable Devices: Integrates with smart glasses, smart watches, or fitness trackers to provide advanced health monitoring and biometric data analysis.

By providing a reliable and accurate means of detecting eye blinks, the Eye Blink Sensor opens up new possibilities for innovative applications and research in various fields.

Pin Configuration

  • Eye Blink Sensor Documentation
  • Overview
  • The Eye Blink Sensor is a non-invasive, low-power sensor designed to detect eye blinks and other eye movements. It uses electrooculography (EOG) technology to measure the electrical signals generated by eye movements. This sensor is ideal for various applications, including wearable devices, healthcare monitoring, and human-computer interfaces.
  • Pinout Description
  • The Eye Blink Sensor has a total of 6 pins, each serving a specific purpose. Here's a detailed description of each pin:
  • 1. VCC (Power Supply)
  • Pin Type: Power
  • Description: This pin is used to supply power to the sensor. A voltage range of 3.3V to 5V is recommended.
  • Connection: Connect to a power source (e.g., a battery or a voltage regulator output) that provides a stable voltage within the recommended range.
  • 2. GND (Ground)
  • Pin Type: Ground
  • Description: This pin is used as a reference point for the sensor's circuitry.
  • Connection: Connect to the ground terminal of the power source or the system's ground plane.
  • 3. OUT+ (Output Positive)
  • Pin Type: Analog Output
  • Description: This pin outputs the amplified EOG signal corresponding to eye movements.
  • Connection: Connect to an analog-to-digital converter (ADC) or an operational amplifier (op-amp) for further signal processing and conditioning.
  • 4. OUT- (Output Negative)
  • Pin Type: Analog Output
  • Description: This pin outputs the inverted amplified EOG signal corresponding to eye movements.
  • Connection: Connect to an ADC or an op-amp for further signal processing and conditioning.
  • 5. RST (Reset)
  • Pin Type: Digital Input
  • Description: This pin is used to reset the sensor's internal circuitry. A high signal ( 2.0V) on this pin resets the sensor.
  • Connection: Connect to a digital output pin of a microcontroller or a dedicated reset signal.
  • 6. INT (Interrupt)
  • Pin Type: Digital Output
  • Description: This pin outputs an interrupt signal when an eye blink or movement is detected.
  • Connection: Connect to a digital input pin of a microcontroller or a dedicated interrupt handler.
  • Connection Structure
  • When connecting the Eye Blink Sensor to a microcontroller or a development board, follow this general structure:
  • VCC Power source (e.g., battery or voltage regulator output)
  • GND Ground terminal of the power source or system ground plane
  • OUT+ ADC or op-amp input
  • OUT- ADC or op-amp input
  • RST Digital output pin of the microcontroller or dedicated reset signal
  • INT Digital input pin of the microcontroller or dedicated interrupt handler
  • Notes
  • Ensure proper power supply decoupling and noise filtering to minimize interference with the sensor's operation.
  • Use a dedicated analog-to-digital converter or operational amplifier to condition the output signals for reliable and accurate readings.
  • Implement proper signal processing and filtering techniques to remove noise and artifacts from the output signals.
  • Refer to the sensor's datasheet for specific guidelines on signal processing, noise reduction, and recommended components.

Code Examples

Eye Blink Sensor Documentation
Overview
The Eye Blink Sensor is a novel IoT component designed to detect and count eye blinks in real-time. This sensor is ideal for various applications, including healthcare, accessibility, and human-computer interaction. This documentation provides an in-depth guide on how to use the Eye Blink Sensor, including code examples in different programming languages.
Technical Specifications
Operating Voltage: 3.3V - 5V
 Communication Protocol: I2C, UART
 Resolution: 16 bits
 Sampling Rate: up to 100 Hz
 Dimensions: 20mm x 15mm x 5mm
Code Examples
### Example 1: Basic Blink Counting using Arduino
In this example, we'll demonstrate how to use the Eye Blink Sensor with an Arduino board to count the number of eye blinks.
Hardware Requirements
Arduino Uno or compatible board
 Eye Blink Sensor module
 Breadboard and jumper wires
Software Requirements
Arduino IDE (version 1.8.x or later)
Code
```c
#include <Wire.h>
#define EYE_BLINK_SENSOR_ADDRESS 0x44
int blinkCount = 0;
void setup() {
  Serial.begin(9600);
  Wire.begin();
}
void loop() {
  uint16_t blinkData = 0;
  Wire.requestFrom(EYE_BLINK_SENSOR_ADDRESS, 2);
  blinkData = (Wire.read() << 8) | Wire.read();
  
  if (blinkData > 500) { // adjust threshold value as needed
    blinkCount++;
    Serial.print("Blink count: ");
    Serial.println(blinkCount);
  }
  delay(50);
}
```
### Example 2: Real-time Blink Detection using Python and Raspberry Pi
In this example, we'll demonstrate how to use the Eye Blink Sensor with a Raspberry Pi to detect and display eye blinks in real-time using Python.
Hardware Requirements
Raspberry Pi (any model)
 Eye Blink Sensor module
 Breadboard and jumper wires
Software Requirements
Python 3.x
 RPi.GPIO library
 matplotlib library (optional)
Code
```python
import RPi.GPIO as GPIO
import time
import matplotlib.pyplot as plt
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN, pull_up_down=GPIO.PUD_UP)  # set up GPIO 17 as input
blink_data = []
while True:
    blink_state = GPIO.input(17)
    if blink_state:
        blink_data.append(1)
    else:
        blink_data.append(0)
    time.sleep(0.01)  # sample at 100 Hz
if len(blink_data) > 100:  # display last 100 samples
        plt.plot(blink_data[-100:])
        plt.show(block=False)
        plt.pause(0.01)
        plt.close()
```
### Example 3: Blink-based Gesture Recognition using C++ and ESP32
In this example, we'll demonstrate how to use the Eye Blink Sensor with an ESP32 board to recognize specific eye blink gestures.
Hardware Requirements
ESP32 board
 Eye Blink Sensor module
 Breadboard and jumper wires
Software Requirements
ESP32 Arduino Core (version 1.0.6 or later)
 Gesture recognition library (e.g., KNN or SVM)
Code
```cpp
#include <WiFi.h>
#include <GestureRecognition.h>
#define EYE_BLINK_SENSOR_PIN 32
GestureRecognition gr;  // initialize gesture recognition object
void setup() {
  Serial.begin(115200);
  pinMode(EYE_BLINK_SENSOR_PIN, INPUT);
  gr.begin();
}
void loop() {
  int blinkData = digitalRead(EYE_BLINK_SENSOR_PIN);
  gr.addSample(blinkData);
  
  if (gr.recognizeGesture()) {
    int gestureID = gr.getGestureID();
    Serial.print("Recognized gesture: ");
    switch (gestureID) {
      case 0: Serial.println("Blink once"); break;
      case 1: Serial.println("Blink twice"); break;
      case 2: Serial.println("Blink thrice"); break;
      default: Serial.println("Unknown gesture"); break;
    }
  }
  delay(50);
}
```
These examples demonstrate the basic usage of the Eye Blink Sensor in various contexts. For more advanced applications, refer to the sensor's datasheet and technical documentation for detailed information on programming and integration.