top of page

Measurement

Raspberry Pi - Water Levitation Measurement

​

A recent project undertaken at CTU, was the use of Raspberry Pi for measurement of the water levitation experiment. The goal behind this project was to implement an ultrasonic sensor for detection of the ball’s height during movement on the water jet, generated via a controlled water pump. The water levitation experiment is a single-input-single-output system, with the pump voltage used as the control variable for the process, the output being the ball’s height.

 

The first image on the side, depicts the conceptual layout behind the project, here a HC-SR04 Ultrasonic sensor was used with both direct connection on the Raspberry PI GPIO pins and also via means of Labjack, with Raspberry Pi. The ultimate goal was to implement a graphical user interface, which was capable of managing the measurement including adjustment of the simulation time and generate a corresponding plot, to visualize the measured data.

 

The following image depicts the connection of the ultrasonic sensor, with Raspberry Pi. Here a connection board is necessary for implementation of a voltage divider, for functionality of the used ultrasonic sensor. This board also allows simultaneous connection with Labjack to test the capabilities of both forms of the measurement.

 

Following this, a graphical user interface (as depicted on the right) was implemented in the python programming language to manage the measurement of the ultrasonic sensor with Raspberry Pi. Here two tabs were featured, one for the direct measurement via the Raspberry Pi GPIO pins and the second being for the Labjack DAQ module measurement. The interface is used to begin the measurement, controlled via the simulation time. After the experiment is complete, the data is saved to a file within the folder of the GUI application. Following this, the user may plot the measured data and zoom or save the measured image for later use, via the incorporated navigation toolbar.

 

 

Conceptual Layout Behind the Project

Connection to Raspberry Pi

Application for Measurement of the Water Levitation Experiment at CTU

Human Respiration Measurement

​

This project was designed to show case the capability of the Raspberry Pi for measurement tasks, such as measurement of a human respiration signal. A piezoelectric sensor, was used to capture a changing voltage signal, corresponding to the respiration of the tested human being. This signal could be relayed through a specially designed measuring card for compatibility with the Raspberry Pi's GPIO pins, for reading and recording of the measured signal.

 

The signal produced by the piezoelectric sensor is in the range of 0-20mV. This signal is then converted via a A/D converter, to a digital signal with a value in the range of 0 - 4096, proportional to the analog voltage levels recorded by the sensor. This can then be read by the GPIO pins of the Raspberry Pi and interpreted via a programed algorithm on the Raspberry Pi processor, into a chart correponding to the measured human respiration, as below.

 

This measuring card was designed with an 8 channel, 12 bits A/D converter, with a referencial voltage level of 2.5V. The connection to Raspberry Pi is achieved via a serial interface SPI. After conducting the measurement, it was found that at a sampling rate of 10Hz the maximum deviation of time inaccuracy from the reading of each sampling was within 0.0003 s, which is quite impressive for the used hardware.

 

Measuring Belt - Piezoelectric Sensor for Capturing Respiration Signals

Measuring Card for Piezoelectric Sensor and Raspberry Pi

bottom of page