Building resistivity \ conductivity analog sensor. Please help.

Hi guys,

I'm very excited in building circuit and need advice/help from you guys. I can't find many circuits on this.
I have done some research on timer circuits (555, c4060, etc) and few tiny Arduino boards and little bit confused.

I want the circuit to work as follows,

First, pair of probes will be connected to this circuit. And the enclosed circuit will be placed inside the alcohol fluid tank with probes injected into the fluid. From there the circuit should check the resistivity for every 4hrs and if found any then the LED should lit up. Also the checking should only done for about 1000-1500ms and not more than this because there might be chance of electrolysis. And a reset button should be there for case where resistivity is found and needs to be cured and start the timer again.

5v minus resistance. Could be anything from no conductivity to very close to 5V or whatever the power supply is.

I got two Arduino based boards, one is Nano pro and other is attiny85. Will be great help if you guys can help based on the info provided.

Need more info please ask.

Thank you,

i0s0sx

What resistance range are you trying to detect?
"if found any" isn't very descriptive.

And this doesn't mean anything: "5v minus resistance"

"no conductivity to very close to 5V"
Conductivity isn't measured in volts. It's measured in Seimens per metre.

am I correct in thinking that electrolysis cannot happen in the absence of resistivity ?

also, in your fluids are for human consumption, the composition of the probes should be selected for lowest possible human toxicity. the presence of them in the fluid will off possible interaction, oxidation, etc.

OldSteve:
What resistance range are you trying to detect?
"if found any" isn't very descriptive.

And this doesn't mean anything: "5v minus resistance"

"no conductivity to very close to 5V"
Conductivity isn't measured in volts. It's measured in Seimens per metre.

Hi oldsteve,

Sorry for not being clear in my question. I'm little new in this area.

The conductivity range should be within 1400-1600 (us/cm)2 at one area and below 1800 (us/cm)2 at other area.The LED should lit red if it's below 1800, white if it's within 1400-1600, blue if it's any other value. Say for example the area I want to test should get a value between 1400-1600 and the other area should get a value below 1800.Based on this I should be able to switch the mode to test at particular area.

These readings are measured at different areas, so I would like to know a generic way to do it as based on the requirements I will edit the code if possible.

Hope I'm clear to you, need more info let me know.

Thank you.

dave-in-nj:
am I correct in thinking that electrolysis cannot happen in the absence of resistivity ?

also, in your fluids are for human consumption, the composition of the probes should be selected for lowest possible human toxicity. the presence of them in the fluid will off possible interaction, oxidation, etc.

Yes. You are right Dave.

Happy to get some recommendations for choosing the probes.

It's just a small container.

Thank you

I'm not at all familiar with working in microSiemens. I'm unsure about this:- "1400-1600 (us/cm)2"
Is that correct, or should it be:- 1400-1600 us/cm?

If the latter, as I understand it, 1 microSiemen = 1 micromho, in which case 1400us per cm is equivalent to 714.29Ω per cm. Is this right?

I might be off-track. If so, if you can convert the us values to ohms per cm, and then let us know the distance between the probes, it'll be much easier to advise.

For good accuracy, a constant-current source should be used to supply current to the positive probe, then a precision voltage reference connected to the Arduino's AREF pin. The reading could then easily be taken using 'analogRead()'.

Alternatively, a suitably chosen resistor from the positive probe to +5V, with the reference supplied by the Arduino's internal 1.1V reference. and 'analogRead()'.

OldSteve:
I'm not at all familiar with working in microSiemens. I'm unsure about this:- "1400-1600 (us/cm)2"
Is that correct, or should it be:- 1400-1600 us/cm?

If the latter, as I understand it, 1 microSiemen = 1 micromho, in which case 1400us per cm is equivalent to 714.29Ω per cm. Is this right?

I might be off-track. If so, if you can convert the us values to ohms per cm, and then let us know the distance between the probes, it'll be much easier to advise.

For good accuracy, a constant-current source should be used to supply current to the positive probe, then a precision voltage reference connected to the Arduino's AREF pin. The reading could then easily be taken using 'analogRead()'.

Alternatively, a suitably chosen resistor from the positive probe to +5V, with the reference supplied by the Arduino's internal 1.1V reference. and 'analogRead()'.

Sorry, yes you are correct. Its 1400-1600 us per cm and 1800 us per cm.1us per cm = 1 umho per cm and not sure in ohm per cm, I have to check how to calculate.

Probes are 1cm apart.

Could you please give me a rough sketch of the circuit diagram for Attiny85 or uno r3.

Thank you

1 microSiemen/cm = 1 Megohm-cm
http://www.mbhes.com/conductivity_measurement.htm

jremington:
1 microSiemen/cm = 1 Megohm-cm
http://www.mbhes.com/conductivity_measurement.htm

That's what I thought.
So I took the reciprocal of Siemens to get resistance:-
1/1400 x 10-6 Siemens = 714.29Ω.
1/1600 x 10-6 Siemens = 625.0Ω.
1/1800 x 10-6 Siemens = 555.56Ω.

