Simple Arduino Capacitance meter design....

A

amdx

Guest
Here is an Arduino based Capacitance meter, requires zero additional parts.

https://wordpress.codewrite.co.uk/pic/2014/01/21/cap-meter-with-arduino-uno/index.html

 \"Update: I have managed to increase the range, so it can measure
capacitances of less than 1pF to over 1000uF , still with no external
components!\"

\"The circuit is surprisingly easy. In fact there isn’t a circuit now.
We’re going to use the Arduino as follows:
The code above loops round every half second, applying a 5V pulse to the
capacitor, and measuring the voltage of other side.
It then prints out the calculated capacitance (and raw ADC value).\"

\"We will use the ADC to measure VA0. VA2 (input of a capacitance divider
) is actually 5 volts,  so VA0 will vary from 0 to 5 volts, but, we can
use the ADC value instead,
 to make the calculations easier. Obviously we should then use the
maximum ADC value (1023) for VA2.
 The ADC readings we can expect will range from about 33 for CT = 1pF
to about 993 for CT = 1nF (1000pF).\"

\"If we try this out it won’t be very accurate. That is because the stray
capacitance isn’t exactly 30pF. So we need to calibrate it.
I did this with a 100pF capacitor. My multimeter reckons that it
actually has a value of 102pF. The reading I get on my Arduino board is
125pF
 (raw ADC value 825). So if we put VA0 = 825, VA2 = 1023 and CT = 102
into the second equation, this tells us that C1 is 24.48pF.
So I changed IN_STRAY_CAP_TO_GND to 24.48 and uploaded this to the Arduino.\"

So, you will need a Very low tolerance Capacitor to adjust stray
capacitance in programing.

        Thought some might find this interesting,
                                                 Mikek
 
On Monday, September 5, 2022 at 1:45:00 PM UTC-7, jla...@highlandsniptechnology.com wrote:
On Mon, 5 Sep 2022 14:32:14 -0400, Phil Hobbs
pcdhSpamM...@electrooptical.net> wrote:
amdx wrote:

(raw ADC value 825). So if we put VA0 = 825, VA2 = 1023 and CT = 102

Sure. Capacitance isn\'t a scalar value, it\'s a tensor. That\'s why the
capacitance between pads on a board varies a lot depending on the
position of the ground plane. ...

I\'m considering making two little blue boxes, a cap meter and a cap
simulator, both related to capacitive fluid level measurement...
mostly oil and fuel levels in aircraft. Both would be 3-wire devices,
including ground.

If your probe has a \'555 in it, with a load resistor, the frequency can be read out
of the current in the power wires. Don\'t need a three-wire cord, two (one of \'em ground)
will suffice.
 
On Mon, 5 Sep 2022 19:08:10 -0700 (PDT), whit3rd <whit3rd@gmail.com>
wrote:

On Monday, September 5, 2022 at 1:45:00 PM UTC-7, jla...@highlandsniptechnology.com wrote:
On Mon, 5 Sep 2022 14:32:14 -0400, Phil Hobbs
pcdhSpamM...@electrooptical.net> wrote:
amdx wrote:

(raw ADC value 825). So if we put VA0 = 825, VA2 = 1023 and CT = 102

Sure. Capacitance isn\'t a scalar value, it\'s a tensor. That\'s why the
capacitance between pads on a board varies a lot depending on the
position of the ground plane. ...

I\'m considering making two little blue boxes, a cap meter and a cap
simulator, both related to capacitive fluid level measurement...
mostly oil and fuel levels in aircraft. Both would be 3-wire devices,
including ground.

If your probe has a \'555 in it, with a load resistor, the frequency can be read out
of the current in the power wires. Don\'t need a three-wire cord, two (one of \'em ground)
will suffice.

I never use 555s.

I meant that the capacitances will be treated as 3-terminal
capacitors.
 
jlarkin@highlandsniptechnology.com wrote:
On Mon, 5 Sep 2022 14:32:14 -0400, Phil Hobbs
pcdhSpamMeSenseless@electrooptical.net> wrote:

amdx wrote:

 (raw ADC value 825). So if we put VA0 = 825, VA2 = 1023 and CT = 102

Sure. Capacitance isn\'t a scalar value, it\'s a tensor. That\'s why the
capacitance between pads on a board varies a lot depending on the
position of the ground plane.



