Teary eyes detector – part one: IR sensor circuit

Asmir Gračanin from Tilburg University, Serge de Beer and I are prototyping a device that, we hope, will enable us to detect when someones eyes start to tear up – that is, measure whether your eyes are becoming watery, even before you shed a single tear. We think we may be able pull this off by measuring the higher temperature of lacrimal fluid as compared to a persons eyelids and the surface (sclera) of relatively less watery non-crying eyes.

We hope to accomplish by implementing a MLX90621 IR thermal array sensor. Like the well-known MLX90614, this sensor detects thermal radiation and measures temperatures without making contact with any objects. The added advantage of the MLX90621 is that it can read 64 pixels at the same time – very fast, and very accurate.

First phase, basic breadboard setup, attaching the MLX90621 to a Teensy 3.1 Arduino, and working out the Arduino code: all set! Next stage: output as JSON, visualize in Processing, soldering. Then: attach to glasses, and test on crying subject – by subjecting them to a very sad movie.

Instructions on how to connect the MLX90621 to a Teensy 3.1, as per an Arduino forum post by maxbot:

* Connect the Anode of a Silicon Diode to 3V Pin of Teensy. The Diode will drop ~0.7V, so the Cathode will be at ~2.7V. These 2.7V will be the supply voltage “VDD” for the sensor.
* Plug in the USB and measure the supply voltage with a multimeter! – it should be somewhere between 2.5V and 2.75V, else it will fry your precious sensor…
* …disconnect USB again…
* Connect Teensy Pin 18 to 2.7V with a 4.7kOhm Resistor (Pullup)
* Connect Teensy Pin 19 to 2.7V with a 4.7kOhm Resistor (Pullup)
* Connect Teensy Pin 18 to I2C Data (SDA) Pin of Sensor
* Connect Teensy Pin 19 to I2C clock (SCL) Pin of Sensor
* Connect GND and 2.7V with a 100nF ceramic Capacitor.
* Connect the VSS Pin of the Sensor to GND.
* Connect the VDD Pin of the Sensor to 2.7V

See below for a Fritzing diagram with an Arduino Pro Mini 3.3V – a circuit analogous to our Teensy 3.1 setup.

IRPhoneCamera_bb

2015-06-28 12.35.09

werkende

20150705_143706

Related posts:
Cry detection part one
Cry detection part two
Cry detection part three