-  GitHub-Logo YouTube-Logo Twitter-Logo

  -  EN  |  DE  -

PiUS - the different π-Ultrasonic-Sensor

Welcome to the PiUS - a smart ultrasonic rangefinder based on the Raspberry Pi and REBOL.
 
This webpage provides some information about a further developement of TGD-Consulting in the field of embedded hardware and software solutions for the Raspberry Pi and is intended for all users, makers and developers who like to use their Raspberry Pi as a ultrasonic rangefinder.

You can purchase an officially licensed bundle of the "PiUS-It!" management software at a price of €29.99 EUR only here. The software bundle already includes all necessary modules (web server, ultrasonic, archive & plot) of the management software, which are required for an ultrasonic rangefinder for tanks and cisterns based on the Raspberry Pi.

The software runs on all Raspberry Pi models. The modular concept of the "PiUS-It!" management software is ideally suited for the new multi-core architecture of the Raspberry Pi 2/3 and uses the additional computing power optimally.

The "PiUS-It!" management software features in particular
  • amazingly simple setup
  • small memory footprint (<1MB)
  • efficient, modular, smart application
  • user space operated embedded web server
  • displaying meassurements optionally on a remote LCD
  • the option of automatic data transmission to HomeMatic systems and
  • an easy connection to other SmartHome control centres (such as Gira HomeServer, openHAB etc.).
PiUS-Logo

Please refer to the release notes to get an overview and information on the latest version of the software.

The hardware that is shown on the following photos are only for illustration and example as a PiUS can look like and how it is assembled. Please purchase the required hardware from the respective manufacturers or through their distribution channels. TGD-Consulting offers only IT services and software solutions.

You want to make your own PiUS based on our "PiUS-It!" management software? Then purchase a license and read on to find out ...

As a quick start you'll get here directly an answer to the most frequently asked questions:

More answers to questions can be found in the FAQ.


The term PiUS stands for π-Ultrasonic-Sensor and represents the extension of an ordinary Raspberry Pi to a via web interface controllable ultrasonic rangefinder. PiUS is highly versatile. It can be used either as an universal distance meter or as proximity sensor in garages or for monitoring oil-tanks, rain water tanks and cisterns. Below the latter application example will be described. All important functions of PiUS are controlled and monitored even from afar by using a browser from any PC, tablet or smartphone. Find out live the ease of use and advantages of the π-Ultrasonic-Sensor and convince yourself right here and now on the Internet from the "PiUS-It!" management software, its simple operation and the extensive configuration options. Here you see a

PiUS in action: 

PiUS-WebUI
The PiUS user interface.

The system price of PiUS including all required components is less than 100,- EUR. That figure already includes the cost for the license of the "PiUS-It!" management software. The version of the PiUS shown on this page consists of the following components:

HardwareSoftware
PiUS prototype 

PiUS-PrototypPiUS-PrototypPiUS-Prototyp
PiUS protoype with case open.

The external appearance of our prototype of the PiUS is characterized by the two silver round ultrasonic transmitting and receiving sensors. Due to the size of the HC-SR04 ultrasonic module the installation in an ordinary Raspberry Pi plastic housing is a bit cumbersome. However, each component of the PiUS can still be single-handedly assembled by any ambitious users with a little skill. All parts can be ordered directly from the Internet. The sources of supply are partly linked in the above lists. We are using a Raspberry Pi Model A for our prototype of the PiUS, which is extended by the HC-SR04 ultrasonic module. This enables you to create your own self made low-cost digital distance measuring device.

Weatherproof and suitable outdoor housings for the Raspberry Pi are known to be quite expensive, therefore, it is recommended to connect the ultrasonic module via an arbitrary 4-wire cable to the Raspberry Pi if required. Thus larger distances between ultrasonic module and Raspberry Pi can be bridged. If the cable quality is right, this works for lengths up to 20m without any problems.
The DYP-ME007Y ultrasonic module
DYP-ME007Y ultrasonic module
can also be used instead of the cheaper HC-SR04 ultrasonic module
HC-SR04 ultrasonic module
. The DYP-ME007Y module is slightly more expensive, but it is more suitable for the outdoor usage and the sensor is attached with an approximately 2.4 m long cable to the module. The ultrasonic sensor of the HC-SR04 module on the other hand, is mounted directly on the circuit board. Both modules are compatible and have the same pinout.

