How to use a sensor that doesn't required an analog-to-digital converter (ADC)? Like the Pololu QTR-1RC Reflector Sensor. I am using a picaxe 28x1 (Starter Kit).
No you do not have to measure the capacitor charge/ discharge. I have used them on 2 of my robots with arduino. Just use a pullup resistor, or the pullup command in picaxe which is easier, and you should be good and ready to read it as a digital sensor. It will give you 1 on black and 0 on white. No measuring time or anything.
Just to be clear, if you connect your sensor in this manner you’ll only get a digital output, which will change state at a fixed reflectance threshold. If you use the intended capacitor timing method you’ll be able to get an analog reflectance value which can be calibrated in software.
I would think that if you wanted an analog value, then you would buy the analog version of the sensor :D, but not necessarily but it would be easier. My guess is he will be using it just for like line following or something along that line that just uses black and white.
Last time I built a line follower (probably about 4 years ago now…) we had a command on the robot to ‘teach’ it what level white and black were, so you could calibrate the bot for different surfaces and lighting conditions. Either the voltage or capacitive timing based sensors can be used for this (they’re both analog after all).
The analog voltage output sensor may require less coding (due to the ADC functions being handled in hardware), but it consumes more precious hardware resources and power compared to the timing based sensor.
He is using picaxe though with ADC. Maybe instead of us talking to our selves we should ask him what he wants to do with it. Sure you could measure the time it takes to charge and discharge but its not required if you are doing something simple. It is a reflectance sensor but many people just use it as a line sensor.