Liquidator Automation

Rabbit

0
Jul 12, 2008
74
Well I've been working this spring on my Liquidator automation controller. I just need some help from someone with some experience in the field converting mv to parts per million (ppm).

Here is my project as it stands now, I've started to layout the circuit board for the project and I hope to have it done soon. The code is pretty much done with the exception of a few wish items. Much of it will be dependent on what information I can obtain from forums and the net in general.

IMG_6366.JPG


Here is the breadboard layout. In the back you can see the white and black solenoid that will allow the chlorine to flow. It's designed to not require pressure to operate. When it's on it opens a passage inside. The mechanical parts are all stainless and nylon, I hope it last a while. The strange metal tower is actually a make shift heat sink I attached to a TIP-30 transistor. It's job is to turn on and off the solenoid.

IMG_6367.JPG


Here we have the main display screen that would be seen during normal operations. On top 00:00:00 represents the time the solenoid was running. It is in hours:minutes:seconds and is pretty accurate. This time resets itself after 8 hours of no usage. The mv reading is taken from the ORP sensor. The ppm reading is based off a look up table and currently is in a linear slop. It's WAY off because I need to find a good conversion chart. This I could really use help with. The temperature represents ambient temperature. The word "Low" means the sensor is detecting a value below what you have it set to.

IMG_6368.JPG


This is the screen to set the desired ORP level. The device has to have 60,000 samples above or below what this setting is before it makes a decision. This of course happens in just a few seconds. The idea is to not have the unit turning the solenoid on and off too often. Kind of a false alarm prevention.

IMG_6369.JPG


I added a pH setting to allow for re-calculation of the ORP value based on pH, at this time I've not actually implemented this feature. I hope to when I get more data.

IMG_6370.JPG


This is an interesting feature. I didn't want to have flow gauges or any other type of wiring, etc to detect when the pump is running. So I opted to detect the flow of water by sound. A very small microphone will sit on the pipe and listen to the water flowing. This screen shows you the current sound level and allows you to adjust the trigger point.

IMG_6371.JPG


If the pump is running and the chlorine level is low why not have an alarm? Well that's exactly what this does. It allows you to set a minimum ORP level. When the ORP is below this level a multi tone alarm will sound every 10 minutes. It's not supper annoying, but should gain some attention.

IMG_6372.JPG


I didn't really need this screen, but I opted to add it for people that like accurate devices. It allows very fine tuning of the temperature readout. I found it was pretty accurate from the start.

IMG_6374.JPG


One of the most demanding parts of this project was reading an ORP sensor. For that we use a Burr Brown Instrumentation Amplifier. It has an input impedance of 10^13 ohms. That's trillions of ohms. It was needed to accurately read an ORP sensor. Please forgive my sloppy solder work. I knew this little break out board holding the chip would only be used once.


When I'm done with the project (Soon) it will be all surface mount chips. The hardest part is going to be finding a suitable case to put it all in that will withstand the outdoors.

By the way the circuit has non volatile ram and will keep your settings if the power goes out (for at least 100 years). It also has lockup detection and will auto reset itself if the system stops running. So power flickers and such should not cause a green pool.

Wish list for my project:

1. Season detection by using the temp sensor to automatically adjust the chlorine levels. Not a hard thing to do.
2. Accurate PPM readings based on pH adjustments, etc. I need some help with this one.
3. I would love to have a real time clock calendar on board to actually control the pump itself.

If anyone has any information on converting ORP mv reading to PPM values I would greatly appreciate it. My code allows for a non linear curve for these values (look-up table).

I'll post more when the project has progressed.
 
Very cool!

There is no fixed relationship between ORP and FC. There is an equation that can tell you what the relationship ought to be, but it assumes that nothing else changes. In the real world everything else does change. The actual relationship depends on temperature, PH, CYA level, amount of sunlight falling on the pool, dissolved hydrogen gas, MPS level, metals in the water, sensor deign, specific sensor used, and on and on. In effect the relationship drifts over time, and must be re-calibrated to FC regularly. Public pools that use ORP often re-calibrate daily. If you look around at the commercial ORP systems, they nearly all just show the ORP level and don't bother trying to relate it to FC.

One neat feature, would be estimating the amount of time till bleach needs to be added to the liquidator. That time would depend on chlorine usage, which can be estimated based on recent trends.
 
JasonLion said:
Very cool!
One neat feature, would be estimating the amount of time till bleach needs to be added to the liquidator. That time would depend on chlorine usage, which can be estimated based on recent trends.

Hey I like that idea.

So is there any way to even get in the ballpark with the ORP to PPM relation ? Not that I really need PPM, I just thought it would be nice.
 
The hardest part is going to be finding a suitable case to put it all in that will withstand the outdoors.
I think I'd opt for a standard NEMA 4 electrical enclosure. I always liked Hoffman equipment, but it's pricey and the Carlon stuff at Home Depot or Lowes will work, and should be either NEMA 4 or 6/6P rated. An 8x8x4 should run around ~25 bucks or so. You can make a plexiglass window and gasket it behind a rectangular cutout on the cover.
 
