TCS3200-DB problem
Involute1344
Posts: 14
]I'm a sculptor (kinetic) developing a piece that will sort M&Ms using the TCS3200-DB. I've spent a lot of time collecting data and characterizing M&Ms via the sensor and was quite satisfied with its ability to discriminate (at least, once the RGB values are converted to HSI). In the last couple of weeks, though, the sensor's been providing completely different data than what I've seen before. All the frequencies are lower, by about 50% (I always run the sensor at 1:1, i.e., full-speed, and net out ambient light by strobing the LEDs). I still get different values for the individual channels, but nothing that converts to the appropriate hues. I've stripped everything down to just the sensor, the DB-Expander, and a breadboard, using a digital storage scope to acquire the data, but no luck. I've even swapped out the sensor for a new one on the chance the old one got shocked somehow. Any ideas what might be causing this behavior?
Very frustrating since everything was rock-solid until I replaced the breadboard and DB-Expander with a cable for direct connection to my CPU board (not Parallax-based). Then the weirdness. Unfortunately, going back to the breadboard and DB-Expander didn't fix the problem.
Thanks.
Attachment not found.
Very frustrating since everything was rock-solid until I replaced the breadboard and DB-Expander with a cable for direct connection to my CPU board (not Parallax-based). Then the weirdness. Unfortunately, going back to the breadboard and DB-Expander didn't fix the problem.
Thanks.
Attachment not found.
Comments
Please include a schematic or complete hardware description, along with a copy of your program. Also, please include some "before" and "after" sample data for comparison.
Thanks,
-Phil
-Phil
2. The problem began when you switched cables and gradually got worse during the course of an hour.
3. Upon going back to the old cable the problem persisted.
4. The same issue occurs with more than one sensor board.
Two things come to mind:
2. Your power supply voltage has dropped or is not providing enough current to the LEDs when they are strobed. Did you change Vdd and +5V to 3.3V, perhaps? (Only Vdd is 3.3V/5V convertible. The +5V supply has to be 5V.)
Do either of those possibilities ring true?
Also, one thing puzzles me: if you're converting to HSI, the Hue should not change if the outputs from all three color components drop uniformly. Only the Intensity would be affected in this case.
-Phil
Summary 1 - 4: correct.
Suspicion 1: incorrect. My set-up hasn't changed (see attached photos).
Suspicion 2: incorrect. The power supply has always been ~5.125V. I've tried two different supplies.
I agree the hue should not change if the RGB values drop uniformly, but they don't. I was speaking loosely when I said they dropped about 50%. R is 57% of original, G 54%, and B 50%.
Something else I wonder about is the edge of the hole in the clear Plexi with regard to the LEDs. It appears as if the edge will interfere with the beam pattern, due to refraction. This could also skew your readings if the LED positions get disturbed the slightest bit. I would recommend making the hole larger if the edge is in the way.
BTW, if you need a couple feed tubes sized just right for M&Ms, I have lots and would be happy to send you some. Here's a link to the M&M sorter I designed for Parallax (which has been discontinued):
-Phil
Thanks for the tube offer. If I end up going that way I may take you up on it. What diameter do you use?
I had the tubes custom made to fit the M&Ms, since no stock sizes fed them properly. Consequently, I had to buy a LOT of them. Anyway, ID is 0.555", and OD is 0.615". It's a non-stinky plastic that won't contaminate the candy with noxious chemical fumes. IIRC, it's an FDA-approved polymer, but I wouldn't swear to it.
-Phil
Perhaps you could raise your sensor a little and use a prism or a mirror so your sensor looks down on the candy. Perhaps that would avoid a total redesign of your system. However, if you don't want the sensor to be visible to your viewing public, you might lower the sensor and look up from the bottom, but that would require a transparent, low friction, non-smearable floor for the candies to skooch along.
I presume that, once it detects your favorite color candy, a jet of air puffs it up and you catch it in your mouth. True?
Sorry for the delayed reply. The forum didn't notify me of another post. Once identified, the disk rotates allowing the M&M to drop into the machine which has configured a series of channels directing it to the proper bin. You can remove it from here.
Phil:
Attached is a pic of my tester for collecting data from the faces. I've also attached a spreadsheet of the collected data. It's still somewhat ambiguous, especially when distinguishing between an orange (with or without an M&M label) and a red (with no label). I won't blame you for not wanting to wade into the sheet; can you send me your data so I can compare the two sets and maybe see where I'm going wrong? Any other ideas? Thanks.
Thanks,
-Phil
-Phil