Color sensor TCS34725

34 visualizzazioni
Passa al primo messaggio da leggere

נועם פישר

da leggere,
11 apr 2021, 17:33:1011/04/21
a s4a-co...@googlegroups.com
Hi,
My son and I working on project with arduino uno and color sensor TCS34725. 
My son wrote the code with scratch except from the sensor issue. 
How can we decode the information from the sensor using the two analog legs?

Did someone try to use TCS34725 as well?

Noam

Victor Casado

da leggere,
15 apr 2021, 08:01:0915/04/21
a נועם פישר, S4A Community Mail List
Hi Noam,

As far as we know this sensor works through I2C protocol and pitifully this is not supported in S4A. If you want to use it with a blocks programming environment, maybe you should try other options like microBlocks (although you would need a different board, like an ESP8266 or a M5Stick, due Arduinos are not compatible).

Regards,

‪El dom, 11 abr 2021 a las 23:33, ‫נועם פישר‬‎ (<noa...@gmail.com>) escribió:‬
--
You received this message because you are subscribed to the Google Groups "S4A Community Mail List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to s4a-communit...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/s4a-community/CAB2Ae7Ca_-SZBRj8pyt1LrLL7hkBBctEgL%2BgBoa1yOaDi2%3Dt0Q%40mail.gmail.com.


--
Víctor Casado
Formador i tècnic en tecnologies creatives
93 551 06 75 (ext. 120)
vict...@citilab.eu

FUNDACIÓ PEL FOMENT DE LA 

SOCIETAT DEL CONEIXEMENT

CORNELLÀ


Citilab Cornellà | http://citilab.eu | Pl. Can Suris s/n | 08940 Cornellà de Llobregat | Barcelona


En compliment de la legislació vigent en matèria de Protecció de Dades de Caràcter Personal, l’informem que les seves dades de contacte seran tractades per FUNDACIÓ PEL FOMENT DE LA SOCIETAT DEL CONEIXEMENT (CITILAB), amb la finalitat de mantenir la relació amb els usuaris dels diferents serveis oferts, inscripció als cursos i a les activitats organitzades, i en el cas de que vostè ho hagi sol·licitat, l’enviament de publicitat relativa als serveis oferts. FUNDACIÓ PEL FOMENT DE LA SOCIETAT DEL CONEIXEMENT (CITILAB) assegura la confidencialitat de les dades aportades i garanteix que, en cap cas, seran cedides per cap altre ús sense que hi hagi un consentiment previ i exprés per part seva.

Per exercir els seus drets sobre les dades personals facilitades, segons preveu la legislació vigent, pot adreçar-se de forma presencial o per correu postal a FUNDACIÓ PEL FOMENT DE LA SOCIETAT DEL CONEIXEMENT (CITILAB), Ref. Protecció de Dades, Pl. Can Suris S/N, 08940, Cornellà de Llobregat, Barcelona, o bé enviar la seva petició al correu electrònic avis...@citilab.eu, indicant en l’assumpte del correu “Ref. Protecció de Dades” (acreditant degudament la seva identitat).

Aquest missatge pot contenir informació confidencial, sotmesa a secret professional o que la seva divulgació està prohibida per la llei. Si vostè no és el destinatari del missatge, si us plau esborri’l i notifiqui’ns-ho de forma immediata, no el reenviï ni copiï el seu contingut.

Dimitri Pochet

da leggere,
15 apr 2021, 08:53:0615/04/21
a Victor Casado, נועם פישר, S4A Community Mail List
Hi,
...but there are color sensors that deliver color values using analog voltage outputs, like https://media.digikey.com/pdf/Data%20Sheets/Austriamicrosystems%20PDFs/TCS3103_04_Rev_Aug_2013.pdf
It should be possible to catch the readings from 3 of the 6 S4A analog inputs, no?
Greetz,
Dimitri

Victor Casado

da leggere,
15 apr 2021, 10:37:0015/04/21
a Dimitri Pochet, נועם פישר, S4A Community Mail List
Hi Dimitri,

Sorry, when I check that datasheet I see this:

image.png

image.png

Can you tell me which pin works as a voltage output?

Thanks,

Dimitri Pochet

da leggere,
15 apr 2021, 15:16:2315/04/21
a Victor Casado, נועם פישר, S4A Community Mail List
Hi,
I don't think it's the correct datasheet you look at Victor.
When I open the link I sent, I see this:
image.png
So, pins 6, 5 and 4 give back a "voltage that is linearly proportional to irradiance on the corresponding photodiode element".
Should do the job, no?
Greetz,
Dimitri

Victor Casado

da leggere,
16 apr 2021, 05:11:5416/04/21
a Dimitri Pochet, נועם פישר, S4A Community Mail List
Hi Dimitri,

Sorry you're right, I was looking at the datasheet of the TCS34725 (since it's the one Noam was asking about) instead of yours! And yes, I guess that sensor would work with S4A attaching it to three analog pins.

Anyway, I can't find it available in any store, maybe it's out of stock globally? In that case, it would be interesting to find a similar sensor.

Best regards,

Dimitri Pochet

da leggere,
16 apr 2021, 06:56:2316/04/21
a Victor Casado, נועם פישר, S4A Community Mail List
You're right Victor it seems obsolete and I can't find directly a replacement chip.

But another way round, might be to build the sensor by their own.
After all, what is a color sensor that delivers analog outputs per color?
It's simply a wide-spectrum white light projected on a surface that mirrors back a part of that large spectrum, depending on the reflected color of the object in front.
So one approach could be to just combine a wide spectrun whilte LED and
- 3 (or more) light captors, either each sensible to a specific color wavelength,
- or even and more simply 3 wide-spectrum light captors but in front of which one would place a different color filter (piece of transparent, colored plastic sheet)
There you'd just need 3 of the analog inputs of Arduino (+ 1 digital output if you want to be able shutting down the light source)

Yet another approach can also be looked at.
Instead of using a single, wide-spectrum light source, use a single, wide-spectrum light sensor.
Aside to it, you'd have a 3 colors LED, of which the 3 basic colors would be displayed one after each other (driven for instance from the analog out of Arduino and via S4A). So in sequence (this sequencing being driven from S4A), you illuminate consecutively with Red, then measure global light reception, the illuminate with Green and measure global light reception, and same for blue.
Then you recycle (just in case you need a continuous color measurement.
So at the end for this solution it's a single 3-colors LED, and a single wide-spectrum light sensor.
Maybe it's the easiest way. There you'd need 3 digital ouput pins to drive the 3-color LED, and a single analog input.

What do you think?

Greetz,
Dimitri

Victor Casado

da leggere,
20 apr 2021, 11:08:0420/04/21
a Dimitri Pochet, נועם פישר, S4A Community Mail List
Hi Dimitri,

I think that would be really cool in order to demonstrate how a color sensors works (for a school project, e.g.), but I am not sure if it's an affordable solution for Noam's son due the complexity it involves. Maybe he could say something about that.

Anyway in my opinion, if they need to buy another sensor or any of the components you were talking about, with that money I would get an ESP8266 (~4$) and use microBlocks, which already has a library for the TCS34725.

Best,
Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi