Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help with ORP and Salinity Circuits

Status
Not open for further replies.

Jorge Ramalho

New Member
Hi!

I'm building a controller based on a Arduino Mega 2560 and some stackable shields made by myself to manage an marine aquarium. The idea is to build the controller slowly, learning with it. I'm not an specialist or engineer, so I used an existing Open Hardware Controller called ReefAngel to help me with it's solutions for some circuits and software, as well.

I managed to build some shields and now it has RTC, EEPROM, Temperature, dosing pumps and the power unit (relay) command. I'm building now the probes shield which will have pH, ORP and Salinity. In ReefAngel's schematic, pH is driven at 5V together with it's main controller circuit. As I'm using Arduino, the voltage is ok. However, according to reef angel's project for ORP and Salinity, they're circuits are driven at 9V, as you can see in it's schematics. As I'm working with stackable shields and I don't want to have many modules connected with cables, I intend to integrate all circuits in one single module.

My question is: might the Salinity and ORP circuits be driven in a derived subnet of 9V since I'm driving arduino at 12V? I wonder if I use an 9V regulator (7809) I would be able to use RA ORP and SAL circuits with no modifications.

In Reef Angel's forum someone has written the circuits need to be galvanic isolated because you have different levels for GND, is it true? Can't I just connect the output of the gain OPAMP to an analog in pin of arduino with?

You may notice the circuits attached are opto-isolated from the main I2C bus (the USB connector). I want to connect the circuit directly to an analog input pin of the Arduino. Is it possible?
 

Attachments

  • ORPExpansion.pdf
    80.1 KB · Views: 676
  • SalinityExpansion.pdf
    79.5 KB · Views: 670
Thank you Mosaic!

Actually I figured out the ORP circuit is just like the pH circuit, but with less gain. I've seen basically two kinds of implementation: the most common using 2 opamps in inverting configuration and the other with only one opamp in non-inverting configuration. I didn't get the actual diference between both, but I will use the most common one: the 2 inverting input configuration.

The main problem now is the salinity. I know the sensors can measure the electrical conductivity of water (EC) and the is a math formula to convert to salinity, but almost all circuits I've found runs at 9 or 12 volts, and as I'm working with arduino, I didn't want to use optocouplers and stuff like that, since I must work with +5v.

Any clue?
 
I built one using a PIC with a 7555 AC frequency feed, kinda like a VCO. The PIC counts the freq. via its T0CK input and I calibrate using known solutions. The PIC then interpolates the cal.

Sorry no sketches...all assembly.
Here is the EC VCO circuit.
EC-cct.png
 
Hum.. Pretty interesting. So, you don't measure the voltage (conductivity) directly: you analyze the different PWM frequencies. Very interesting! But what about the probes? Other circuits work with a simetrical wave signal (sine or square) driven at +9/-9 or +12/-12v. As some text I've read, it makes the salt ions to "remain at their places", since, they will move just a bit following the electrical current and there will not be any ions accumulation on the probes.
 
The pulses delivered by the probe happens to be AC due to the capacitive relaxation oscillator of the 555. The conductance determines the freq. of the oscillation. Thus there isn't any net galvanic voltage. The probes don't degrade or develop crud.
 
Well yes. I wrote it.

It's part of a larger application that runs a Solar 12V, ebb & flow, hydroponics system with level sensors, Ph, temperature, etc.
Based around a 16F886 PIC.
 
... Actually I figured out the ORP circuit is just like the pH circuit, ...

Electrically, sort of. In practice, decidedly no. pH transitions between negative and positive values and visa versa. DO only between zero and positive. Both are significantly affected by temperature. Both experience notable fouling problems.

What DO probe(s) are you considering? I have considerable experience in aquaculture (especially marine) water quality monitoring and its myriad pitfalls.
 
Interesting what you've said. Almost ORP all circuits I have analyzed work with probes which measure range is 0 to +/-2000mV. All circuits have the same configuration as pH circuits: usually 2 opamps in series: one for the slope and the other for it`s gain. ORP gain should be much smaller then the pH one. Some commercial solutions let you configure the circuit to make possible to choose it`s application: ORP or pH. The solution I`m using doesn't read all the probe range, but as it's for an aquarium, if I stay between 400mV and 700mV, it would be ok, since far from this point, there would not be any life in the aquarium. Am I wrong?

Well, I got this ORP probe: https://www.aliexpress.com/snapshot/6070876645.html
and this ORP circuit: https://www.dfrobot.com/image/data/SEN0165/OPR meter V1.0 Schematic.pdf

And what about the salinity circuit?
 
Jorge,

No, you're not wrong. And I understand your goal(s). It might be of no consequence, but I feel obligated to make the following observations.