I\'m considering making two little blue boxes, a cap meter and a cap
simulator, both related to capacitive fluid level measurement...
mostly oil and fuel levels in aircraft. Both would be 3-wire devices,
including ground.

The cap meter doesn\'t need programmable DC bias, but that would be
easy to add and might sell some for other uses.

ChesterW and I did a radar gas gauge that sells for super cheap and
covers that territory fairly well.

https://rochestersensors.com/product/9400/

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC / Hobbs ElectroOptics
Optics, Electro-optics, Photonics, Analog Electronics
Briarcliff Manor NY 10510

http://electrooptical.net
http://hobbs-eo.com
 
On a sunny day (Mon, 5 Sep 2022 12:16:54 -0500) it happened amdx
<amdx@knology.net> wrote in <tf5au7$3kqe6$1@dont-email.me>:

On 9/5/2022 11:27 AM, Jan Panteltje wrote:
On a sunny day (Mon, 5 Sep 2022 10:13:03 -0500) it happened amdx
amdx@knology.net> wrote in <tf53m0$3k1sb$1@dont-email.me>:
1pF makes no sense, as anything close to it will change C,

Are you saying anything within close proximity of the one pf, \"will
change C (CT)\"?
I expect so.
Did you try it?

I did now! The smallest cap have is a silver mica 2pf. I used my
DE 5000 to measure, 1.97pf, I slipped a 1/2\" copper pipe over it, and
the capacitance increased to 2.94pf,
when connected it to the guard, the capacitance dropped to dropped to
1.74pf.
 Lightly touching the cap on both sides with my fingers increases the
capacitance to 2.4pf,
but, if I\'m also touching the guard, negligible change.
  I put the leads through an FR4 perforated PCB, capacitor body close
to the pcb and the capacitance dropped 0.02pf.

Interesting,
For design of tuned circuit up to say 100 MHz I use much higher capacitor values
there are many reasons
1) transistors have a high Ccb Cce, so you want to be an order of magnitide bigger perhaps
(unless you want to use the transistor as varicap as I sometines do).
2) PCBs have their own trace capacitance, so you want to be bigger than that

So having 1 pF caps makes no sense to me.
In special cases you can make a cap / trimmer by puting 2 pieces of insulated wire next to each other
or wind some piece of wire around an other piece of wire, but that has its own effects too
http://panteltje.com/pub/2.4GHz_twisted_oscillator_IMG_3629.GIF
http://panteltje.com/pub/twisted_wire_oscillator_IMG_6629.JPG
as when you get to very short wavelength this sort of construction resembles a transmission line
where 1/4 wavelength etc gives all sort of interesting effects.

For lower frequencies in the MHz range I use LARGE capacitors
http://panteltje.com/pub/testing_the_20_meter_inductive_loop_antenna_IMG_4536.JPG
few hundred pF variable capacitor.

http://panteltje.com/pub/testing_the_20_meter_inductive_loop_antenna_dunno_IMG_4537.JPG
that is test result from using my SARK100 antenna analyzer:
http://panteltje.com/pub/SARK100_on_dummy_antenna_IMG_4508.JPG

For normal circuits, say 10 to maybe 100 MHz, a few hundred pF and a variable core inductor works best for me:
http://panteltje.com/pub/25MHz_220pF_par_LC_IMG_6896.JPG


You can put the LC combination in a metal housing too, I never really bother with that, just keep some distance
between LCs on the board.



With 220 pF other effects become much less .
Evan the old AM radios used 2 x 500 pF variable caps, as you can see in th inductive loop link that also worls at many MHz
Keep your C values as high as possible!

So, I never used a 1 pF cap in my life....

I hope the links work...
 
Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> wrote:

I\'m considering making two little blue boxes, a cap meter and a cap
simulator, both related to capacitive fluid level measurement...
mostly oil and fuel levels in aircraft. Both would be 3-wire devices,
including ground.

The cap meter doesn\'t need programmable DC bias, but that would be
easy to add and might sell some for other uses.


ChesterW and I did a radar gas gauge that sells for super cheap and
covers that territory fairly well.

https://rochestersensors.com/product/9400/

Cheers

Phil Hobbs

Totally unsuited for aircraft. The level changes with turbulence and turn
and bank errors. Most aircraft, including my Piper Malibu, use fuel flow
and a simple float level gauge. You know how many gallons you put in the
tanks, and fuel flow tells when you will run out. You constanly compare
them to spot any leaks or anomalies.

