Go Down

Topic: Is capacitive sensing possible with batteries? (Read 12427 times) previous topic - next topic

fungus

Update:

A piece of foil in the base of the jar works.

A piece of foil stuck to the side of the jar works too, but not as well as a piece in the base.

nb. The side I touch with my hand is actually the "GND" of the PCB/battery/etc. The foil is on the sense pin is far away. It seems ass-backwards to me, but it works.

Advanced Arduino

polymorph

If it were a mason jar lid, you could do as I suggested and insulate the ring and lid from each other.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

Grumpy_Mike

Quote
It seems ass-backwards to me, but it works.

It's floating there is no "right" way round.

KeithRB

You could probably glue a piece of PC board to the underside of the lid and use that.

polymorph

You don't want the PCB on the bottom of the lid to have too much capacitive coupling to it.

I would not glue it to the bottom of the lid. Instead, I'd put it so the circuit is sandwiched between the lid and a metal piece under it. Although a ring around inside the jar would be better than that.

It is about having your conductive hand shorten the path that the electric field has to take between the pieces of metal.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

Paul__B


A piece of foil in the base of the jar works.


Insofar as it is actually (capacitively) coupling itself to the bench on which it is sitting which is itself well coupled to the "real" "ground"/ "earth"/ whatever.  If on the other hand, the jar is picked up, it will lose this.


A piece of foil stuck to the side of the jar works too, but not as well as a piece in the base.


Needs to be a ring of foil in the neck of the jar, not too close to the lid but so the hand approaches this as it approaches the lid.  Whilst it may not be as sensitive, it will be much more reliable as it will not be affected by what the jar is - or is not - sitting upon.

fungus



A piece of foil in the base of the jar works.


Insofar as it is actually (capacitively) coupling itself to the bench on which it is sitting which is itself well coupled to the "real" "ground"/ "earth"/ whatever.  If on the other hand, the jar is picked up, it will lose this.


It still seems to work OK if you pick it up.

You also can trigger it by standing the jar on your hand.




A piece of foil stuck to the side of the jar works too, but not as well as a piece in the base.


Needs to be a ring of foil in the neck of the jar, not too close to the lid but so the hand approaches this as it approaches the lid.  Whilst it may not be as sensitive, it will be much more reliable as it will not be affected by what the jar is - or is not - sitting upon.



I don't need it to be mega-reliable, it just has to light up if people mess around with it.

It's more important to be able to hide the mechanism. A big ring of foil around the jar kinda spoils that.

I'll play around a bit more today....
Advanced Arduino

polymorph

Ah, I see... maybe you need to define the bandwidth, first.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

fungus

I've got working quite well. The lid of the jar is tied to GND and I attached a piece of foil on the end of a wire to the sense pin.

The main difference was that I ended up running the Tiny85 at 8MHz instead of the 1MHz I was originally using.

1MHz works fine when you're connected to a USB cable but it simply wasn't fast enough to get a good reading with a piece of foil as "ground".

Advanced Arduino

jbarchuk

I want a Tiny85 based device under the lid of a jam jar. I want it to turn on some LEDs when I touch the lid. It's powered by a coin cell.


How about a piezo disk to sense vibration? You may need to tap lightly rather than just touch the lid. If it's -too- sensitive it might detect a door slam so there's a range where it'll be just right.

Is this a metal lid? Most jam jars I've seen around are metal. If yes then make your own capacitor.

About a billion years ago one of the first factory jobs I had was to make 'Bolometer elements.' I'm not even sure what the heck the elemts were for was but it was some sort of ancient (meaning WWII era) technology that was still in use in the late 70s. *ALL* the devices they had in stock were *BAD* because the guy who'd been making them just did whatever he felt like and had no idea what the actual process was. So, I had to research from scratch how to make the friggin things. Pretty cool for an 18 year old kid eh? LOL!!!

