No shipping info available.
Set destination country to see options
Shipping to starts at
Free shipping is available to !
Ships from
This item does not ship to .
More Info
Sign up to get notified when this product is back in stock!
Miniph pH interface MinipH is a very cost effective solution for adding pH sensing capability to any project. MinipH uses a popular and proven 12 bit ADC that is very easy to work with, precise, and …
Read More…MinipH is a very cost effective solution for adding pH sensing capability to any project. MinipH uses a popular and proven 12 bit ADC that is very easy to work with, precise, and reliable, taking measurements is a snap. This makes it an ideal addition to any electronic tool box, especially those that need water quality sensors! Designed to be easily integrated with projects using either a breadboard(standard .1" header) or even use a Seeed Grove connector! This is an open source hardware project and all files can be found on MinipH's Project page!
Very simple code to read ADC and assemble 12bit number! pH can then be calculated just like with other projects! See MinipH's Project page for full code examples as well!
#include
#include
#include
#define MAX_LENGTH 18
#define VERSION 0x0001
uint8_t pHi2cAddress = 0x4D; // MCP3221 A5 in Dec 77 A0 = 72 A7 = 79)
void setup()
{
//The library assume you will initialize the wire library mine as well do this here
Wire.begin();
//initialize and run anything that needs to be performed prior to the main loop executing for the first time
Serial.begin(115200);
Serial.println("MINIPH Library Usage Example");
}
void loop()
{
int pHtemp = miniph.calcRollingAVG();
int pHtemp2 = miniph.readI2CADC();
if (Serial.available() > 0)
{
processIncomingByte(Serial.read());
}
Serial.println(pHtemp);
delay(500);
}
void processIncomingByte(const char inByte)
{
static unsigned int numChars = 0;
switch (inByte)
{
case '\n': // end of text
// terminator reached! process input_line here ...
numChars = 0;
processMessage(messageIn);
break;
case '\r': // discard carriage return
break;
default:
// keep adding if not full ... allow for terminating null byte
if (numChars < (MAX_LENGTH - 1))
messageIn += inByte;
numChars++;
break;
} // end of switch
} // end of processIncomingByte
void processMessage(String msg)
{
Serial.println(msg);
if (msg.startsWith("C"))
{
//we received a calibration string lets rip it apart to see what to do
char whichType, whatCal;
whichType = msg.charAt(1);
whatCal = msg.charAt(2);
String tempStringtoInt = "";
int nDex = 3;
//Serial.println(msg);
while (msg[nDex] != ',' && nDex < MAX_LENGTH)
{
//Serial.println(msg[nDex]);
tempStringtoInt += msg[nDex];
nDex++;
}
int calMapReference = tempStringtoInt.toInt();
switch (whichType)
{
case 'E':
//now lets check which cal we want to run in the eC group
//We want to calibrate our low
if (whatCal == 'L')
{
//miniec.calibrateeCLow(miniec.calcRollingAVG(),(long)tempStringtoInt.toInt());
}
else if (whatCal == 'H') //or our high
{
//miniec.calibrateeCHigh(miniec.calcRollingAVG(), (long)tempStringtoInt.toInt());
}
break;
case 'P':
if (whatCal == '7')
{
miniph.calibratepH7(miniph.calcRollingAVG());
}
else if (whatCal == '4')
{
miniph.calibratepH4(miniph.calcRollingAVG());
}
else if (whatCal == '10')
{
miniph.calibratepH10(miniph.calcRollingAVG());
}
break;
default:
break;
}
}
if (msg.startsWith("R"))
{
Serial.print("pH: ");
Serial.print(miniph.calcpH(miniph.calcRollingAVG()));
Serial.print(" | ");
Serial.println("eC: ");
//Serial.println(miniec.mapeC(miniec.calcRollingAVG()));
}
if (msg.startsWith("S"))
{
//Stop
//do whatever you want here to stop or what and S command might be
}
if (msg.startsWith("I"))
{
//Lets read in our parameters and spit out the info!
//eeprom_read_block(¶ms, (void *)0, sizeof(params));
sendSerialInfo('I');
}
if (msg.startsWith("X"))
{
//restore to default settings
Serial.println("Reseting to default settings");
//miniec.reset_eCParams();
miniph.reset_pHParams();
}
//clear out our message buffer
messageIn = "";
}
void sendSerialInfo(char charStatusInfo)
{
Serial.print("MiniLib pH and eC Example: Firmware Ver ");
Serial.println(VERSION);
Serial.print("pH 7 cal: ");
Serial.print(miniph._pHParams.pH7Cal);
Serial.print(" | ");
Serial.print("pH 4 cal: ");
Serial.print(miniph._pHParams.pH4Cal);
Serial.print(" | ");
Serial.print("pH 10 cal: ");
Serial.print(miniph._pHParams.pH10Cal);
Serial.print(" | ");
Serial.print("pH probe slope: ");
Serial.println(miniph._pHParams.pHStep);
Serial.print("eC Low cal: ");
//Serial.print(miniec._eCParams.eCLow);
Serial.print(" | ");
Serial.print("eC Low Ref: ");
//Serial.print(miniec._eCParams.eCRefLow);
Serial.print(" | ");
Serial.print("eC High cal: ");
//Serial.print(miniec._eCParams.eCHigh);
Serial.print(" | ");
Serial.println("eC High Ref: ");
//Serial.println(miniec._eCParams.eCRefHigh);
}
No country selected, please select your country to see shipping options.
No rates are available for shipping to .
Enter your email address if you'd like to be notified when MinipH I2C pH interface can be shipped to you:
Thanks! We'll let you know when the seller adds shipping rates for your country.
Shipping Rate | Tracked | Ships From | First Item | Additional Items |
---|---|---|---|---|
:
|
Quantity | Price |
---|---|
1-4 | $18.00 |
5-9 | $16.20 |
10-19 | $14.50 |
20-49 | $13.50 |
50+ | $11.75 |
Product: (None)
Documentation: (None)
Shipping: (None)
Communication: (None)
Elaine | Nov. 2, 2013
Olivier | Aug. 6, 2013
Jason | Aug. 6, 2013
No shipping info available.
Set destination country to see options
Shipping to starts at
Free shipping is available to !
Ships from
This item does not ship to .
More Info
Sign up to get notified when this product is back in stock!
Westminster, CO, United States of America
Ships from United States of America.
4 Reviews | 167 Orders
By clicking Register, you confirm that you accept our Terms & Conditions
We recognize our top users by making them a Tindarian. Tindarians have access to secret & unreleased features.
We look for the most active & best members of the Tindie community, and invite them to join. There isn't a selection process or form to fill out. The only way to become a Tindarian is by being a nice & active member of the Tindie community!