how to Measure distance with photo transistor and led

i need to build circuit with photo transistor, led and arduino
how i do it?
i I can add more components

How much distance?

Over a few millimeters, you could take photoresistor readings vs the actual distance and map them within the Arduino; knowing the light intensity will die off over distance. Of course this will only work in shade to dark area and over a few millimeters. Beyond that you will need to research how laser range finders work and what it would take to build one using and Arduino.

i most use photo transistor and led
and do not use photoresistor

Same applies. See previous post. Answer questions. We need more information.

Few mm only.
What is the circuit if i use photo transistor and led?
You can show me the block diagram please?

Need to know which phototransistor and LED specifications

The more specific information you provide, the more specific information we can provide. So based on the information you have provided:

  1. Connect LED to power with current limiting resistor.
  2. Connect phototransistor to a different current limiting/sense resistor similar to LED.
  3. Connect phototransistor/current limiting resistor junction to analog input on the Arduino.

Both the transmitter and receiver are highly directional, so for reproducible results you'll need them always to be pointing in the same direction.

And high levels of ambient light will mess up the results.

I don't think you'll get more than an approximate measurement this way.

Allan

This setup can be used if the transmitter and receiver are a few millimeters apart and the closest to furthest distance is also only a few millimeters. It will take hand calibration to record the distance versus the ADC reading.

Even model railroad scale would be "large" for this setup.

the led is TLDR5800
the photo transistor is QTLP610CPD
arduino ono

Someone can draw a block scheme?

thanks!

One block diagram coming up:

POWER -> LED

POWER -> ARDUINO <- PHOTOTRANSISTOR

There you go.

Have you read the QTLP610CPD phototransistor datasheet yet?

Yeah, we need a BUNCH more information:

  • When you say "Distance Measurement", why kind of measurement? Precise? Rough? Distance vs NOT Distance?
  • Distance in thin air? Across some surface? What kind of surface? Always the same kind of surface, or different surfaces [i.e. unknown target]? From a static position? ...or, While the electronics are moving? While the mystery target is moving? or Both? Something else I didn't think of? Or, maybe the question is better asked as "Distance between what and what?"
  • And, even more informative would be a description of what you want to achieve. When you say you need to build this circuit, do you mean this is something like a school project, or have you been captured by a mad scientist, and measuring distance has something to do with an escape plan, and these components you listed are all that is available in this secluded lab?

google -optical or ultrasonic distance meter arduino

dudiraviv:
the led is TLDR5800
the photo transistor is QTLP610CPD
arduino ono

Someone can draw a block scheme?

thanks!

Did your teacher put "show your block diagram" in the assignment?