The most IMPORTANT aspects of that Bolometer element was two capacitors about 1/4" across, built by spraying silver paint on opposite sides of a piece of mica, and a platinum wire (wow now just popped into my head, Wollaston wire,) about 1/8" long. That made a very precision R/C circuit.  I had to research at the local community college library how to calculate the dimensional specs for these precision caps and resistors.

The critical aspects were that the silver/mica caps and the Wollaston resistor had to be within a certain range of values. The guy who -had- been making them made boxes full of faulty parts had paid close to no attention to those values.

There's a formula that I don't remember any more that references the square inches of dielectric between two plates, vs the plate thickness. I'm sure you can find that somewhere.

You need a know thickness dielectric, but very stable, nylon, mica, maybe some other plastics. But they used mica because it was very stable, pure nonconductive dielectric, and fairly precision in thickness for repeatability. In your case precision is not much required, just 'a' capacitor of some vaguely known value. Whether you'll need to make something the size of a dime or a half dollar I have no clue - it depends on the thickness of the dielectric - but in general 'thinner = more capacitance.'

Glue down that dielectric on the underside of the lid with maybe CA which works best when clamped super-thin. That's to avoid much variation between the -calculated- dielectric thickness vs -assembled-.

Then glue another piece of conductive plate, any thin metal really, to the dielectric.

Now find a capacitive sensor circuit. Something that doesn't measure absolute capacitance but 'registers' when the capacitance changes 'a bunch.'

When the jar is untouched the capacitor will charge up to some level by static electricity, will vary with humidity. Again the exact value doesn't matter.

Your body will normally be at some voltage level drastically different from the jar capacitor, either higher or lower but probably generally much higher. When you touch the lid the electrons will kick off the sensor circuit and register in the Arduino.

polymorph

But you don't -want- more capacitance between the sensor and the lid. The more capacitance there is, the smaller percentage change from the added capacitance of someone touching the lid.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

jbarchuk


But you don't -want- more capacitance between the sensor and the lid. ...


As I said I couldn't even say if he needs a cap the size of a dime or a half dollar. It'll depend on environment, dielectric material, the detector. It's an exercise for the student. I'm just offering options and describing how I made them from scratch. Personally I think I'd rather use the piezo/tap because it's probably more uniform over environment variations (carpet, clothing, humidity.)

A high school kid could win a prize with this whole homemade cap idea. Describe and explain the equation, diagram how the electrons toddle about, chart about different dilectrics, make a bunch of little caps that demonstrate the theory, and make a capacitance meter to test and measure them.

jbarchuk

My lid is metal, not much chance of changing it.


How about get a cheap 'touch lamp.' Open it up and find out how they did it. They usually have  metal base. Inside is doubtless a dielectric and another metal plate and a little circuit. You can recreate it or even easier pull the guts out and adapt it to your jar.

Paul__B


How about get a cheap 'touch lamp.' Open it up and find out how they did it. They usually have  metal base. Inside is doubtless a dielectric and another metal plate and a little circuit. You can recreate it or even easier pull the guts out and adapt it to your jar.


The "touch lamps" operate by sensing capacitance against the mains - 110 or 240V.  The "ground" side of the detector is actually the full mains voltage so that the capacitance of a person touching it provides a capacitive coupling to the actual ground.  I do not think he wishes to connect his bottle to the mains.   :D

fungus


The "touch lamps" operate by sensing capacitance against the mains - 110 or 240V.  The "ground" side of the detector is actually the full mains voltage so that the capacitance of a person touching it provides a capacitive coupling to the actual ground.  I do not think he wishes to connect his bottle to the mains.   :D


This is what happened to me. I developed the code on an Arduino Uno, tested it on a Tiny85 with ISP programmer...it all worked perfectly.

Then as soon as I switched to battery power it stopped working. It took me a while to figure out why, ie. until then I'd always had a USB cable connected to the device and my PC was forming part of the system.

The difference in capacitance was easy to measure when it's on USB - it can actually detect a hand from a few inches away. Without the USB cable the difference drops to almost nothing. I had to go from 1MHz to 8Mhz clock to be able to measure it.
Advanced Arduino

Go Up