Tried Googling this but I'm not really sure what vocabulary to use.
I have a series of light sensors that will be detecting changes at the speed of 400 kHz (or 2.5 µs). I would like to use an ESP32 to receive this data, but according to my research, it can only detect analog inputs at the rate of 6 kHz (166 µs), much too slow.
Perhaps I have a fundamental misunderstanding of how the sensor works, but my assumption is the sensor looks for changes in light at the rate of 400 kHz and sends this signal (at the same rate?) to the micro-controller. Thus, the signal would need to be slowed down so the micro-controller is able to read it.
Goal: Determine when an object as small as a marble or large bug passes through a line of light at high rates of speed.
Circuit setup: A high powered LED that is pointed directly at a light sensor which will need to be activated upon an object passing through extremely quickly by determining when a shadow is cast on the sensor.
I looked in to using delays like this one, but it seems to only allow 1 fixed output and at $1.66 a pop, this project would get really expensive, really fast.
Question: Is there a part that I'm missing that will allow me to detect a 400 kHz signal with my ESP32's 6 kHz analog input?
I'm fine with using some other device that has such analog capabilities and passing off the data to the ESP32, but all of the devices I have found (Arduinos) have too low of a poll rate for this.
Thanks in advance for any help/input!
Update: After all of your very helpful comments, I believe what I am needing is a method in which a sensor will respond to changes in light in at least a 5 µs intervals and only send a signal to the micro-controller when the light changes below a certain level (the object passes through the beam of light). I am still not sure how to go about this, however.