Reef Central Online Community

Go Back   Reef Central Online Community > General Interest Forums > Do It Yourself
Blogs FAQ Calendar

Notices

User Tag List

Reply
Thread Tools
Unread 02/03/2007, 07:59 AM   #101
mloebl
Registered Member
 
Join Date: Nov 2005
Location: Ayer, MA USA
Posts: 12
Quote:
I've been working on it in my spare time, and have been doing some of the hardware design. My biggest accomplishment was getting pH measurement prototyped. I took vernier pH probe amplifier to amp up the pH probe output into the 0-5v range of the DS2450 quad A/D. Then it was a matter of getting the formula correct to convert from mV to pH.
What formula did you use? I did the same thing as a test with a Vernier amplifier, but found I was slightly off for some reason.

Thanks!

-Mike


mloebl is offline   Reply With Quote
Unread 02/03/2007, 08:18 AM   #102
pista01
Registered Member
 
pista01's Avatar
 
Join Date: Sep 2003
Location: Mi
Posts: 155
I used a 4-20ma pH transmitter with my DS2450. It has a span adjustment, so I adjusted it so the voltage output would to be between 0 and 2.5 volts (the DS2450 is in 0 - 2.5 v mode) within the ph7 and ph10 range. Here is the formula I'm using.


ph7 = voltage with ph7 calibration fluid (currently 1.145)
ph10 = voltage with ph10 calibration fluid (currently 2.465)

slope = (ph10 - ph7) / 3
pH = 7 + ((voltage - ph7) / slope)


If you don't have temperature compensation, then the calibration fluid should be the same temperature as the tank.


pista01 is offline   Reply With Quote
Unread 02/03/2007, 09:14 AM   #103
aka_BigRed
Registered Member
 
aka_BigRed's Avatar
 
Join Date: Mar 2004
Location: St. Paul, MN
Posts: 162
I don't remember the where exactly I found the formula off the top of my head, but here's the perl script I use. I found it to be as accurate as my pH meter (actually more since I trusted it to 2 decimal places whereas my pH meter only does one decimal place - I found anything beyond 2 decimal places was just random noise and not reliable IMO due to DS2450 accuracy).

The real accuracy is based on the slope & offset of ph Probe (calibration constants) and finding the actual nominal offset of the vernier pH amplifer - they say it's 1.2v but I found mine to be more like 1.175v.
Quote:
#####################
# The parameters of my particular pH probe. I used a calculation
# program called PHFIT.exe to get them using known pH solutions and
# mV of output of the probe
#####################
my $offset = 9.4408;
my $slope = -984.5802;

#####################
#Get temp in Kelvin for use in formula
#####################
# (Temp in C + 273.15 = Temp in Kelvin)
my $temprt = 20.944 + 273.15

#####################
# Vout = the actual pH probe output voltage.
# To get this we must revers the amp/offset done by the Vernier amp
# The nominal offset of the amp is 1.2v but I found mine to be slightly lower (1.175v)
# The gain of the amp is 2.2v so we also have to cancel out that.
#####################
my $Vout = ($owval-1.175)/2.2*1000;

#####################
# This is the 'Magic' formula it needs:
#
# Probe voltage [actual and not amplified/offset] ($Vout)
# Probe calibration offset ($offset)
# probe calibration slope ($slope)
# fluid temperature ($temprt)
#########################

my $pH = 7 + ($Vout - $offset) / (1.98416 * 0.0001 * $temprt * $slope);



aka_BigRed is offline   Reply With Quote
Unread 02/03/2007, 09:24 AM   #104
aka_BigRed
Registered Member
 
aka_BigRed's Avatar
 
Join Date: Mar 2004
Location: St. Paul, MN
Posts: 162
Quote:
Originally posted by pista01
I used a 4-20ma pH transmitter with my DS2450. It has a span adjustment, so I adjusted it so the voltage output would to be between 0 and 2.5 volts (the DS2450 is in 0 - 2.5 v mode) within the ph7 and ph10 range. Here is the formula I'm using.
Do you have a model # or more info on your amp? Span adjustment would be very nice.

This is the vernier one I used:
http://www.vernier.com/probes/ea-bta.html

I bought mine from
http://www.schoolmart.com/index.asp?...ROD&ProdID=226
for $40 + 5 s/h


aka_BigRed is offline   Reply With Quote
Unread 02/03/2007, 09:54 AM   #105
pista01
Registered Member
 
pista01's Avatar
 
Join Date: Sep 2003
Location: Mi
Posts: 155
This is the pH transmitter I'm using:

http://www.sensorex.com/products/ph_...nsmitters.html

