Difference between revisions of "Finger Position Sensing with a Photodiode Array"
Line 3: | Line 3: | ||
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. |
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 and output over I2C to MAX517 D2A chips, which output the X and Y analog values. |
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. |
Revision as of 16:24, 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.