Reef Central Online Community

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

Notices

User Tag List

Reply
Thread Tools
Unread 01/26/2010, 11:52 AM   #1
terahz
1x10^12 Hz
 
terahz's Avatar
 
Join Date: Oct 2009
Location: Stamford, CT
Posts: 1,185
PH Module for Arduino controllers

Just wanted to share this little project of mine with you. I've used a schematic from www.electro-tech-online.com by richard.c and created a PCB from it. He allowed me to make PCB and share it (Big thanks for that!) so here it is. I recreated the schematic in eagle and ordered a test board from batchpcb. Tested it yesterday and it works:



Calibration is done via the two trimmers (and can be done in software of course):
dip probe in 7pH and turn RV2 until VPH reads about 1.709V
clean probe with RO water
dip probe in 10pH and turn RV2 until VPH reads about 2.441V

I use a BRS PH probe.

Here are the Eagle files (schematic, board, gerb files, gerb job file):
http://joro.geodar.com/code/PH%20Amp%20eagle.zip
And this is the BOM (part number, description, Digi-key part) (On the preview the table below is rendered a bout a page down, not sure why):


























































































































Part Description Digi-Key Part Number
R1 Miniature 1/4W 1% metal-film resistor 150KΩ P150KCACT-ND
R2 Miniature 1/4W 1% metal-film resistor 10.0KΩ P10.0KCACT-ND
R3 Miniature 1/4W 1% metal-film resistor 4.70KΩ P4.70KCACT-ND
R4,R5,R6,R7 Miniature 1/4W 1% metal-film resistor 22.0KΩ P22.0KCACT-ND
R8, R9 Miniature 1/4W 1% metal-film resistor 100KΩ P100KCACT-ND
R10 Miniature 1/4W 1% metal-film resistor 2.70KΩ P2.70KCACT-ND
R11 Miniature 1/4W 1% metal-film resistor 15.0KΩ P15.0KCACT-ND
R12 Miniature 1/4W 1% metal-film resistor 8.20KΩ P8.20KCACT-ND
RV1 3/8" multi-turn cermet 100KΩ T93YA-100K-ND
RV2 3/8" multi-turn cermet 5KΩ T93YA-5.0K-ND
C1 multilayer ceramic capacitor 150pF 490-3689-ND
C2 multilayer ceramic capacitor 3.3pF 490-3718-ND
C3 multilayer ceramic capacitor 5.6pF 490-3659-ND
C4, C5, C6, C7 metallized polyester film capacitor 0.1µF BC1639-ND
C8, C9 metallized polyester film capacitor 0.22µF 3015PH-ND
C10, C11, C12, C14, C15 aluminum electrolytic capacitor 10µF 493-1057-ND
C13, C16 metallized polyester film capacitor 0.33µF BC1630-ND
U1 LF356 JFET OP AMP LF356N-ND
U2 TL084 JFET OPAMP 497-2221-5-ND
U3 ICL7660 Voltage Converter ICL7660CPAZ-ND
U4 78L05 +5V Reg MC78L05BP-APMSCT-ND
U5 79L05 -5V Reg MC79L05BP-APMSCT-ND
X1 BNC PCB connector A32260-ND




Last edited by terahz; 01/26/2010 at 12:01 PM. Reason: trying to fix the table
terahz is offline   Reply With Quote
Unread 01/26/2010, 12:06 PM   #2
der_wille_zur_macht
Team RC Member
 
der_wille_zur_macht's Avatar
 
Join Date: Sep 2003
Location: NY
Posts: 17,749
Nice job! This is on my list of projects and I've compiled a bunch of schematics, but I like this one better than most I have. For one thing, the voltage regulator is right on board.

Can you explain the pinout for the header on the left side? What sort of input voltage is it looking for? I'm guessing 5v since you mentioned use with an Arduino?

I know the analog signal from the probe is "weak" and I've read in other pH meter projects that the signal paths need to be treated carefully. Did you put any consideration into that when doing the layout?


__________________
Inconveniencing marine life since 1992

