Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I would like to understand how does work the polulu Reflectance Sensor internally. I can make it work but I would like to know what is happening electrically.

http://www.pololu.com/catalog/product/961

This is the schema (focus on the bottom left part, the squared area).

http://a.pololu-files.com/picture/0J629.650.png?7975fd7128a0eb0861e253d9c7f439c0

An these are the steps to read a value:

  1. Turn on IR LEDs (optional)
  2. Set the I/O line to an output and drive it high
  3. Allow at least 10 us for the 10 nF capacitor to charge
  4. Make the I/O line an input (high impedance)
  5. Measure the time for the capacitor to discharge by waiting for the I/O line to go low
  6. Turn off IR LEDs (optional)

I guess initially the 10 nF capacitor is charged. Why does it say in step 3 to charge it again. Do you charge "the other side" of the capacitor?.

share|improve this question

1 Answer

up vote 3 down vote accepted

The third pint should read

Allow at least 10 us for the 10 nF capacitor to discharge.

If the capacitor has Vcc on both sides it's discharged. (IR) light on the phototransistor will cause a current to ground, so that voltage builds up on the capacitor, making its lower side go lower, as the other side is fixed at Vcc. Since the charging is through a current source instead of a resistor the voltage will decrease linearly with time.

share|improve this answer
Thanks for your answer. Why is that "If the capacitor has Vcc on both sides it's discharged". Where does the energy...go? Related with: "Since the charging is through a current source instead of a resistor the voltage will decrease linearly with time" This linear decreasing still depends on the phototransistor value, right? – Sergio Lopez Jul 6 '12 at 14:16
If it's charged the voltage on the lower pin is 0 V or near it. In step 2 you make the I/O output high, then there's current from the output through the resistor to the lower pin, so that the voltage increases. Charge is voltage x capacitance, so as the voltage across the cap decreases, the charge decreases. And yes, the linear decreasing depends on the phototransistor. The more light it gets the faster the decrease. – stevenvh Jul 6 '12 at 14:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.