This article explains about the process to read the analog voltage from pi. Read on to know more on this.
There are many ways to read many types of sensors without the help of ADC. By calculating the sensor as a resistor, which is used to fill up a capacitor, we can easily able to count how long it takes. The process which anybody adopts is by taking the advantage of the electronic property of both the resistor and capacitor.
It is found to be true that if a capacitor with no voltage is used and connected with some power by using resistor, then it is noticed that it would slowly charge up to a power voltage. Those sensors, which act like the resistors, can work with these techniques. Some sensors, which works like this are photocells, thermistors, flex sensor, force-sensitive resistors, and many more. The sensors which have pure analog output are not be used with this technique like IR distance sensors or analog accelerometers.
This process starts by using oscilloscope which shows what is going on in the digital pins. The pin with blue color indicates the starting point of Pi and it complete in about 4.5ms. In this the capacitor will act like the bucket and the resistor is acting like a thin pipe.