Hey guys,
I'm still having some trouble with the program sketch I need to type up for my arduino uno to upload in order for the orp/ph adapter 1130 I attached to it to be able to read the ph levels of different solutions. Any thoughts? Thanks for the help.
Any thoughts?
Post a link to the specific device you are using. Post the code you have so far.
Here's the link to the adapter I am talking about:
And here's the code I have so far:
// Ph Adapter 1130 test
void setup()
{
// begin the serial communication
Serial.begin(9600);
}
// variable to hold the analog input value
int analogValue = 0;
float temperature = 25.0; // or some other degrees C value if you know it or measured it
int digitalValue = analogRead(0);
float voltageValue = digitalValue * 0.0049; // from Arduino reference
float pH = 7.0 - (2.5 - voltageValue) / (0.257179 + 0.000941468 * temperature); // from p. 8 of Phidget 1130 manual
void loop()
{
// read the analog input on pin 0
analogValue = analogRead(0);
// print as an ASCII-encoded decimal
Serial.print(analogValue, DEC);
// print a terminal newline character so the AVR Voltmeter
// will know that it has received the full string
Serial.print('\n');
// delay 1 second before the next reading:
delay(1000);
This code:
int digitalValue = analogRead(0);
float voltageValue = digitalValue * 0.0049; // from Arduino reference
float pH = 7.0 - (2.5 - voltageValue) / (0.257179 + 0.000941468 * temperature); // from p. 8 of Phidget 1130 manual
should be in loop, but before it.
What is the problem you are having? Besides the missing } at the end of loop()?
When I place the probe in solutions of different ph the volts being measured does not change as it should from one solution to another.
There are several operations that convert the analog pin reading to a pH value. You need to figure out where the conversion error is occurring.
Are you getting varying values from the analogRead() function as you move the probe?
Not really. The only value that keeps appearing is 705/706. No matter where the probe goes the value stays the same.
The only value that keeps appearing is 705/706. No matter where the probe goes the value stays the same.
This tells me that you have the probe attached to the wrong pin, or some other wiring issue.