So, a little update. I received some photo_something, and did some testing.howiec wrote: ↑24 Dec 2020, 11:45Those are definitely photoresistors. Interesting that you seem to get response times different than spec. Regardless, I strongly recommend photodiodes instead for various reasons including much lower response times, and less sensitivity to incident light. Then again, I've never used either so YMMV. I just have an electrical engineering background.
So these, contrary to what adafruit said, are not phototransistor, nor photodiodes, they are actually photoresistors. From what I gathered, they are the new version of the old photoresistors, because the old were not compliant with some EU regulation on some material.
So they work just like the old ones I was using, ~30 to 40 µs response time.
These, ordered from aliexpress, are sold as phototransistors with 2 legs.I do believe they are actual phototransistors. Here's the datasheet I could find from their part number https://datasheetspdf.com/datasheet/3DU5C.html
I don't think I found any actual photodiode yet. i've ordered some stuff from aliexpress, but it still hasn't come
Now, onto the interesting part, I tested them both for response time, based on lighting an LED. My test setup looked like this And results were as follow :
- Photoresistor : 124-132 µs
- Phototransistor : 4-8 µs
This was with a basic arduino setup. I then used the stuff to get faster analog reads (https://forum.arduino.cc/index.php?topic=6549.0) then ran some more tests, which gave me :
- Photoresistor : 32-36 µs
- Phototransistor : 4-8 µs
And the weird part :
analogRead from an arduino leonardo like mine takes ~110 µs to process. This seems fine, and the results I'm getting with the photoresistor makes sense.
analogRead with the stuff from the arduino forums to make it faster takes ~17 µs. Results from the photoresistor also makes sense.
But then, analogRead from the phototransistor gives 4-8 µs, with and without the things to make it faster. It's still the same analogRead() function. I have no clue how that works honestly.
Anyway, I'm now in the process of designing a shroud for the photodiode, and then I'll test it for input latency on a PC, and see what happens.