Professional Documents
Culture Documents
Course Project
Course Project
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:
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)
{