I found it on eBay for about $30


pista01 is offline   Reply With Quote
Unread 02/03/2007, 09:57 AM   #106
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,772
Quote:
Originally posted by bigreddastud
Yes/no.

I've moved from the Linksys platform to a full blown PC running Ubuntu, so the router-based setup is temporarily out, but the spirit of the device is still alive. I haven't heard from the guy that was really driving the OWFS on WTR54G cross-compiling, so with my limited linux knowledge I decided to switch to a PC based setup. I think this will be better and give me a more robust platform with a PHP front-end and a MYSQL back-end.

I've been working on it in my spare time, and have been doing some of the hardware design. My biggest accomplishment was getting pH measurement prototyped. I took vernier pH probe amplifier to amp up the pH probe output into the 0-5v range of the DS2450 quad A/D. Then it was a matter of getting the formula correct to convert from mV to pH.

I found an MSDOS based program that would calculate the slope & intercept needed for calibration, but I have been unable to find a decent calculation formula (that I understand) to make my linux box fully independent - ie add in a calibration routine. Anyone have experience with pH calculation formulas?

I've also been learning how to make my own PCB's with photo paper and a laser printer. I actually got my first RJ45 based temp probe board etched and soldered up last night. It's quite simple, but much better with a PCB then with my alligator clip connected workbench prototype.

I've written some basic test shell/perl scripts that I can run to collect data from the sensors, but I decided to concentrate on the hardware first *then* refine the software. The software will be nothing but a group of data collection scripts, some monitoring scripts, and a web front-end.

Bad Inferno - I think we emailed a while back off the OWFS developer's list. You have the discus down in Australia, correct?
I kinda figured the little linky would not have enough horsepower for most folks and development would dwindle.

The STAPLES PHOTO paper is the stuff to use. I do not have a part number off hand. I have also been using Muriatic + Peroxide instead of ferrich chloride. I like the results much better, but must do it outside due to the fumes.


BeanAnimal is offline   Reply With Quote
Unread 02/03/2007, 01:17 PM   #107
Gordonious
Registered Member
 
Gordonious's Avatar
 
Join Date: Jan 2004
Location: Newark DE
Posts: 3,393
bad inferno, does your screen shot there actually work? Like is that a screen shot of a live image or just the layout you plan to use when things work out.
I have wanted to get my PC doing that sort of stuff for a long time, but any time I get started I'm told I have to just pick any random ph probe, figure out how it works on my own, then type the code on my own. I don't have the time or background to do that.


Gordonious is offline   Reply With Quote
Unread 02/06/2007, 07:18 PM   #108
WizardOne
Registered Member
 
WizardOne's Avatar
 
Join Date: Jan 2004
Location: Placerville, CA.
Posts: 318
Yes, I am watching. I just now got (and promptly took apart) a WTR54G router to use in making my setup. I just need to get a source for the parts needed for the 1 Wire. I see lots of spec sheets, but no where to get the parts. First on the list is the parts for the serial interface to the WRT.

bigreddastud: Do you have a file for the PC board? I have been downloading those I find built in Eagle (free addition) so I can start building them when I get parts.


__________________
"When you are up to your @$$ in alligators, it is difficult to remind yourself your initial objective was to drain the swamp."

Current Tank Info: A couple hundred Gal of saltwater in my home office waiting for my laptop to get closer.
WizardOne is offline   Reply With Quote
Unread 02/06/2007, 07:48 PM   #109
Gordonious
Registered Member
 
Gordonious's Avatar
 
Join Date: Jan 2004
Location: Newark DE
Posts: 3,393
Some one PLEASE tell me where to order a small quantity of 1 Wire parts from. I ran into the same thing, lots of info, but no ordering pages. You think they would make it easier for you to give them your money, lol. I suppose I was mostly on manufacture pages and they weren't worried about the couple of parts I would have bought.


Gordonious is offline   Reply With Quote
Unread 02/06/2007, 08:01 PM   #110
mloebl
Registered Member
 
Join Date: Nov 2005
Location: Ayer, MA USA
Posts: 12
I very often order 1Wire devices from here:
http://www.hobby-boards.com/catalog/main_page.php

-Mike


mloebl is offline   Reply With Quote
Unread 02/07/2007, 02:44 AM   #111
bad inferno
Registered Member
 
Join Date: Jul 2006
Location: Australia
Posts: 123
Gordonious...Yes its live and has web server functions so I can get this web interface from anywhere.

It runs on a web server/1wire NSLU2 device. Only draws 5watts, has Hard disk attached....I use 1wire to monitor the following and also log this data so I can provide trends for the web site. It can also send out email/SMS alerts if any parameter is over a select value

