| View previous topic :: View next topic |
| Author |
Message |
DIY SnakeSkin

Joined: 28 Sep 2004 Posts: 467 Location: Dingley, Melbourne
|
Posted: Fri May 18, 2007 5:30 pm Post subject: DIY ph amp |
|
|
I've been meaning to make a pH amp for a while now, Bad Inferno's 1-wire monitoring system and Bald_noggin's pic based controller gave me the spark to continue on with what I'd already started.
I wanted a pH amp that could be connected to different devices, for example a 1-wire ADC or a PIC. To be the most portable I wanted the following things
. Operate from a single supply, preferably 5v
. Have a gain of around 8.2 to provide a resolution of .01 PH using 10bit adc found on most PIC's @ 5v.
. Calibration adjustment pot's included to reduce need for memory usage on a PIC due to needing a programmed calibration routine.
. Work with 1-wire ds2450 as well as PIC, although ds2450 accuracy is only 8bit, it can be configured to read at 10.
. Simple & cheap to build, the hardest part should be making the board
So on to the circuit, I'm no electronic's guru but I do like to DIY... I've looked at various pH circuits on the net and in project books and decided on the basic example design given in the LM6001 opamp datasheet and added various features found in other circuits.
The spec is a usable output of just above 0v to just below 5v and the intended 0.01 resolution on a 10bit ADC. The readable range is 2.0 - 12.0 pH.. Since I'm not planning on running an aquarium lower than a pH of 2.0 or higher than 12.0 it's fine for me.
The first pic is the circuit in operation on a breadboard, it is connected to my other stalled project - a pic based controller...
I'm really happy with the operation so far so the next step is to make a PCB and house it in a shielded enclosure.
Second pic is the actual circuit, some values may still need some "tweaking" otherwise it seems to work ok.
More to follow...
(Info added, circuit updated 19/5)
Last edited by DIY on Sat May 19, 2007 2:37 am; edited 2 times in total |
|
| Back to top |
|
 |
Bad Inferno San Merah
Joined: 20 Jul 2004 Posts: 656 Location: Eastern Suburbs... VIC
|
Posted: Fri May 18, 2007 9:15 pm Post subject: |
|
|
Great job...Tell me about the 7660. I think what I am seeing is a input of 5VDC and a +/- output of what voltage....?
I built a cct for a pressure sensor had all sorts of trouble ranging the thing. its output was 4-20ma and I put it across a 250 ohm resistor to give me 1-5VDC....however I could not get the span I wanted and have ended up with a span of 1.5 volts on my 1wire A/D input which can take 0-5VDC. I don't want to steal your ph amp thread so I might PM you my cct. If you wouldn't mind having a look. I use this pressure sensor as level monitoring in my reservoir. The sensors provide something like 0-10mv for 0-10 kpa. I assume I can use your exact cct just change the gain ?
http://www.freescale.com/files/sensors/doc/data_sheet/MPX2010.pdf
rob |
|
| Back to top |
|
 |
DIY SnakeSkin

Joined: 28 Sep 2004 Posts: 467 Location: Dingley, Melbourne
|
Posted: Fri May 18, 2007 9:29 pm Post subject: |
|
|
I actually was considering the same thing after I finish some of the things I have started... I even did a quick breadboarded circuit some time ago but didn't get it quite right at the time..
Very similar circuit to the one above and yes different gain, I think I have a couple of examples somewhere I used when I tried it. I'll do a hunt and see what I have. pm me your email and I'll send you what I have, and happy to look at what you have so far.
The 7660 is an inverter so for 5v in gives -5v out, it has limitations like it can't provide much current, and even at a couple of mA drain will start to drop voltage - eg +5v gives -4.7v but for an opamp or 2 it's handy. |
|
| Back to top |
|
 |
DiscusMad Unemployed Santa

Joined: 22 Apr 2004 Posts: 921 Location: Glenfield, Sydney
|
Posted: Sat May 19, 2007 12:06 am Post subject: |
|
|
I wish I had great knowlage on electronics
the best I ever did was some sort of keyboard at high school _________________
 |
|
| Back to top |
|
 |
DIY SnakeSkin

Joined: 28 Sep 2004 Posts: 467 Location: Dingley, Melbourne
|
Posted: Sat May 19, 2007 12:15 am Post subject: |
|
|
| DiscusMad wrote: | | I wish I had great knowlage on electronics |
Me too
It's all self taught and fiddling for me. I've spent more hours surfing the web reading than any person should spend in front of a monitor.... but it's great when it comes together! |
|
| Back to top |
|
 |
DIY SnakeSkin