My experience is in large scale (>20, 2 to 18 acre [surface area]) intensive shrimp aquaculture pond facilities (3,000 animals/m2). I have no idea of the size of your aquarium, but strictly by size alone my suggestions are probably irrelevant.

Our DO and pH fluctuations were radical, at best, due to the enormous strains on the culturing systems imposed by crazy algal densities and animal excreta (wild pH changes) and enormous DO load(s) imposed by the maturing shrimp, the algae (at night) and feed/excreta rot.

We paid no (zero) attention to salinity since: 1. it's a parameter over which we could not exercise control and: 2. it had marginal effect on DO and pH. In your case, once salinity is settled, merely maintaining water level(s) ordinarily will suffice.

Water temperatures were vitally important to us, especially in monitoring real DO (although also, obviously, not controllable)

As a result, we needed extremely accurate Temp, full-scale DO and pH data.

That said, it may be that you can adequately monitor your aquarium's water quality with "raw" DO values as you envision (not compensated for by Temp) so long as you occasionally calibrate the DO probe/amp circuit output values against known DO levels at ambient tank temperatures. Understand that an ORP probe (such as you listed) has a short life span if used in-situ due to electrolyte depletion, not unlike pH probes. True in-situ probes of this sort have large electrolyte reservoirs that can be replenished.

Lastly, all ORP probes can suffer from O2 fouling if the electrically active element is not: 1. a large (several square inches) surface area vertically oriented or; 2. mechanically "washed" by some sort of water current. If not kept clear of this fouling, the probes will give false low (or zero) readings. This can also be caused by slime films developing on the probe surface.

Accurate, in-situ marine water quality data streams are not easy to maintain.

I anticipate following your progress in this endeavor.
 
Here is a cheaper Ph unit that is easily replaceable.
**broken link removed**

I also have designed a 0-5V PH amplifier and use 2.5V as the centre ground with a rail to rail opamp. Makes it ADC compatible on the uC.

If supplying DO is a prob. Then u need to monitor etc.
But it may be simpler to ensure available DO rather than trying to 'manage' it
 
Cowboybob,

Thanks for the detailed explanation!! I agree with you about salinity: it's not the main concern, but I would be happy to plot it with other parameters in a chart to help me analyzing the tank, but definitely not major requirement. Althought, pH and ORP are.

I think I've omitted the controller has 3 waterproof temperature probes. I really intend to compensate the temp in ORP and Sal readings.

The main issue now, is just find a good salinity (or EC, or PPM, or TDS) circuit driven at 5v. I know it can be done since there are commercial controllers with this functionality. I just need the circuit.

By the way, very good advice about the "wash" at ORP probe. If I point the probe in recirculation pump flow at sump, would it be ok? How often should I wash the probe in RO water?

Mosaic,

Thanks, man! That's exactly the one I've bought! ;)

I didn't quite understand what you mean bout supplying DO. I intend to monitor it, not to provide. It might indicate some kind of problem if there are a big fluctuation in its level: a dead animal, too much food, etc.
 
Jorge, Is it that you don't want to program your own sketch to interpret the 7555 frequency as an EC measurement?
What type of sensor input do u need, an ADC readable voltage or an I2C signal?
Do u want another arduino shield with sample code or something like that?

**broken link removed**
 
Last edited:
Well, the goal is to make it work fine. I intend to make it work using Arduino analog pins as input, so I need 0-5v of range. If it's too hard to do, I might use an I2C solution (or even Serial UART). I was really interested in your solution of frequency analysis, but I actually I don't know how to work with frequency analysis in Arduino (I began studying arduino and electronics just a few months ago, by myself! ;)). However, I'm a good programmer, so that's why I've asked if you had a piece of software: I would analyze the software and discover how to do it...
 
Mosaic, I think the solution explained in the PDF would be a bit tricky: It would have a lot of ions accumulating in the probe's terminals since it works with a fixed DC level (+5V).
 
Salinity can be measured electrically, by a probe's output alone, using a number of different methods. There is no need to buy a readout device. So long as you can calibrate your sensor output to, for instance, the very reliable refractometer or any other salinometer, your good to go.

The problem lies in the composition of the salinity probe tips you're using. They all suffer from some degree of corrosion/degradation which is, generally, only slightly reduced by pulsing or other excitation interrupting regimes (which, by the way, was my preferred method. You just have to build in a "power-up and then delay before read" routine to allow the probe to "settle").

I've had the best probe longevity with an extremely simple probe had 100% carbon elements. They were, in essence, conductivity sensors, whose output can be digitally adjusted for only the NaCl component of your water with a formula that takes into account the water temp.

Again, calibration curves will need to be developed against other known sources.
 
If I was up to build my on probe, I would try titanium: it's a salt water resistant metal, but I guess I could try the graphite since it's a lot cheaper.

I must say your advices are all great and make my head almost melt thinking.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top