The sensors Measurements

Hello,

I have a question about the sensors measurements, are they filtered?
One important issue I noticed is that in the calibration function we use the maximum and the minimum to calibrate the readings, hence my question raised.

Thanks.
Moat.

Hello, Moat.

Assuming you are talking about the reflectance sensors on the 3pi, they work by measuring the discharge time of a capacitor through the photodiode, which makes them relatively immune to short-duration electrical noise. As you can see from the schematic, the signal going to the MCU is just the capacitor voltage. The calibration function does not do any kind of software filtering of the results, and I think such filtering is generally not necessary, but you could consider adding some if you are concerned. For example, store the highest four and lowest four readings, reject any outliers and use the averages for the calibration max and min (or use the existence of outliers as a sign you should perform the calibration again).

- Ben