I needed a hardness tester to test the hardness of cylinder heads and other engine components.
Years ago, sales reps would give garages and reconditioning shops a simple tester based on the Shore rebound principle. I made a copy of those for myself but I was disappointed with it because it was too fast to get repeatable results by visual observation. I then made a more sophisticated version which replaced my poor old man's observational skills with electronics and an Arduino.
Then when preparing this post I saw how the use of a camera or smart phone could turn the original version into a really useful instrument. This multi-disciplinary post describes both versions. There is mechanical, electronic, programming and simple maths content but the original version only uses the mechanical, so do not be frightened off if electrons bring you out in a rash.
Click thumbnails for full size.
These really need to be seen in action so I prepared two videos, part 1 describes the mechanical stuff and discusses hardness testing in general and part 2 looks at the electronics (very simple).
However, video is not the best format in which to present schematics and programmes so I have also prepared a PDF with file. A PDF is not the best medium from which to lift the text of an Arduino programme so I also include that in this post directly, just copy and paste into your Arduino IDE.
Videos:
and
Watch part 1 before part 2.
Here is the PDF: https://diqn32j8nouaz.cloudfront.net...ess_tester.pdf
----------------------------------------------------
Here is the programme to upload to an Arduino Nano or other compatible micro.
#include <Wire.h> // Communications library
#include <LiquidCrystal_I2C.h> // Library for printing to display
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 and a 20 x 4 display.
// Change these two constants to suit your own hardware implementation.
float s = 0.0049;
// Vertical constant distance between sensors in m.
float twoas = 0.1813;
// Constant 2as is used to correct velocity using 9.25 mm final drop after mean sensing.
void setup(){
lcd.init();
lcd.backlight();
lcd.clear();
lcd.setCursor(1,0);
lcd.print("Leeb");
lcd.setCursor(1,1);
lcd.print("Rockwell C");
lcd.setCursor(1,2);
lcd.print("Brinell");
lcd.setCursor(1,3);
lcd.print("Vickers");
pinMode(2, INPUT_PULLUP);
pinMode(3, INPUT_PULLUP);
myCalc();
}
unsigned long t[4], dt1, dt2;
float v1, v2 ;
uint16_t leeb, Rc, Brin, Vick;
void myCalc() {
// Get timings. This works better than using interrupts.
while (! digitalRead(2)) { }
t[0] = micros();
while (! digitalRead(3)) { }
t[1] = micros();
while (digitalRead(3)) { }
while (! digitalRead(3)) { }
t[2] = micros();
while (! digitalRead(2)) { }
t[3] = micros();
// Calculate time intervals
dt1 = t[1] - t[0];
dt2 = t[3] - t[2];
// Calculate and adjust drop & rebound velocities
v1 = (1000000*s)/dt1; v1 = sqrt(v1*v1 + twoas);
v2 = (1000000*s)/dt2; v2 = sqrt(v2*v2 + twoas);
// Calculate leeb hardness value and convert to other scales
leeb = (1000 * v2)/v1; // Leeb value
Rc = -0.000112211 * leeb*leeb + 0.2808769 * leeb - 93.83636; // HRC
Brin = 0.00237066 * leeb*leeb -1.646908 * leeb + 455.7088;
// Brinell
Vick = 0.00264169 * leeb*leeb -1.900271 * leeb + 519.8346;
// Vickers
myDisplay();
}
void myDisplay() {
if (leeb < 1000 && leeb > 0) {
if (leeb >= 950) {
lcd.setCursor(0,1); lcd.print("**High value** ");
}
else if (leeb < 400) {
lcd.setCursor(0,1); lcd.print("** Low value ** ");
}
if (leeb >= 400) { //Value when Rc = 0
lcd.setCursor(16, 1); lcd.print(Rc);
}
lcd.setCursor(15, 0); lcd.print(leeb);
lcd.setCursor(15, 2); lcd.print(Brin);
lcd.setCursor(15, 3); lcd.print(Vick);
}
else { // When !(leeb < 1000 && leeb > 0)
lcd.clear();
lcd.setCursor(0, 1); lcd.print("***** WARNING *****");
lcd.setCursor(0, 2); lcd.print("Value out of range.");
}
}
void loop() {
}
Bookmarks