Arduino code to measure the hardness of a material specially tablets
sayed_elmasry:
Arduino code to measure the hardness of a material specially tablets
There is no way to develop the code until the sensor is defined, the range of the sensor and the sensor output. The code is written around what the sensor will be. You would also do better to start a new thread and well define your question.
Ron
MorganS:
What physical principle do you want to use to measure hardness? The obvious one is not always the best: hardness is a very difficult quantity to measure.For a tissue (like a Kleenex?) then you are looking at very low levels of hardness. Mostly softness, I guess. Measuring the depth of penetration under a constant force might work but making the force constant will be difficult. I'd actually look at using a small solenoid and measuring the force required for a constant distance penetration. Have it increase the drive signal to the solenoid until a specific distance has been measured with an optical or hall-effect sensor.
You want to measure just the skin? That's challenging without removing it first!
The typical way is to push an object with specific defined shape with a known force onto the material you want to measure, and measure how much it penetrates.
With the correct actuators and sensors that should be easy to automate with an Arduino.
Most of the hardness measurements are based on what was described above. It might be useful to study a bit the existing methods and then develop what would work for you. Here are some examples
Shore Hardness - typically for rubber and soft materials - measures penetration of a sharp needle into material
HRC - Hardness Rockwell Cone - Cone shaped, measures size of indentation left by cone into material - used primarily for hard metals.
HRB - Hardness Rockwell Ball - Ball shaped , measures size of indentation left by ball into material - used primarily for soft metals.
... there are few more
Of course, most materials can be characterized fully by three parameters: Young's Modulus, Poiisson Ratio, and Damping loss Factor ... The hardness can be expressed in terms of those 3 basic parameters ... but those parameters are not always easy to measure.
Young's modulus and Poisson ratio are about elasticity before deformation only, not related to strength or hardness for metals, which is a deformation process. In softer materials behaviour is often non-linear,
history-dependent and creep is often very pronounced. Rubber for instance is dominated by entropy
effects and exhibits adiabatic temperature change on deformation. Quickly stretch a rubber-band and
hold it to your cheek to experience this.
What I trying to say is that elasticity and hardness are difficult to separate for softer materials, in metals
its pretty clear cut though.
However this thread has been butchered, the OP was talking about measuring skin hardness, but seems
to have redacted this crucial information for some reason.
Not to beat this to death and turn this into an elasticity/plasticity course ... I was simply giving examples that 'illustrate' that there are many ways/methods to quantify/measure hardness, depending on the specific material. All of them were more or less based on the penetration depth of some 'shape' into the subject material (That is really the key point). Granted, it was a major digression from my side to go into the Lamé constants and damping, but ok, I'd rather give a fellow human more to think about than oversimplify and box him/her in. The main message is in the first part of my answer: Try first to understand what is it you're trying to measure ... dive into the physics, then maybe one can develop a measurement method.
For skin however, is it baby skin or adult? moisturized or dry, loose or tight ... many factors that could make the measured quantity a bit difficult to categorize. Not to 'patronize' this thread too much (not my intention), but in measurements of the sort, one also needs to investigate how repeatable/reproducible the measurement is. If it is not, then there is no point in measuring in the first place ...
https://www.nature.com/articles/s41598-018-30206-1
Still, interesting topic, and I hope the OP comes up with something we all can learn from.
PS. In my line of work, we often predict Shore Hardness based on a combination of Elastic properties (Young's Modulus and Poisson's Ratio) and a fine-mesh FEA model. We do this for rubber parts only, as, like you said, for steel and harder materials, plasticity and elasticity are worlds apart. So, I was not totally wrong, and you just learned something ![]()
still don't know what sayed_elmasry actually thinks he/she wants to measure!
perhaps it's water hardness?
Very good point. That throws the whole conversation above down the drain.