Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -rf639bbc47806ddcefdbdce78a377cd87050872e5 -r0b93322875e9aa5719941574fde93d3042dc6796 --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision f639bbc47806ddcefdbdce78a377cd87050872e5) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 0b93322875e9aa5719941574fde93d3042dc6796) @@ -68,8 +68,11 @@ #define FLOW_SAMPLES_TO_AVERAGE ( 250 / TASK_PRIORITY_INTERVAL ) ///< Averaging flow data over 250 ms intervals. #define FLOW_AVERAGE_MULTIPLIER ( 1.0F / (F32)FLOW_SAMPLES_TO_AVERAGE ) ///< Optimization - multiplying is faster than dividing. +// The ADC to LPM factor is calculated using the following steps: +// 0.1 to 2 LPM range +// 110000 pulses/liter +// For 2 LPM => 2LPM x 110000 pulses/liter * 1 edges/pulse * 1 min/60 seconds #define RO_FLOW_ADC_TO_LPM_FACTOR 272.72F ///< Conversion factor from ADC counts to LPM (liters/min) for RO flow rate (multiply this by inverse of FPGA reading). - #define ROP_FLOW_TO_PWM_SLOPE 0.1F ///< Slope of flow to PWM line equation. #define ROP_FLOW_TO_PWM_INTERCEPT 0.0F ///< Intercept of flow to PWM line equation.