Has anyone added a peak-hold function to a gram scale?

Hey folks,

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

Very simple. As the readings come in, store the "highest one yet" in some variable, and print that variable when you are done measuring.

...
weight = read_scale();
if (weight > highest) highest = weight;
...

I thought there might need to be “peak-hold” circuit added. No?

Added to what?

The two lines of code implement "peak hold" in software.

2 Likes

A verbose form of @jremington 's razor:

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(")");
    }
  }
}
1 Like

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?

Doug

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.

That's basically my poorly formed question :slight_smile:

With what sensor?

Capacitor peak/hold circuits are for voltage levels.

This youtube video shows that measuring can be a slow process.
Plenty of time to store the peak.
Leo..

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.