Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] TDS / EC / PPM meter

Status
Not open for further replies.

mikewardlow

Newbie level 5
Newbie level 5
Joined
Apr 13, 2006
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,336
I have been looking etc for a ec/tds/ppm meter circuit and have not found any that I liked. So after some thought a light shined and I kirchoff.... so have decide to use a pic for a signal source.

IE source + known resistance + conductance probe.

Measure the peak voltage on each side of the resistor using ADC's

Compute the current flow Vin - Vout / known Resistor

compute conductance Vout = voltage across probe
therefore probe R = Vout / current
conductance = 1 / R

I have started similiar post on RCGROUPs, but not sparking much interest..
https://www.rcgroups.com/forums/showthread.php?t=2198345
 

You mean to say that you want to build a ppm meter circuit by using a PIC microcontroller..?
 

You mean to say that you want to build a ppm meter circuit by using a PIC microcontroller..?

That is the plan.. I've been playing with the simple circuit pic - resistor - probe.:lol:

I pulse the resistor + probe at 10kc ( I think maybe too fast ) and take reading across
the resistor, compute current, compute probe resistance, compute condunctance.

So far I've only accomplished a reasonable good OHM meter for resistors, the elusive MHO
is on the flaky side:bang:
 

So..can you explain again what problem(s) are you facing in the design of the system..?
 

When I use a resistor for the probe I compute a resonable close values consistantly.

When I use the probe I compute what I think is a low value and it never wants to stablize.

I am going to lower test freq from 10kc to 1kc to see if that makes any difference, but first I have to find bug I put in my pgm after last change[ attempted to use 1.024 v ref ]
 

Recently found this simple Conductometer ,, seems to work quite well with make shift probe, but of course not sure how the calibration / scales will be linear or accurate:shock:
 

Attachments

  • Conductometer.pdf
    124.8 KB · Views: 133

Have completed a pulse counting TDS meter, my problem now is I need several good calibration solutions, and a good k 1.0 probe..

The pulse circuit is LM555 timer timer chip [ similiar to atlas scientific] which feeds a 16f1825 pic running 32mhz... The 555 circuit itself appears to be temperature sensitive. And requires more investigation. I have attached the source code -in proton basic and a hex file..
In case anyone is interested...

It captures pulses for 32000 us into T1 ctr, I have captured 64000 counts reliably. I take 8 samples of the pulses and also of the temperature [DS18b20]
I have 5 Probe tables that will hold 10 calibration ppm/count values each
you have to manually add the values with a command [ RS232 ] other command are available - see source code

I have some test code using port c to derive Bipolar signal from op amp
-was trying to play with pulse TDS measurement

My current timer is using a .022uf cap and with 150 ohm {probe-resistor}
I get approx 44000 pulses, If I place my finger on the 555 chip the pulse rate slowly drops to 43000+ [ ie temp sensitive]

If I can come up with a good probe and embed the DS18b20 I think it will be a viable design
 

Attachments

  • New Folder.zip
    24.3 KB · Views: 119

I have been working on a similar project. There is a ton of pitfalls you are going to have with your 555 design. I'll try to point you in the right direction.

The 555 won't run stable because the capacitor is temperature sensitive. If you look at the capacitor datasheet, most are +/- 30%. Even the best ones have too much of a fluctuation to be accurate. You must measure the capacitor on the RC circuit before each measurement and calculate the real capacitor value.

The pic your using has voltage comparators. You can use those to do away with the 555.

Connect a GPIO pin to the probe, probe to capacitor / comparator, cap to gnd.

Also connect another GPIO pin to a precision resistor to the cap to do the capacitor measurement. (leave the pins in high impedance state when not in use)

So set the pin to high, count clock cycles until the comparator triggers at 2/3, switch the comparator to 1/3, set pin to low, count until comparator triggers. Repeat and average like 10,000 times. Keep it above like 5khz it must be as even as possible. If its too slow put in smaller cap. Also keep a eye on the high/low values... if they are too far apart, the probe is dirty or your having polarization issues. You will need a crystal to get accurate counts as well.

Put a resistor in parallel with the probe to do a calibration when probe is dry. You can also put one in series and short the probe to get a second value to do a y=mx+b calibration.

Once you have your ohms reading. You calibrate with 1000ppm (1 gram of salt in distilled water) and calculate the probe constant K. Conductivity = ohms * K. Also note that EC calibration is only 1 point! The conductivity of 0ppm is infinite.

Also you will need a probe with a thermistor to get a accurate temperature reading. TDS readings are highly temperature sensitive.

Temperature compensation is tough. It's too hard to calibrate the temp, and apply that to your ec calibration and expect anything to work out. Here is my solution: I take a 1000ppm sample, heat it covered in the microwave. I put it in a bowl of ice and record the ADC reading from the thermistor and EC reading as it cools down. From that I build a table of +/- percents to offset at every ADC value.


You will want to isolate the PIC with a dc/dc convertor and a few optocouplers. Especially important if you have other probes connected in the same environment. If its just the single probe you can use a heavy wall wart adapter with a proper transformer in it. Ground loops are a serious pain. I even isolate the temperature sensor, as it can throw off readings if there is a small ***** in the probe.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top