different liquid detection sensor

i am building a biodiesel production system. at different points in the process, a tank will have different liquids in it (sometimes more than 1 type, separated out). for instance, there is a point where glycerol sinks to the bottom, while biodiesel floats on top. what i want to do is drain the glycerol from the bottom of the tank (via electronically controlled solenoid valve), then when a sensor detects a change in material (biodiesel), shuts off that valve and opens another (final product tank). for the life of me, i cannot find a sensor that will do this for less than $100. preferably, i'd like to spend less than $30. i can work with a resistive type or voltage type sensor. i just need to be able to make that distinction of material change... any ideas? THANKS!!!

sort by: active | newest | oldest
samurai1200 (author) 7 years ago
Thanks for all your responses. Google surprisingly doesnt turn up much on DIY resistivity sensors. That's why I'm here! We don't want to drain off any of the (semi-)liquids manually, we want valves to control flow of everything, fully automating our system. We can't do optical because the color/refractive difference between the runoff water, the glycerol, and the biodiesel is barely detectable. We are making batches of 1, 2, or 3 gallons, depending on available materials, so draining off a predetermined amount of glycerol is out, even though i guess we could program in the constants for each of the 3 cases... (we may have to go this route if we cant do automatic detection). We have considered the copper-wire-as-crude resistivity sensor, but can't seem to get it to work in testing. @lemonie i'm not quite understanding whats going on in your diagram.... I get the electronics, but what is going on with the "pipe"? These different oils are not very conductive, so will putting electrodes in it/before it work? I'd imagine if theres a voltage difference that it'd be on the order of microvolts? that seems prone to false positives... again, thanks to all.
lemonie7 years ago
Refractive index or conductivity. The aqueous phase will conduct some amount of electricity, esp if you've got metal ions in there.

samurai1200 (author)  lemonie7 years ago
I understand that a conductivity sensor is the right path. But is it absolutely necessary to spend hundreds of dollars on one? Or is there a nice, cheap DIY solution?
If you made a couple of small holes in the outlet tube, you could force e.g. copper wire (solid not stranded) into them to produce a pair of electrodes. I'm thinking of something like this. L
PKM samurai12007 years ago
You can sense conductivity almost as cheaply as you want- what spending more money will get you is consistency and accuracy. Google around, you'll almost certainly find something. Alternatively, an optical sensor could work if the liquids are noticably different colours- you could do that with a light sensor, light source and a well-sealed enclosure. However, how often are you going to be doing this? If it's only running one batch a day, can't you do the switch manually?
Try modding a multimeter(resistance) with an arduino(that way you can use it to test multiple liquids) Just a thought.
crapflinger7 years ago
do you always make the exact same amount of biodiesel in the same manner? i'm not 100% familiar with the production of biodiesel (though i've got enough knowledge to know you put a bunch of junk in a thing and it does some magic and stuff comes out the other end) but if your production runs are always the same...they should always create the same amount of runoff (give or take) with each batch, and in theory these different undesirables (or at least not desirable for putting in your car) should always exist at the same time during the processing stage... a simple set of lawn sprinkler timers would work for this if the above assumptions are true... at which point you don't have to care what's in the tank...you just know that it takes X hours (days) for stage1 to produce Y volume of glycerol...so at hour(day) X the timer turns on the valve for Z minutes (the time required to drain Y volume with gravity) then shuts the valve off, then you could have a second sprinkler zone (a lot of sprinkler timers have multiple zones) open to dump the contents into the finished goods tank
caitlinsdad7 years ago
Is there anything you can do with an optical type sensor? Like refracting some kind of light beam to distinguish the different liquid densities? Just a thought.
Or having a ball float made of something that distinguishes the different specific gravities of each like those floating thermometers. The ball sinks in glycerol but floats in biodiesel. It can be metallic or embed a magnet to control a reed switch or design the discharge tube to block off when it changes liquids. Good luck.