Colour sensor RGB Value Issues with different Voltage and Current output

Hai,
First, sorry for my bad english, I'm not good in this language....
But I really need help......
I'm working for my project using 4 colour sensor to detect 9 colours with 3 combination Primary Colour Red, Green and Blue.
I'm using Mega 2560 and tcs3200.

The problem -
when my project connected to my laptop with usb port, the RGB value from sensor is more stabil..... range between 8-10

But when I connected to jack 2.1mm adapter with 12V 2A output.... I realize the Value RGB from sensor is different and the range is to big .....Range between 25-40

EXAMPLE *

Connected to Usb Port -
Purple (R= 50-60, G= 120-130, B=40-50)

Connected to 2.1mm jack 12V 2A -
Purple (R= 60-90, G= 100-140, B=30-70)

The reason this happen is because from different Voltage/current ? Or other reason ?
And how to fix this problem ?

Thanks

That's a hopelessly outdated, cumbersome chip that you should just chuck back into the parts bin. You'll grow grey hairs trying to get it to work reliably.

Go get yourself one of the more modern RGB color sensors that connects via I2C to your Arduino. There are plenty out there, including a fairly popular Adafruit module (and many clones of it) using a TCS34725 which is very easy to work with.

Good Afternoon moji-tsu! What you are seeing is the protection circuit on the Arduino drops the 5VDC from the laptop just a little bit. What you are see is the difference between the voltage from your laptop and the arduino regulator. If you have a real Arduino board, you can leave the external power supply connected and it should become stable as it will pull power from the 12V system and electronically turn the 5V from the laptop off. If this does not help please post your schematic. This appears to be Spanish in origin so I will post both ways.

¡Buenas tardes moji-tsu! Lo que está viendo es que el circuito de protección en el Arduino deja caer los 5VDC de la computadora portátil solo un poco. Lo que ves es la diferencia entre el voltaje de tu computadora portátil y el regulador arduino. Si tiene una placa Arduino real, puede dejar la fuente de alimentación externa conectada y debería estabilizarse, ya que extraerá energía del sistema de 12 V y apagará electrónicamente los 5 V de la computadora portátil. Si esto no ayuda, publique su esquema. Esto parece ser de origen español, así que publicaré en ambos sentidos.

No, here I share tips to make tcs3200 is 99%-100% accurate range....

actually tcs3200/tcs230 is pretty accurate if you use scaling only 2% output in coding and use my frequency calculation formula that I make by myslef to get 99%-100% accurate Range value (frequency*10/100)

With this 2% scaling and my formula you will get range only between 1-2.....and not move at all from this range,
its very accurate and cheap sensor

I use this method and this sensor detect 9 colour and 2 metal colour (gold and silver).

All 11 colour can detect accurate with this sensor

Hai, gilshultz

Thank you for helping me.

Actually I found the problem.

The problem because of my 12V 2A adapter.

I already solve it with new adapter :grin:

Sure. If you, as you noticed, ensure that it has just about perfect conditions to work under. Contrary to the more modern I2C sensors which are MUCH more resilient against real world conditions and MUCH more accurate.

That's nice for you, but I'm not impressed. I've done quite a bit of work on color sensors and detecting 9 distinct colors isn't special at all. Come back when your sensor can distinguish between adjacent Pantone hues in dim indoor light conditions. Then we'll talk about "accurate".

@moji_tsu, your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with your project :wink: See About the Installation & Troubleshooting category.

Its fine for me because my project only focus to detect 9 colour and 2 metal colour.... I don't need any colour then that, my sensor accurate for me now

Thanks u for your information about the sensor

I am glad you found it, thanks for letting us know.

Me alegra que lo hayas encontrado, gracias por hacérnoslo saber.