http://www.taosinc.com/images/product/document/TSL230R-E10.PDF

available for $4.75 from Parallax.com: http://www.parallax.com/detail.asp?product_id=27924

I decided to work with the programmable Light-To-Frequency Converter by TAOS. In the same family of Light to Frequency sensors as the TCS 230 color sensor (see report by Spencer Keiser), the TSL230R senses light using an array of photodiodes which act like an "electronic iris" and then convert the light into a variable frequency square wave or pulse train, (clearly visible using an oscilloscope). This is an extremely useful feature in the IC, making it easy to integrate with a microcontroller such as Basic Stamp or PIC.

Applications

The TCS230R has been used for medical applications, such as heart rate monitoring or as a Pulse Oximeter. Reports are available from TAOS's site.

Pulse Oximeter: http://www.taosinc.com/downloads/pdf/tsl230ROximeter.pdf

Heart Rate Monitor : http://www.taosinc.com/downloads/pdf/tsl230ROximeter2.pdf

Other uses would be found in photography applications, (measuring exposure time for example).

Electrical Characteristics

The TSL230 has a Minimum Supply Voltage (Vdd) of 2.7, Nominal at 5, Maximum at 5.5. Operating free-air temperature ranges from -25 to 70 degrees celcius. High Level Output Voltage typically at 4.5 V. Low Level Output Voltage typically at 0.25 V. High Level Input Current at a Max of 5 microAmps. Low Level Input Current also at a Max of 5 microAmps. Supply Current at Power On Mode typically is at 2 with a Max of 3 milliAmps. Supply Current at Power Down Mode typically is at 5 with a Max of 13 microAmps. Full Scale Frequency Range of 1.1 MHZ. (max frequency without saturation).

Output Frequency at 5Volts with sensitivity settings: SO,S1=H, S2,S3=L: Min 80, TYP, 100, MAX 120 KHZ

Output Frequency at 5Volts with sensitivity settings: S1=H, S0,S2,S3=L: Min 8, TYP, 10, MAX 12 KHZ

Output Frequency at 5Volts with sensitivity settings: S0=H, S1,S2,S3=L: Min .8, TYP, 1, MAX 1.2 KHZ

Output Frequency at 5Volts with sensitivity settings: S3=L, S0,S2,S1=H: Min 40, TYP, 50, MAX 60 KHZ

Output Frequency at 5Volts with sensitivity settings: S0, S1,S2=H,S2=L: Min 8, TYP, 10, MAX 12 KHZ

Output Frequency at 5Volts with sensitivity settings: S0, S1,S2,S3=H: Min .8, TYP, .10, MAX 1.2 KHZ

---

Pin Descriptions

Name # I/O Description
S0,S1 1,2 I Sensitivity Select Inputs
OE 3 I Output Enable (active low)
GND 4 Ground
VDD 5 Supply Voltage
OUT 6 O Scaled-frequency output
S2,S3 7,8 I Scaling-Select Inputs

Sensitivity Select (pins 1 and 2):

S1 S0 SENSITIVITY
L L Power Down
L H 1x
H L 10x
H H 100x

Scaling (pins 7 and 8)

S3 S2 SCALING (divide-by)
L L 1
L H 2
H L 10
H H 100x

Microcontroller Connections

The TSL230R connects directly to a microcontroller (in my case a PIC 18F452) using the PULSEIN or COUNT commands in PIC BASIC. Simply send the output Pin of the TSL230R to a digital input pin on a PIC. It is generally recommended to use a 0.1microF capacitor on pin 5 (voltage).

Code Sample

TSL230R basic stamp tsl230r example from texas instruments

Typical Behavior

TAOS recommends three measurement techniques: frequency-measurement, pulse-accumulation, or integration techniques. "Frequency measurements provide the added benefit of averaging out random or high-frequency variations (jitter) resulting from noise in the light signal or from noise in the power supply. Resolution is limited mainly by available counter registers and allowable measurement time. Frequency measurement is well suited for slowly varying or constant light levels and for reading average light levels over short periods of time. Integration (the accumulation of pulses over a very long period of time) can be used to measure exposure, the amount of light present in an area over a given time period."

It's recommended to use PULSEIN to measure the width of a single pulse. It's desirable to set the pulse width as long as possible without exceeding the maximum pulse width. In the PDF "Look into the Eye from TI" available at: http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv21.pdf it's recommended to set the pulse width to 100ms and use this value as a divisor for the output frequency, "meaning that each output pulse represents 100 cycles from the light to frequency convertor".

When working with COUNT, it's recommended to use a 1 second count. (i.e. how many pulses occur within 1 second).

Questions/Comments

Regarding the sensitivity selection and scaling pins, I was somewhat confused as to whether or not this meant that the pins needed to be drawing continuous power (high pin connected to 5volts, low connected to ground) or if this was something that simply needed to be set to high or low once upon powering up via a message from the PIC. My attempts to solve this problem were inconclusive, but I hope to resolve it this week.

-zach layton