"It is my personal belief that reef aquaria should be thriving communities of biodiversity, representative of their wild counterparts, and not merely collections of pretty specimens growing on tidy clean rock shelves covered in purple coralline algae." (Eric Borneman)
der_wille_zur_macht is offline   Reply With Quote
Unread 01/26/2010, 12:27 PM   #3
der_wille_zur_macht
Team RC Member
 
der_wille_zur_macht's Avatar
 
Join Date: Sep 2003
Location: NY
Posts: 17,749
Ok, looking at the eagle project now and I'm still a bit confused, at least on the power supply end of things.

So, the op amps need +5v and -5v. The schematic calls for +12v on the header. For the -5v side, the +12v goes into the ICL7660 converter through four diodes. The datasheet for the regulator calls for 1.5V to 10V input. Are those diodes just there to drop the voltage to within the regulator's range?

For the +5v side, why not just give it +5v from the Arduino's onboard regulator? Couldn't the ICL7660 take the same +5v instead of +12v through a bunch of diodes?


__________________
Inconveniencing marine life since 1992

"It is my personal belief that reef aquaria should be thriving communities of biodiversity, representative of their wild counterparts, and not merely collections of pretty specimens growing on tidy clean rock shelves covered in purple coralline algae." (Eric Borneman)
der_wille_zur_macht is offline   Reply With Quote
Unread 01/26/2010, 12:52 PM   #4
terahz
1x10^12 Hz
 
terahz's Avatar
 
Join Date: Oct 2009
Location: Stamford, CT
Posts: 1,185
Quote:
Originally Posted by der_wille_zur_macht View Post
Can you explain the pinout for the header on the left side? What sort of input voltage is it looking for? I'm guessing 5v since you mentioned use with an Arduino?
It requires a single 12V supply. I know the arduino can do 5V but you need a -5V as well...

Pinouts:
P1 -> 12V supply
P2 -> GND
P3 -> -5V out (just comes out of U5)
P4 -> VPH (goes to arduino)
Quote:
Originally Posted by der_wille_zur_macht View Post
I know the analog signal from the probe is "weak" and I've read in other pH meter projects that the signal paths need to be treated carefully. Did you put any consideration into that when doing the layout?
Yes, I tried keeping analog and digital separate. That's really the only consideration I had when I did the PCB.

Quote:
Originally Posted by der_wille_zur_macht View Post
So, the op amps need +5v and -5v. The schematic calls for +12v on the header. For the -5v side, the +12v goes into the ICL7660 converter through four diodes. The datasheet for the regulator calls for 1.5V to 10V input. Are those diodes just there to drop the voltage to within the regulator's range?
As far as I understand it yes, the diodes are there for voltage drop. It becomes a bit over 7V before it enters converter.

Quote:
Originally Posted by der_wille_zur_macht View Post
For the +5v side, why not just give it +5v from the Arduino's onboard regulator? Couldn't the ICL7660 take the same +5v instead of +12v through a bunch of diodes?
For the +5V I don't see why not, I just think the schematic was designed to run on any micro that can read 0-5V.

As for the negative voltage, the -5V regulator requires at least -7V in.

On a side note, it might be nice to put a fifth pin for +5V and use that to power the arduino....


terahz is offline   Reply With Quote
Unread 01/26/2010, 02:27 PM   #5
der_wille_zur_macht
Team RC Member
 
der_wille_zur_macht's Avatar
 
Join Date: Sep 2003
Location: NY
Posts: 17,749
Thanks for the answers. I suppose there's a certain amount of personal preference and/or influence from design criteria (i.e. function just with an arduino, or with any microprocessor) that goes in to some of this.

How's it working out for you? Can you verify accuracy/stability/etc against a known good meter or test kit? How long have you been using it for?


__________________
Inconveniencing marine life since 1992

"It is my personal belief that reef aquaria should be thriving communities of biodiversity, representative of their wild counterparts, and not merely collections of pretty specimens growing on tidy clean rock shelves covered in purple coralline algae." (Eric Borneman)
der_wille_zur_macht is offline   Reply With Quote
Unread 01/26/2010, 02:58 PM   #6
terahz
1x10^12 Hz
 
terahz's Avatar
 
Join Date: Oct 2009
Location: Stamford, CT
Posts: 1,185
Quote:
Originally Posted by der_wille_zur_macht View Post
Thanks for the answers. I suppose there's a certain amount of personal preference and/or influence from design criteria (i.e. function just with an arduino, or with any microprocessor) that goes in to some of this.
NP. Yeah it wasn't designed for just arduino in mind, but even with that you still can't get both +5V and -5V easily. I really looked at a lot of circuits and options and this one looked like the simplest one.
Quote:
Originally Posted by der_wille_zur_macht View Post
How's it working out for you? Can you verify accuracy/stability/etc against a known good meter or test kit? How long have you been using it for?
I finished it on Sunday so can't really tell how accurate it is yet. Only way for me to verify how accurate it is is to test it in the calibration fluids I have (4hP ,7pH and 10pH) after a few days which I'll do. I don't have any
test or reliable meter.

BTW I got a spare board from batchPCB (they sent me 2) if anyone is interested let me know I can mail it to you.


terahz is offline   Reply With Quote
Unread 01/26/2010, 03:06 PM   #7
der_wille_zur_macht
Team RC Member
 
der_wille_zur_macht's Avatar
 
Join Date: Sep 2003
Location: NY
Posts: 17,749
Oh me me me! Can I trade you an LED driver board once they're finished?

Eventually I want to put a pH circuit on a shield with an RTC and some other basic reef-targeted stuff (see the thread I just started) but I'd love to have this circuit to play with in the meantime.


__________________
Inconveniencing marine life since 1992

"It is my personal belief that reef aquaria should be thriving communities of biodiversity, representative of their wild counterparts, and not merely collections of pretty specimens growing on tidy clean rock shelves covered in purple coralline algae." (Eric Borneman)
der_wille_zur_macht is offline   Reply With Quote
Unread 01/26/2010, 03:11 PM   #8
der_wille_zur_macht
Team RC Member
 
der_wille_zur_macht's Avatar
 
Join Date: Sep 2003
Location: NY
Posts: 17,749
PS -

Quote:
Originally Posted by terahz View Post
NP. Yeah it wasn't designed for just arduino in mind, but even with that you still can't get both +5V and -5V easily. I really looked at a lot of circuits and options and this one looked like the simplest one.
Indeed, you have actually done this and I haven't, so I hope the above pontifications weren't seen as criticism. It just seems a shame to have half the PCB dedicated to generating the right voltage but I would defer to your judgement that this is as simple as it gets!


__________________
Inconveniencing marine life since 1992

"It is my personal belief that reef aquaria should be thriving communities of biodiversity, representative of their wild counterparts, and not merely collections of pretty specimens growing on tidy clean rock shelves covered in purple coralline algae." (Eric Borneman)
der_wille_zur_macht is offline   Reply With Quote
Unread 01/26/2010, 03:21 PM   #9
terahz
1x10^12 Hz
 
terahz's Avatar
 
Join Date: Oct 2009
Location: Stamford, CT
Posts: 1,185
Quote:
Originally Posted by der_wille_zur_macht View Post
Oh me me me! Can I trade you an LED driver board once they're finished?
Sure. Let's move this part to PMs.
Quote:
Originally Posted by der_wille_zur_macht View Post
Indeed, you have actually done this and I haven't, so I hope the above pontifications weren't seen as criticism.
Not at all
Quote:
It just seems a shame to have half the PCB dedicated to generating the right voltage but I would defer to your judgement that this is as simple as it gets!
Yeah I agree. I was really hoping to find one that uses just 5V, but didn't have such luck.


terahz is offline   Reply With Quote
Unread 01/26/2010, 08:54 PM   #10
guido_kp
Registered Member
 
guido_kp's Avatar
 
Join Date: Jan 2005
Location: Muskogee, OK
Posts: 248
I etched the original circuit using the black and white board photo from the original PDF awhile ago. It's pretty stable and accurate. Could this circuit - or any ph amp - be used as an ORP amp? If not, what needs to be changed?

As far as using a 5v ph amp - the phduino circuit also works well and holds it's accuracy.


guido_kp is offline   Reply With Quote
Unread 01/26/2010, 09:22 PM   #11
noobtothereef
Registered Member
 
Join Date: Jan 2010
Location: council bluffs iowa
Posts: 1,530
just out of curiousity how much did they charge for the test board? I take it you sent them the eagle?


noobtothereef is offline   Reply With Quote
Unread 01/26/2010, 10:22 PM   #12
terahz
1x10^12 Hz
 
terahz's Avatar
 
Join Date: Oct 2009
Location: Stamford, CT
Posts: 1,185
Quote:
Originally Posted by guido_kp View Post
I etched the original circuit using the black and white board photo from the original PDF awhile ago. It's pretty stable and accurate. Could this circuit - or any ph amp - be used as an ORP amp? If not, what needs to be changed?
I hate etching stuff... that's why I decided to get the PCB done. I wanted to post the eagle files in the original thread but they closed it

An ORP amp should work pretty similar to a pH amp. I have not looked into it but my guess is it is a matter of changing a few resistors to get the right amplification.

Quote:
Originally Posted by guido_kp View Post
As far as using a 5v ph amp - the phduino circuit also works well and holds it's accuracy.
yeah the phduino is a complete solution with an LCD. If I didn't have my controller already setup I would have done that most likely.

Quote:
Originally Posted by noobtothereef View Post
just out of curiousity how much did they charge for the test board? I take it you sent them the eagle?
The cost of the board is about $14, with shipping and handling it becomes about $25. And if you don't have any of the materials for etching a board I think it costs about the same to do your first board yourself (granted you have a lot of leftover material for future projects). They want the gerb files (already generated in the zip file in the first post) no the eagle files.


terahz is offline   Reply With Quote
Unread 01/27/2010, 11:32 AM   #13
der_wille_zur_macht
Team RC Member
 
der_wille_zur_macht's Avatar
 
Join Date: Sep 2003
Location: NY
Posts: 17,749
Edit - nevermind, the parts I was thinking of exist only in my mind.


__________________
Inconveniencing marine life since 1992

"It is my personal belief that reef aquaria should be thriving communities of biodiversity, representative of their wild counterparts, and not merely collections of pretty specimens growing on tidy clean rock shelves covered in purple coralline algae." (Eric Borneman)

Last edited by der_wille_zur_macht; 01/27/2010 at 11:37 AM.
der_wille_zur_macht is offline   Reply With Quote
Unread 01/27/2010, 12:24 PM   #14
stugray
Premium Member
 
stugray's Avatar
 
Join Date: May 2004
Location: Longmont, Co
Posts: 4,566
If you added a 1-wire AtoD (DS2450) directly to that board, you could read it over a 1-wire network.

http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2921

That way ANY 1-wire equipped device could read as many of them as you want.

You wouldnt even need a major re-layout as the parts are so small & simple ( they dont even need power from your board ).

Just two wires to solder pads for the 1-wire network and a line to the VPh & one to GND.

Stu


__________________
Some people think that I have Attention Deficit Disorder. They just dont understand that........ Hey! Look a chicken!

Well, We KNOW GOD exists, but for US to exist without a GOD is preposterous….Umm wait a minute…. Sounds a bit circular to me…

Current Tank Info: 125 Gal. display w/80 gal mud/caulerpa sump. Basement sump w/ LED Grow Light,Gravity fed Reeflo200 skimmer w/ ORCA Recirc, DIY calc reactor & kalk stirrer. Inline plumbed 75 Gal frag/settling tank.
stugray is offline   Reply With Quote
Unread 01/27/2010, 12:36 PM   #15
shackscs
Super Premier Member
 
shackscs's Avatar
 
Join Date: Jul 2007
Location: Norristown, PA
Posts: 849
How weird is this? I ordered two sets of components for this same exact design on Monday. They ship from Mouser yesterday.

Did you and DER work something out for the board? If not, I can use it.

I was going to get a PCB and solder across it but the more I think about it and look at it, it would be a mess.

Here is my parts list, minus the LF356 and 79l05 that mouser was out of stock on. Tell me what you think:

523-31-5431-10RFX
PC R/A BLHD JCK Ni


649-DILB8P223TLF
8P IC SOCKET

855-D2814-01
14 PIN DIL IC SOCKET


512-1N4148
100V Io/200mA BULK


863-MC79L05ABDG
5V 100mA Negative

595-UA78L05CD
5.0V 100mA

700-ICL7660CPA
IC VOLTAGE CONVERTER

511-TL084IN
Quad Gen Purp JFET

594-2222-304-54224
220nF 5% 400volts


80-C410C151K5G5CA
50volts 150pF 10%

80-C315C569D2G
C315 5.6pF 200volts

581-SR152A3R3DAA
200volts 3.3pF


72-T93XB-5K
3/8" SQ H/ADJ 5K

652-3299W-1-104LF
100Kohms Standoffs


660-MF1/4CC1503F
150K 1% 50PPM


71-CMF55100K00BHEK
1/4watt 100Kohms .1%

660-MF1/4CCT52R2202F
1/4 WATT 22K OHM 1%

71-CMF5515K000FKEK
1/4watt 15Kohms 1%

71-CMF5510K000FEEB
1/4watt 10Kohms 1%


71-CMF558K2500FHEK
1/4watt 8.25Kohms 1%


71-CCF558K25FKE36
1/4watt 8.25Kohms 1%

71-CMF554K7000FKEK
1/4watt 4.7Kohms 1%

The total was 24.65 before 6.50 in shipping.



Last edited by shackscs; 01/27/2010 at 12:54 PM.
shackscs is offline   Reply With Quote
Unread 01/27/2010, 01:12 PM   #16
shackscs
Super Premier Member
 
shackscs's Avatar
 
Join Date: Jul 2007
Location: Norristown, PA
Posts: 849
If anyone is interested here is a link to Richard's post:

http://www.electro-tech-online.com/e...ier-micro.html


shackscs is offline   Reply With Quote
Unread 01/27/2010, 04:05 PM   #17
terahz
1x10^12 Hz
 
terahz's Avatar
 
Join Date: Oct 2009
Location: Stamford, CT
Posts: 1,185
Quote:
Originally Posted by stugray View Post
If you added a 1-wire AtoD (DS2450) directly to that board, you could read it over a 1-wire network.

http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2921

That way ANY 1-wire equipped device could read as many of them as you want.

You wouldnt even need a major re-layout as the parts are so small & simple ( they dont even need power from your board ).

Just two wires to solder pads for the 1-wire network and a line to the VPh & one to GND.

Stu
Thanks Stu, I'll take a look at and if I can squeeze it I will add it. I suppose DWZM can add this while incorporating the circuit to the reef controller. Not sure I'll be ordering anymore PCBs of this.

Quote:
Originally Posted by shackscs View Post
How weird is this? I ordered two sets of components for this same exact design on Monday. They ship from Mouser yesterday.

Did you and DER work something out for the board? If not, I can use it.

I was going to get a PCB and solder across it but the more I think about it and look at it, it would be a mess.

Here is my parts list, minus the LF356 and 79l05 that mouser was out of stock on. Tell me what you think:

The total was 24.65 before 6.50 in shipping.
shackscs, I'll PM you about the board.

The parts look OK, if you are doing the original etched board. The resistors, however, will not fit on the PCB.


terahz is offline   Reply With Quote
Unread 01/27/2010, 04:10 PM   #18
shackscs
Super Premier Member
 
shackscs's Avatar
 
Join Date: Jul 2007
Location: Norristown, PA
Posts: 849
I just ordered the board based on your eagle file. What was the turn around time?


shackscs is offline   Reply With Quote
Unread 01/27/2010, 04:28 PM   #19
terahz
1x10^12 Hz
 
terahz's Avatar
 
Join Date: Oct 2009
Location: Stamford, CT
Posts: 1,185
Quote:
Originally Posted by shackscs View Post
I just ordered the board based on your eagle file. What was the turn around time?
I sent you a PM that I have the board for you ... If you can cancel your order go ahead.

The turnaround time is about 4-5 weeks. I'd say.


terahz is offline   Reply With Quote
Unread 01/27/2010, 04:35 PM   #20
shackscs
Super Premier Member
 
shackscs's Avatar
 
Join Date: Jul 2007
Location: Norristown, PA
Posts: 849
Wow 4-5 weeks???

Yeah, I will take your board.

I sent you a pm.


shackscs is offline   Reply With Quote
Unread 01/27/2010, 04:58 PM   #21
guido_kp
Registered Member
 
guido_kp's Avatar
 
Join Date: Jan 2005
Location: Muskogee, OK
Posts: 248
Right on, etchings not the most fun thing I've ever done but it's nice to be able to do it. I'm using a modified phduino circuit that doesn't have the LCD portion. It's just a sensor shield. I've tried to plug my orp probe up but I never get a voltage out, is why I was asking. Tried with the trimpot all up/down but no workie.

What code are you using to derive the pH?


guido_kp is offline   Reply With Quote
Unread 01/27/2010, 06:24 PM   #22
MaLi
Registered Member
 
MaLi's Avatar
 
Join Date: Apr 2009
Location: Columbus, IN
Posts: 532
Quote:
Originally Posted by terahz View Post
I sent you a PM that I have the board for you ... If you can cancel your order go ahead.

The turnaround time is about 4-5 weeks. I'd say.
you got a PM

Thank you


MaLi is offline   Reply With Quote
Unread 01/27/2010, 06:36 PM   #23
noobtothereef
Registered Member
 
Join Date: Jan 2010
Location: council bluffs iowa
Posts: 1,530
Quote:
Originally Posted by terahz View Post
The cost of the board is about $14, with shipping and handling it becomes about $25. And if you don't have any of the materials for etching a board I think it costs about the same to do your first board yourself (granted you have a lot of leftover material for future projects). They want the gerb files (already generated in the zip file in the first post) no the eagle files.
Id say thats darn cheap! considering how much ph controllers cost, and if you were to run a larger amount of them the cost would be DRASTICALLY reduced, great job on this! Ive always wanted to learn electrical engineering like this, i have contemplated going back to school for it.


noobtothereef is offline   Reply With Quote
Unread 01/27/2010, 06:43 PM   #24
shackscs
Super Premier Member
 
shackscs's Avatar
 
Join Date: Jul 2007
Location: Norristown, PA
Posts: 849
When I soldered my first Protoboard for the Arduino I was turned on to doing more electronic projects, hence the phduino board project.

My board is costing 29.00 (Priority mail shipping).


shackscs is offline   Reply With Quote
Unread 01/27/2010, 06:48 PM   #25
terahz
1x10^12 Hz
 
terahz's Avatar
 
Join Date: Oct 2009
Location: Stamford, CT
Posts: 1,185
Quote:
Originally Posted by guido_kp View Post
I've tried to plug my orp probe up but I never get a voltage out, is why I was asking. Tried with the trimpot all up/down but no workie.
well an ORP probe will not be a drop in replacement but I'm not knowledgeable enough to tell you what needs changing.

Quote:
Originally Posted by guido_kp View Post
What code are you using to derive the pH?
You can get the formula pretty easy. On this board 7pH is about 1.709V which is 0.00244V for 0.01pH; Arduino can do 1024 steps over 5V which works out to be 0.00488. So one arduino step is 0.02pH. Just multiply the value you get from the arduino readout and multiply by 0.02 and you're all set:
7pH = 1.709V = analog value 350 on the arduino * 0.02 = 7pH

Quote:
Originally Posted by MaLi View Post
you got a PM
Replied.


Just a note: I had only one extra board. DWZM claimed it first but changed his mind, shackscs asked second and he got it.

I suggest if there are more people that want to make this board, just get together and do a group order, it will be much much cheaper that way.


terahz is offline   Reply With Quote
Reply

Thread Tools

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 11:45 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.