The pins of the ultrasonic module are directly connected to the 5 volt supply voltage and the GPIO interface of the P1 pin header of the Raspberry Pi. A voltage divider consisting of two resistors provides the necessary voltage level to the GPIO23 (echo input). If a longer cable is used, then the voltage divider has to be placed on the RPi-site in close proximity to the P1 pin header. The HC-SR04 module is triggered by GPIO24. The exact connection of the ultrasonic module results from the circuit diagram as shown below.

Caution: If you get unexpected system hangers during operation, this indicates a too weak power supply for the Raspberry Pi. Then replace the PSU with a stronger and more reliable one.

When mounting the components into the case short circuiting must be avoided. While installing the ultrasonic module pay careful attention, that no unwanted connections to live lines arise. This may damage your Raspberry Pi. In particular during the installation of the Raspberry Pi and especially in dealing with the HC-SR04 module is to ensure that appropriate protective measures against static discharges are taken.
The ethernet port (only availabe for Model B) and the USBs port on the Raspberry Pi (Model A & B) are freely accessible, so that the π-Ultrasonic-Sensor (PiUS) can be connected either via CAT cable or USB wireless adapter to your own LAN. At the moment our prototype of the PiUS looks from the inside like this:

PiUS inside 

PiUS-schematics   PiUS-wiring
PiUS - magic by design.

Measuring a distance by means of ultrasonic is in principle quite simple and is based on the speed of sound. The ultrasonic sensor of the PiUS sends an ultrasonic sound toward a distant targeted object. This sound is reflected at the object and echoing to the sensor. From the elapsed time of the sound wave, the distance to the object is then calculated. The HC-SR04 ultrasonic module communicates via the GPIO23 (Echo / IN) and GPIO24 (trigger / OUT) with the Raspberry Pi. The control and analysis of the signals is done by a REBOL3 script, the UltraSonic module.

The advantages of distance measurement using ultrasonic are obvious. Measurements are relatively simple and inexpensive to perform. It provides a good accuracy in empty rooms, but obstacles, sloping measuring surfaces, wind and fluctuating temperatures can affect the measuring result. The HC-SR04 ultrasonic module is very cheap and already available for a few euros. It has a measuring range of 2 cm to 4 m with a maximum accuracy of 3 mm. The opening angle of the ultrasonic sensor is 15°. HC-SR04 module requires a supply voltage of 5 V and has an operational current consumption of 15 mA only. Therefore, it can be powered directly from the pin header P1 of the Raspberry Pi with electricity.

The central core of the PiUS is the "PiUS-It!" management software, which in addition to a Web server module also includes the Ultrasonic module as well as the Archive & Plot module. With the help of the latter Pius-It! is archiving all measured data and prepares them for graphing as a plot. The plots are automatically drawn every night shortly before midnight and provided as resources for one page of the web server. The clearly arranged daily, weekly, monthly and annual charts (see above) can be increased by clicking. The UltraSonic module is Donationware and under this basic condition available as open source. The remaining modules of the management software are closed-source and require the purchase of a license.
The software requires a REBOL3-interpreter/runtime environment. Those who like can even compile themselves the source code of the REBOL3 interpreter for the Raspberry Pi. The master branch is released under the Apache2.0 license on GitHub. Alternatively, a ready-made binary for Raspbian can be downloaded right here from our website.