JasonLion said:
You can look at things like this post by chem geek or this paper to get some idea of how to estimate FC based on ORP and PH.

If you get the general form of the equation right you can then provide some kind of user calibration procedure and that can get you quite close for some period of time till it drifts out of calibration.

I'm actually using a look up table. It will allow a non linear ramp. Pretty much instead of calculating on the fly I would like to use the table to just read a pre-calculated value. That's not to say an equation for adjustment could not be applied against that looked up value. Thanks for the info, I'll see if any of his papers can be applied to give me a good starting point.

I hope to have the first prototype circuit board done in a week for testing. That's assuming I stay motivated :)
 
Pretty cool!

I'd be a little concerned that you might have some delay in the ORP measurement that might let you overshoot on chlorine. You may want to consider two solenoid valves in parallel with a manual valve in line with each so you can throttle the chlorine rate down to avoid overshooting when you get close to your desired range. I'd think that would be an easy add-on after you run it a while, but if you can allow for it now, it might be worth considering.
 
JohnT said:
Pretty cool!

I'd be a little concerned that you might have some delay in the ORP measurement that might let you overshoot on chlorine. You may want to consider two solenoid valves in parallel with a manual valve in line with each so you can throttle the chlorine rate down to avoid overshooting when you get close to your desired range. I'd think that would be an easy add-on after you run it a while, but if you can allow for it now, it might be worth considering.

Very good point.

I might also be able to compensate for this in software. Perhaps a settable overshoot offset that causes a delay. If you were targeting 650mv the software might shut off at 630mv and not check again for say half an hour. Once the time is up it could test and inject for 15 minutes and retest. I guess what I'm trying to say is that the software should be able to handle the throttle down. I still have about 25% flash memory space to add on things and I could also just go to a bigger badder chip to do even more.
 
Rabbit said:
JohnT said:
Pretty cool!

I'd be a little concerned that you might have some delay in the ORP measurement that might let you overshoot on chlorine. You may want to consider two solenoid valves in parallel with a manual valve in line with each so you can throttle the chlorine rate down to avoid overshooting when you get close to your desired range. I'd think that would be an easy add-on after you run it a while, but if you can allow for it now, it might be worth considering.

Very good point.

I might also be able to compensate for this in software. Perhaps a settable overshoot offset that causes a delay. If you were targeting 650mv the software might shut off at 630mv and not check again for say half an hour.

That's true, and would probably work. My experience has been with high-rate battery chargers where we monitor internal battery temperatures. Big chunks of lead and water have the same kind of inertia issue when you get close to the set point.

You'll probably learn from experience what the delay factor is if it is an issue.
 
Might want to search for PID functions.
Generally, controls for such analog situations are PID controls - proportional/integral/differential. The P part provides a control signal proportional to the error from setpoint (which is the bulk of the control), the integral adjusts for overall offset from setpoint, and the derivative function is what provides overshoot tailoring. It may be more than you are wanting to put into your controller, but that is what "real" process controls do, and is applied in everything from water treatment to air conditioning.
 

Enjoying this content?

Support TFP with a donation.

Give Support
I have a few comments for you but first let me congratulate you on how far you've gotten. Most people stop when they discover how tedious it can be to get a good signal from an ORP electrode due to the impedance issues.

I'll second Jason's opinion and tell you not to bother with ORP to PPM conversion. You don't need it and it will never be accurate. I've wasted a LOT of time on this one over the years.

Your solenoid is likely going to be a problem if it is in contact with bleach. Neither nylon or stainless hold up well to bleach.

You may want to add a hysteresis around the setpoint to help prevent the rapid on/off of the solenoid. The ORP will drift a little bit while the electrode is in water....it's not steady like a thermometer. 5 mV should be adequate.
 
Aquaman95 said:
I have a few comments for you but first let me congratulate you on how far you've gotten. Most people stop when they discover how tedious it can be to get a good signal from an ORP electrode due to the impedance issues.
With the right tools and experience it's not all too hard. I've been doing this sort of thing as a hobby for about 25 years.

I'll second Jason's opinion and tell you not to bother with ORP to PPM conversion. You don't need it and it will never be accurate. I've wasted a LOT of time on this one over the years.
Chances are I'll just drop it, easy enough to remove it from the code and will free up a bit of memory.

Your solenoid is likely going to be a problem if it is in contact with bleach. Neither nylon or stainless hold up well to bleach.
Ya, I was kind of thinking the same thing. Do you have any suggestions ? I could get rid of the float from the liquidator and use a mechanical (non submerged) actuator to open the float. Then again too many mods.