Measurements
ph
Conductivity
Tank Temperature
Ambient Temperature
Outside temperature
Turbine flow meter monitors water pumped out of aquarium
Outside water reservoir level 0-110litres & temperature

I don't know what the total cost is however
NSLU2 US80.00
Hard disk =X.XX Find an old one !
1 wire/USB device US25.00
1 wire devices US5.00 per temperature US12.00 for 4 channel A/D
Water level based upon pressure sensor, ebay US5.00 for the sensor and some electronics to make it 4-20ma ~US20.00
PH transmitter Foxboro 873 US25.00 ebay pH electrode US20.00 ebay
Conductivity transmitter Foxboro 873 US150.00
pH & Conductivity by Foxboro is far superior than any Aquarium monitor you could buy plus it provides an output 4-20MA. They also have two alarm contacts biult in so you can dose, in my case, CO2, to control the Ph


This graph shows water changes. You can see the grey area show the accumulated water change for the week (resets on Sunday night), blue line show how much was pumped out, Green line shows level in litres in the water tank, and the temperature being red. I currently have two solenoids that allow me to drain water out of the tank and pump water back into the tank.




bad inferno is offline   Reply With Quote
Unread 02/07/2007, 09:23 AM   #112
aka_BigRed
Registered Member
 
aka_BigRed's Avatar
 
Join Date: Mar 2004
Location: St. Paul, MN
Posts: 162
You can also a limited number of get free sample 1-wire chips directly from dallas-maxim

http://www.maxim-ic.com/1-Wire.cfm

I think you can request up to 3 each of 3 different devices every few months.


aka_BigRed is offline   Reply With Quote
Unread 02/07/2007, 09:24 AM   #113
BeanAnimal
Registered Member
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 20,772
Can you please elaborate on your choice of flow sensor and interface for it.


BeanAnimal is offline   Reply With Quote
Unread 02/07/2007, 11:22 AM   #114
marcwake
Registered Member
 
Join Date: May 2006
Location: Crescent City, CA
Posts: 60
ya I would love some more info on your setup. Is there a thread that talks about that design somewhere?


marcwake is offline   Reply With Quote
Unread 02/07/2007, 11:51 AM   #115
lakee911
Registered Member
 
lakee911's Avatar
 
Join Date: Dec 2005
Location: Columbus, OH
Posts: 1,988
Neat project. I'd rather see it on a Linksys, but that's just me. Stand alone, small footprint and what not. If I get some time, maybe I'll try to get on board! Good luck


lakee911 is offline   Reply With Quote
Unread 02/07/2007, 12:14 PM   #116
Gordonious
Registered Member
 
Gordonious's Avatar
 
Join Date: Jan 2004
Location: Newark DE
Posts: 3,393
bad inferno, I am going to order a lot of the things you mentioned there you think you can help me through getting some of it connected? Instead of using the NSLU2 do you think something like the WRT350N could work? Same company and same concept I think, just has different stuff attached to it. I didn't know if I needed to modify it in any way or if the hardware was too different to work with. I was already planning on purchasing one.


Gordonious is offline   Reply With Quote
Unread 02/07/2007, 02:25 PM   #117
bad inferno
Registered Member
 
Join Date: Jul 2006
Location: Australia
Posts: 123
I know the linksys NSLU2, with unslung firmware mod, coupled with owfs works great....for 1 wire...and no reason to keep a power hungry PC running 24/7...NSLU2 is better than a wrt54G router as you can attached a hard disk to record all your readings/web pages and create a photo album on your site. Beware you will need to know a few linux commands......Make sure you have a plan and understand what you want out of the system before buying anything ! ie do you want X10 control's.....at this stage I am only monitoring, next phase is digital outputs for control however am thinking hard on how to make sure it is secure and very reliable.

I am in the process of writing an overview of my project...should be finished in a couple of weeks



http://www.nslu2-linux.org/
http://www.owfs.org/

cheers rob


bad inferno is offline   Reply With Quote
Unread 02/07/2007, 02:30 PM   #118
RichConley
Registered Member
 
RichConley's Avatar
 
Join Date: Sep 2004
Location: Bostonian in Chicago going to DC
Posts: 9,908
I may not understand something here, and I haven't looked at the specs for what each pin does, but 1-Wire runs on Rj45, correct? Would there be any way to hack the drivers to use the RJ45 ports already built in to read 1-wire sensors?

Just seems like an awful lot of work to get back to the point we were already at.


__________________
NO TANKS!!!
RichConley is offline   Reply With Quote
Unread 02/07/2007, 02:37 PM   #119
aka_BigRed
Registered Member
 
