Sensor or capacitance measuring with a microprocessor
First Claim
1. An apparatus for measuring a parameter, the apparatus comprising:
- a microprocessor having a plurality of pins;
a sensor capacitor configured to change capacitance as the parameter changes, the sensor capacitor having a first lead electrically connected to a first pin of the microprocessor, and a second lead electrically connected to a second pin of the microprocessor;
a first reference capacitor having a first lead electrically connected to a third pin of the microprocessor, and a second lead electrically connected to the second pin of the microprocessor;
a resistor having a first lead electrically connected to a fourth pin of the microprocessor, and a second lead electrically connected to the second pin of the microprocessor;
a second reference capacitor having a first lead electrically connected to a fifth pin of the microprocessor, and a second lead electrically connected to the second pin of the microprocessora comparator configured to detect whether a threshold voltage has been reached;
a timer, wherein the apparatus is configured to use the timer to measure how long it takes for;
the sensor capacitor to reach the threshold voltage;
the first reference capacitor to reach the threshold voltage; and
the second reference capacitor to reach the threshold voltage;
wherein the sensor capacitance is calculated using the formula;
Sensor Capacitance=[(TimerS−
Timer1)/(Timer2−
Timer1)](Ref2−
Ref1)+Ref1wherein;
TimerS is the time for the sensor capacitor to reach the threshold voltage,Timer1 is the time for the first reference capacitor to reach the threshold voltage,Timer2 is the time for the second reference capacitor to reach the threshold voltage,Ref1 is the capacitance of the first reference capacitor, andRef2 is the capacitance of the second reference capacitor.
6 Assignments
0 Petitions
Accused Products
Abstract
An apparatus, system, and method for measuring parameters, measuring or determining capacitance, producing a digital output that is dependent upon a capacitance, or converting a variable capacitance output, of a sensor capacitor for example, into a digital format. By activating and deactivating pins, a microprocessor may form various circuits, for instance, each containing a resistor and a different capacitor and, in some embodiments, without the use of intermediate switching components. The microprocessor may alternately measure the time to change the charge of each of the capacitors and then calculate the capacitance of one of the capacitors using the measured times and known capacitances of one or more reference capacitors. Certain embodiments use two reference capacitors and alternately charge and discharge the capacitors, and a simple formula may be used to calculate capacitance using times to reach a threshold voltage. A measured parameter may be humidity or pressure, for example.
34 Citations
34 Claims
-
1. An apparatus for measuring a parameter, the apparatus comprising:
-
a microprocessor having a plurality of pins; a sensor capacitor configured to change capacitance as the parameter changes, the sensor capacitor having a first lead electrically connected to a first pin of the microprocessor, and a second lead electrically connected to a second pin of the microprocessor; a first reference capacitor having a first lead electrically connected to a third pin of the microprocessor, and a second lead electrically connected to the second pin of the microprocessor; a resistor having a first lead electrically connected to a fourth pin of the microprocessor, and a second lead electrically connected to the second pin of the microprocessor; a second reference capacitor having a first lead electrically connected to a fifth pin of the microprocessor, and a second lead electrically connected to the second pin of the microprocessor a comparator configured to detect whether a threshold voltage has been reached; a timer, wherein the apparatus is configured to use the timer to measure how long it takes for; the sensor capacitor to reach the threshold voltage; the first reference capacitor to reach the threshold voltage; and the second reference capacitor to reach the threshold voltage; wherein the sensor capacitance is calculated using the formula;
Sensor Capacitance=[(TimerS−
Timer1)/(Timer2−
Timer1)](Ref2−
Ref1)+Ref1wherein; TimerS is the time for the sensor capacitor to reach the threshold voltage, Timer1 is the time for the first reference capacitor to reach the threshold voltage, Timer2 is the time for the second reference capacitor to reach the threshold voltage, Ref1 is the capacitance of the first reference capacitor, and Ref2 is the capacitance of the second reference capacitor. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method of measuring the capacitance of a first capacitor, the method comprising the steps of:
-
activating at least a first pin of a microprocessor, wherein the first pin is electrically connected to the first capacitor; while the first pin is activated, measuring a time to change the charge of the first capacitor; after the measuring of the time to change the charge of the first capacitor, deactivating the first pin into a high impedance state; activating at least a second pin of the microprocessor, wherein the second pin is electrically connected to a second capacitor; while the second pin is activated, measuring a time to change the charge of the second capacitor; after the measuring of the time to change the charge of the second capacitor, deactivating the second pin into a high impedance state; activating at least a third pin of the microprocessor, wherein the third pin is electrically connected to a third capacitor; while the third pin is activated, measuring a time to change the charge of the third capacitor; after the measuring of the time to change the charge of the third capacitor, deactivating the third pin into a high impedance state; and using at least the time to change the charge of the first capacitor, the time to change the charge of the second capacitor, and the time to change the charge of the third capacitor to calculate the capacitance of the first capacitor; wherein the second capacitor and third capacitor are reference capacitors having known capacitances and the step of calculating the capacitance of the first capacitor includes finding the difference in capacitance between the second capacitor and the third capacitor. - View Dependent Claims (12, 13, 14, 15)
-
-
16. A method of measuring the capacitance of a first capacitor, the method comprising the steps of:
-
activating at least a first pin of a microprocessor, wherein the first pin is electrically connected to the first capacitor; while the first pin is activated, measuring a time to change the charge of the first capacitor; after the measuring of the time to change the charge of the first capacitor, deactivating the first pin into a high impedance state; activating at least a second pin of the microprocessor, wherein the second pin is electrically connected to a second capacitor; while the second pin is activated, measuring a time to change the charge of the second capacitor; after the measuring of the time to change the charge of the second capacitor, deactivating the second pin into a high impedance state; activating at least a third pin of the microprocessor, wherein the third pin is electrically connected to a third capacitor; while the third pin is activated, measuring a time to change the charge of the third capacitor; after the measuring of the time to change the charge of the third capacitor, deactivating the third pin into a high impedance state; and using at least the time to change the charge of the first capacitor, the time to change the charge of the second capacitor, and the time to change the charge of the third capacitor to calculate the capacitance of the first capacitor; wherein the second capacitor and third capacitor are reference capacitors having known capacitances and the step of calculating the capacitance of the first capacitor includes adding the capacitance of the second capacitor. - View Dependent Claims (17, 18)
-
-
19. A method of measuring the capacitance of a first capacitor, the method comprising the steps of:
-
activating at least a first pin of a microprocessor, wherein the first pin is electrically connected to the first capacitor; while the first pin is activated, measuring a time to change the charge of the first capacitor; after the measuring of the time to change the charge of the first capacitor, deactivating the first pin into a high impedance state; activating at least a second pin of the microprocessor, wherein the second pin is electrically connected to a second capacitor; while the second pin is activated, measuring a time to change the charge of the second capacitor; after the measuring of the time to change the charge of the second capacitor, deactivating the second pin into a high impedance state; activating at least a third pin of the microprocessor, wherein the third pin is electrically connected to a third capacitor; while the third pin is activated, measuring a time to change the charge of the third capacitor; after the measuring of the time to change the charge of the third capacitor, deactivating the third pin into a high impedance state; and using at least the time to change the charge of the first capacitor, the time to change the charge of the second capacitor, and the time to change the charge of the third capacitor to calculate the capacitance of the first capacitor; wherein the step of calculating the capacitance of the first capacitor includes finding the difference between the time to change the charge of the first capacitor and the time to change the charge of the second capacitor. - View Dependent Claims (20, 21)
-
-
22. A method of measuring the capacitance of a first capacitor, the method comprising the steps of:
-
activating at least a first pin of a microprocessor, wherein the first pin is electrically connected to the first capacitor; while the first pin is activated, measuring a time to change the charge of the first capacitor; after the measuring of the time to change the charge of the first capacitor, deactivating the first pin into a high impedance state; activating at least a second pin of the microprocessor, wherein the second pin is electrically connected to a second capacitor; while the second pin is activated, measuring a time to change the charge of the second capacitor; after the measuring of the time to change the charge of the second capacitor, deactivating the second pin into a high impedance state; activating at least a third pin of the microprocessor, wherein the third pin is electrically connected to a third capacitor; while the third pin is activated, measuring a time to change the charge of the third capacitor; after the measuring of the time to change the charge of the third capacitor, deactivating the third pin into a high impedance state; and using at least the time to change the charge of the first capacitor, the time to change the charge of the second capacitor, and the time to change the charge of the third capacitor to calculate the capacitance of the first capacitor; wherein the step of calculating the capacitance of the first capacitor includes finding the difference between the time to change the charge of the second capacitor and the time to change the charge of the third capacitor. - View Dependent Claims (23, 24)
-
-
25. A method of measuring the capacitance of a first capacitor, the method comprising the steps of:
-
activating at least a first pin of a microprocessor, wherein the first pin is electrically connected to the first capacitor; while the first pin is activated, measuring a time to change the charge of the first capacitor; after the measuring of the time to change the charge of the first capacitor, deactivating the first pin into a high impedance state; activating at least a second pin of the microprocessor, wherein the second pin is electrically connected to a second capacitor; while the second pin is activated, measuring a time to change the charge of the second capacitor; after the measuring of the time to change the charge of the second capacitor, deactivating the second pin into a high impedance state; activating at least a third pin of the microprocessor, wherein the third pin is electrically connected to a third capacitor; while the third pin is activated, measuring a time to change the charge of the third capacitor; after the measuring of the time to change the charge of the third capacitor, deactivating the third pin into a high impedance state; and using at least the time to change the charge of the first capacitor, the time to change the charge of the second capacitor, and the time to change the charge of the third capacitor to calculate the capacitance of the first capacitor; wherein the step of calculating the capacitance of the first capacitor includes finding the difference between the time to change the charge of the first capacitor and the time to change the charge of the second capacitor, and dividing this quantity by the difference between the time to change the charge of the second capacitor and the time to change the charge of the third capacitor. - View Dependent Claims (26, 27)
-
-
28. A method of measuring the capacitance of a first capacitor, the method comprising the steps of:
-
activating at least a first pin of a microprocessor, wherein the first pin is electrically connected to the first capacitor; while the first pin is activated, measuring a time to change the charge of the first capacitor; after the measuring of the time to change the charge of the first capacitor, deactivating the first pin into a high impedance state; activating at least a second pin of the microprocessor, wherein the second pin is electrically connected to a second capacitor; while the second pin is activated, measuring a time to change the charge of the second capacitor; after the measuring of the time to change the charge of the second capacitor, deactivating the second pin into a high impedance state; activating at least a third pin of the microprocessor, wherein the third pin is electrically connected to a third capacitor; while the third pin is activated, measuring a time to change the charge of the third capacitor; after the measuring of the time to change the charge of the third capacitor, deactivating the third pin into a high impedance state; and using at least the time to change the charge of the first capacitor, the time to change the charge of the second capacitor, and the time to change the charge of the third capacitor to calculate the capacitance of the first capacitor; wherein the step of calculating the capacitance of the first capacitor comprises using the formula;
Sensor Capacitance=[(TimerS−
Timer1)/(Timer2−
Timer1)](Ref2−
Ref1)+Ref1wherein; TimerS is the time to change the charge of the first capacitor, Timer1 is the time to change the charge of the second capacitor, Timer2 is the time to change the charge of the third capacitor, Ref1 is the capacitance of the second capacitor, and Ref2 is the capacitance of the third capacitor. - View Dependent Claims (29, 30)
-
-
31. A method of converting the variable capacitance output of a sensor capacitor into a digital format, the method comprising the steps of:
-
using a microprocessor, without the use of intermediate switching components, forming a circuit to facilitate changing the charge of the sensor capacitor; using the microprocessor, without the use of intermediate switching components, changing the charge of the sensor capacitor while measuring the time required to change the charge of the sensor capacitor; using the microprocessor, without the use of intermediate switching components, reconfiguring the circuit to facilitate changing the charge of a first reference capacitor; using the microprocessor, without the use of intermediate switching components, changing the charge of the first reference capacitor while measuring the time required to change the charge of the first reference capacitor; using the microprocessor, without the use of intermediate switching components, reconfiguring the circuit to facilitate changing the charge of a second reference capacitor; using the microprocessor, without the use of intermediate switching components, changing the charge of the second reference capacitor while measuring the time required to change the charge of the second reference capacitor; and using the microprocessor and at least the time required to change the charge of the sensor capacitor, the time required to change the charge of the first reference capacitor, and the time required to change the charge of the second reference capacitor to calculate a digital output that is dependent upon the capacitance of the sensor capacitor; and wherein the step of calculating a digital output comprises using the formula;
Sensor Capacitance=[(TimerS−
Timer1)/(Timer2−
Timer1)](Ref2−
Ref1)+Ref1wherein; TimerS is the time to change the charge of the sensor capacitor, Timer1 is the time to change the charge of the first reference capacitor, Timer2 is the time to change the charge of the second reference capacitor, Ref1 is the capacitance of the first reference capacitor, and Ref2 is the capacitance of the second reference capacitor. - View Dependent Claims (32, 33, 34)
-
Specification