My Malibu has two tanks, one in each wing. They total 120 gallons, so I am
good for about 1,555 nautical miles, or San Jose to Piper Headquarters at
Vero Beach, Florida, in about 3 hops, depending on the winds.

The environment in an aircraft is much more demanding than a stationary
application on solid ground. An electronic gauge has complex electronics,
and may not survive lightning strikes and the electrical environment in an
A/C. It has to survive constant vibration and turbulence which is not
present on solid ground, plus the shocks of landing at the end of each
flight.

The FAA is highly reluctant to allow new, untried technology to replace
systems that have shown excellent performance for many decades. The key
here is simplicity and reliability. A float level gauge is a simple
potentiometer and ruggedized voltmeter. There is very little that can go
wrong.




--
MRM
 
On Tuesday, September 6, 2022 at 6:04:16 PM UTC+10, Mike Monett VE3BTI wrote:
Phil Hobbs <pcdhSpamM...@electrooptical.net> wrote:


I\'m considering making two little blue boxes, a cap meter and a cap
simulator, both related to capacitive fluid level measurement...
mostly oil and fuel levels in aircraft. Both would be 3-wire devices,
including ground.

The cap meter doesn\'t need programmable DC bias, but that would be
easy to add and might sell some for other uses.


ChesterW and I did a radar gas gauge that sells for super cheap and
covers that territory fairly well.

https://rochestersensors.com/product/9400/

Cheers

Phil Hobbs
Totally unsuited for aircraft. The level changes with turbulence and turn
and bank errors. Most aircraft, including my Piper Malibu, use fuel flow
and a simple float level gauge. You know how many gallons you put in the
tanks, and fuel flow tells when you will run out. You constanly compare
them to spot any leaks or anomalies.

My Malibu has two tanks, one in each wing. They total 120 gallons, so I am
good for about 1,555 nautical miles, or San Jose to Piper Headquarters at
Vero Beach, Florida, in about 3 hops, depending on the winds.

The environment in an aircraft is much more demanding than a stationary
application on solid ground. An electronic gauge has complex electronics,
and may not survive lightning strikes and the electrical environment in an
A/C. It has to survive constant vibration and turbulence which is not
present on solid ground, plus the shocks of landing at the end of each
flight.

The FAA is highly reluctant to allow new, untried technology to replace
systems that have shown excellent performance for many decades. The key
here is simplicity and reliability. A float level gauge is a simple
potentiometer and ruggedized voltmeter. There is very little that can go
wrong.

Something like a proximity fuse could never work. Getting fired out of an anti-aircraft gun would clearly wreck the electronics much more thoroughly than turbulence and landing jolts.

--
Bill Sloman, Sydney
 
On Tue, 6 Sep 2022 01:09:06 -0400, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

jlarkin@highlandsniptechnology.com wrote:
On Mon, 5 Sep 2022 14:32:14 -0400, Phil Hobbs
pcdhSpamMeSenseless@electrooptical.net> wrote:

amdx wrote:

 (raw ADC value 825). So if we put VA0 = 825, VA2 = 1023 and CT = 102

Sure. Capacitance isn\'t a scalar value, it\'s a tensor. That\'s why the
capacitance between pads on a board varies a lot depending on the
position of the ground plane.



I\'m considering making two little blue boxes, a cap meter and a cap
simulator, both related to capacitive fluid level measurement...
mostly oil and fuel levels in aircraft. Both would be 3-wire devices,
including ground.

The cap meter doesn\'t need programmable DC bias, but that would be
easy to add and might sell some for other uses.


ChesterW and I did a radar gas gauge that sells for super cheap and
covers that territory fairly well.

https://rochestersensors.com/product/9400/

Sounds like US20200217706A1, to Chester Wildey et al of Rochester
Gauge.

Get pdf by entering the above number into google patents.

Joe Gwinn
 
On Tue, 6 Sep 2022 01:09:06 -0400, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

jlarkin@highlandsniptechnology.com wrote:
On Mon, 5 Sep 2022 14:32:14 -0400, Phil Hobbs
pcdhSpamMeSenseless@electrooptical.net> wrote:

amdx wrote:

 (raw ADC value 825). So if we put VA0 = 825, VA2 = 1023 and CT = 102

