ph-measurement - a starter-project based on Arduino or Raspberry Pi!?

Thread Starter

rincon

Joined Aug 15, 2018
6
hello dear friends,

i am willing to start a project for ph-measurement:

pH measurement has many uses - for example for all sorts of laboratory and industrial uses.

i want to run a Raspberry Pi (or Arduino of course) to read pH, log it, and integrate it into a concept that runs more sensors.
pH (power of hydrogen) shows us how how acidic or basic a water-based solution is. This is a equivalent of electrical power...to be more precice - the ph shows us a value of the concentration of hydrogen ions (H+) present in a probe.


i have tried to make up my mind and have read some forum threads here - and more stuff to dive into the technique: - as of the learing curve i have went through - i have to recap.

How to connect a sensor to the Pi?
i want to read pH from a glass electrode, and then (afterwards) convert the voltage is generates to digital form. There are circuits available to do this - the details of how they work vary: One idea is to match the high impedance of the sensor to the low impedance of the electronics using an operational amplifier (op amp), While doing so we can afterwards convert the analog signal to a digital signal using an analog-to-digital converter (ADC).

At the end of this process we can interpret the digitized voltage as pH.

i can use a circuit with while use 4-6 wires connected to GPIO pins, or the USB port. GPIO circuits get power by connecting to a 3.3V or 5V pin, and a ground pin. They also connect to either UART, I²C, or SPI pins to send and receive data.

the planned setup:
Raspberry Pi Model 3B
Raspberian OS
or alternative : Arduino !!!
Atlas Scientific OEM pH Sensor with OEM Simple Development Board

i have found some docs here:
https://atlas-scientific.com/files/oem_pH_datasheet.pdf

i have decided to connect an Atlas Scientific EZO-pH™ Circuit to a Raspberry Pi 3.

i want to do this with the Gen 2 Electrically Isolated USB EZO™ Carrier Board connected to an Raspberry Pi 3.0 B+ , running our Atlas IoT Monitoring Software. While doing so i want to convert the Raspberry Pi into a monitoring system. Atlas IoT™ uses the Raspberry Pi to create a powerful new monitoring system.

out of the manual of Atlas-scientific: /(see above)
Step 2. Connecting to the Raspberry Pi
Using the HDMI cable, connect the monitor of choice to the Raspberry Pi. Next, i will connect the USB power supply and mouse to the Pi.

Side Note:
In order for the Raspberry Pi to detect the EZO-pH™ Circuit via USB, the circuit must be in UART mode. By default, all our EZO devices are in UART mode. You can easily tell what mode the circuit is in by looking at the LED on the circuit. If the LED is blinking green you are in UART mode. If its solid blue you are in I2C mode.
In previous projects i never have used any Atlas-Scientific EZO circuits, devices and sensors.

Questions that arise:

Should i connect RTD, pH, ORP, DO, EC!?,
However I don't think I am ever going to require the quantities ( in other words - the threshold seems to be xy units before the savings are significant) that will give me sufficient savings to justify the additional work to implement them (when we compare to the ease of the EZOs).

so the question is: is it very difficult to integrate these - from an engineering and design standpoint?
 

Yaakov

Joined Jan 27, 2019
5,488
After wading through your very long post I have the impression you are asking if you should use USB or SPI? I can't tell. There is no way to really answer the very last question because you haven't really provided any information on a design, or a requirement that would drive it.

I'd love to help but I just can't understand your post. Could you clarify, concisely?
 

BobTPH

Joined Jun 5, 2013
4,742
Should i connect RTD, pH, ORP, DO, EC!?,
However I don't think I am ever going to require the quantities ( in other words - the threshold seems to be xy units before the savings are significant) that will give me sufficient savings to justify the additional work to implement them (when we compare to the ease of the EZOs).
Agree with Yaakov. You may know what the above paragraph means, but I certainly do not.

Bob
 
Last edited:

Thread Starter

rincon

