Hey guys,
I know this may be a pretty dumb question but I have been given a project that is beyond my skill level haha. I am trying to connect an Arduino uno and a orp/ph adapter 1130 together with a breadboard. I need to cut off one of the plugs on one end of the ph connector cable and then connect the exposed wires to the breadboard etc. I have no idea how to do that or what the coding for a project like this would look like. If any of you are able to help that would be very much appreciated. Again, I'm very sorry about the little amount of knowledge I know about this stuff.
Well as far as the connector, It looks like ti just uses a regular 3 wires. 1 gets connected to the gnd on your arduino (black wire), one goes to 5V on the arduino (the red one) and the toehr is the analog data input (the white). So cut the connector off and plug each of those into their respective parts.
Then, depending on which your trying to read Ph or the other thing. This link tells you the math you need to do to get the right reading. 1130 User Guide - Phidgets Support
So which are you trying to read?
Also a project like this really isnt that excessively high level, if you already have an arduino do the analog in tutorial, basically your replacing the Potentiometer with your sensor. Then just do the match that it tells you and itll work. Biggest worry I'd have is weather or not you'll need to have a calibration circuit (probably not though, that built into the sensor most likely).
Welcome to the forum.
Do you have a link to the adapter? That would be a good start.
Probably need some wire strippers, maybe a soldering iron to neaten up the bare wires to be breadboard friendly.
You might also browse the Playground to see if anyone has used that sensor before.
And also the Learning section to get some experiene on basic programming setup.
You may not even need to cut the ends off.
Go to www.pololu.com and pick up some Crimp terminated wires, use male-male and connect the sensor plug to the arduino headers.
Specifically:
http://www.pololu.com/catalog/product/1902
I find having some of these and other sizes around to be very handy.
OK. You need an overall game plan first.
The idea is to read the voltage of the sensor using the Arduino's analog read, do some simple calculations to convert to pH, and then display the result.
Look at pages 8 and 9 of the 1130 manual.
If the sensor is being interfaced to your own Analog to Digital Converter and not a Phidget device, our formulas can
be modified by replacing (SensorValue) with (Vin * 200). It is important to consider the voltage reference and input
voltage range of your ADC for full accuracy and range.
If you are just measuring pH, the last page gives the voltage range and precision.
Input Range -400 mV to +400 mV
That 800 mV range represents the full pH range (0-14 approx).
Your Arduino analog input gives you a number 0-1023 for voltages 0 thru 5V.
Thus your 800mv range corresponds to 16% of that range or about 163 values.
That is about 11 per pH unit, giving you a maximum pH precision of about 0.1 pH unit.
If that is ok for your purposes, you first need to condition the analog input sensor voltage so it is non-negative.
Adding half a volt would do it. You could also scale it up by a factor of 5, so your pH precision would now be 0.02 pH units per analog read value.
Look at the TLV2371 (first circuit below)
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?action=print;num=1241730209
If I remember correctly the gain is 1 + R1/R2, giving a gain of 16.
You would use, say 2.5k for R2 and 10k for R1 for a gain of 5.
You still need to add the 0.5 volt to make the input voltage positive.
There are several ways to do that. Perhaps an analog pro will chime in.
I hope this is a good start.
Hey guys,
I'm having trouble with the programming code that I need to update to my arduino for it to successfully read the pH from the ph adapter 1130 that I attached to it. I believe I have the wiring correct and I know the math I need to do to convert the voltage to pH however the programming is really confusing me. I know this is a noob question but I am really struggling with how to program this into my arduino. Any help would be awesome.
What's a 'ph adapter 1130'? How does it connect? Serial? Analogue? Two Wire?
Topics merged.
Please do not cross-post
Ok. It seems to be an analogue device, so follow the advice in reply #1. Use the AnalogInOutSerial example as a starting point. It will send the values it is reading to the serial port, and you can see them in the serial monitor.
The pH sensor is an analog device, but a non-trivial one. The sensors themselves have millivolt levels and contain their own internal reference.
The Phidget board takes care of that and let's you just read a digital value, which you convert to pH.
Phidgets are non-trivial. Allthough they have a lot of drivers, for many computer operating systems, Arduino is not one of them. (Why not, already?)
I did find this one link of someone who made an Arduino shield for Phidgets:
It is enough for a noob to just get the Arduino to read the digital value from a Phidget board, since none of the many drivers are for Arduino.
Starting from the analog signal and properly conditioning it requires additional analog circuitry expertise.
Major N, I'd try like crazy to find someone who sells an Arduino shield for a Phidget.
Then you can just deal with the relatively simple sensor value to pH calculation.
Interestingly enough, it looks like the Arduino and Phidgets are in two parallel separate worlds.
Check out this little presentation:
Sorry for posting 3 in a row!
Ok. If you want to take a crack at reading the sensor voltage directly and converting it to pH,
looking at the Phidget manual tells you how.
Connect the 0 and 5v to your Arduino power and the sensor signal to an Arduino anolog input pin.
You should be measuring a voltage of 2.5v from the sensor for neutral ph 7.0 water for the equation to work;
For code I'd try something like:
float temperature = 25.0; // or some other degrees C value if you know it or measured it
int digitalValue = analogRead(sensorPIN);
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
Serial.println(pH);