The operation of Pius-It! done easily via a standard web browser. The web server module handles the entire communication and control. An integrated search function enables easy and fast search for historical readings. It also provides an additional status function ("... a nice gimmick ..."), which among other things records the temperature of the SOC of the Raspberry Pi for the last 10 hours and represents it as a temperature profile. Just click at the corresponding π at the bottom of the page and find out how warm it is about inside the PiUS.
In addition to this gimmick you are configuring all the essential functions of PiUS via the web server module. Starting with the indication of the capacity of the cistern used, over the sampling rate of the distance measurements and up to the identification of possible maintenance intervals as well as the optional event control, all important parameters of the system settings are configured centrally from the browser.
By using the universal event control

example of a LED level meter based on the event control
any configurable events (GPIOs, e-mail or shell commands) can be level-dependent controlled. For example, an automatic water make of the cistern or a level-dependent garden irrigation using magnetic valves or pumps can be easily realized by additional GPIOs and relay modules. Also, a notification e-mail in case of an empty or full cistern is possible in this way.
An overview of the various configuration options can be seen on the following image.

PiUS-Settings 

PiUS-Settings
The PiUS configuration interface (PiUS-Settings).

Note: By factory default the configuration interface (PiUS-Settings) is only reachable within the same network segment as the PiUS. If necessary, this can be adjusted according to your own security requirements. If no address for the Admin IP nor an IP range is specified, the π-Ultrasonic-Sensor is configurably from any IP address! Optionally, you can set the access control by an individual combination of user and password.

There are countless types of cisterns and tanks in many different designs from different manufacturers, an exact calculation of the current volume proves to be difficult. The "PiUS-It!" management software calculates the volume linearly to the configured maximum capacity and can therefore be used without any further adjustment for cisterns and tanks in rectangular or cubic shape as well as for vertical cylindrical tanks. Other designs can be easily integrated via bearing charts. The volume is adjusted individually based on a bearing chart (mapping table per CSV file) to the local nature of the cistern. The software bundle already includes bearing charts of cisterns from the following manufacturers:

Use the following link to purchase a license of "PiUS-It!" and to acquire the software itself. The license for the software bundle already includes the limited, nonexclusive right to use the respective modules. An additional license fee for each module is not necessary anymore. Nevertheless when needed you can also purchase volume licensing of our software in addition to individual licenses for the respective modules ( Archive & Plot / Web server ). Detailed information on prices or volume discounts for volume licensing are available upon request.

Installation & Start: It's an amazingly simple setup. The software is delivered as a tarball, which only has to be unpacked (tar xvf PiUSIt.tar) and PiUS-It! is ready for use on the Raspberry Pi. By manually calling the shell script ./PiUSIt.sh start all PiUS-It! modules on the Raspberry Pi are started. Of course, this script can also be used as an init script to start PiUS-It! automatically within the booting process of the system. But you can even run individually the PiUS-It! modules as an alternative to the shell script. By entering ./bin/r3 PiUSIt.r & in the shell the Archive & Plot-module as well as the UltraSonic-module are started. The launch of the web server module is provided by this command ./bin/r3 Webserver.r & . However, we recommend at least the integration of the web server module as respawn process in the /etc/inittab . This offers the advantage that the web server module restarts each time it has been killed.

Usage: As already mentioned above, the continued use and configuration of the PiUS-It! management software is amazingly simple. It is primarily done by using the browser on pc, tablets or smartphones. Simply enter the IP address of the Raspberry Pi in conjunction with the port of the web server module as an URL in the browser ( eg: http://192.168.0.100:8080 ) and go for it. Everything else is self-explanatory or reveals itself by itself.


We hope you are just as convinced of the benefits of PiUS and from the smart design of the software as we are. If you have any questions, requests or suggestions for improving PiUS or the "PiUS-It!" management software, we are looking forward to your inquiry.

You are interested in a level indicator on the basis of a reliable hydrostatic pressure measurement method, then click here

 

You want to know more about our projects and other software? Then visit also these sites:

 

  -   Copyright 2014-2020 by TGD-Consulting   -   FAQ   -   PiUS powered by Serve-It! TNG   -  

π