loading

Developed @FABLAB VERITAS fablab.veritas.cr

In this tutorial you will learn how to make a capacitive sensor to measure liquid levels. You will need the following:

  1. Arduino UNO
  2. 1M Resistor
  3. Prototyping cables
  4. SVGs of the tubes
  5. 3D Printer
  6. Aluminum foil

Step 1: Waterproof Concentric Tubes

The sensor works with two pieces of aluminum inside of two waterproof concentric tubes.

You can download the parts and their 3d models to print them here:

Step 2: Cover the Tubes With Aluminum Foil

Step 3: Assemble the Tubes and Their Covers

  1. Introduce the inner tube covered in aluminum foil in the inner tube cover.
  2. Introduce the external tube covered in aluminum foil in the external cover.
  3. Introduce the inner tube in the outer tube and glue them together with hot glue.
  4. Make sure that when the tubes under a liquid the liquid does not touch the foil.
  5. Solder a cable to each piece of aluminum foil.

Step 4: Connect to the Arduino

Follow the diagrams above to connect the Arduino and then use the Capacitive Sensor Library example.

/* * CapitiveSense Library Demo Sketch * Paul Badger 2008 * Uses a high value resistor e.g. 10M between send pin and receive pin * Resistor effects sensitivity, experiment with values, 50K - 50M. Larger resistor values yield larger sensor values. * Receive pin is the sensor pin - try different amounts of foil/metal on this pin */ CapacitiveSensor cs_4_2 = CapacitiveSensor(4,2); // 10M resistor between pins 4 & 2, pin 2 is sensor pin, add a wire and or foil if desired void setup() { cs_4_2.set_CS_AutocaL_Millis(0xFFFFFFFF); // turn off autocalibrate on channel 1 - just as an example Serial.begin(9600); } void loop() { long start = millis(); long total1 = cs_4_2.capacitiveSensor(30); Serial.print(millis() - start); // check on performance in milliseconds Serial.print("\t"); // tab character for debug windown spacing Serial.print(total1); // print sensor output 1 Serial.print("\t"); delay(10); // arbitrary delay to limit data to serial port }

<p>Just about 6pF, first try in dry air.</p><p>C = E0 * Er * O / d<br>Cap.<br>E0 = 8.854 E-12<br>Er = ~ 78 (water) but not here, it's more 10-12 times, here.<br>O = Length * Width (Length in tube = diam * 3,14)<br>d = distance between the &quot;Plates&quot;</p><p>Would giv' 6pF in water ~72pF</p>
<p>Does it works with oils?</p>
<p>Just curious, have you measured the actual capacitance range of your sensor? I just constructed a capacitive fluid sensor, a really quick and dirty one using a strip of 3mm coroplast, aluminium foil tape and some waterproof sealing tape. I did this as a proof of concept, the sensor is 18&quot; long, the capacitance measures 0.3 nF when dry and just over 2.0 nF in 9&quot; of water. I'm wondering how that compares to a sensor like yours.</p><p>This instructable motivated me to get started with this. Thanks.</p>

About This Instructable

4,220views

64favorites

License:

More by luismorales-navarro:Liquid Level Capacitive Sensor Sensor capacitivo de nivel de líquido  
Add instructable to: