Sie sind auf Seite 1von 10

NOV 22, 2019

Measurement of Unknown Capacitance

Presented by:
Venkata Deekshith Boddeda 170020020
Sonu Sourav 170020021
AIM:
To design a simple circuit for measuring an unknown capacitance which range
from 1 nF to 100 nF using Arduino UNO board for measuring frequencies and
serial monitor for displaying the capacitance value

Method Used:
Astable Multivibrator
The Astable Multivibrator is a type of cross-coupled transistor switching circuit that has NO
stable output states as it changes from one state to the other all the time. The astable circuit
consists of two switching transistors, a cross-coupled feedback network, and two-time delay
capacitors which allows oscillation between the two states with no external triggering to
produce the change in state.

The basic transistor circuit for an Astable Multivibrator produces a square wave output from a
pair of grounded emitter cross-coupled transistors. Both transistors either NPN or PNP, in the
multivibrator are biased for linear operation and are operated as Common Emitter Amplifiers
with 100% positive feedback.

This configuration satisfies the condition for oscillation when: ( βA = 1∠ 0o ). This results in
one stage conducting “fully-ON” (Saturation) while the other is switched “fully-OFF” (cut-off)
giving a very high level of mutual amplification between the two transistors.
Circuit Diagram:
Procedure:
1. The circuit is set up as given in the diagram above.
2. The R1 and R2 are 10kΩ both so the value of β comes out to be 0.5.
3. The capacitance value range is given to be 1nF to 100nF. Choose any one
calibrated value of capacitor and get the calibrated value of resistor.
4. The output from this circuit is fed into the Arduino using digital pin 7.
5. The pulseInLong() function of the Arduino will give the time period of the
LOW pulse and HIGH pulse. The inverse of the time period will give the
frequency.
6. The frequency of the output generated can be used to back calculate the
capacitance of the capacitor.
7. A known capacitance of a capacitor is used to calibrate the formula used.
By using the Vout formula, we get the value of resistor R3.
8. Now, connect different unknown capacitor and get their values on serial
monitor.

Calculations:
For an Astable Multivibrator, the frequency of oscillations of the output
voltage:

Since, we are using R1 = R2 = 10 kΩ, β = 0.5


Using the calibrated value of capacitor (1.017nF), and putting it in above
formula,
753.65 =1/(2 ∗ 𝑅 ∗1.017* 10-9 ∗ 𝑙𝑛(1 +0.5/ 1 -0.5) ) 𝐻𝑧
𝑅 = 600.56kΩ
Arduino Code:
#define pulse_ip 7
long ontime,offtime,duty;
double freq,period,cap;

void setup()
{
pinMode(pulse_ip,INPUT);
Serial.begin(4800);
Serial.print("Freq:");
}
void loop()
{
ontime = pulseInLong(pulse_ip,HIGH,960000);
offtime = pulseInLong(pulse_ip,LOW,960000);
period = ontime+offtime;
freq = 1000000.0/period;
duty = (ontime/period)*100;
cap = 1000000/(2*freq*1.0986123*600.12);
Serial.print(freq);
Serial.println("Hz");
Serial.print("Cap:");
Serial.print(cap);
Serial.println("nF");
delay(1000);
}
unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout)
{

uint8_t bit = digitalPinToBitMask(pin);


uint8_t port = digitalPinToPort(pin);
uint8_t stateMask = (state ? bit : 0);
unsigned long startMicros = micros();
while ((*portInputRegister(port) & bit) == stateMask) {
if (micros() - startMicros > timeout)
return 0;
}
while ((*portInputRegister(port) & bit) != stateMask) {
if (micros() - startMicros > timeout)
return 0;
}

unsigned long start = micros();


while ((*portInputRegister(port) & bit) == stateMask) {
if (micros() - startMicros > timeout)
return 0;
}
return micros() - start;
}
Observations:

Frequency Rated value of Calibrated Observed Error (in


(Hz) capacitor (nF) value(nF) Value(nF) percentage)
(From Gas sensing (From Serial
Lab) Monitor)

753.65 1 1.012 1 1.1%

65.565 10 11.59 11.68 7.7%

7.77 100 98.56 97.9 6%


Capacitor Value = 1nF
Capacitor Value = 10nF
Capacitor Value = 100nF
Inference:
1)the error observed between calibrated values and rated values of capacitors is
less than 5%.
2)The given circuit is able to measure the value of capacitances in the range of 1nF
to 100nF. The maximum error in the measured value of capacitance is 7.7% which
comes for the capacitance value of 10nF.

Das könnte Ihnen auch gefallen