Measuring a break in

I am trying to create a sensor that will tell me when there is a break in a gel.

I am pulling apart (vertically) a sticky liquid in a vial and I want to stop the linear movement when the gel breaks. I am having some difficulty coming up with the best method to do this.

What I am currently trying is to create a circuit with the gel and passing a current through. When the circuit is broken, stop moving it.

Is there a way to measure the volume of liquid with a "one sided" circuit. (I would measure the volume of the fluid at the beginning and when the fluid pulled a portion of the gel off, the volume would decrease and that would be my "break point")

Any help?

Digital scales or strain guage with a serial output (you need to decide the size) that are stuck down. The reading will start high (full weight of gel) and decrease (possibly going negative) until gel separates and then you will get a sudden weight increase.

Maybe capacitive. The gel connected to one wire would act as small capacitor (the other wire would be grounded), and the gel breaking should decrease its capacitance. Similar to a capacitive touch sensor.

Can only work if the gel is at least somewhat conductive, and the amount is big enough to have a measurable capacitance. Even so, of course I've never actually tried it, so you will have to experiment a bit. You're probably looking at a few pF at most.

The capacitance is related to the volume of the gel: more gel means higher capacitance, so this should give you a measure of how much gel is left.

Usually gels are conductive, they rely on charge-charge interactions in many cases.

Capacitance is more related to area, but either way when the gel fragments there would be a
definite change in the capacitance, or at least in the Q of the system.

Two approaches to measuring capacitance:

1. use an ac signal to probe the ac impedance. Needs some analog electronics.
2. Sense the RC time-constant directly using analogRead and a digital pin to pre-charge
the system. Have the system under test connected to ground through a very high value
resistor (100M perhaps), and connected to an analog pin.

Then:

``````#define megohms 100.0

void measure ()
{
pinMode (pin, OUTPUT) ;
digitalWrite (pin, HIGH) ;
delayMicroseconds (10) ;
pinMode (pin, INPUT) ;
digitalWrite (pin, LOW) ; // ensure internal pullups are off.

unsigned long start_time = micros() ;  // record start time
while (analogRead (pin) > 377)    // wait for RC discharge to 37% (one time constant)
{}
unsigned long elapsed = micros() - start_time ;  // time in us
float pico_farads = elapsed / megohms ;  // time constant in us / R in megohms = capacitance in picofarads