Photodetector to measure rotation and torque

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
matheus_m
 
Posts: 7
Joined: Sun Oct 16, 2022 5:34 pm

Photodetector to measure rotation and torque

Post by matheus_m »

Good Morning.

I need an Active Photodetector for the following task.
Detect the change between blue, red and green bands that will be attached to the shaft of a moving engine.

Basically I will have an axis with several tracks in a blue/red/green sequence that is repeated throughout the circumference of the axis, these tracks have a very short length (less than an arc of 5 degrees of circumference on an axis of radius 2 cm = ~ 1.7mm) and are rotating at high angular speed. The sensor must be able to return the intensity of the band perpendicular to it at every instant and when it is in a position where there is a transition between bands of different colors it needs to be able to quickly return the interpolated values of these colors, that is when it is in a transition from a red to a green band the sensor needs to return a real-time signal that starts with a red spike and smoothly changes to a green spike.

In this way, it would be possible to identify the relative position of the sensor in relation to the axis tracks, which is the objective I intend to achieve.

Looking at your catalog I came across the TCS34725 that is working for low speeds but with a precision a little far from what I need when detecting lane changes, this is also being caused by the low response speed of it that is in 2.4 ms.

So I'm looking for a sensor with enough features and reading speed to do this job.
In this case, my biggest problem is the accuracy of the reading, many times the TCS34725 returns me values ​​of colors that are not close to it.

User avatar
sj_remington
 
Posts: 998
Joined: Mon Jul 27, 2020 4:51 pm

Re: Photodetector to measure rotation and torque

Post by sj_remington »

are rotating at high angular speed
You need to be more specific. Work out the response time required of the detector at the highest RPM.
my biggest problem is the accuracy of the reading
How did you determine "accuracy"?

Keep in mind that perceived and measured color depends very strongly on illumination, and for the human eye, is also relative to the background. The values that a color sensor returns will often not meet expectations based on what you see.

User avatar
matheus_m
 
Posts: 7
Joined: Sun Oct 16, 2022 5:34 pm

Re: Photodetector to measure rotation and torque

Post by matheus_m »

sj_remington wrote: Thu Nov 24, 2022 12:27 pm
are rotating at high angular speed
You need to be more specific. Work out the response time required of the detector at the highest RPM.
my biggest problem is the accuracy of the reading
How did you determine "accuracy"?

Keep in mind that perceived and measured color depends very strongly on illumination, and for the human eye, is also relative to the background. The values that a color sensor returns will often not meet expectations based on what you see.
Goodnight!
The speed I want to perform my next tests is something around 44 rpm.
I calculated that for an axis with 60 tracks each track will occupy an arc of 6 degrees, for each track the sensor will have to be able to perform 90 readings, so that it will be possible to draw a moving average with an offset set to 10, that is 90 readings we will have 9 valid values (which will be later processed in the program).

So I need a sensor that has a read speed of 0.25ms or 34KHz.
Or anything close to 1ms would be useful.

By precision I mean correct reading data, for example many times my current sensor is between green and red colors it ends up returning me a non-null value of blue.
WhatsApp Image 2022-12-01 at 18.44.14 (1).png
WhatsApp Image 2022-12-01 at 18.44.14 (1).png (867.43 KiB) Viewed 62 times
Correct result (Expected)
chart.png
chart.png (53.53 KiB) Viewed 62 times
Wrong result (It is currently happening)
chart (1).png
chart (1).png (53.54 KiB) Viewed 62 times
Does anyone have any ideas on how I can get rid of external interference?

https://youtu.be/uUB2KfilYTI
In this video it is also possible to see a problem that I am also facing, which is these sudden drops in some values.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Photodetector to measure rotation and torque

Post by adafruit_support_bill »

By precision I mean correct reading data, for example many times my current sensor is between green and red colors it ends up returning me a non-null value of blue.
That is more an issue with your setup than the sensor. Like all planar sensors, the TCS34725 has a Lambertian sensitivity pattern. That means the field of view is nearly 180 degrees, with the sensitivity being proportional to the cosine of the angle from normal. To get a 'pure' color reading, you need to block out all input from the periphery so that only light from the intended sample area reaches the sensor.

With a proper setup, you should be able to get reliable readings without all that oversampling.

In the guide, there is a link to an excellent tutorial on the subject: https://learn.adafruit.com/adafruit-col ... ing-colors

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”