Vat sitter

I am a handmade papermakerhttp://ifugaopaperblog.tumblr.com/ and artist. We dip a mould and deckle into a vat to pull sheets of paper. Adding the exact amount of pulp and keeping the water to fiber ratio appropriate for a specific weight of paper is labor intensive and subjective at best. I am experimenting with Arduino, an electrical conductance probe, and an LDR. Data from the probes vary so greatly, I doubt that smoothing will yield accurate results. The LDR and LED in glass containers placed inside the vat is promising but the sketch has to account for ambient light.

Simply deducting ambient light from the same reading (with LED high), is not a solution. Is there is a not –so- complicated formula that will permit accurate calibration, regardless of ambient light? Thanks for advise.

// ANALOG INPUT - SENSOR
// This example flashes an LED on and off at a rate determined by the analog
// input value read on ANALOG IN 0 based on the light striking the CdS Cell. 
// This value will be used to determine one cycle of delay time for the LED to 
// be on and then off. The value of CdS_PIN is printed into the Arduino Serial 
// Window so its value change can be monitored along with the change in flash
// rate of the LED

int CdS_PIN = 0; // select the input pin for the CdS Cell
int ledPIN = 3; // select the output pin for the LED
int CdS_VAL = 0; // variable to store the value coming from the CdS Cell
int ambientValue = 0;



void setup() {
Serial.begin(9600); // set the baud rate for the serial window
pinMode(ledPIN, OUTPUT); // declare the ledPin as an OUTPUT

}

void loop() {
digitalWrite (ledPIN,LOW);
ambientValue = analogRead(CdS_PIN);
delay(1000);
digitalWrite (ledPIN,HIGH);
CdS_VAL = analogRead(CdS_PIN); // read the value from the CdS Cell
CdS_VAL = CdS_VAL - ambientValue; 
                                    //digitalWrite(ledPIN, HIGH);  // set the ledPIN LOW, which turns off the LED
delay(1000);
Serial.print("Cds Value ");
Serial.println(CdS_VAL); 
Serial.print("ambient value ");// print CdS_VAL in the serial arduino serial window
Serial.println(ambientValue);
}

Perhaps have the arduino measure weight to deduce the ratio, have a sensor that will allow you to sense the weight(not sure what kind but you can steal them from any digital scle),
first when the vat is empty to get a zero, then with the amount of water and then with the fibers being added,
once you get specific numbers of what means a good batch you can work out a ratio, and then perhaps in the future automate the adding of water or fibers or both

Your suggestion would be effective if the dry fiber didn't have to be beaten in a Hollander so I am adding pulp that is more water than fiber. Possibly enclosing the sensor/led in a black pipe would eliminate the need to calibrate as the relative ambient light would be negligible.

Is the liquid even enough that chunks wont disrupt the reading?

Adding the exact amount of pulp and keeping the water to fiber ratio appropriate for a specific weight of paper is labor intensive and subjective at best.

I know you want a sensor, but...

The more pulp, the higher the specific gravity, right? Suppose you had a float that would sink or rise depending on the density of the mix. Something like a thin wooden rod about 10 inches long with a weight on one end. You could mark it at the ideal level.

What I see is a quartz tank level indicator ~1/2" I.D./5/8" O.D. on the outside of the tank tapped in just above/below the 10-90% of capacity so that the vat is like a giant beer mug. In the quartz "beer mug handle" you can attach all sorts of sensor, though you might have to ramp voltage to get conductance signal to process ;) All sort of frequencies could be tested, and you may just factor in the ambient.

Just a thought.

Your loop looks like:

digitalWrite (ledPIN,LOW);
ambientValue = analogRead(CdS_PIN);
delay(1000);
digitalWrite (ledPIN,HIGH);
CdS_VAL = analogRead(CdS_PIN)
delay(1000);

CdS cells don't react to changes in light quickly enough to beat the speed at which the Arduino will read it. You need the delay after turning the LED on/off (but not so much delay should be needed):

digitalWrite (ledPIN,LOW);
delay(200);
ambientValue = analogRead(CdS_PIN);
digitalWrite (ledPIN,HIGH);
delay(200);
CdS_VAL = analogRead(CdS_PIN)