Arduino based uroflowmeter

The LCD is easiest to work with, but first get your program to display the weight on the serial monitor, which is part of the IDE, development environment.

Paul

Ok, thank you Paul. THAT is my question! How to display it , first on serial monitor...?

Get the bugs out of the program using the serial monitor of the IDE. Then think about how to package it up using a display like this one, or similar, other colors are available.

Plenty of example code is available to learn how to display stuff on the screen. And how to wire it up.

Paul

There are literally thousands of results on a site search of 'display on serial monitor'. Tons of info, too on the Arduino reference page.

Drink lots of water before testing

I think this belongs in the "project guidance" forum section rather than here.

So button to start measuring. Easy - look at the button examples in the IDE, get that working.

Then there's a scale: make sure you have one you can read with an Arduino. If it has a library it'll likely have example code that prints values to the Serial monitor. Make that one work.

Get an LCD screen, 2004 sound good. Four lines of text: elapsed time, current rate, total weight. Maybe also have a maximum rate shown.

After that put it together.

Upon button press clear the screen & reset variables.
After that every second read the weigh from the scale, calculate rate & totals, update the display.
Do this until the button is pressed again, or another button is pressed.

The hard part of this will be the wiring and building it into a case to make it useful and not fall apart easily, and finding a suitable scale that can handle the intended use and can be read by an Arduino.

Thank you, that helped me much !!
I'll show you the results.

I hope I will be able to plot a curve, also....

I have the same question. Thank you Paul_KD7HB

So ,

I managed to use a HX711 load cell. Calibrated it. Display the weight over time on the serial monitor , in grams. 1 measure every second.

Now, I just want to display the rate of change over the time. It means , weight difference in grams between two successive measures made at 1 second interval....

I try sth like this:

float v1= (scale.get_units(),5);
float v2= (scale.get_units(),5);
float result = v2-v1;
Serial.println(result);
delay(1000);

, but I am unable to introduce the time difference between the two values v1 and v2...

Help, please... !

Move that delay in between the two scale.get_units() calls.

Sorry , it doesn't function. Always printing "0.00"

What do you get when you print the v1 and v2 values separately? Correct values?

This isn't doing what you expect:

float v1= (scale.get_units(),5);

It's equivalent to

float v1= 5;

Which is why your result is always zero. Get rid of the ",5". The enclosing brackets aren't needed either.

Sorry but your latests suggestions doesn't fuction... It shows 5.00 every second on the monitor !!

I'm quite sure the error is in the part you didn't post. Such as your current sketch.

Here is the sketch

#include "HX711.h"

// HX711.DOUT - pin #5
// HX711.PD_SCK - pin #6

HX711 scale(5,6); // parameter "gain" is ommited; the default value 128 is used by the library

void setup() {
Serial.begin(9600);
Serial.println("HX711 Demo");

scale.set_scale(-350);// this value is obtained by calibrating the scale with known weights; see the README for details
scale.tare();

}

void loop() {

float v1=5;
Serial.println(v1);
delay(1000);

No surprise there. You've apparently dropped the most important part:

float v1= scale.get_units();

OK ! Great !
Here is the solution :

#include "HX711.h"

// HX711.DOUT - pin #5
// HX711.PD_SCK - pin #6

HX711 scale(5,6); // parameter "gain" is ommited; the default value 128 is used by the library

void setup() {
Serial.begin(9600);
Serial.println("HX711 Demo");

scale.set_scale(-350);// this value is obtained by calibrating the scale with known weights; see the README for details
scale.tare();

}

void loop() {

float v1= scale.get_units(5);
delay(1000);
float v2= scale.get_units(5);
Serial.println(v2-v1);
delay(1000);

}

Now , I want to program the fact that the measure has to begin as soon as the weight is increasing and has to stop when it remains stable during 10 seconds.
And, to print and calculate the total weight in the end of the measure
And calculate the average rate and print it
And display the maximum rate and print it.

Do yo think it is possible ?

Definitely possible.

The hardest part is going to be the "stable" time. It will never be stable: the values will continuously change. Noise in the line, air flow, vibrations from a truck driving by your building, etc. You have to decide how much change is allowed when it's "stable".