You may want to add a hysteresis around the setpoint to help prevent the rapid on/off of the solenoid. The ORP will drift a little bit while the electrode is in water....it's not steady like a thermometer. 5 mV should be adequate.
It already has such a function. Above set ORP values count up a counter, below values count down a counter. When it reaches a count of 60,000 or 0 it then turns on or off. So it would need 60,000 samples that all agreed in order to make a decision. If the values are fluctuating above and below it would not make a decision very quickly as the positives and negatives end up averaging out to very little change. The sample rate can be slowed as needed to provide a more or less delayed reaction. The audio detection system uses this same model and has so far worked very well in testing. I opted for this method over basic averaging.
 
Ohm_Boy said:
Might want to search for PID functions.
Generally, controls for such analog situations are PID controls - proportional/integral/differential. The P part provides a control signal proportional to the error from setpoint (which is the bulk of the control), the integral adjusts for overall offset from setpoint, and the derivative function is what provides overshoot tailoring. It may be more than you are wanting to put into your controller, but that is what "real" process controls do, and is applied in everything from water treatment to air conditioning.
I will do some research on this, I want to be sure this project works correctly.
 
Is the solenoid 12VDC NC?

Is it on the outlet side of the liquidator?

I may have a 12VDC NC pinch valve at the office that you could have. No chemical touches anything except the tygon tubing and it pinches the tubing to stop flow.
 
Aquaman95 said:
Is the solenoid 12VDC NC?

Is it on the outlet side of the liquidator?

I may have a 12VDC NC pinch valve at the office that you could have. No chemical touches anything except the tygon tubing and it pinches the tubing to stop flow.

It's on the outlet side of the LQ and is normally closed. It's pretty much a spring loaded solenoid that covers a hole. When engaged it opens the hole and allows flow. The bad part is that it would have chlorinated water flowing around the stainless parts of the solenoid.

Pinch valve sounds great, let me know how much you want for it. Any idea if it will handle 3/8 OD line?
 
Rabbit said:
Aquaman95 said:
Is the solenoid 12VDC NC?

Is it on the outlet side of the liquidator?

I may have a 12VDC NC pinch valve at the office that you could have. No chemical touches anything except the tygon tubing and it pinches the tubing to stop flow.

It's on the outlet side of the LQ and is normally closed. It's pretty much a spring loaded solenoid that covers a hole. When engaged it opens the hole and allows flow. The bad part is that it would have chlorinated water flowing around the stainless parts of the solenoid.

Pinch valve sounds great, let me know how much you want for it. Any idea if it will handle 3/8 OD line?


Well, I dug it out this morning but the solenoid appears to be frozen. The one I have is also 110vac instead of 12vdc that I thought it was, but I suppose a relay could be used. It does have a 3/8" OD tube in it. If you want to try and "un-stick" it you're welcome to it, just PM me an address to ship it to. It's been sitting in my desk for 5 years or so...I suspect the solenoid just needs to be taken apart and cleaned.

I also found a website for the company that makes them - http://www.nresearch.com/. The 3/8" models aren't cheap...about $165 or so.[attachment=0:udiub1od]200904301019_027.jpg[/attachment:udiub1od]
 

Attachments

  • 200904301019_027.jpg
    200904301019_027.jpg
    116.3 KB · Views: 417
Aquaman95 said:
Rabbit said:
Aquaman95 said:
Is the solenoid 12VDC NC?

Is it on the outlet side of the liquidator?

I may have a 12VDC NC pinch valve at the office that you could have. No chemical touches anything except the tygon tubing and it pinches the tubing to stop flow.

It's on the outlet side of the LQ and is normally closed. It's pretty much a spring loaded solenoid that covers a hole. When engaged it opens the hole and allows flow. The bad part is that it would have chlorinated water flowing around the stainless parts of the solenoid.

Pinch valve sounds great, let me know how much you want for it. Any idea if it will handle 3/8 OD line?


Well, I dug it out this morning but the solenoid appears to be frozen. The one I have is also 110vac instead of 12vdc that I thought it was, but I suppose a relay could be used. It does have a 3/8" OD tube in it. If you want to try and "un-stick" it you're welcome to it, just PM me an address to ship it to. It's been sitting in my desk for 5 years or so...I suspect the solenoid just needs to be taken apart and cleaned.

I also found a website for the company that makes them - http://www.nresearch.com/. The 3/8" models aren't cheap...about $165 or so.

Wow, I would love to try and get that working again. I sent you a PM with my info. I can't see myself spending $165 on a new one as I haven't spent half that on my entire project so far. Thank you!
 
Aquaman95, just wanted to let you know I received the pinch valve today and I'm in the process of trying to get it all working again. The coil is still good, so there is hope without a doubt. It doesn't appear to be frozen, but the travel distance is very very short. I'll let you know how I make out. I tried adjusting the back spring pressure set screw without any change in motion.

I thank you very much and I'm very glad to see there are still some really decent people left in the world. Cheers.

Rabbit.
 
Thread Status
Hello , This thread has been inactive for over 60 days. New postings here are unlikely to be seen or responded to by other members. For better visibility, consider Starting A New Thread.