Forum Replies Created
-
AuthorPosts
-
The mayfly can generate a square wave which can then be filtered/rounded to a sinish wave. It would still need to be amplified with a low current op-amp
For TDS trials I personally would start with s
The mayfly can generate a square wave which can then be filtered/rounded to a sinish wave. It would still need to be amplified with a low current op-ampFor TDS trials I personally would start with something like this, though might need more research – it has methods of calibration. The qu is just what sort of value does the results give
https://www.dfrobot.com/product-1797.html
https://github.com/DFRobot/DFRobot_EC – I haven’t found a diagram yet
The cable, for outdoors (no radio emf) doesn’t need to be the shielded cable.
My guess Titanium sensors of similar size would work instead of the defined lab sensor.Cutting the rod in small diameter wasn’t a problem for me. Ideally it should be a square cut.
Ti oxidation layer protects it https://cdn.ymaws.com/titanium.org/resource/resmgr/2010_2014_papers/Cutting the rod in small diameter wasn’t a problem for me. Ideally it should be a square cut.
Ti oxidation layer protects it https://cdn.ymaws.com/titanium.org/resource/resmgr/2010_2014_papers/HouserRobert_2011.pdfYou may have two different sensors if you want to be able to do “water detection” v “conductance”
Also depends on power consideration, and how long it should be left between maintenance visits.
Conductance – ionic transport in water – is much studied and seems to get tricky pretty fast, but maybe it doesn’t have to be that accurate.
Stream water gets a lot of particles in it as flow is reduced.
http://reefkeeping.com/issues/2004-04/rhf/feature/index.phpImplementing a Low Cost, Battery Powered, TDS Meter Using MCU and PSoC
Mechanical considerations is always a challenge. If you are looking at an array of sensors, – I wonder what distance between them. If they are going to be linearly distributed, then perhaps a PVC (1″? 3/4″) pipe could be a mechanical holder and wire conduit. Electrodes could be inserted in joining sections. That would make it accurate for intra-electrode spacing. There could be some challenges assembly two titanium electrodes with wires, inside a 1″ PVC pipe joiner, but seems doable.
The array of temperature sensors also is something I’ve been thinking of. I like thermistors for their low thermal inertia – however both need to be sealed from direct water contact, and that needs to be both thermally conductive and prevent long term water migration.
Thermistor v DS18B20 is partly how many units are likely to be produced. The DS18B20 require the individual ID numbers to be characterized in the array, thermistors require an analog multiplexing scheme. Both are dependent on how far from a datalogger.I look at the measurement accuracy, and vented depth sensors. Especially at lower water levels vented depth sensors are I believe the most accurate.
Good measurement accuracy starts at about 0.25% ofI look at the measurement accuracy, and vented depth sensors. Especially at lower water levels vented depth sensors are I believe the most accurate.
Good measurement accuracy starts at about 0.25% of range and optionally can be of 0.1%
I’ve been using the Keller Acculevel for ranges over 10′, and characterizing the Keller Nanolevel for ranges under 10′ – both of these use a Modbus interface – RS485 physical driver and excitation voltage of about 12V.
The accuracy including temperature compensation can be selected to be 0.1% – ie for 10’range is +/-0.01′(+/3mm) – across temperature variations. That is if you have a smaller temperature range the accuracy can be better than 0.1%https://www.instrumart.com/products/33962/keller-acculevel-submersible-level-transmitter (Start ~$527)
However if accuracy is important, you have to dig a bit deeper in to the specification, I can explain if interested.
The do have a Keller Digilevel SDI-12 which has the same spec – but haven’t seen anybody interface to it. Shouldn’t be too hard I would think, but there isn’t much value to their SDI-12 as it still requires 6V excitation.and the Keller Level range
https://www.instrumart.com/search?query=Keller+level&ab=TZ27RWeRDBhId2oG2N9OZZJtd1X%2FG8p%2BWeWPPNyJ%2FpBmvD9%2FYnH5HupMBgbQWOnlWe initially used the Keller LevelGage sensors, but in streams, they started failing after a couple of years and where replaced by Acculevel then Insitu LT500.
The hydrologists I work with have good experience with Insitu LT500 series for accuracy (0.1%FS and 0.01%FS) and stability. They are expensive (base $2K+) and are standalone, they have battery and loggers, the cables are highly engineered devices and cables. Recently I’ve had two of the pig-tail connectors fail (at$350each). There isn’t a ModularSensors library for them yet.I’ve blogged about accuracy on sensors (but not specifically the Keller AccuLevel).
I recently got a quote for the CTD-10 (10m or 30′ – they only do the 10m now) with a fixed accuracy at 20C of 0.05% Full Scale or +-/5mm and no statement of how it varies with temperature (called temperature compensation).
UpdateJan9th: I got a reply from leo.rivera@metergroup.com “We typically evaluate this from 0 to 50C and we see somewhere around +/- 2 cm in that range. It does vary sensor-to-sensor and some sensors have lower sensitivity.”
So practically they are saying temperature compensation is challenging, and they could have the readings varied by ±25mm or 0.25% of scale – and they wouldn’t take the instrument back.
https://www.metergroup.com/environment/products/hydros-21-water-level-monitoring/ Quote $491 per sensor and with a 10-meter cable.
The CTD-10’s value seems to be its widely used in ModularSensors, and can be interfaced to simply with the base Mayfly, though I don’t have any experience with it.Hope that’s useful, and not too much info!! There are a few people using Acculevels, so if you have any other questions, maybe you can describe the expected site and also the accuracy you are aiming for 🙂
Hi Charles,
I’ve used titanium rod – 1/16″ Dia 6″ length= $1.62 – https://www.mcmaster.com/89145k28
and its easy to crimp a wire to the rod. I might be able to find a piHi Charles,
I’ve used titanium rod – 1/16″ Dia 6″ length= $1.62 – https://www.mcmaster.com/89145k28
and its easy to crimp a wire to the rod. I might be able to find a picture of it at some point.
Its also possible to drill two holes through a PVC end cap, and then snuggly push the rod through with a watersealant adhesive on it – uses the friction fit of the rod, with the watersealant adhesive as secondary water tight guarantee. That then provides small chamber to protect electrical connections. I used a crimp connections, with solder as a glue, are better for long term survivability.
I haven’t had a lot of field experience with the titanium example though.One area to look for in ideas of detection is the analog front end of “water leak detectors/alarms” and plant water probes and rain detectors
http://www.hobby-circuits.com/circuits/sensor/fluid-and-humidityPart of the issue is that pure water doesn’t conduct. Its the salts/ions that conduct electrons.
So what type of ionic conduction is likely in your water – and more to the point if you have too much current – possibly like in your proposed simple detector – will all the ionic transport be used up. If its flowing water probably not. Rain detectors use a large surface area to catch water and then have a high impedance detection circuit.
These have some good descriptions:
http://www.hobby-circuits.com/circuits/sensor/fluid-and-humidity/783/plant-watering-watcher-circuit-schematic
http://www.hobby-circuits.com/circuits/sensor/fluid-and-humidity/263/plants-watering-watcherI’m also looking at a water disconnect sensor for stream reaches here in the Western USA. With the long hot summers, the biology of stream pools starts to change when the stream flow reaches zero. Detecting no flow or low flow in a real stream reach is challenging. Perhaps measuring a stream disconnect might be easier and help with stream management. So I’m interested in what your experience is.
Hi Erik, Sounds like we ended up working on the same issue at about the same time.
Great to hear you have a basic path forwards. I am very much a fan of the open source ModularSensors and EnviroDIY wHi Erik, Sounds like we ended up working on the same issue at about the same time.
Great to hear you have a basic path forwards. I am very much a fan of the open source ModularSensors and EnviroDIY which covers a lot of functionality.However, it is a matrix of south bound (away from internet) instrument sensor interfaces ~~which are fantastic~~ and north bound (towards internet) communication interfaces.
I personally have just a few configurations that I’m trying to build for the future, very much with RS485/12V (and SDI12/5V as instruments support it).
From the software engineering aspect of the open source, there is no regression defined. So I’m attempting a definition of that.
SO interested how it works for you.Sara sorry about the stomach bug. Life is challenging when the rulers of the internal ecology get distracted with nasty bug invasions.thanks for the fix ~ I just noticed this conversation today.
I
Sara sorry about the stomach bug. Life is challenging when the rulers of the internal ecology get distracted with nasty bug invasions.thanks for the fix ~ I just noticed this conversation today.
I think it was working with the AVR compiler as I had it all working for many months on a Mayfly (except that specific riparian monitoring Mayfly got stolen a couple of months ago). I’ve seen this problem before, that the AVR compiler has some defensive won’t execute a NULL pointer. Which is great. The NULL pointer came up in the ARM context, but I hadn’t regression tested it with the AVR.
I haven’t looked at this AVR Mayfly RS485 DIR management as its a streams based environment. That is where the Auto Direction SOM works very nicely. I had no problems with it.
Apologies if this is repeating something that everyone knows;
Modbus is a packet of information. At the begin of the packet the RS485 driver half duplex goes to transmit, and then only when the complete Modbus msg is sent does the RS485 driver revert to receive.
The reverting to receive is critical hard real time, as the modbus slave starts to respond shortly afterwards and I believe its specified at 3.5Character timings or about 3.5mS. Modbus also specifies for a packet that there should never be a gap between characters of more than 1.5Character timings or about 1.5mS.
The RS485 SOM does this with a simple hardware timing. Resistor, Cap, Diode and buffer(schmitt trigger) I believe.
For a streams based environment I believe its challenging.
I did investigate this for an Ubuntu Linux build and compiled in a different set of drivers for an RS485 mode.
For the streams based environment, turning the driver to transmit is easy and can be done before starting writing to the stream.
However it requires an accurate time to detect, not just when the last byte in the packet is written to the hardware (and how does a stream know its the last byte especially if there is a multibyte FIFO for the Tx UART) but when that byte has completed transmission through the UART. So for a stream based environment, the driver needs to start a timer whenever the UART end of character interrupt is received, and if another character isn’t written into the UART in 1.5character timings (a 1.5mS) then it needs to switch the direction to receive.
In the world of industrial designed systems for Modbus there are a number of potential solutions a) design a packet based interface for the Mega1280 UART- the UART supports end-of-byte transmission, but the driver guarenttees the Rx switch. b) use a MAX1348 driver which also has auto direction, but it requires +5V c) using a processor with UART that supports RS485 like the SAM51Well Solstice Salutations to everyone, I hope you have a good holiday – and that there is harmony with the anthropogenic masters, the gastric microbial ecology!.
Thanks for the front door 🙂 eTree was going down a whirly pooll!This worked for me, though maybe there is a nicer way.
The output is value_num – which can be used for the threshold check.Thanks for the front door 🙂 eTree was going down a whirly pooll!This worked for me, though maybe there is a nicer way.
The output is value_num – which can be used for the threshold check.1234567891011121314151617181920212223242526import ulmo#post_req='http://data.wikiwatershed.org/wofpy/rest/1_1/GetValues?location=envirodiy:TU-RC-01&variable=envirodiy:EnviroDIY_Mayfly_Batt'#post_req='http://data.wikiwatershed.org/wofpy/rest/1_1/GetValues?location=envirodiy:TU-RC-01&variable=envirodiy:All_ExternalVoltage_Battery'wsdl_url = 'https://monitormywatershed.org/wofpy/soap/cuahsi_1_1/.wsdl'site_code = 'TU-RC-01'variable_code ='All_ExternalVoltage_Battery'site_values_dict = ulmo.cuahsi.wof.get_values(wsdl_url, site_code, variable_code, start=None, end=None, suds_cache=('default', ))for key_svd in site_values_dict :elem_svd = site_values_dict[key_svd]if key_svd == 'values' :print('**elem_svd',elem_svd)# Fut may have multiple 'value'first_or_default = next((x for x in elem_svd if 'value'), None)if first_or_default :print('**full_value',first_or_default)value_txt = first_or_default['value']if value_txt :value_num = float(value_txt)print('value (v)', value_num)else :print('err2:value not found')else:print('err1:value not found')The retrieved ‘sites_values_dict’ is
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263([('site', {'code': 'TU-RC-01','name': 'TU-RC-01 LDSR PitTag Monitor','network': 'envirodiy','location': {'latitude': '38.40731','longitude': '-122.81813','srs': 'EPSG:4236'}}), ('variable', {'value_type': 'Instrument deployment','data_type': 'Average','general_category': 'Instrumentation','sample_medium': 'Surface water','no_data_value': '-9999.0000000000','code': 'All_ExternalVoltage_Battery','id': '215','name': 'Battery voltage','vocabulary': 'envirodiy','time': {},'units': {'abbreviation': 'V','code': '369','name': 'Volt','type': 'Electromotive force'},'description': None}), ('values', [{'value': '16.0','method_code': '2','quality_control_level_code': '1','censor_code': 'nc','date_time_utc': '2019-11-23T03:51:02','source_code': '611','time_offset': '-08:00','datetime': '2019-11-22T19:51:02'}]), ('censor_codes', {'nc': {'censor_code': 'nc','description': 'nc'}}), ('methods', {'2': {'id': '2','code': '2'}}), ('quality_control_levels', {'1': {'id': '1','code': '1','definition': 'Raw Data'}}), ('sources', {'611': {'id': '611','code': '611','organization': 'Trout Unlimited','description': 'Today TU is a national organization with about 300,000 members and supporters organized into over 400 chapters and councils from Maine to Montana to Alaska. This dedicated grassroots army is matched by a respected staff of lawyers, policy experts and scientists, who work out of more than 30 offices nationwide. These conservation professionals ensure that TU is at the forefront of fisheries restoration work at the local, state and national levels.','contact_name': 'Neil Hancock','email': 'neilh20+turc1910@wllw.net','link': 'https://www.tu.org/'}})])The debug out looks like this
1234567891011121314151617181920212223** elem_svd[{'value': '16.0','method_code': '2','quality_control_level_code': '1','censor_code': 'nc','date_time_utc': '2019-11-23T03:51:02','source_code': '611','time_offset': '-08:00','datetime': '2019-11-22T19:51:02'}]** full_value {'value': '16.0','method_code': '2','quality_control_level_code': '1','censor_code': 'nc','date_time_utc': '2019-11-23T03:51:02','source_code': '611','time_offset': '-08:00','datetime': '2019-11-22T19:51:02'}value(v) 16.0Thanks for ulmo reference – I can sort of see something there, but its got a lot of layers and I can see it understands the response from a http://data.wikiwatershed.org/wofpy/rest/1_1/GetValuesThanks for ulmo reference – I can sort of see something there, but its got a lot of layers and I can see it understands the response from a http://data.wikiwatershed.org/wofpy/rest/1_1/GetValues?
of the form
<timeSeriesResponse xmlns=”http://www.cuahsi.org/waterML/1.1/” xmlns:ns0=”http://www.cuahsi.org/his/1.1/ws/”>Well in the spirit of try many things, be prepared to fail, I’m putting aside trying to understand the namespaces built in here defined by
xmlns=”http://www.cuahsi.org/waterML/1.1/” xmlns:ns0=”http://www.cuahsi.org/his/1.1/ws/”So just an FYI if there are an XML gurus, I’m trying to retrieve the simple value, and whenever I try to search down using xml.etree.ElementTree I can’t null out the effects of xmlns and xmlns:ns0.
A sensor value is encoded as “timeSeries” and shows
123456789101112131415161718192021222324252627282930313233343536373839404142434445--->dump node<ns0:timeSeries xmlns:ns0="http://www.cuahsi.org/waterML/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ns0:sourceInfo xsi:type="SiteInfoType"><ns0:siteName>TU-RC-01 LDSR PitTag Monitor</ns0:siteName><ns0:siteCode network="envirodiy" siteID="558">TU-RC-01</ns0:siteCode><ns0:geoLocation><ns0:geogLocation srs="EPSG:4236" xsi:type="LatLonPointType"><ns0:latitude>38.40731</ns0:latitude><ns0:longitude>-122.81813</ns0:longitude></ns0:geogLocation></ns0:geoLocation></ns0:sourceInfo><ns0:variable><ns0:variableCode default="true" variableID="250" vocabulary="envirodiy">EnviroDIY_Mayfly_SampleNum</ns0:variableCode><ns0:variableName>Sequence number</ns0:variableName><ns0:variableDescription>The sample number returned by ModularSensors</ns0:variableDescription><ns0:valueType>Instrument deployment</ns0:valueType><ns0:dataType>Average</ns0:dataType><ns0:generalCategory>Instrumentation</ns0:generalCategory><ns0:sampleMedium>Surface water</ns0:sampleMedium><ns0:unit unitID="409"><ns0:unitName>Count</ns0:unitName><ns0:unitType>Count</ns0:unitType><ns0:unitAbbreviation>Count</ns0:unitAbbreviation><ns0:unitCode>409</ns0:unitCode></ns0:unit><ns0:noDataValue>-9999.0000000000</ns0:noDataValue><ns0:timeScale /></ns0:variable><ns0:values><ns0:value censorCode="nc" dateTime="2019-11-21T15:44:02" dateTimeUTC="2019-11-21T23:44:02" methodCode="2" qualityControlLevelCode="1" timeOffset="-08:00">173.0</ns0:value><ns0:qualityControlLevel qualityControlLevelID="1"><ns0:qualityControlLevelCode>1</ns0:qualityControlLevelCode><ns0:definition>Raw Data</ns0:definition></ns0:qualityControlLevel><ns0:method methodID="2"><ns0:methodCode>2</ns0:methodCode><ns0:methodLink /></ns0:method><ns0:censorCode><ns0:censorCode>nc</ns0:censorCode><ns0:censorCodeDescription>nc</ns0:censorCodeDescription></ns0:censorCode></ns0:values></ns0:timeSeries>On the ThingSpeak thanks for pointing it out – they have become painful. I have a number of legacy connections I’m setup up for.Not knowing the architecture of the ODM2/WOF and WaterML
On the ThingSpeak thanks for pointing it out – they have become painful. I have a number of legacy connections I’m setup up for.Not knowing the architecture of the ODM2/WOF and WaterML 1.1 it was more of a reference.
Thingspeak used to be a lot more open, but Mathwork$ acquired them, and I guess they are making money out of it.
Which is to be expected, but I so appreciate enviroDIY coming along for environmental monitoring (and thanks to the NSF and William Penn Foundation funders)I am digging into Python libs in parsing the WaterML – but if you have any examples on getting to the data that would be great.
-
AuthorPosts