aka_BigRed's Avatar
 
Join Date: Mar 2004
Location: St. Paul, MN
Posts: 162
Quote:
Originally posted by RichConley
I may not understand something here, and I haven't looked at the specs for what each pin does, but 1-Wire runs on Rj45, correct? Would there be any way to hack the drivers to use the RJ45 ports already built in to read 1-wire sensors?

Just seems like an awful lot of work to get back to the point we were already at.
Not really since it's a completely different wiring standard and communication protocol. The 1-wire deviced use CAT5 network cable merely because it's cheap, readily available and fits the bill. Other than than the actual cable, the 1-wire and traditional network protocols have little in common. Unless you are a driver-writing guru, I personally don't think it's possible/feasible.

OWFS, wraps all that low-level communication junk up for us. So no need to do massive hardware hacking to do what you are suggesting.


aka_BigRed is offline   Reply With Quote
Unread 02/07/2007, 03:14 PM   #120
RichConley
Registered Member
 
RichConley's Avatar
 
Join Date: Sep 2004
Location: Bostonian in Chicago going to DC
Posts: 9,908
I was thinking, that it would be possible if Linksys/etc was doing most of the processing in software. If theyre doing it in hardware, forget it.


Anyone happen to have a diagram on the voltages of an ethernet connector?


__________________
NO TANKS!!!
RichConley is offline   Reply With Quote
Unread 02/07/2007, 03:42 PM   #121
lakee911
Registered Member
 
lakee911's Avatar
 
Join Date: Dec 2005
Location: Columbus, OH
Posts: 1,988
That's a good idea. I'm sure that it would be possible if written in software, but as Rich said, you'd really need to be a driver writing guru. Chances are it only has one stack, so using it for real Ethernet would then be out of the question.

Being such a small device, I would imagine that the network connectivity portion would be in hardware. You'd need to simply look up a few chips on the mobo to find out,


lakee911 is offline   Reply With Quote
Unread 02/07/2007, 03:48 PM   #122
RichConley
Registered Member
 
RichConley's Avatar
 
Join Date: Sep 2004
Location: Bostonian in Chicago going to DC
Posts: 9,908
Right, that was my point, if its hardware, the ports are useless. If its software, then it takes away the need to solder things. That being said, you'd need to be able to write the drivers.

They're most likely hardware, so its probably a dead end.


__________________
NO TANKS!!!
RichConley is offline   Reply With Quote
Unread 02/07/2007, 04:04 PM   #123
lakee911
Registered Member
 
lakee911's Avatar
 
Join Date: Dec 2005
Location: Columbus, OH
Posts: 1,988
You could use an Ethernet to RS-232 converter and then use a 1-wire to RS-232 convertor, although it might complicate things somewhat.

Oh wait, here you go.. Ethernet to 1-wire? http://www.embeddeddatasystems.com/p...PROD/HA/HA7Net


lakee911 is offline   Reply With Quote
Unread 02/07/2007, 04:38 PM   #124
RichConley
Registered Member
 
RichConley's Avatar
 
Join Date: Sep 2004
Location: Bostonian in Chicago going to DC
Posts: 9,908
eh, $150.. Not useful enough for that.


__________________
NO TANKS!!!
RichConley is offline   Reply With Quote
Unread 02/08/2007, 03:24 AM   #125
bad inferno
Registered Member
 
Join Date: Jul 2006
Location: Australia
Posts: 123
1wire interface....you are better of using the dallas 9490 series as its the fastest usb/1wire converter and works well if going the linksys route. I also understand you can make your own serial to 1wire converter.

"Beananimal" Flow meter.....I use a turbine flow meter from radio spares .3 - 6 litres per minute. (I think) cost ~US50.00 ...they have various sizes. It provides pulses out proportional to flow rate. Mine gives out 4000 pulses per litre thus I use the 1wire pulse counter with internal battery. It just counts and stores the pulses. I just read the pulses and divide by 4000 to read litres. I also capture the number of pulses on sunday nights and also at midnight every day thus I can calculate flow for the week and for the day. The counter never resets unless it overflows the 32 bit internal counter. Thats why you subtract current value of the counter from the stored value at midnight the night before. I just pop the Sunday and midnight readings into a simple script file, called weekly and daily

Couter http://www.hobby-boards.com/catalog/...products_id=42


cheers

rob


bad inferno is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On



All times are GMT -6. The time now is 09:41 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2024 Axivo Inc.
Use of this web site is subject to the terms and conditions described in the user agreement.
Reef CentralTM Reef Central, LLC. Copyright ©1999-2022
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.