Measuring the quantity of liquid in a container is surprisingly non-trivial. If the liquid in query occurs to be conductive, you need to use a collection of contact sensors. However these solely inform you if the liquid is to the extent the place you’ve positioned the sensors, which fairly low-resolution. The great old style float gauge is an effective different, although it comes with problems with its personal. To electronically monitor the float gauge for his heating oil tank, Steve turned to Raspberry Pi and pc imaginative and prescient.
Steve factors out that there are extra sensible options to this drawback and that he tackled it as a “enjoyable diversion,” however we don’t suppose he’s giving himself sufficient credit score. Some could name this over-engineered, however it’s really very smart. It solely requires a couple of reasonably priced {hardware} elements, offers very correct readings, and doesn’t necessitate the modification of the oil tank. The tank in query holds heating oil and information retailers are predicting shortages this coming winter, so realizing how a lot oil one has readily available goes to be essential.
Steve factors out that there are extra sensible options to this drawback and that he tackled it as a “enjoyable diversion,” however we don’t suppose he’s giving himself sufficient credit score. Some could name this over-engineered, however it’s really very smart. It solely requires a couple of reasonably priced {hardware} elements, offers very correct readings, and doesn’t necessitate the modification of the oil tank. The tank in query holds heating oil and information retailers are predicting shortages this coming winter, so realizing how a lot oil one has readily available goes to be essential.This heating oil is just like diesel and most of the people retailer it in a big tank of their properties (typically within the basement). A standard float gauge signifies the present oil degree within the tank. Steve’s gadget consists of a Raspberry Pi Zero W and a Raspberry Pi Digital camera module. The digital camera factors on the float gauge and the Raspberry Pi makes use of OpenCV pc imaginative and prescient software program to research the video feed.
Steve’s OpenCV script seems on the float gauge and first detects the positions of the extent markings on the tube. These correspond to utterly empty, one-quarter full, half full, three-quarters full, and utterly full. The markings present a visible scale for OpenCV to reference. The software program additionally seems for the pink float and creates a line centered between the highest and backside of the float. That line, relative to the dimensions markers, corresponds to the oil degree. This offers a way more correct studying than an individual eyeballing the gauge and is much more correct than many digital gauges meant for this goal—all for about $20 value of {hardware}.
The Raspberry Pi can illuminate a strip of NeoPixel LEDs to replicate the present oil degree or it might make the info accessible by way of varied IoT and residence automation platforms. Steve set it up with House Assistant and with a customized net app that features the video feed. It additionally has a REST API, which additional expands the accessibility.
We love initiatives like this, as a result of they reveal how sensible and reasonably priced “leading edge” know-how like pc imaginative and prescient could be.