Example Code for Arduino-ORP Measurement
Last revision 2026/01/21
Measure ORP (Oxidation-Reduction Potential) values of a liquid using the Gravity Analog ORP Sensor PRO and output the results to the serial monitor. Users can learn how to connect the sensor to an Arduino, use the DFRobot_ORP_PRO library, and read analog signals to calculate ORP values.
Hardware Preparation
| Name | Model/SKU | Quantity | Purchase Link |
|---|---|---|---|
| DFRduino UNO Controller | Product-838 | 1 | DFRduino UNO Controller |
| Gravity Analog ORP Sensor PRO | SEN0464 | 1 | Gravity Analog ORP Sensor PRO |
Software Preparation
- Development Tool: Arduino IDE (compatible with most versions)
- Library: DFRobot_ORP_PRO Library (install via Arduino IDE Library Manager or ZIP import)
Wiring Diagram

Other Preparation Work
- Connect modules according to the wiring diagram.
- Ensure the Arduino is powered by a high-quality linear regulated power source or fully charged lithium battery (voltage close to 5V for best accuracy).
- Do not immerse the ORP probe fully in liquid (not completely waterproof).
- Upload the sample code to the Arduino before inserting the probe into the liquid.
Sample Code
#include "DFRobot_ORP_PRO.h"
#define PIN_ORP A1
#define ADC_RES 1024
#define V_REF 5000
float ADC_voltage;
DFRobot_ORP_PRO ORP(0);
void setup() {
Serial.begin(115200);
}
void loop() {
ADC_voltage = ((unsigned long)analogRead(PIN_ORP) * V_REF + ADC_RES / 2) / ADC_RES;
Serial.print("ORP value is : ");
Serial.print(ORP.getORP(ADC_voltage));
Serial.println("mV");
delay(1000);
}
Result
Serial monitor output (ORP measurement data):
ORP value is: 244 mV
ORP value is: 244 mV
ORP value is: 245 mV
ORP value is: 245 mV
ORP value is: 245 mV
Additional Information
- Measurement Note:
- Simply insert the terminal electrode into the measured liquid and read the data. ORP probes are not completely waterproof—do not immerse the probe fully.
- Use a stable 5V power supply for the Arduino to minimize voltage fluctuations and improve accuracy.
- ORP electrodes do not require calibration for normal use. Use ORP standards only to verify probe/signal converter functionality if results are questionable.
Was this article helpful?