Sure. Capacitance isn\'t a scalar value, it\'s a tensor. That\'s why the
capacitance between pads on a board varies a lot depending on the
position of the ground plane.



I\'m considering making two little blue boxes, a cap meter and a cap
simulator, both related to capacitive fluid level measurement...
mostly oil and fuel levels in aircraft. Both would be 3-wire devices,
including ground.

The cap meter doesn\'t need programmable DC bias, but that would be
easy to add and might sell some for other uses.


ChesterW and I did a radar gas gauge that sells for super cheap and
covers that territory fairly well.

https://rochestersensors.com/product/9400/

Cheers

Phil Hobbs

The aircraft level sensors usually have one AC excitation electrode
and two pickups, one for the level and one as the dielectric constant
measuring reference. So our cap simulators accept a big sine wave and
output two currents, shifted 90 deg from the excitation. Of course a
TDR level sensor doesn\'t need an Er reference.

We also do a resistive component, to simulate water in the fuel. Maybe
Er tells them something about the fuel too. You don\'t want the wrong
stuff, or dirty stuff, in a plane.

How is your TDR sensor selling?
 
On a sunny day (Mon, 5 Sep 2022 06:33:58 -0500) it happened amdx
<amdx@knology.net> wrote in <tf4mre$3ihm4$1@dont-email.me>:

Here is an Arduino based Capacitance meter, requires zero additional parts.

https://wordpress.codewrite.co.uk/pic/2014/01/21/cap-meter-with-arduino-uno/index.html


 \"Update: I have managed to increase the range, so it can measure
capacitances of less than 1pF to over 1000uF , still with no external
components!\"

\"The circuit is surprisingly easy. In fact there isn’t a circuit now.
We’re going to use the Arduino as follows:
The code above loops round every half second, applying a 5V pulse to the
capacitor, and measuring the voltage of other side.
It then prints out the calculated capacitance (and raw ADC value).\"

\"We will use the ADC to measure VA0. VA2 (input of a capacitance divider
) is actually 5 volts,  so VA0 will vary from 0 to 5 volts, but, we can
use the ADC value instead,
 to make the calculations easier. Obviously we should then use the
maximum ADC value (1023) for VA2.
 The ADC readings we can expect will range from about 33 for CT = 1pF
to about 993 for CT = 1nF (1000pF).\"

\"If we try this out it won’t be very accurate. That is because the stray
capacitance isn’t exactly 30pF. So we need to calibrate it.
I did this with a 100pF capacitor. My multimeter reckons that it
actually has a value of 102pF. The reading I get on my Arduino board is
125pF
 (raw ADC value 825). So if we put VA0 = 825, VA2 = 1023 and CT = 102
into the second equation, this tells us that C1 is 24.48pF.
So I changed IN_STRAY_CAP_TO_GND to 24.48 and uploaded this to the Arduino.\"

So, you will need a Very low tolerance Capacitor to adjust stray
capacitance in programing.

I use this:
http://panteltje.com/panteltje/pic/lc_pic/

1pF makes no sense, as anything close to it will change C,
You will need a PIC programmer.
Arduino is overkill.
 
On 9/5/2022 8:26 AM, Jan Panteltje wrote:
On a sunny day (Mon, 5 Sep 2022 06:33:58 -0500) it happened amdx
amdx@knology.net> wrote in <tf4mre$3ihm4$1@dont-email.me>:

Here is an Arduino based Capacitance meter, requires zero additional parts.

https://wordpress.codewrite.co.uk/pic/2014/01/21/cap-meter-with-arduino-uno/index.html

 \"Update: I have managed to increase the range, so it can measure
capacitances of less than 1pF to over 1000uF , still with no external
components!\"

\"The circuit is surprisingly easy. In fact there isn’t a circuit now.
We’re going to use the Arduino as follows:
The code above loops round every half second, applying a 5V pulse to the
capacitor, and measuring the voltage of other side.
It then prints out the calculated capacitance (and raw ADC value).\"

\"We will use the ADC to measure VA0. VA2 (input of a capacitance divider
) is actually 5 volts,  so VA0 will vary from 0 to 5 volts, but, we can
use the ADC value instead,
 to make the calculations easier. Obviously we should then use the
maximum ADC value (1023) for VA2.
 The ADC readings we can expect will range from about 33 for CT = 1pF
to about 993 for CT = 1nF (1000pF).\"

