I've been looking around for a simple peak force meter circuit that will record brief (ie breaking of a thread by a sharpened blade - ie BESS gauge) downward force.
I understand (I think) what I need - a peak hold circuit that has a rapid response time - and a gram load-cell scale.
Unfortunately, I'm a bit limited in my electronic/Arduino skill set. Ideally, there is a project out there that the peak hold could be 'added' into. Does this ring a bell with anyone? It would be a great addition to the "amateur knife sharpening world"
Thanks
Doug
void setup(){
Serial.begin(115200);
}
void loop()
{
// find highest and lowest and when they occurred in the count
unsigned long reading = 0; // new reading
unsigned long highest = 0; // highest value (set to lowest)
unsigned long lowest = 1023;// lowest value (set highest)
unsigned long count = 0; // running count for when min/max occurrs
unsigned long readCountHighest = 0; // the reading count when the highest value occurred
unsigned long readCountLowest = 0; // the reading count when the lowest value occurred
boolean newCurrentHighLow = 0; // signals a new high or low
randomSeed(analogRead(A0));
while (1)
{
reading = analogRead(A0);
count++;
if (reading > highest)
{
highest = reading;
newCurrentHighLow = true;
readCountHighest = count;
}
if (reading < lowest)
{
lowest = reading;
newCurrentHighLow = true;
readCountLowest = count;
}
if (newCurrentHighLow) // only print when a new low or high ocurrs
{
newCurrentHighLow = false;
Serial.print("(CURRENT reading ");
Serial.print(reading);
Serial.print(" count ");
Serial.print(count);
Serial.print(") ");
Serial.print(" (LOWEST ");
Serial.print(lowest);
Serial.print(" count ");
Serial.print(readCountLowest);
Serial.print(") ");
Serial.print(" (HIGHEST ");
Serial.print(highest);
Serial.print(" count ");
Serial.print(readCountHighest);
Serial.println(")");
}
}
}
I understand the algorithm for detecting the largest number and recording it... but I got the impression that if the event was too short (ie the breaking of a thin thread by a knife blade) the hardware might not be able to record the peak. Is that not the case?
It is very likely that the hardware cannot detect the "true peak", especially for digital measuring devices. It takes some time for the hardware to measure the data, process it and send a message. If the peak occurs between measurements, it is not directly detectable.
The best you can do is record the maximum result that the hardware produces for each experiment and repeat. Perhaps you can estimate the maximum from a serials of trials.
well, the actual "experiments" are simple. Simply measure the force required to cut a standard monofilament thread suspended between two posts. The force required to cut the thread (maximum force - which immediately falls to zero after the thread breaks) is measured as a peak force. There are "peak-hold" circuits that charge a capacity in proportion to the force applied, (some faster and some slower than others) and retain that charge, to be read after the thread is broken. The circuits aren't all that complicated, at least on paper.