Joined: 28 Sep 2004 Posts: 467 Location: Dingley, Melbourne
|
Posted: Sat May 19, 2007 2:19 am Post subject: |
|
|
Update:
I've spent this evening creating a pcb board layout in cadsoft's eagle (it's free!), the main criteria was it should fit inside the 100x50x25mm diecast enclosure I got today.
Pic's are of the actual board layout and a printed copy of the layout sitting near the enclosure after i checked the dimensions. |
|
| Back to top |
|
 |
DIY SnakeSkin

Joined: 28 Sep 2004 Posts: 467 Location: Dingley, Melbourne
|
Posted: Mon Jul 16, 2007 12:02 am Post subject: |
|
|
Been meaning to update this thread for a while
I'll let the pics do the talking  |
|
| Back to top |
|
 |
DIY SnakeSkin

Joined: 28 Sep 2004 Posts: 467 Location: Dingley, Melbourne
|
Posted: Mon Jul 16, 2007 12:04 am Post subject: |
|
|
| Works great connected to my breadboarded PIC controller. I was able to calibrate without any problems, although in the attached pic the pobe is just in storage solution. The RJ45 connection is based on the 1-wire standard for analogue sensors. |
|
| Back to top |
|
 |
DIY SnakeSkin

Joined: 28 Sep 2004 Posts: 467 Location: Dingley, Melbourne
|
Posted: Mon Jul 16, 2007 12:14 am Post subject: |
|
|
And finally a pic of it connected to a DS2450 1-wire ADC which is in turn hooked up to a NSLU2 (not pictured) as described in the aquarium monitor - controller thread. I've also copy & pasted a pic of the raw voltage (volt.A) from the owfs web server running on the NSLU2.
If anyone ever builds one to use with a DS2450 like this, the basic calculation is (Raw Voltage/0.48859)+1.88 = pH units. So for the raw voltage in the pic of 2.11386 that equals a pH of 6.20 (rounded to 2 decimal places)
I'm happy with the result  |
|
| Back to top |
|
 |
Bad Inferno San Merah
Joined: 20 Jul 2004 Posts: 656 Location: Eastern Suburbs... VIC
|
Posted: Sun Aug 12, 2007 6:15 pm Post subject: |
|
|
Have you seen the cheap pH meters on ebay ? take a look they seem OK....I was thinking if you could get to the back of the seven segment displays we maybe able to read off the value displayed as digital inputs and decode the value in a PIC ? _________________ My online Aquarium www.rjconway.homeip.net |
|
| Back to top |
|
 |
DIY SnakeSkin

Joined: 28 Sep 2004 Posts: 467 Location: Dingley, Melbourne
|
Posted: Sun Aug 12, 2007 7:22 pm Post subject: |
|
|
Anything's possible
To decode the seven segment display might use up a lot of I/O pins though. There's a lot of different cheap meters on ebay atm not just Ph so it is tempting to try a couple of them. |
|
| Back to top |
|
 |
Bad Inferno San Merah
Joined: 20 Jul 2004 Posts: 656 Location: Eastern Suburbs... VIC
|
Posted: Sun Aug 12, 2007 7:36 pm Post subject: |
|
|
i was thinking you could multiplex each of the 7 segment displays and just use external cmos ? switches to select either digit 1 / 2 or 3...as my pH provides a 0-5VDC output I'm OK however of others this could be possible without having to really build too much. I just got one of those "black" pH probes off ebay ($15.00) ..it took a week in the tank and it has settled in now. Don't really like the fact I cannot see the reference KCL solution in the probe. I still think I like the "green" tube style probes selling on ebay. I also found that the fluval pipe fitting with the two suction cups (it looks like a plastic device that the heater normally get attached with) is just the correct size to fit the probe into. So you attach this inside the tank and the probe just slips. _________________ My online Aquarium www.rjconway.homeip.net |
|
| Back to top |
|
 |
ILLUSN Advisor
Joined: 04 Jan 2007 Posts: 4561 Location: Penrith NSW
|
Posted: Sun Aug 12, 2007 7:37 pm Post subject: |
|
|
careful with the cheap meters on ebay, i had an orp meter that said my redox varied from 260-1999mv over a 2 day span (it also said the tap water was -160mv on day 3  |
|
| Back to top |
|
 |
C4Vette Wriggler

Joined: 23 May 2007 Posts: 8 Location: Netherlands
|
Posted: Sun Sep 09, 2007 6:25 am Post subject: |
|
|
| DIYjunkie wrote: | Update:
I've spent this evening creating a pcb board layout in cadsoft's eagle (it's free!), the main criteria was it should fit inside the 100x50x25mm diecast enclosure I got today.
Pic's are of the actual board layout and a printed copy of the layout sitting near the enclosure after i checked the dimensions. |
Very well done!
This is about where I am now with my 1-wire project. The Linux-box with 1-wire hub and owfs is up and running with a nice website. The next step is pH. Already have the probe and like your design. Would you mind sharing the project-file for cadsoft? I'm thinking about a change for the power and would like it to run from single +5v and let the board invert it with a ICL7660CPA to prevent the need of an extra powersupply.
And can you please eleborate at the calibration procedure? |
|
| Back to top |
|
 |
DIY SnakeSkin

Joined: 28 Sep 2004 Posts: 467 Location: Dingley, Melbourne
|
Posted: Sun Sep 09, 2007 9:59 am Post subject: |
|
|
| C4Vette wrote: | | I'm thinking about a change for the power and would like it to run from single +5v and let the board invert it with a ICL7660CPA to prevent the need of an extra powersupply. |
Have a good look at my circuit above that is exactly what I have done, no change required.
| C4Vette wrote: | | can you please eleborate at the calibration procedure? |
R5 is to set the offset of the input op-amp, so is a one-time adjustment at completion. short out the input and adjust R5 so that the a mulitmeter on pin6 of the first op-amp (ca3140) shows 0v.
the rest is standard pH calibration routine, place pH probe in ph 7.0 solution and adjust R10 so the output is 2.5v, then pH probe in pH 4 or 10 and adjust R4 to the slope required, for me it's 1.04v@pH4 or 3.96v@pH10. |
|
| Back to top |
|
 |
Bad Inferno San Merah
Joined: 20 Jul 2004 Posts: 656 Location: Eastern Suburbs... VIC
|
Posted: Sun Sep 09, 2007 11:06 am Post subject: |
|
|
Welcome C4Vette to the world of Discus !
Cheers rob _________________ My online Aquarium www.rjconway.homeip.net |
|
| Back to top |
|
 |
Bald_noggin SnakeSkin

Joined: 22 Feb 2007 Posts: 154 Pictures: 6 Personal pictures: 6 Location: Canberra, ACT
|
Posted: Sun Sep 09, 2007 11:40 am Post subject: |
|
|
Hmmmm, C4Vette something I like about that name! Welcome! _________________ Everybody sing with me.....
I owe, I owe, it's off to work I go.......
And no wonder why,
A 6 foot by 2 foot by 2 foot paradise for fish!
Eco-Complete substrate, CO2 injection, pH controller set at 6.7, Custom electronic lighting system and heating control made by the owner, ME!
Fish? oh yeah...
20 Neon's, 10 Cardinal's, 10 Rummy-Nose, 4 Headstanders, 4 Danio's, 2 Discus, 2 Congo's, 2 Clown's, 2 Bristlenose and 1 Siamese Algae Eater aka 'The Plant Mulcher' so far to date. |
|
| Back to top |
|
 |
C4Vette Wriggler

Joined: 23 May 2007 Posts: 8 Location: Netherlands
|
Posted: Mon Sep 10, 2007 12:40 am Post subject: |
|
|
| Bald_noggin wrote: | | Hmmmm, C4Vette something I like about that name! Welcome! |
The 'nick' is from a former hobby <sniff, snotter>. The 1992 Corvette is long gone but the memories linger.
| DIYjunkie wrote: |
Have a good look at my circuit above that is exactly what I have done, no change required. |
Ahh, it must have been too late for me This mix-up happened because I was comparing several projects. What I meant was that I want to integrate the DS2450 onto the PCB. Still any change you are going to 'lent' me the design?
Thanks for the extra explanation for the calibration. Just ordered some components to build this too. Now I have to find someone who can make the PCB. The soldering and software-part I can do myself.
Ed |
|
| Back to top |
|
 |
DIY SnakeSkin

Joined: 28 Sep 2004 Posts: 467 Location: Dingley, Melbourne
|
Posted: Mon Sep 10, 2007 8:51 pm Post subject: |
|
|
| C4Vette wrote: | | What I meant was that I want to integrate the DS2450 onto the PCB. Still any change you are going to 'lent' me the design?Ed |
Pm me your email and I will send the eagle files to you
Warning on using the ds2450, I found it is a very noisy ADC. Bad Inferno also noticed problems with the ds2450. Better to use one of the battery monitoring one wire chips ds2438, ds2760 etc as they have a higher resolution ADC function.
I tried a ds2760 and it was miles better than the dodgy ds2450 which is only a true 8bit adc. The advantage of the ds2450 is that it has 4 inputs, if you are going to integrate into the pH amp the extra inputs will be wasted anyway. |
|
| Back to top |
|
 |
C4Vette Wriggler

Joined: 23 May 2007 Posts: 8 Location: Netherlands
|
Posted: Mon Oct 08, 2007 4:39 am Post subject: |
|
|
| DIYjunkie wrote: | R5 is to set the offset of the input op-amp, so is a one-time adjustment at completion. short out the input and adjust R5 so that the a mulitmeter on pin6 of the first op-amp (ca3140) shows 0v.
the rest is standard pH calibration routine, place pH probe in ph 7.0 solution and adjust R10 so the output is 2.5v, then pH probe in pH 4 or 10 and adjust R4 to the slope required, for me it's 1.04v@pH4 or 3.96v@pH10. |
Ok, I build it and seems to work fine.
Didnt't use the pcb (yet) but used a pre-drilled board. This way I could make it smaller so it fits inside de router I'm using as Linux-system.
The voltage outputs are extremely stable and the calibratation is very accurate.
One question before I can go on logging data:
Why a slope of 1.04 and not exactly 1.0 ?
It would make calculations more understandable. The slope, being the difference between the pH-4 and pH-7, at 1 volt it makes 0.5 volt per pH-step.
ph7 = voltage with ph7 calibration fluid (currently 2.5)
ph4 = voltage with ph4 calibration fluid (currently 1.0)
slope = (ph7 - ph4) / 3
pH = 7 + ((voltage - ph7) / slope) |
|
| Back to top |
|
 |
|