Go Down

Topic: Arduino based uroflowmeter (Read 773 times) previous topic - next topic

Poetschevleesch

Hi everyone. As urologist I  want to build a uroflowmeter by myself. It has to be versatile.

A uroflowmeter can be built as a scale. Thaïs scale si already built with a load cell.

My questions are :

How to display the flow on a lcd or tft screen?
The flow will be calculated in mL per second as the weight difference between each second during the flow.
The display has to show the total volume that has been  urinated (e.g the weight that won't change in the end , or the same weight during 10 seconds or so determining the end of micturiction.)
The display has to show Max flow and mean flow.

And , the measure has to be started by a switch....


Help needed!

Thanks

Paul_KD7HB

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

Poetschevleesch

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

Paul_KD7HB

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

dougp

There are literally thousands of results on a site search of 'display on serial monitor'.  Tons of info, too on the Arduino reference page.
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

hammy

Drink lots of water before testing

wvmarle

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.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Poetschevleesch

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

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

tamkiem

I have the same question. Thank you Paul_KD7HB

Poetschevleesch

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... !

wvmarle

Move that delay in between the two scale.get_units() calls.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Poetschevleesch

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

wvmarle

What do you get when you print the v1 and v2 values separately? Correct values?
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

wildbill

This isn't doing what you expect:
Code: [Select]

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

It's equivalent to
Code: [Select]

float v1= 5;

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

Poetschevleesch

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

Go Up