Difference between revisions of "Finger Position Sensing with a Photodiode Array"

From Mech
Jump to navigationJump to search
Line 8: Line 8:
1) Interfacing with the TSL1406R requires precise timing. The "start integration" (SI) pulse and the clock signal (being generated by the PIC's PWM feature must be accurately phased.
1) Interfacing with the TSL1406R requires precise timing. The "start integration" (SI) pulse and the clock signal (being generated by the PIC's PWM feature must be accurately phased.
2) To achieve 2ms loop times on the 18F4520 PIC, minimalistic integer code is required. To improve looptime further, the PIC is running on a 40MHz clock.
2) To achieve 2ms loop times on the 18F4520 PIC, minimalistic integer code is required. To improve looptime further, the PIC is running on a 40MHz clock.

[[Image:finger_postition_board.JPG|right|400px|A single PCB is used to make the electrical connections and provide the mechanical support to the lasers, lenses, and photodiode]]

Revision as of 18:32, 10 June 2009

This device finds the X and Y position of a finger in a 2"x2" square area. The resolution is about 256 counts per axis and the update rate is 2ms. The board output is a 0-5V analog signal for each X and Y position.

For each axis, there is a 768-pixel photodiode array (TSL1406R) illuminated by laser light. The laser light is produced by a "line generator" laser, which is nothing more than a laser pointer capped with a cylindrical lens. The cylindrical lens creates a triangular area (not a cone) of divergent light. To redirect the divergent light into parallel light in the sensing area, a 2" cylindrical Fresnel lens is placed between the laser and the photodiode array. This parallel light creates a distinct shadow on the photodiode array and allows for a a full 2"x2" working area.

The center of the shadow that the finger casts on the photodiode array is found by doing a "center of mass" calculation on the shadow's profile. The resultant X and Y position is output by the PIC over I2C to two MAX517 D2A chips, which output the X and Y analog values.

There are only two tricky parts to the design of the code and circuit, 1) Interfacing with the TSL1406R requires precise timing. The "start integration" (SI) pulse and the clock signal (being generated by the PIC's PWM feature must be accurately phased. 2) To achieve 2ms loop times on the 18F4520 PIC, minimalistic integer code is required. To improve looptime further, the PIC is running on a 40MHz clock.

A single PCB is used to make the electrical connections and provide the mechanical support to the lasers, lenses, and photodiode