0

I want to make a basic TOF distancing circuit inspired by the square-wave phase shift method here.

But I don't know how to measure charge stored in capacitors.

However, I thought of a simplification. Perhaps I could just measure if one value is bigger than other?

More specifically, I could make a device that returns a binary (digital) signal saying whether or not there is an object within a predefined distance L away.

Let's say L = 5 meters. The total distance will be 10m, which means approximately 33 ns phase shift. So we can just determine whether there is a phase shift of less than 33ns.

If we generate a square wave at 7.5 mhz, it will be on for 66ns and off for 66ns, and we need only check if the phase shift is less than 50% of the "on" part of the square wave.

So we can have a photodiode whose output is switched between two wires in sync with the 7.5mhz output LED signal, we use a capacitor on both lines to smooth out the signal, and whenever the "on" wire voltage is higher than the "off" wire voltage, it means there is an object within 5 meters.

My questions are:

  1. Will this design work, or have I made a mistake somewhere?
  2. I want to use these parts: IR LED TSML1000 and IR Photodiode TEMD1000. Is that reasonable?
  3. Can you suggest a suitable voltage comparator part for this circuit? Or should I use a current comparator?
CaptainCodeman
  • 670
  • 5
  • 12
  • 1
    Measuring charge in the capacitor is easy, Q=CV – Bryan Nov 09 '22 at 06:10
  • 1
    Where \$q\$ is the charge, \$C\$ is the capacitance, and \$v\$ is the voltage across the capacitor. Collect the photodiode current properly into your capacitor(s), read their voltage with an ADC, do some math, and presto -- you have an answer. – TimWescott Nov 09 '22 at 06:16
  • Thanks for the comments. The actual mechanics of measuring the capacitor charge would require different "states" for the system, right? At some point you'd have to be in a "collecting" state to charge up the capacitors and then disconnect the capacitors from the photodiodes and then go into a "measuring" state, and then zero them somehow, and then go back to the "collecting" state? Or is there a simpler way? – CaptainCodeman Nov 09 '22 at 07:03
  • 1
    @CaptainCodeman that would depend on the load your adc presents to the cap and the “supply” it gets from the photodiode. Adcs will present a greater load when actively converting, you may get away with hard wiring the cap to the adc pin and only doing a conversion at the coorrect time - no external switching required, just software. – Bryan Nov 12 '22 at 19:24

0 Answers0