\"If we try this out it won’t be very accurate. That is because the stray
capacitance isn’t exactly 30pF. So we need to calibrate it.
I did this with a 100pF capacitor. My multimeter reckons that it
actually has a value of 102pF. The reading I get on my Arduino board is
125pF
 (raw ADC value 825). So if we put VA0 = 825, VA2 = 1023 and CT = 102
into the second equation, this tells us that C1 is 24.48pF.
So I changed IN_STRAY_CAP_TO_GND to 24.48 and uploaded this to the Arduino.\"

So, you will need a Very low tolerance Capacitor to adjust stray
capacitance in programing.
I use this:
http://panteltje.com/panteltje/pic/lc_pic/

1pF makes no sense, as anything close to it will change C,
You will need a PIC programmer.
Arduino is overkill.
Are you saying anything within close proximity of the one pf, \"will
change C (CT)\"?
                                                    Mikek
 
On a sunny day (Mon, 5 Sep 2022 10:13:03 -0500) it happened amdx
<amdx@knology.net> wrote in <tf53m0$3k1sb$1@dont-email.me>:

Are you saying anything within close proximity of the one pf, \"will
change C (CT)\"?

I expect so.
Did you try it?
 
On 9/5/2022 11:27 AM, Jan Panteltje wrote:
On a sunny day (Mon, 5 Sep 2022 10:13:03 -0500) it happened amdx
amdx@knology.net> wrote in <tf53m0$3k1sb$1@dont-email.me>:
1pF makes no sense, as anything close to it will change C,

Are you saying anything within close proximity of the one pf, \"will
change C (CT)\"?
I expect so.
Did you try it?
I did now! The smallest cap have is a silver mica 2pf. I used my
DE 5000 to measure, 1.97pf, I slipped a 1/2\" copper pipe over it, and
the capacitance increased to 2.94pf,
when connected it to the guard, the capacitance dropped to dropped to
1.74pf.
 Lightly touching the cap on both sides with my fingers increases the
capacitance to 2.4pf,
but, if I\'m also touching the guard, negligible change.
  I put the leads through an FR4 perforated PCB, capacitor body close
to the pcb and the capacitance dropped 0.02pf.
                                               Mikek
 
amdx wrote:
 (raw ADC value 825). So if we put VA0 = 825, VA2 = 1023 and CT = 102

Sure. Capacitance isn\'t a scalar value, it\'s a tensor. That\'s why the
capacitance between pads on a board varies a lot depending on the
position of the ground plane.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC / Hobbs ElectroOptics
Optics, Electro-optics, Photonics, Analog Electronics
Briarcliff Manor NY 10510

http://electrooptical.net
http://hobbs-eo.com
 
On 9/5/2022 1:32 PM, Phil Hobbs wrote:
amdx wrote:

 (raw ADC value 825). So if we put VA0 = 825, VA2 = 1023 and CT = 102

Sure.  Capacitance isn\'t a scalar value, it\'s a tensor.  That\'s why
the capacitance between pads on a board varies a lot depending on the
position of the ground plane.

Cheers

Phil Hobbs
 I probably don\'t understand, did you respond to the post you wanted to?
As I understand, VA2 value of 1023 is 5V, VA0 value of 825 is the value
at the center tap of the capacitive divider,
resulting a value of 102pf for the 100pf capacitor.

 But, yes, and I didn\'t have a ground plane on the first pcb I used.
I retested with a copper clad pcb, with the ground plane connected to
the guard on the DE 5000,
the capacitance dropped from 1.97pf to 1.84pf. When not connected to
guard, 1.95pf.
                         Mikek
 
On Mon, 5 Sep 2022 14:32:14 -0400, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

amdx wrote:

 (raw ADC value 825). So if we put VA0 = 825, VA2 = 1023 and CT = 102

Sure. Capacitance isn\'t a scalar value, it\'s a tensor. That\'s why the
capacitance between pads on a board varies a lot depending on the
position of the ground plane.

Cheers

Phil Hobbs

I\'m considering making two little blue boxes, a cap meter and a cap
simulator, both related to capacitive fluid level measurement...
mostly oil and fuel levels in aircraft. Both would be 3-wire devices,
including ground.

The cap meter doesn\'t need programmable DC bias, but that would be
easy to add and might sell some for other uses.
 

Welcome to EDABoard.com

Sponsor

Back
Top