need a water flow sensor example

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
kg300
Posts: 31
Joined: Thu May 31, 2018 6:25 am
Has thanked: 5 times
Been thanked: 1 time
Contact:

need a water flow sensor example

Post by kg300 »

Any flowcode exemple of using this sensor? Actually i want to use this sensor to measure total flow pass in liters/minut and display on lcd. And i need starting point by a flowcode example
Attachments
flow.png
(446.67 KiB) Downloaded 1527 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: need a water flow sensor example

Post by medelec35 »

That should be fairly easy to sort out.
Do you have hardware details in mind, e.g. Microcontroller (freq, internal/External osc.), LCD etc?
Perhaps would be better if you started the flowchart by setting up configuration settings and adding LCD.
Martin

kg300
Posts: 31
Joined: Thu May 31, 2018 6:25 am
Has thanked: 5 times
Been thanked: 1 time
Contact:

Re: need a water flow sensor example

Post by kg300 »

medelec35 wrote:That should be fairly easy to sort out.
Do you have hardware details in mind, e.g. Microcontroller (freq, internal/External osc.), LCD etc?
Perhaps would be better if you started the flowchart by setting up configuration settings and adding LCD.
hardware is so simple, pic16f683 with intrnl Osc and 2X16 LCD, display data on lcd in liters. actually i need a calculation method of water flow in liters using this sensor then i modify my software and hardware according my use. need a calculation block diagram i think..

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: need a water flow sensor example

Post by medelec35 »

kg300 wrote:pic16f683
?
That chip does not exist.
Personally if it was me I would select one of the newer microcontrollers as they are much cheaper, faster and have more memory and functions than the older devices.
Martin

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: need a water flow sensor example

Post by medelec35 »

Testing Water Flow Meter hardware.png
(161.45 KiB) Downloaded 1471 times
I tried the attached Flowchart for my hardware (different target device) and injected a 225Hz signal into INT pin. Result was good as getting a value between 29.9 and 30.0 L/S
So its slightly more accurate than arduino version.
This the accuracy appears to be constant, its dependent on the target osc frequency.
It must be kept at 8MHz So is compatible with older devices.
Attachments
Water Flow Meter.fcfx
(14.33 KiB) Downloaded 252 times
Martin

kg300
Posts: 31
Joined: Thu May 31, 2018 6:25 am
Has thanked: 5 times
Been thanked: 1 time
Contact:

Re: need a water flow sensor example

Post by kg300 »

medelec35 wrote:Testing Water Flow Meter hardware.png
I tried the attached Flowchart for my hardware (different target device) and injected a 225Hz signal into INT pin. Result was good as getting a value between 29.9 and 30.0 L/S
So its slightly more accurate than arduino version.
This the accuracy appears to be constant, its dependent on the target osc frequency.
It must be kept at 8MHz So is compatible with older devices.
Thanks medelec35

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: need a water flow sensor example

Post by medelec35 »

You're welcome.
Can you please let me know if works OK or not?
Martin

kg300
Posts: 31
Joined: Thu May 31, 2018 6:25 am
Has thanked: 5 times
Been thanked: 1 time
Contact:

Re: need a water flow sensor example

Post by kg300 »

medelec35 wrote:You're welcome.
Can you please let me know if works OK or not?
Yes, it's working. your example show me the way how i use this sensor. actually i'm trying to build a bottle filling project. the MCU start a small pump and sensor start to count flow, when 1 liter is done the MCU stop the pump. now i'm trying to modify your flowchart according my requirement..

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: need a water flow sensor example

Post by medelec35 »

kg300 wrote:Yes, it's working.
Thank you, that's good to know.
kg300 wrote: actually i'm trying to build a bottle filling project.
After modifying flowchart, you can post it if stuck?
Martin

kg300
Posts: 31
Joined: Thu May 31, 2018 6:25 am
Has thanked: 5 times
Been thanked: 1 time
Contact:

Re: need a water flow sensor example

Post by kg300 »

medelec35 wrote:
kg300 wrote:Yes, it's working.
Thank you, that's good to know.
kg300 wrote: actually i'm trying to build a bottle filling project.
After modifying flowchart, you can post it if stuck?
yes

Post Reply