I/O pH ORP block
The I/O pH ORP block supports connecting pH and ORP electrode sensors for measuring water quality. It also has a general I/O pin that can be used for a digital or analog (3.3V) connection and two switched relay outputs that have a common terminal.
ph and ORP sensors are often used to measure water quality. They are passive electrodes that require special signal conditioning electronics. They are connected to the pH-, pH+, ORP-, and ORP+ screw terminals on the back of the module. The sensors will output analog values between 0 and 670 over their full range. You can calibrate the sensors using standard test solutions. A lower pH will be a higher number, a higher pH a lower number. Neutral pH will output approximately 330 on the “Out 1 pH” terminal. ORP oxidation range will be a higher number and ORP reduction range will be a lower number (than neutral 330). Note that the typical lifetime of sensor probes is 12 - 18 months and they need to be stored in solution. Please read your sensor probe documentation for more information.
I/O pH ORP Connector - Looking into back
When using the relay outputs, connect the ground for the power supply powering your loads (solenoids, valves, etc) to the Relay Common terminal. Connect one end of your loads to the positive voltage of your power supply and the other end of your loads to the Relay 1 or Relay 2 terminal. The relay outputs are rated at 0 - 60 V DC max and 700 mA current max. If you need to switch higher voltages or AC power, you can connect inexpensive external relay adapters to the Interstacks I/O Expander block.
For advanced users, included here is the full block detail spec sheet with all properties and terminals.
IO pH ORP Block
T (uuid): Module Type
F (int): Firmware Version
HT1_Mode through HT3_Mode (int): Define behavior of I/O1 - I/O 3
0 nothing - never does anything.
1 Digital Output. Input terminal character '0' or '1' will make I/O pin low or high.
2 Digital Input. Output terminal will output character '0' or '1' dependent on state of I/O pin when requested by sending any message to the corresponding input terminal.
3 Digital Input Send Change. Will output on any state change.
4 Analog input on demand.
Output terminal will output an int (0 - 1000) based on analog voltage of I/O pin when requested by sending any message to the corresponding input terminal.
5 Analog input send change. Will output analog value on any change while filtering based on the value of the HTx_Hysteresis (hysteresis) property for that pin.
6 Analog input with compare. Outputs a ‘1’ on change to above HTx_Threshold property. Outputs a ‘0’ on change to below comparison value property HTx_Threshold for that pin.
7 Analog input, send every x milliseconds based on update rate property HTx_Rate for that pin.
8 Digital input, accumulate duty cycle - Send update every HTx_Rate mS.
Accumulates the amount of high signal during update and sends this as value (currently samples once per mS).
(Have used with dust sensors (particulates)).
9 Digital edge count - send number of edges counted every HTx_Rate mS. (min 1ms pulses)
HT1_Hysteresis through HT3_Hysteresis (int): Hysterisis value for analog input send on change. default is 5. (multiples of about 3mV).
Each input used as analog input has its own hysterisis property, hence HT1_Hysteresis through HT8_Hyesteresis.
If analog input signal is noisy, use a higher value to reduce automatic value update sends.
HT1_Threshold through HT3_Threshold (int): Comparison value for analog input compare mode. default is 500.
HT1_Rate through HT3_Rate (int): Update rate, in milliseconds (1000 is 1 second), for analog input update rate mode.
Voltage (int): 0 to set external power terminal to 5V. 1 for 3.3V (default).
“Properties” - in (List or Property Name string): To set property. Send property name, Value. For example [’N’,’netname’].
To get property, just send property name. For example. ’N'
“Presponse” - out (List or True) : On set, responds with True when done.
On get, responds with list. For example [’N’, ‘netname’].
“Read pH” - Any message will send value out of output terminal if HT1_Mode set to 4.
“Read ORP” - Any message will send value out of output terminal if HT2_Mode set to 4.
Terminals In and out 3, . See above description of various properties 1-3 (HTx_Mode, HTx_Hysteresis, HTx_Threshold, HTx_Rate).
"Out 1 pH” Uses HT1 properties for analog inputs.
“Out 2 ORP” Uses HT2 properties for analog inputs.
“In 3” Uses HT3 properties.
“Out 3” Uses HT3 properties.
If property defines I/O pin as output, character '0' makes pin low, '1' high.
If property defines I/O pin as digital input, will output character '0' or '1' based on level on I/O pin.
If property defines I/O pin as analog input, will output int with I/O pin analog voltage. Outputs a number 0 - 1000.
If analog input with compare, outputs on change character ‘0’ if below compare value and ‘1’ if above.
“Relay 1” - Input terminal character '0' or '1' will make relay 1 open or closed.
“Relay 2” - Input terminal character '0' or '1' will make relay 2 open or closed.
Note: Digital inputs configured with weak pullups. so can connect buttons without external resistor.
Texas Instruments - Designing with pH Electrodes App Note
Refer to documentation on many other topics at interstacks.com/support.
Please email firstname.lastname@example.org with any questions.