"Electrolysis of water" discussions do indeed often lead into woo-woo "science" that is not tolerated here. What TO DO with
colloidal silver produced by electrolysis of water will 99 44/100% (the "purity" of Ivory-brand soap) of the time lead directly into a woo-woo discussion. That is why the previous similar thread was terminated after it wandered away from electronics circuitry. So, please let us keep the discussion limited to electronics circuitry since that is what the ElectronicsPoint.com website is all about.
The constant-current circuit shown in post #11 is a very simple and convenient way to produce a constant current in a load referenced to power supply common. The only caveat is the regulator output voltage must be sufficiently high to drive the constant current through the load resistance. The
LM317 (see attached datasheet) output voltage is adjustable up to 37 volts and requires a minimum 3 volts drop across the regulator (from input to output) to operate properly, thus the maximum input voltage is 40 volts.
The regulator design is such that it tries to maintain a constant 1.25V reference voltage across the resistance connected between the "output" and the "adjust" terminals. Since the "adjust" terminal is a high-impedance input, the current through this resistance must be supplied from a load connected between power supply common and the "adjust" terminal. This current is supplied by the regulator "output" through the resistance connected between "output" and "adjust," said resistance setting the constant current through the load connected between "adjust" and power supply common. Figure 14 "Precision Current-Limiter Circuit" in the attached Texas Instruments datasheet provides an example of how this is done.
If there is no load (electrolysis probes removed from the water) the LM317 output voltage will rise to a maximum value determined by the input voltage. There will be no regulation of the output voltage under these conditions, but no harm to the regulator either. If the regulator is supplied with only 12V DC, the output voltage may not be high enough to cause the desired electrolysis current. You can raise the input voltage from 12V up to 40V (well filtered, and this is a maximum value!) or increase the area of the electrolysis electrodes immersed in the water to reach the desired 21mA electrolysis current. If neither approach is feasible for you, someone here at EP will have to re-think the problem and find a higher voltage constant-current solution.