@i0s0sx , what resolution do you need across the measuring range?
And what are the absolute maximum and minimum values that you want to measure?
Does it have to be particularly accurate? (The 1.1V reference in an AVR chip isn't perfect.)

An external precision reference and constant-current source would be the most accurate approach.

Just brainstorming.
It might be possible to feed the sending probe with AC (capacitor coupled 50% PWM), to combat electrolysis.
The receiving electrode should also be AC coupled.
Arduino can "top-detect" the amplitude of the square wave.
Leo..

OldSteve:
That's what I thought.
So I took the reciprocal of Siemens to get resistance:-
1/1400 x 10-6 Siemens = 714.29Ω.
1/1600 x 10-6 Siemens = 625.0Ω.
1/1800 x 10-6 Siemens = 555.56Ω.

@i0s0sx , what resolution do you need across the measuring range?
And what are the absolute maximum and minimum values that you want to measure?
Does it have to be particularly accurate? (The 1.1V reference in an AVR chip isn't perfect.)

An external precision reference and constant-current source would be the most accurate approach.

Hi oldsteve,

Range:0 to 1999 µs/cm
Resolution:1 µs/cm
Accuracy: ±0.5 or 1% F.s. (excluding probe error)
Calibration: Manual, one point

Thank You

Wawa:
Just brainstorming.
It might be possible to feed the sending probe with AC (capacitor coupled 50% PWM), to combat electrolysis.
The receiving electrode should also be AC coupled.
Arduino can "top-detect" the amplitude of the square wave.
Leo..

That's probably a good idea, to combat electrolysis, but it would make measuring trickier. Also harder to use a constant-current source to supply the positive probe.
But if a constant-current source isn't needed, at std Arduino PWM rates, there's more than enough time for a couple of analogue reads during each cycle.

i0s0sx:
Hi oldsteve,
Range:0 to 1999 µs/cm
Resolution:1 µs/cm
Accuracy: ±0.5 or 1% F.s. (excluding probe error)
Calibration: Manual, one point
Thank You

You'll need an external circuit to get that resolution. You can only get about half of that with an Arduino 10-bit ADC. You want 2000 discrete steps. A 10-bit ADC is only capable of 1024.

And you asked for advice/help, not for someone to do all of the work for you.
(Before you ask for a complete design.)

Wawa:
Just brainstorming.
It might be possible to feed the sending probe with AC (capacitor coupled 50% PWM), to combat electrolysis.
The receiving electrode should also be AC coupled.
Arduino can "top-detect" the amplitude of the square wave.
Leo..

Hi Wawa,

Thank you for the reply. You are right I have to make sure not to happen electrolysis. I actually started this to make a battery operated compact size device. As long as its within the form factor I'm happy to make changes to get the desired functionality.

i0s0sx:
Hi oldsteve,

Range:0 to 1999 µs/cm
Resolution:1 µs/cm
Accuracy: ±0.5 or 1% F.s. (excluding probe error)
Calibration: Manual, one point

Thank You

`

That will range from 500 Ohms to 1 Mega Ohms.

May be circuit like this

Edit:

OldSteve:
You'll need an external circuit to get that resolution. You can only get about half of that with an Arduino 10-bit ADC. You want 2000 discrete steps. A 10-bit ADC is only capable of 1024.

And you asked for advice/help, not for someone to do all of the work for you.
(Before you ask for a complete design.)

Sorry steve, before coming here I did some research and had all these confusions. Thats the reason I asked for circuit other than that not to have complete circuit done by someone.

Hope you understood.

Thank you

i0s0sx:
Sorry steve, before coming here I did some research and had all these confusions. Thats the reason I asked for circuit other than that not to have complete circuit done by someone.
Hope you understood.
Thank you

I could just see where this was leading. First a complete circuit, then complete code.

Bill's suggestion of multiple ranges is something I didn't consider, I must admit, and would take care of the resolution issue.

Is this just to be a measuring device, or will it control something externally?

OldSteve:
I could just see where this was leading. First a complete circuit, then complete code.

Bill's suggestion of multiple ranges is something I didn't consider, I must admit, and would take care of the resolution issue.

Is this just to be a measuring device, or will it control something externally?

Its just a measuring device.

i0s0sx:
Its just a measuring device.

I asked because I was going to suggest that you use an off-the-shelf DMM, but just re-read your original post and it also needs a timer and a LED, so a DMM is out.

Perhaps something like BillHo suggested is the way to go? An auto-ranging multimeter circuit would give better than the resolution that you require. You could omit the LCD display if not needed, but it would be a handy additional feature.
You could also add a buzzer for when the conductivity is out of acceptable range, rather than just a LED.

OldSteve:
I asked because I was going to suggest that you use an off-the-shelf DMM, but just re-read your original post and it also needs a timer and a LED, so a DMM is out.

Perhaps something like BillHo suggested is the way to go? An auto-ranging multimeter circuit would give better than the resolution that you require. You could omit the LCD display if not needed, but it would be a handy additional feature.
You could also add a buzzer for when the conductivity is out of acceptable range, rather than just a LED.

Yes while doing my first research I came across the BillHo suggested circuit as the conductance is the reciprocal of electrical resistivity. But however I'm learning things in arduino and thought there might be some other constraints that needs considering.

I'll start working with BillHo suggested circuit also and let you know the progress. I'm looking at power efficient circuit and for that reason Im not going for buzzer. It will consume more power than LED.

Thank you