Joined: 30 Dec 2004 Posts: 1179 Location: Tilburg - Netherlands
Posted: Fri Sep 05, 2014 10:43 am Post subject: Arduino Nano and TSC230 color sensor
TSC230 - Color Sensor
Single-supply operation 2.7 to 5.5 volt
High-resolution conversion of light intensity to frequency
Programmable color and full-scale output frequency
Output frequency: 5 volt
Duty cycle: 50%
Distance to object: max 10 mm
Value of RGB between 1200 and 3500, with this Bascom-AVR program.
S0 and S1: Output frequency scaling selection inputs
S2 and S3: photodiode type selection inputs
Out: Output frequency
OE pin: Output frequency enable pin (active low)
TSC230 has four photodiode types. Red, Blue, Green and Clear.
We can choose the different type of photodiode by different combinations of S2 and S3.
Connection to the Arduino Nano:
S0 = D6 = Portd.6
S1 = D5 = Portd.5
S2 = D4 = Portd.4
S3 = D3 = Portd.3
Out = D2 = Portd.2 = INT0
OE connect to GND
VCC to 5 volt
GND to GND
During 100 mSec the frequency is measured of Red, Green and Blue. This is done by counting the interrupts on INT0 which is connected to the OUT of the TSC230. The value is send to the serial port.
This is done in a do loop cycle for all three colors RGB.
Thanks for sharing. Nice and simple code. I need to get myself such a sensor too. Always have been intrigued by them. Dont have a practical use for it yet. I do know you and Theo had a great project for such a sensor.
Hope to see that project some day. _________________ Mark
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum