mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Lounge

Reply
 
Thread Tools
Old 2019-07-24, 17:52   #12
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

258B16 Posts
Default

Hm... it looks like you have a lot of unexpected rains and winds (for evaporation) there in Bim, I better delay my visit...
LaurV is offline   Reply With Quote
Old 2019-07-24, 18:26   #13
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3·1,171 Posts
Default

Quote:
Originally Posted by chalsall View Post
Thanks for the feedback. However, I'm still trying to "make friends" with the kit; confused by the large amount of noise in the samples (the discrete jumps in the "Highest" value is particularly concerning).

Yesterday I tried sampling using a kernel module I wrote using interrupts triggering on rising and falling edges of the GPIO, reading the system's clock with nanosecond resolution. While the readings are better, I'm still getting lots of (very similar) noise. The temperature correlated variation is to be expected and can be factored out once I have a temperature sensor alongside each USS module.

This might just be the way the USS modules behave. My next exercise is to use a single core of the RPi busy sampling the pins. If that doesn't improve things I'll try the Real-Time patch for the Linux kernel. Then go "bare-metal", and eliminate the OS entirely.

Just for anyone who might be interested, attached are two additional plots. The first is the polling data over three days. The second is about 17 hours of interrupts derived data.

A little frustrated, but having fun too.
What are your absolute accuracy requirements? You are characterizing uncertainty well, but based on this data you should be able to tell the difference between 230 cm and 240 cm, or certainly 140 cm and 240 cm. Is this good enough to drive the irrigation outflow loop?

If you are having fun and trying to find the limits of your hardware, then of course continue. But if you are just trying to get something done then you may be there already.
bsquared is offline   Reply With Quote
Old 2019-07-24, 18:55   #14
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

2×5×7×139 Posts
Default

Quote:
Originally Posted by bsquared View Post
If you are having fun and trying to find the limits of your hardware, then of course continue. But if you are just trying to get something done then you may be there already.
Oh, for sure; accurate enough to trigger irrigation.

I'm primarily continuing in order to find out exactly what the capabilities are, for other possible applications. Also, it's been a long time since I did low-level work like this; quite a nice break from writing policy position papers...
chalsall is online now   Reply With Quote
Old 2019-07-24, 19:04   #15
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3×1,171 Posts
Default

Quote:
Originally Posted by chalsall View Post
Oh, for sure; accurate enough to trigger irrigation.

I'm primarily continuing in order to find out exactly what the capabilities are, for other possible applications. Also, it's been a long time since I did low-level work like this; quite a nice break from writing policy position papers...
Cool, it does sound like a fun project.

If you are interested, I can recommend this laser TOF sensor. I've used it before; it is accurate and very easy to use. Since it is laser-based, it shouldn't have the thermal issues you are seeing (assuming those are related to humidity and temperature dependent speed-of-sound). It is 3 times the cost though.
bsquared is offline   Reply With Quote
Old 2019-07-25, 09:11   #16
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

10,753 Posts
Default

Quote:
Originally Posted by bsquared View Post
Cool, it does sound like a fun project.

If you are interested, I can recommend this laser TOF sensor. I've used it before; it is accurate and very easy to use. Since it is laser-based, it shouldn't have the thermal issues you are seeing (assuming those are related to humidity and temperature dependent speed-of-sound). It is 3 times the cost though.
Well, if we are allowed to propose alternative hardware ...

What about a depth gauge (a tape measure or a metre-stick) tape measure attached to a clear tube containing a brightly coloured float, in the field of view of web cam? Find the position of the meniscus with relatively simple computer vision algorithms such as are implemented in OpenCV

Or a float attached to spool of line which is weighted to remain at the bottom of the tank. The spool has a spring strong enough to take in any slack but not strong enough to prevent the float from surfacing. Measure the length of line by any mean you wish, perhaps by a shaft encoder on the spool.

(added in edit: most of this kit can be sourced easily from an angling supply store.)

Last fiddled with by xilman on 2019-07-25 at 09:12
xilman is offline   Reply With Quote
Old 2019-07-27, 14:42   #17
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

2·5·7·139 Posts
Default

Quote:
Originally Posted by bsquared View Post
If you are interested, I can recommend this laser TOF sensor. I've used it before; it is accurate and very easy to use. Since it is laser-based, it shouldn't have the thermal issues you are seeing (assuming those are related to humidity and temperature dependent speed-of-sound). It is 3 times the cost though.
Cool! Thanks for the recommendation; this could indeed be very useful for other applications. However, I don't think it would work for water levels (could be wrong). Also, I need up to three meter range; this only does up to one.

BTW, it looks like the first sensor I installed in a tank is faulty (never fails; no joke intended). I finally got the cable pulled for the other tank in another building (had to be hidden; SWMBO is an architect, and thus everything has to be "pretty").

The readings are far more stable and am actually getting +/- 0.2 mm accuracy. Attached is a plot of the readings after final placement, and siphoning water from another tank into this one. Note that this tank is effectively underground, so it won't be seeing the ambient thermal variations of the others.
Attached Thumbnails
Click image for larger version

Name:	tank_number_4_final_placement.png
Views:	55
Size:	114.0 KB
ID:	20808  

Last fiddled with by chalsall on 2019-07-27 at 14:44 Reason: Forgot to upload plot.
chalsall is online now   Reply With Quote
Old 2019-07-27, 14:50   #18
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

2·5·7·139 Posts
Default

Quote:
Originally Posted by xilman View Post
What about a depth gauge (a tape measure or a metre-stick) tape measure attached to a clear tube containing a brightly coloured float, in the field of view of web cam? Find the position of the meniscus with relatively simple computer vision algorithms such as are implemented in OpenCV
LOL... I actually already have something like this implemented. Two of our tanks (of five) have vinyl tubing running from the bottom of the tanks, out the top, back down to the bottom and then back up to the top.

I place a little bit of red pepper oil in each tube to be able to easily see the water level. Human (rather than computer) vision is then used. The sampling period is quite intermittent, but good enough...
chalsall is online now   Reply With Quote
Old 2019-07-28, 19:20   #19
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

3×5×137 Posts
Default

Quote:
Originally Posted by chalsall View Post
LOL... I actually already have something like this implemented. Two of our tanks (of five) have vinyl tubing running from the bottom of the tanks, out the top, back down to the bottom and then back up to the top.

I place a little bit of red pepper oil in each tube to be able to easily see the water level. Human (rather than computer) vision is then used. The sampling period is quite intermittent, but good enough...
I'm glad that it worked:

https://www.mersenneforum.org/showpo...&postcount=910
a1call is offline   Reply With Quote
Old 2019-07-29, 03:00   #20
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

7×1,373 Posts
Default

Quote:
Originally Posted by a1call View Post
That is bad design, the end of the tube has to be bent once more, to face down. That way the dust and dirt from atmosphere won't go inside. Or you have to design a "hat" for it, something like a little umbrella to attach on top, to cover the tube but allow the air to go in and out.
(the engineer in me, hehe, sorry, but product design, and being bitchy about, is part of my daily job)
LaurV is offline   Reply With Quote
Old 2019-07-29, 05:12   #21
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101Γ—103 Posts

23×1,223 Posts
Default

The major city water supplier near me uses several systems to monitor tank levels. One of the common ones (that is often redundant to radioed automatic measures) is a float inside attached to a cable that exits the top of the tank. This cable goes over a pulley and down the side to a weighted marker. There is a scale in black and white on the side of the tank. Using binoculars the level can be read quite accurately from a good distance. The moving marker sometimes has a light on it and there is a light at the top of the tank (the empty mark on the scale.) The relative level can be determined from a good distance without optical aid. With a cheap camera web cam and 3 LEDs (one on the marker that is differently colored) the % full should be quite detectable. Slap a dark filter on it and computing will be easier. Depending on the tank locations and the camera, you might be able to do multiple tanks at one go.

I have seen the float system used for tanks in the 7.5 million liter range,
Uncwilly is online now   Reply With Quote
Old 2019-08-12, 16:02   #22
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

260216 Posts
Default Ongoing fun; PBC design!

So, LaurV is going to laugh at me about this, but...

I spent the weekend making friends with KiCad EDA and designed a very simple circuit, and then a PCB, to sit on top of a Raspberry Pi. This is to drive up to four ultrasonic and temperature sensors.

I also brought all of the unused GPIO lines over to a smaller 20 pin header, so I can design another daughterboard to sit on top of this to drive other things, like pressure and water-flow sensors, and valves.

I have to say, I'm having a hoot! It's been more than 20 years since I last did PCB design; how things have changed! The software I worked with before cost several hundred dollars and didn't have the capabilities of KiCad (which is Open Source).

Also, I was working on a PC back then, at 640 by 480 pixels. I'm now working with three 1920 by 1080 screens (with 36 virtual desktops)! Sometimes I wonder how we got anything done back then...

PS: On the down side... I tried to source a 74HC74 chip locally here in Bimshire, and found I couldn't even buy a 7400! Sigh... The frustrations of living in "paradise"...
Attached Thumbnails
Click image for larger version

Name:	uss_daughterboard_v1_0.png
Views:	75
Size:	262.9 KB
ID:	20913  

Last fiddled with by chalsall on 2019-08-12 at 16:06 Reason: PS...
chalsall is online now   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
New Raspberry PI 4 ET_ Mlucas 26 2019-07-08 11:38
Raspberry Pi lavalamp Hobbies 10 2017-08-16 00:37
Raspberry Pi sloppyonefoot Software 1 2017-07-02 08:48
Raspberry Pi xilman Hardware 126 2017-06-01 14:42
PC to run in a tank of mineral oil? wildrabbitt Hardware 32 2015-04-10 00:36

All times are UTC. The time now is 22:50.


Fri Jul 16 22:50:12 UTC 2021 up 49 days, 20:37, 1 user, load averages: 1.70, 2.65, 2.85

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.