This is TCS230 based Bluetooth color picker prototype which we build to test the concept. In here the idea is to extract color from any physical object and transfer it to PC / mobile. To test this concept, we use low-cost TCS230 color sensor.
TCS230 is programmable color light-to-frequency convert IC. This chip produces square wave output with frequency directly proportional to the light intensity. To drive this sensor and capture its output we used PIC16F628A microcontroller. The processed output is then transferred to the host using the HC-05 Bluetooth SPP (Serial Port Protocol) module.
In PC we wrote small Python script to display captured value and color in a Window.
In this design, we drive the TCS230 sensor with 20% frequency scaling. The entire circuit is built using commonly available modules and components. For the color sensor, we use the 8-pin TCS230 sensor module which is commonly found in eBay and other online electronic component stores. This module comes with 4 white LEDs and because of that, we don’t need a separate circuit for LEDs.
Due to the small number of components this circuit is quite easy to assemble. To build our prototype we used 46mm × 36mm breadboard. Connections to the TCS230 sensor module is made using a couple of jumper wires.
Before connecting this circuit with PC or host device make sure to configure the HC-05 Bluetooth module with proper name and with a baud rate of 9600. To configure this module, we used HC-06 configuration utility which we developed a couple of months back. Also, make sure to configure “config.py” file with correct COM port name.
At the testing stages, we find out that the TCS230 sensor is not as accurate as we thought. It identifies colors but its results are not accurate enough to meet with our original project requirements. We got a quite satisfactory result when we attached a CCTV camera (filter) lens to this sensor but still, it is not accurate enough for our application.
The firmware, schematic and Python monitoring script of this project are available at https://github.com/dilshan/tcs230-color-picker. To build PIC16F628A firmware use MPLAB IDE with XC8 C compiler.
A prototype version of color picker on a tiny breadboard. |
TCS230 is programmable color light-to-frequency convert IC. This chip produces square wave output with frequency directly proportional to the light intensity. To drive this sensor and capture its output we used PIC16F628A microcontroller. The processed output is then transferred to the host using the HC-05 Bluetooth SPP (Serial Port Protocol) module.
In PC we wrote small Python script to display captured value and color in a Window.
In this design, we drive the TCS230 sensor with 20% frequency scaling. The entire circuit is built using commonly available modules and components. For the color sensor, we use the 8-pin TCS230 sensor module which is commonly found in eBay and other online electronic component stores. This module comes with 4 white LEDs and because of that, we don’t need a separate circuit for LEDs.
Minimum frequency readout from TCS230 for green color. |
Maximum frequency readout from TCS230 for green color. |
Due to the small number of components this circuit is quite easy to assemble. To build our prototype we used 46mm × 36mm breadboard. Connections to the TCS230 sensor module is made using a couple of jumper wires.
Before connecting this circuit with PC or host device make sure to configure the HC-05 Bluetooth module with proper name and with a baud rate of 9600. To configure this module, we used HC-06 configuration utility which we developed a couple of months back. Also, make sure to configure “config.py” file with correct COM port name.
At the testing stages, we find out that the TCS230 sensor is not as accurate as we thought. It identifies colors but its results are not accurate enough to meet with our original project requirements. We got a quite satisfactory result when we attached a CCTV camera (filter) lens to this sensor but still, it is not accurate enough for our application.
Sample output captured from the sensor. |
The firmware, schematic and Python monitoring script of this project are available at https://github.com/dilshan/tcs230-color-picker. To build PIC16F628A firmware use MPLAB IDE with XC8 C compiler.
Comments