|
||||||||||||||||
|
||||||||||||||||
|
|||||||
| Advertisements | |
| Get Rid of Advertisements | |
|
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Planted Tank Enthusiast
|
DIY pH Contorller - New and Improved
I've been tinkering with DIY controllers for the last two years and I've built a lot of prototypes and followed a lot of plans somewhat unsuccessfully at times and this is the best I can offer for my effort to date.
The meter portion of the controller is a modification of plans provided by National Semiconductor. It uses an ultra low current op-amp (LMC6001). Their plan uses +/- 5VDC so the pH is read out in tenths of a volt, e.g. 0.7 volts is a pH of 7. I didn't like that so I desigend the circuit to run off of +/- 12 VDC. I had to make adjustment to the resistor values so that 1 volt is 1 pH unit and I've provided the equations I used iterate resistior values in a spreadsheet to get a workable combination. Rather than using a precision voltage control diode (I burned my last one up), I decided to simply use a red LED, which seems to work. The output goes into a comparator (not an op-amp). The set point for the pH is provided by a precision voltage regulator that is adjustable. When I set it at 6.6 volts, it stay put and may only drift 10 or 20 milivolts. Hysteresis is provided by a potentiometer and a resistor in series to give me 0.02 to about 0.12 volts offset. I can control a range in pH of 0.04 with no problem. The output for the comparator turns the solenoid on through a series of transistors. The first two are general purpose and for reasons I can't explain are needed. The first one triggers an LED to show that the comparator is calling for CO2 and it in turn triggers a Darlington pair that activates the solenoid, which runs on 12 VDC. I've got a simple snubber (a capacitor and and a resistor) to soften the activation. Normally you see circuits like this with a diode to protect the transistors. Since the solenoid is on the emitter side of the transistor I believe I don't have to be as careful but there is a LED attached in the same manner that not only verifies that the solenoid is activated, it provides a path to divert any voltage spikes. The whole unit is powered by the +/- 12 VDC from a old computer power supply.
__________________
Andrew, Eheim Club Member #24
This message is always under construction: 75-gallon tank; 2, Eheim 2026 filters; Tek Light with 4, 54W T5s (6000K) ; Sand on top of 4:1 sand:clay mixture; Milwaukee CO2 controller; PlantGuild vortex CO2 reactor; pH = 6.6, kH=70mg/l, GH=120mg/l; EI; Flourish excel on 50% weekly water change: AGA Member. Last edited by g8wayg8r; 06-09-2007 at 05:33 PM. |
|
|
|
|
|
#2 (permalink) |
|
Algae Torturer
|
Cool, another electronics geek!
It appears that the hysteresis loop is wrong. When the output of the the comparator goes high, the hysteresis circuit tries to raise the setpoint voltage, which would turn the comparator off. When the comparator is off, it tries to lower the setpoint voltage, which would turn the comparator back on. In short, this is not wired as hysteresis - it's wired as an oscillator! And it would be oscillating like crazy if it were not for the fact that the setpoint voltage regulator is connected to the comparator's negative input *without* a resistor - meaning the LM317 is actively cancelling the effects of your erroneous hysteresis circuit. Hysteresis should be on the positive side of the op-amp. Connect LM411 pin 6 to LM339 pin 3 with a resistor. Connect LM339 output to to LM339 pin 3 with a fixed resistor and variable resistor in series. That's a proper hysteresis circuit. The actual hysteresis is determined by the ratio between the resistance of the hysteresis circuit and the resistor on the input from the previous op-amp. This is a good page to see how hysteresis works. The relay driver could use some cleanup too, but that's not a functional change. |
|
|
|
|
|
#3 (permalink) |
|
Planted Tank Enthusiast
|
Thanks for the advice. It may be that I've got them connected properly but that's doubtful. I'll take another look.
Ok. Here's the scoop. I've checked my wiring and my notes. I started out with the hysteresis on the non-inverting input but it altered the pH reading due to the additional voltage. I changed it to the non-inverting input hoping it would move the set point so that the meter reading would be the same regardless of a high or low state from the LF411. I would work to drive down the pH after a water change but I guess it was ocillating very slowlywhen it reached the set point. Oh well. Maybe I could could invert the output through another op amp and get what I want. That's another day. The 1K pull-up resistor on the out put of the LM339 gives me almost 12V. I've got a 220ohm reisistor connecting pin 6 of the LF411 and pin 3 of the LM339. I'm using around 500K for the feedback and that gives me about 0.1 volts hysteresis. It doesn't make much sense given the ratio. I've got a decent Fluke meter - not a $10 home utility type - so I'll go with the volts for now.
__________________
Andrew, Eheim Club Member #24
This message is always under construction: 75-gallon tank; 2, Eheim 2026 filters; Tek Light with 4, 54W T5s (6000K) ; Sand on top of 4:1 sand:clay mixture; Milwaukee CO2 controller; PlantGuild vortex CO2 reactor; pH = 6.6, kH=70mg/l, GH=120mg/l; EI; Flourish excel on 50% weekly water change: AGA Member. |
|
|
|
|
|
#4 (permalink) |
|
Planted Tank Enthusiast
|
Ok, I've got it working in a 0.1 pH range with the hysteresis on the non-inverting input. I still don't understand the apparant lack of control with the hysteresis voltage but it's working and I continue to experiment with the ratios.
__________________
Andrew, Eheim Club Member #24
This message is always under construction: 75-gallon tank; 2, Eheim 2026 filters; Tek Light with 4, 54W T5s (6000K) ; Sand on top of 4:1 sand:clay mixture; Milwaukee CO2 controller; PlantGuild vortex CO2 reactor; pH = 6.6, kH=70mg/l, GH=120mg/l; EI; Flourish excel on 50% weekly water change: AGA Member. |
|
|
|
|
|
#5 (permalink) | |||
|
Algae Torturer
|
Quote:
Quote:
Quote:
|
|||
|
|
|
|
|
#6 (permalink) |
|
Planted Tank Enthusiast
|
Ok. I'm starting anew again using an quad op-amp as a comparator circuit because the voltages from the LM339 are driving me nuts. I've feed the output from the pH meter and the set-point reference into seperate op-amps that are wired as a voltage follower. Both go into another op amp that does the controlling. The pH goes into the inverting input and the set-point into the non-inverting input with positive feedback to give it some hysteresis. That output is inverted to turn the transistor on when the pH is high and off when it low. The transistor circuit is rather simple and I have only had success using either a power transistor or a reed selonoid as an emitter follower. I've also noticed that I can clamp the output using two zenor diodes and it has a profound effect on the reading and hysteresis. So, I've not figured out how to make the controller and the meter independent of the power handling portion of the circuit. Sometimes I wonder if I would have done better starting with something programable like BasicStamps. Oh well. The good new is, however, is that it appears to work. The best I can do now is plus and minus 0.03 pH units.
I think I'm going to stick with this basic set-up and work with it from here. Cobra: I really appreciate the help. I can go months and learn less. Anyway, I'm still not certain about the panel meter wiring. Maybe I'm not clear. I've got an on-on two position switch. One wire is attached on the non-inverting input and the other to the inverting input. Another wire goes to the panel meter to read the voltage. I know somthing is missing.
__________________
Andrew, Eheim Club Member #24
This message is always under construction: 75-gallon tank; 2, Eheim 2026 filters; Tek Light with 4, 54W T5s (6000K) ; Sand on top of 4:1 sand:clay mixture; Milwaukee CO2 controller; PlantGuild vortex CO2 reactor; pH = 6.6, kH=70mg/l, GH=120mg/l; EI; Flourish excel on 50% weekly water change: AGA Member. Last edited by g8wayg8r; 06-09-2007 at 05:34 PM. |
|
|
|
|
|
#7 (permalink) | |||||
|
Algae Torturer
|
Quote:
Quote:
Quote:
Quote:
Quote:
If it's working, nothing is missing. Other notes: D3 in the diagram is backwards. D1 may be backwards also, but I'm not familiar with your use of an LED as a voltage-control device, so I'm not sure. |
|||||
|
|
|
|
|
#8 (permalink) |
|
Planted Tank Enthusiast
|
1. The voltage followers are being used because they are there. I guess I could just use a singel op amp and wire a PNP transistor to accomplish the same thing as the quad amp and the NPN transistor. Transistors! I get so confused with them at times.
2. The R15 and R16 are there. It was like they were there and it worked and they were easier to use than cutting another wire. It's not like you need a bunch of volts to turn on a transistor. 3. I tried to clamp the voltage between the 4.7K resistor and the last op amp that inverts the voltage. 4. The LED do light up so I guess I have them drawn in like a zenor diode. In a way, that's how I'm using them. I've got to rethink one and two above. No sense in over building the circuit.
__________________
Andrew, Eheim Club Member #24
This message is always under construction: 75-gallon tank; 2, Eheim 2026 filters; Tek Light with 4, 54W T5s (6000K) ; Sand on top of 4:1 sand:clay mixture; Milwaukee CO2 controller; PlantGuild vortex CO2 reactor; pH = 6.6, kH=70mg/l, GH=120mg/l; EI; Flourish excel on 50% weekly water change: AGA Member. |
|
|
|
|
|
#10 (permalink) |
|
Planted Tank Enthusiast
|
Here the old controller and a circuit of a barebones meter I'll try to design a better controller around buy nulling out the 20 millivolts from the 20 pico amps of current from the 1 gigaohm probe.
__________________
Andrew, Eheim Club Member #24
This message is always under construction: 75-gallon tank; 2, Eheim 2026 filters; Tek Light with 4, 54W T5s (6000K) ; Sand on top of 4:1 sand:clay mixture; Milwaukee CO2 controller; PlantGuild vortex CO2 reactor; pH = 6.6, kH=70mg/l, GH=120mg/l; EI; Flourish excel on 50% weekly water change: AGA Member. |
|
|
|
|
|
#11 (permalink) |
|
Planted Member
|
Don't mean to take any fun out of this project, but here is a complete circuit, parts and step by step to create it. Have not had a chance to do it yet, but think it would be pretty cool.
http://www.66pacific.com/ph/ph_1.htm |
|
|
|
|
|
#12 (permalink) |
|
Planted Tank Enthusiast
|
The purpose is never to save money or time. This was a learning exercise for me. I now have a spreadsheet that I can input resistor values and make all of my gain and summing addition calculations.
I assembled and had the project that guy on yoru link based his design on. The advantage of his approach is that it gives you the correct ph on the display with no negative DC. I'm at the amp part of the circuit now and I'm having trouble with the reference ground working for some reason. I have no clue why. I've also discovered the reason why a Fluke RMS meter cost a bunch more than the little $10 POS multimeter I bought online. That meter and an oscilloscope really opened my eyes.
__________________
Andrew, Eheim Club Member #24
This message is always under construction: 75-gallon tank; 2, Eheim 2026 filters; Tek Light with 4, 54W T5s (6000K) ; Sand on top of 4:1 sand:clay mixture; Milwaukee CO2 controller; PlantGuild vortex CO2 reactor; pH = 6.6, kH=70mg/l, GH=120mg/l; EI; Flourish excel on 50% weekly water change: AGA Member. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|