3PI vs QTR capacitor values and timing


I have a question about the relationship between the capacitor value on my QTR-RC sensors versus the cap value on the 3pi robots ir sensors. (10nf versus 2.2nf). Does using 2.2nf mean that you can cut the time it takes to report full “black” essentially in half without sacrificing resolution? (sorry if resolution is not the proper word, not quite sure what the right term would be)

With my RC sensors, when I read the line my blackest colors take no more than 1000us. My grey is about 500, and white is reported around 50 or lower so. If I changed my cap values to 2.2nf like the 3pi uses, would this scale my readings in half? So black only takes 500us now, grey 250us, white 25 etc?

Also, what is the 2nd non-LED related resistor for on the QTR-RC schematic? (the one in line with the capacitor)

Thanks for your time



Yes, if you used the 3pi reflectance sensors and QTR-xRC sensors under identical conditions, the sensor pulses from the 3pi’s sensors would be shorter. The capacitor and phototransistor combine to form an RC circuit, with R being a function of the intensity of the incident IR on the phototransistor. The time constant of an RC circuit is T=RC, so you can see that the decay time is approximately four times faster on the 3pi sensors for a constant R. Note that mounting height also has a very significant effect on the pulse lengths, so differences in height could easily overshadow this 4x factor.

Because the sensors react more quickly on the 3pi, you can achieve higher update rates, and this comes in handy when trying to follow a line at high speeds. However, the trade-off is that you effectively lose measurement resolution because you are timing these shorter pulses without increasing timer resolution. For example, consider using a stopwatch with 1-second resolution to time a 40-yard dash vs a marathon.

The resistor in series with the sensor output acts as a current-limiter when you are charging the output node with an I/O line. For example, if you are using a 5V I/O line, the current flowing into the output node will be limited to 5/220 = 23 mA. The charging time constant is RC (in this case R is 220 Ohms, not the phototransistor), which is approximately 0.5 us for the 3pi sensors and 2.2 us on the QTR-xRC sensors. This is the amount of time it takes to charge the capacitor to approximately 63% of its full charge.

- Ben