Sunday, August 30, 2009

pHduino 0.2 released

A new pHduino hardware version was released. The problem about sensor voltage offset compensantion was resolved. See the changelog for the changes.



Changelog - Hardware version 0.2
  • Fixed the problem of the offset signal amplification before the compensation.
  • Increase the value of the resistors to reduce the electric current consume (Dr. do Lago).
  • Changed the charge pump inverter capacitors from 1000uFx6.3V to 100uFx25V.
  • Removed zener diode and trimpot used to adjusts the voltage reference by a resistor of fixed value.
  • Added a ADC channel to reads the reference voltage.
History

Friday, August 21, before to get sleep, I had an idea to resolve the offset signal compensation problem with gain. On Saturday and on Sunday, I changed the PCB layout and did a clean-up on the firmware code.

On Monday, 24, I changed the electronic circuit of the first version to the new circuit. Dr. do Lago helped me selecting the right value of the resistors to reduce the current consume.

On Wednesday, 26, my friend Mr. Vidal, realized a comparative test between the pHduino and a pHmeter from a commercial brand using a titration of HCl with NaOH in a didactic laboratory. He said me the pHduino worked fine. The results I will show soon.

On Friday, 28, I made a PCB with the new layout, on Saturday, 29, I bought more electronic components and I mounted the circuit at my home toolshop.

Today, Monday, 31, I took some new shots of the circuit mounted.

The solution

The basic idea to resolved the main problem is apply an adjustable electric potential, using a trimpot, at the place of the voltage divider ground of the non-inverter amplifier (Stage1). Dr. do Lago deduced for me the equation for the Stage1.



I know that this point does not have a low impedance. I should put a follower voltage. However, the current that flows by the R1 and R2 is about 100 times lesser than the current that flow by the voltage divider (defined by R3, R4, and R5) that applies the voltage offset at R1. This circuit is suitable for this application.

pHduino Project
http://code.google.com/p/phduino

Monday, August 17, 2009

Error with the gain stage

I said that I decided change the gain stage from a trimpot to a resistor to simply the calculus, but now I made a mistake about the gain stage.

My first version used a trimpot for the offset stage and another one to the gain stage. In this configuration I can adjust the signal with freedom. The code is simple and easy to change. But, I can determine exactly the gain value. This is the point because I decided change the trimpot for a resistor.

Last weekend I was writing a peace of code to make calibration by software. The code is getting complex instead of when I used trimpots to adjust the gain. Today I did some tests with buffer solutions and I used a glass electrode. It applied an offset voltage about 100mV. So, this value with a gain of 5.0 put the signal near of saturation. Therefore, I need fix it.

Another point is with this offset adjust approach generates a signal out from the middle of the ADC scale. So, I lost part of the pH scale.

Now, I am considering to return to trimpot gain to simplify the project, read the voltage reference with an ADC, and put another operational amplifier to change the offset circuit (before to apply the gain).

So, I suggest you don't mount this circuit. I am working on it. There are thing that you discover with a prototype.

Tuesday, August 11, 2009

Circuit released

I am really sorry about the delay. But, just before to publish the electronic schemes and the PCB layout I decided to make some changes. Now I published the first public version of the pHduino hardware scheme and PCB. I have a code example but I need clean it up.

One change was remove a gain adjust trimpot to a fixed value resistor. This change makes me know exactly the voltage of the glass electrode. In the beginning of the project, the trimpot did make me sense for a better use of ADC range. But, tests show me that the operation was a little bit complicated.

About the offset adjust trimpot, I decided to keep it, because each electrode will give an electrical potential different from zero at pH 7.00.

I changed the position of some components for a better layout and put the operational amplifier input near the connector terminal.

I am still feeding the project with documentation. So, I am sorry about the lack of information. I will really appreciate suggestion.

Tuesday, August 4, 2009

pHduino - An pHmeter using Arduino Board


About

pHduino is a open hardware and open software for pH measuments using a glass electrode sensor for hydrogen ion and a Arduino board.

History


Just after I returned from my last post-doc project at San Antonio, Texas, I decided not restart my last project. I did it to finish some works and make an open hardware project in electrochemistry. After some tests, a friend called Denis Vidal, suggested me to construct a pHmeter. I made the project in a weekend and I spent more three weekend to adjust the layout and documentation. I made this project just for fun.

Features

This pHmeter can be powered by a power supply and display the data using a LCD. Also, you can control it and power it up by USB port. The offset and slope can be adjust manually by potentiometers or by an auto calibration code (not implemented, yet). There is a temperature sensor for temperature compensation.

It is inferior and a little bit more expensive from a portable low resolution pHmeter. However, it is interfaceable, programmable, expansible, and, the more important, open and free!

Again, it is not intent to be a high resolution analytical instrument to compete with a commercial pHmeter. It is different.

Current stage

I am improving the hardware and the software. I need make some tests and some benchmarks. I will publish the electronic scheme, PCB layout, and the code as soon as possible. I will write a program to run in the computer (cross-plataform) to read, plot, and save the data. At the moment, I am using a serial terminal to display the data by USB port.

Applications

In a Chemistry Lab, the pHmeter is typically used to adjust pH of solutions and buffers. In Environment Chemistry we can use it for monitoring the water of rivers, sea, dams, reservoirs, rain, and etc. For a not technician end users, he can monitoring the pH of an aquarium. There are many other possible applications. It is very important to know the pH glass electrode sensor limitations to make the write use. It is possible substitute the pH electrode by a different ion-selective electrode.

Acknowledgement

This project was possible by the idea from my friend Denis, the space that my supervisor gave me, prof. Dr. Emanuel Carrilho, BioMicS Group, Institute of Chemistry from São Carlos, University of São Paulo and by facilities and suggestions from prof. Dr. Claudimir Lucio do Lago, LAIA Laboratory, Institute of Chemistry of University of São Paulo. I would like to thank Fapesp - Fundação de Amparo à Pesquisa do Estado de São Paulo by the financial support for my different projects during my academic life.

Links

Blog
http://phduino.blogspot.com/

Project
http://code.google.com/p/phduino

Discussion group
http://groups.google.com/group/phduino

First post

Hi everybody.

I am really happy to announce the launch this project: a pH meter using a Arduino/Freeduino board.

PURPOSE

Construct a pH meter using an Arduino/Freeduino board to read pH with a pH glass electrode. It is not a high resolution scientific instrument. This project aims to be simple, using resources from the Arduino, commons and cheap electronic components. The pHduino could be operate connected to a computer by a USB cable or in a stand alone mode using a display and powered by a power supply or a battery. Important: It is fundamental connect a pH sensor (e.g. pH glass electrode) to the pHduino.

APPLICATIONS

First, the pHduino aims to be useful in a chemistry laboratory to read pH of solutions. It can be used in a didactic chemistry laboratory or in analytical applications like potentiometric titration. Other applications could be the monitoring the pH of an aqueous solution from aquariums, reservoirs, lakes, rivers, swimming pools, rain, industrial processes, etc.

This is my contribution for the chemistry, open source and open hardware communities.

Enjoy.