Joined Aug 15, 2018
6
Hello Yaakov hello dear BobTPH :)


first of all - many many thanks for the quick reply. i am glad to hear from you
well i have to explain that i am in the early planning stages:

After wading through your very long post I have the impression you are asking if you should use USB or SPI? I can't tell. There is no way to really answer the very last question because you haven't really provided any information on a design, or a requirement that would drive it. I'd love to help but I just can't understand your post. Could you clarify, concisely
wow / great i am happy
:)
Well - many thanks for the reply and for your ideas: probably there is not too much engineering or design to do if we're using the carrier board with USB. If we connect the pH circuit directly to the Pi, i guess that we would need four connections to the GPIO pins on the Pi:

the following ones: ground, +V, data, and clock.
if we use UART then we would also need four, possibly more if the device uses other lines for the signalling.


What about the Atlas solution>
see the corresponding pages

a. https://atlas-scientific.com/files/oem_pH_datasheet.pdf
b. https://atlas-scientific.com/blog/ph-sensor-raspberry-pi/


The Atlas site says that we can have up to nine EZO devices connected (I2C mode only).

I'm not sure if that means we can have more connected via USB - probably i need a closer read or sending them an email.
I would expect there to be no real practical limit for USB connections (as long as there's sufficient power) but best to make sure first. As for the software,

should i go and use Atlas' image file / if so i guess that it looks like everything will be set up for us.
Would you stick with Arduino or Raspi / would zou use ATLAS or DFRoot

If we take Raspi> if I'd install Raspberry Pi OS and then i could make use of the .zip file that Atlas has on their site to do the install.

To sume up> from a quick glance at the documentation at Atlas scientific (see the above links) to, it doesn't look like the EZO devices will be difficult to set up with a Pi, particularly if we're using the carrier boards and their USB connection.


But that said / i have to mention that i am at the early planning stages i have heard of different types of sensors.

a. DFRobot Gravity Analog pH Sensor
b. EZO TM class embedded pH circuit
: This is an ... - TI E2 by : The Atlas Scientific EZO™

which one is the best one!?
see the both examples:

https://eckstein-shop.de/DFRobotGravityAnalogpHSensor2FMeterKitForArduino

DFRobot Gravity Analog pH Sensor / Meter Kit For Arduino
30,26 € (Netto 25,43 €)
Artikelnummer: DF01035
GTIN: 4060137045332
Kategorie: Sonstige Sensoren
Hersteller: DFRobot

overview:
Aquakultur: ANALOG PH-SENSOR / METERSPEZIFIKATION
Modulpower : 5.00V
Modulsize : 43 x 32mm(1.69x1.26")
range :0 - 14PH
temperature: 0 - 60 °C
accurate ph-readings : ± 0.1pH
Reaction : < 1min
pH-Sensor with BNC-connector
pH2.0-interface ( 3-Fuß-Patch )

pH-Messtaster (BNC-Stecker) x1
pH-Sensor-Leiterplatte x1
Analoges Kabel x1



EZO TM class embedded pH circuit This is an ... - TI E2E

The Atlas Scientific EZO™ class pH circuit, has a flexible calibration protocol, allowing for single point, two point, or three point calibration. The other two ...
https://www.amazon.com/Atlas-Scientific-Embedded-Circuit-001-14/dp/B00641R1PQ
Features
Reads
• Full range pH reading from .001 to 14.000
• Accurate pH readings down to the
thousandths place (+/- 0.02)
• Temperature dependent or temperature
independent readings
• Flexible calibration protocol supports single point,
2 point, or 3 point calibration
• Calibration required only once per year with
Atlas Scientific pH probe
• Single reading or continuous reading modes
• Data format is ASCII
Two data protocols
• UART asynchronous serial connectivity
• (RX/TX voltage swing 0-VCC)
C (default I2
C address 0x63)
• Compatible with any microprocessor that supports
UART, or I2
C protocol
• Operating voltage: 3.3V to 5V
• Works with any off-the-shelf pH probe
Sleep mode power consumption
• 0.995mA at 3.3V

DescriptionThe Atlas Scientific™ EZO™ class embedded pH circuit, is our 6th generation
embedded pH circuit. This EZO class pH circuit, offers the highest level of stability
and accuracy. With proper configuration the EZO class pH circuit, can meet, or
exceed the accuracy and precision found in most bench top laboratory grade
pH meters. The pH-EZO™ pH circuit, can work with any off-the-shelf pH probe/
sensor/electrode. This device reads pH from a pH probe/sensor/electrode. This
device does not include a pH probe/sensor/electrode.


btw: i think i will stick to the b.- the Atlas Scientific™ EZO™ class embedded pH circuit

but if i think about it / then i see that

  • that the Atlas Scientific EZO has a pH resolution of +/-0.002 - i do not really need that high resolution? It costs approx $42 and seems to require a separate probe that you will have to buy. The circuit board looks a bit rough. The websites that I've searched for this product say it is not available at present.
  • The DFRobot is about the same price but comes with a probe. The pH resolution is only +/-0.1 which is probably OK for most people (only the user has to decide that) and the whole assembly look very professional. I guess that this product is still available.


Well / what is my usecae> i want to measure liquids like coffee, water, beer and others / the purpose is to demonstrate the technique and to play around with the arduino and raspi.
that said i guess that i do not need the high resolution of the atlas scientific solution


dear Yaakov, dear BobTPH What would you say.

i look forward to hear from you

regards:)
 

djsfantasi

Joined Apr 11, 2010
8,255
Wow! Normally we have to ask a poster to supply more detail. But in your case, there’s SO much detail that it obscures the question.

First, thanks for providing a comprehensive description.

Of your long post, I extracted a couple of sentences.
The Atlas site says that we can have up to nine EZO devices connected (I2C mode only).

I'm not sure if that means we can have more connected via USB - probably i need a closer read or sending them an email.
I2C is NOT related to USB. It is a protocol for using GPIO or IC pins to communicate. So there is NO need for USB in connecting these sensors unless they also support USB.

But just using I2C is a much simpler solution. Now, what questions do you have as a follow up, in two paragraphs or less.
 

Yaakov

Joined Jan 27, 2019
5,488
I'd love to help but I fear there is a language barrier exacerbating your newness to engineering.

The most important thing for you to do is create a specification document. To do that need to explain (not just to others but to yourself) not the parts of the solution but the problem you are trying to solve. You have to describe what the completed project will do and what it would be like to be a user of it.

Then you need to consider the future and document things like expected scalability, expected lifetime, and anything else that might require changes in the future.

Then, you need to document the constraints you have. This would include things like cost, power sources, size, your own skill, time, and anything else that is a relevant constraint.

Then, with that information, you can start choosing platforms like RPi and Arduino alongside components like the sensors you want to use. Note that if you decide for whatever reason you simply must use a particular SBC or sensor then that becomes a constraint and is part of the list above.

The process is iterative, but it must start with you having an understanding of what the completed project will look like in function and user interface because that drives everything else. If something has to compromise that, you need to do it only after you understand what the ideal version is or you may compromise it for no reason.

I hope you are very successful. Unfortunately, at this stage I can't really help. Your questions are very hard for me to put in context or frankly to even follow very well.
 

JohnInTX

Joined Jun 26, 2012
4,654
There is some basic info right here on AAC:
https://www.allaboutcircuits.com/textbook/direct-current/chpt-9/ph-measurement/
https://control.com/technical-articles/ph-monitoring-and-control-systems/

PH measurements are not trivial and require careful signal conditioning and an instrumentation amplifier with extremely high input impedance with careful attention to RF rejection and other noise factors. Pick a probe-interface with as much of the analog done as possible. Keep in mind that even fingerprints on the board can affect the HIz input. Actually, lots more than that can affect it but I gotta go.. Granddaughter says 'snuggle'
 
Top