Coder Social home page Coder Social logo

francesconegri / universal-testing-machine Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 0.0 537 KB

A Raspberry Pi based Universal Testing Machine to perform a number of tasks related to mechanical tensile tests of specimens.

License: MIT License

Python 100.00%
python3 utm universal-testing-machine mechanical-engineering research-tool maker diy diy-tool raspberry-pi raspberrypi

universal-testing-machine's Introduction

Universal Testing Machine

A Raspberry Pi based Universal Testing Machine to perform a number of tasks related to mechanical tensile tests of specimens.

Table of Contents

Requirements

The following packages are to be installed through Raspberry Pi apt package manager:

  • SciPy 1.6.0 (python3-scipy)
  • matplotlib 3.3.4 (python3-matplotlib)
  • pandas 1.1.5 (python3-pandas)

The following packages are to be installed through pip:

  • InquirerPy 0.2.4
  • rich 10.13.0

Installation & Usage

Clone this project on your Raspberry Pi and move into the main directory:

git clone https://github.com/FrancescoNegri/universal-testing-machine.git
cd universal-testing-machine/

The program can be easily launched with this command:

python3 universal-testing-machine/

Software Features

This software allows for three different types of test.

Monotonic Test

It refers to a classical monotonic tensile test. A specimen is loaded into the UTM clamps and then it is tested by running the machine at a given speed for a desired distance. It measures force and displacement, which can easily be converted to stress and strain. The test ends either when the crossbar reaches the specified distance or when the test is manually interrupted by the operator.

Cyclic Test

Not implemented yet.

Static Test

Under development.

Hardware List

The software running this project is fully parametric, therefore the connections between the required devices and the Raspberry Pi are not reported here. However, a full list summarizing all the necessary components to run the universal testing machine through the code provided in this repo is available below:

Soon available.

universal-testing-machine's People

Contributors

francesconegri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

universal-testing-machine's Issues

Refactor helpers.py

helpers.py contains all the software logic, but it is getting incresingly complex and full of stuff, making it difficult to maintain. Therefore, it might be reasonable to split its content into several files, according to the functions associated.

Avoid lines plotting during any test

After refactoring the code by adding the new pyqtgraph plotting library, it is necessary to uniform the way it plots across different tests.
It has been chosen to use plots without lines connecting the various data points.
In particular, changes are to be made into Monotonic and Static tests.

Configuration file for cyclic tests

It would be helpful to give the possibility to load all the test parameters for a cyclic test from a configuration file (such as a .txt) instead of manually entering them every time.
Given the large amount of parameters required, it is easy to do mistakes which would invalidate tests.
A system detecting the configuration file and asking the user to load it should be introduced.

Display the relative distance in the live table

At the time of writing, the live table shows the absolute position of the crossbar with respect to the absolute zero defined during calibration. It has been decided to show the relative position with respect to the position of test starting during the running of any type of test.

Fix paths

Fix the paths of calibration, configurations, and output directories:

  • use os.path.join instead of manual string concatenation
  • create path constants, making easier to change the paths if needed

Mode button not working during tests

It has been reported that the mode button does not work in any kind of test in order to interrupt it before the natural termination.
The problem emerged after the refactoring concerning the plotting library, switching from matplotlib to pyqtgraph library.

Reduce the number of plotted data points

Given the high number of samplings, it might be helpful to reduce the amount of plotted data points. This would make no difference to the user, but it might significantly improve the performance of the software while plotting.
This might also represent a solution for #16 issue, nonetheless it would produce an enhancement in any case.

Static test plot dynamic x-axis has not fixed range

In the static test plot, the x-axis is generated such that it shows a time span of 30 seconds. In particular, when the value with an x equal or greater than the plot x limit is drawn, the x-axis range is updated, such that the last 15 seconds of available data al shown and another empty 15 seconds are available on the right.

At the moment of writing, the udpdating of x-axis range works in a weird fashion, increasing the considered time span every time the range is modified.

Save .csv file before .xslx

The saving of data after a test is to be refactored such that the .csv file is saved first, as the whole operation is much faster. The saving of the .xslx file can be done later, as it is slower and more prone to errors. This is done in order to minimize the chance to lose the freshly recorded test data while saving them.

Generalizing static tests plotting

The plotting static tests is similar to the plotting of delay phases when the delay tends to infinite, as static tests are exclusively stopped manually, by pressing the mode button.
It makes sense, for generalization sake, to extend the function collecting and plotting data during delay phases such that it can go on indefinitely if a specific delay parameter (such as -1 or None) is passed to the function.

Remove first data points from each phase

It has been noticed that the first data points collected at the beginning of each phase (anytime the load cell is started) are more likely to exhibit measuring errors. Therefore, in order to simplify manual data post-processing and cleaning, it has been decided to remove some of them.
Errors have been observed up to 3 data points after the load cell started measuring.
This should not affect the overall performance, as the load cell sampling rate is between 50 and 80 samples per second.

Tests get stuck after a while

It has been observed that the mode button to end a test (either monotonic or cyclic) prematurely stops working after some time and the test cannot be blocked. In particular, the plot keeps drawing new data points, thus it is reasonable to believe that new data are collected as well. Notice that once this phenomenon occurs, it has been noticed that the motor stops when it is supposed to, but this happen due to the fact that the motor (unless aborted prematurely) runs on a separated thread.

Refactor calibration

Refactor the calibration process (looking for an existing calibration, creating a new calibration, saving it, ...) in a similar way to the test parameters configuration one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.