Open TechPro424 opened 1 month ago
For a 4.7 pF cap:
527
580
580
487
509
502
576
542
527
580
580
487
509
502
576
542
Bump
Tried using Capacitor instead if CapacitorLite, and got these values (for a 47 pF cap)
37.61
37.30
37.30
37.76
37.61
37.61
Code:
/*
MeasureCapacitor
Measures the capacitance between D7 and A2.
Prints the result to the Serial Monitor.
This example code is in the public domain.
*/
#include <Capacitor.h>
#include <CapacitorLite.h>
// Capacitor under test.
// Note that for electrolytics the first pin (in this case D7)
// should be positive, the second (in this case A2) negative.
Capacitor cap1(7,A2);
void setup() {
Serial.begin(9600);
}
void loop() {
while (Serial.available() == 0) {
}
String input = Serial.readString();
if(input.length() > 0) {Serial.println(cap1.Measure());
} // Measure the capacitance (in pF), print to Serial Monitor
}
For a 4.7 pF cap
5.35
5.09
5.39
5.35
5.20
I tested the library out on an Arduino Uno R3 (that I borrowed from a friend) using a 47pF capacitor and it does not seem to return the right value. (Returns around 3600 to 3700) I used the CapacitorLite example, but set the delay to 5 seconds
Code:
Output for a 47pF capacitor: