Green Building Forum - arduino coder Tue, 19 Dec 2023 08:19:34 +0000 http://www.greenbuildingforum.co.uk/newforum/ Lussumo Vanilla 1.0.3 arduino coder http://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=17280&Focus=293034#Comment_293034 http://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=17280&Focus=293034#Comment_293034 Thu, 11 Nov 2021 14:41:22 +0000 Brian Faux Two depth sensors (on ebay about £30 each) that give out a 4 - 20mA output signal: compare depths and if different by a couple of cm then turn a relay on, turn relay off when depths synchronise again.
It`s 20 years since I did any programming (in VB) so looking for someone to help so I can avoid steep learning curve for one project.]]>
arduino coder http://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=17280&Focus=293036#Comment_293036 http://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=17280&Focus=293036#Comment_293036 Thu, 11 Nov 2021 16:07:59 +0000 John Walsh
https://www.cooking-hacks.com/documentation/tutorials/4-20ma-sensor-board-shield-tutorial-for-arduino-raspberry-pi-intel-galileo.html]]>
arduino coder http://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=17280&Focus=293037#Comment_293037 http://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=17280&Focus=293037#Comment_293037 Thu, 11 Nov 2021 17:12:07 +0000 Ed Davies https://edavies.me.uk/contact.html if you like.

Also, do tell us all about your hydro installation.]]>
arduino coder http://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=17280&Focus=293046#Comment_293046 http://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=17280&Focus=293046#Comment_293046 Fri, 12 Nov 2021 10:42:38 +0000 Ed Davies Posted By: John WalshI googled 'raspberry pi depth sensor 4 - 20mA output signal' and the following looks an interesting startDepending on exactly how the sensors are wired I'd think a resistor for each would be sufficient.]]> arduino coder http://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=17280&Focus=293240#Comment_293240 http://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=17280&Focus=293240#Comment_293240 Sun, 21 Nov 2021 12:31:10 +0000 Brian Faux Ed has pointed out that the arduino will measure 1024 states which (given that depth sensor range is 5m) gives a resolution of around 5mm. For my purposes 5mm would probably be OK but a more accurate version would not do any harm and probably be more useful to the world at large.
BTW waterwheel installation pics at Instagram (bdfaux) - some turbine pics too but having problems uploading...]]>
arduino coder http://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=17280&Focus=293242#Comment_293242 http://www.greenbuildingforum.co.uk/newforum/comments.php?DiscussionID=17280&Focus=293242#Comment_293242 Sun, 21 Nov 2021 14:45:06 +0000 Ed Davies
Still, since what Brian wants to do is to compare to water levels to reasonably close resolution (10mm or so) over a range of about a metre measuring the levels separately before and after the leaf filter may lead to some problems if the sensors aren't linear (or are non-linear in slightly different ways).

That could probably be overcome by storing some sort of calibration chart in the microprocessor, e.g., the raw A/D converter output for 100, 200, 300, … 1000mm depth for each of the two sensors.

Another approach might be to directly measure the difference in pressures between the two levels using a sensor like this: https://www.ebay.co.uk/itm/254767611066?epid=1067948679&hash=item3b51553cba:g:bIMAAOSw6bVfoWcI , maybe one with a narrower range. Quite a few years ago I did the software, but not the electronics, for an electronic barograph (for use in gliding and other air sports) using non-differential sensors like this.

They're not designed for exposure to water but are used in applications like sensing the water level in washing machines by using an air-filled tube to transfer the pressure, with negligible effect of gravity, to a point high enough that the sensor doesn't get wet. For a washing machine the tub gets emptied regularly so the air in the tube gets reset. For an application like Brian's I think you'd need to blow some air into the tube once in a while - I'm thinking of those little pumps used to aerate fish tanks.]]>