Go Down

Topic: Arduino + PH probe in Aquarium. Ground Loop. Please help. (Read 17921 times) previous topic - next topic


Feb 05, 2013, 02:47 am Last Edit: Feb 05, 2013, 02:50 am by armeniki Reason: 1
Hey mate,

Again, not sure why you're fiddling with the mosfet... but I guess it will be a learning experience for you.

Here's my schematic, please note that whilst it does work I do have to post the disclaimer at the end of this message.  :)

If you have any questions, please make sure you read the data sheet first:


If still not sure, then post them here and we'll help you out.


This schematic is distributed in the hope that it will be useful for everyone but it is distributed without any warranty. It is provided "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the schematic is with you. Should the schematic prove defective, you assume the cost of all necessary servicing, repair or correction.
In no event will the author of the schematic be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use of the schematic, including but not limited to loss of life, money, the loss of data or data being rendered inaccurate, or any other losses sustained by you or third parties or a failure of the schematic to operate with any other device(s), even if the author has been advised of the possibility of such possibilities.


About grounding the water of the aquarium. I think that it might be a good idea. But for safety you could use a resistor of about 1M ohm between the water and the ground. Use a large (long) resistor or use two resistors of 1M in series. The will avoid a static charge to build up.

Earthing the aquarium water has always been an interesting topic for me because on the one hand one might think it's better for the fish if any inducted electricity is dissipated but on the other hand, it is used to "cover up" a more serious problem where there is an actual electrical fault leaking current into the watter - made even worse by the fact that there is no RCD or it has failed altogether.

Before doing this, it's probably best to figure out why you have stray currents in your setup.  To do this, use a multimeter with it set to display VAC and then earth one lead and dip the other in the water.  Chances are you will see some voltage there and in reality, it's more than likely that the equipment such your pumps are causing a bit of voltage due to inductance.  This is nothing to be concerned about.  However, you must do a second test with your multimeter.  This time set it to measure current (Amperes) and then put one lead to earth and the other to water (make sure you change the leads on the meter if needed to measure A).  At this point, if you see *ANY* current flowing, you have a dangerous situation where there is actual current flowing from your tank to the earth.  You need to then find the faulty piece of equipment by unplugging things until you see no more flow.  Earthing in this situation is NOT recommended and you are only covering up a serious problem.



Feb 05, 2013, 11:29 am Last Edit: Feb 05, 2013, 12:44 pm by Jensen_HJ Reason: 1
I fiddled a bit more with this and as a part of my project I built another lamp from wood (it will contain the electronics, feeders and such). The light tubes are now suspended about 25 cm over the water level (compared to about 5 cm before) and the problem seems to have disappeared, even when removing the ground from the water. I still keep the ballast grounded with an extra wire dipped in the water hooked up to a 1M resistor as suggested by Krodal. With a multimeter I can't measure anything, neither volts or amps, so I guess that it's finally working here.


Hi armeniki,
thank you very much for your schematics. Right now I'm in search for those parts to buy them.
When I receive them all I will try to implement that.

Greetings ;)


Hi everyone, based on the design of the circuit that armeniki showed I have some doubts.
The capacitor C1 and C2 in 1 side takes 5v and on the other side takes ground and from that same side it goes to one pin of the 6N137. Is this correct? Also the RX and TX passes in the middle of those capacitor but they only have 2 points of contact, that RX and TX only crosses those capacitor psychically or is only because of space to drawing it?

Also the Arduiino RX must connect to stamp TX, and arduino TX must connect to stamp RX, but in the drawing the RX is connected to RX and TX connect to TX through 6N137 chips, is this correct?

Anyone can help for I be able to reproduce this solution?



Jun 16, 2013, 06:06 pm Last Edit: Jun 29, 2013, 12:47 pm by goebish Reason: 1
Hi, has the circuit been removed from reply #15, I can't see it ?

I'm currently having the same issue (well, I guess) with Atlas Scientific Ph & Ec probes & stamps.

Readings are fine in calibration solutions but goes all the way when in the tank.

edit: looks like the problem comes from the Ec stamp or probe, if I remove it from the tank the Ph reading is spot on...

Does anybody got this working? I am really interested in buying this but I am not convinced yet after reading the whole thread  :smiley-roll-blue:


I had it working perfectly for one week, but now the reading is off and jittery again:

(started going "mad" again on 7.Jul)
It now reports 4.10Ph when I know the real value is 6.4 ...

I've to find what's wrong in my environment.


Hi, by that time I have saved the circuit from post 15.
Here it is:

Can anybody help to solve this problem with a picture of the system working?
There is also this:


Did anybody ever get this to work with this diagram?
Doesn't seem to work for me.

My next step was to remove the optoisolators and just try the DC-DC converter itself.
That didn't work either and I think the reason is that there's supposed to be an inductor/resistor combination on the output side as per the murata datasheet p4, but I don't really know.

Thanks for any help.

ok... pretty sure the problem with that diagram is that the lines that cross over each other next to pin 8 (ie top right pin of U2) should be a connection. I haven't fully examined U1 yet, but I think that similarly.... pin8 needs +5V and a 330ohm resistor to pin6 (which is also the output).... Basically pin8 and pin5 go to +5 and Gnd using the DC-DC converter.... Whichever side of the DC-DC converter that you use depends upon which side the output (pin 6) is going to.

Pins 2 and 3 are the input signal voltage difference (between gnd and input or +5V and input). The high side goes on pin 2... So you could do...+5V (from source side) to pin2 and input pin3.
Or you could do input to pin2 and GND to pin3.
I think the output side is inverted. So if you do the first method, the output will be the same as the input.

Be careful about the input pins...You need a resistor. It's not clear how much. This diagram shows 430ohm. I was attempting to use a 1k, but I accidentally used a 1000ohm resistor and fried a few things!.... Those color bands look so much alike.

Go Up