I am using an ESP32 to create a pH sensor for my aquarium. This essentially all works fine except that for aquarium safety I have also installed a grounding probe and when this is in the tank I get noisy readings from my aquarium, e.g.
I had assumed that this was a grounding problem (since now the tank is grounded to the main ground but the ESP32 is using common ground), so did a quick test by (temporarily) connecting a spare GND pin on the ESP32 to the main ground. This clears up all the noise.
My question is, is it safe to permanently attach a GND GPIO of the ESP32 to the ground of an electrical socket? If so, does the diameter of the wire matter? If not, how else can I achieve this?
What is the "grounding sensor"?
Using a galvanically mains separated power supply I would not connect to mains ground. Suppose a short in the mains system. That will raise the voltage in the mains ground.
p.s. I added the grounding probe because I felt some tingling when touching various parts of the hood (containing the lighting) and the water. The lights are in the process of being replaced (waiting for delivery).
I didn't mention before that the pH probe gives wildly wrong readings when the lighting is switched on, which is rectified with the grounding probe so there must be a voltage leak somewhere. (I understand that a grounding probe is not the solution to such problems, it is a temporary fix while the new lighting arrives.) However, separate from this, having young children I wanted to keep the aquarium as safe as possible so installed the grounding probe, just in case.
Every time you make a measurement with an oscilloscope you are connecting one end of the circuit to the mains ground. Unless you have an isolation probe, which is likely to cost more than your oscilloscope.
The tingling feeling is the earth leakage from your mains power supply. This is nothing to be concerned about for a single device. There are strict limits on the size of this current leakage in the EU, so a properly approved power supply is not going to give you much of a problem.
Mains ground is for mains connected devices, not a good idea to go connecting ANYTHING not mains related to this earth conductor. Under certain circumstances for example, your "ground" could share certain mains circuit fault current.
Sounds to me like your"lighting hood" is either faulty or contains no earthing as required.
DIY is it...???
Any tingling is NOT normal and could, again, under certain circumstances, point to a much more serious mains related fault such as a bad neutral in an MEN system, and these can cause fatal injuries.
These can and do occur at any point in the mains system, and can be far away from the actual premises in which you reside.
These occurances are best check out by a qualified electrician/contractor.
We recently attended one such occurance (tingling) and after initial tests were done and clear on the premesis, the local supply authority were informed of the fault being external. They arrived and replaced faulty cabling in the street to 5 houses.
That is so. There is a bit of a cheat you can do. Use two probes, do not connect the probe grounds to your circuit. Instead, set both channels to the same input sensitivity (range). Go to the panel or menu that has "math". Select "A-B" and you will see the differential voltage between the channel A and channel B probe tip conductors. It will be not fully isolated in a safety sense, but it will decouple the scope earth ground from the measurements.
Re tingling... I once felt a strange tingling when sitting down at at table in a bar. Looking down, one side of an open 4kV neon sign transformer, sitting openly on the floor, touching the metal leg of the chair.
No, not DIY. But as I said, it is currently being replaced with an LED unit on which I am waiting for delivery so Iâm not too worried about that. The electrical installation in our flat is about 5 years old (full rewiring, breakers etc) so Iâm quite confident that it is all ok. Iâve added the earth probe to be sure that any electrical faults in the aquarium equipment do not go through us.
I am only really concerned whether attaching the esp32 ground to the mains ground is dangerous in any way and if so, if there is another way to solve it (preferably easily!)?
One thing to consider is that there may be a mains powered device in the water that is causing the tingling when you touch the properly grounded hood light. Perhaps a heater with a cracked glass envelope.
One test you can do is to put one of your volt meter probes in the water and the other on a known good ground. If you read voltage the source of the fault is in the water. Of course you must remove your ground electrode first.
I donât know about other places but in the United States any âtinglingâ is unacceptable. It is a sign of a ground fault and needs to be resolved.
So physics work different in the United Sates does it?
I think not.
It is a wonder that out of the millions of cable and satellite set top boxes my company shipped out to that country none were ever returned because of the tingly effect.
Please if you do not know much about how things work, stop scare mongering, and confusing people.
Perhaps instead of telling everyone how wrong they are you could explain your point. Having worked in the electrical and instrumentation field for 40+ years I know what I am talking about. If the source of the âtinglingâ is the electrical power supply then there is a fault that needs to be corrected. End of discussion. Unless you care to explain why electric shock from the electrical power distribution system is perfectly acceptable.
I was once called to investigate why a person was getting shocked when he touched a steam pipe while standing on a dry wooden ladder. It turned out that the steam that was blowing down by the ladder was giving it a static charge when he reached up and touched the valve to shut off the steam.
I am not talking about electric shocks, I am talking about the tingling feeling you get when you touch a ground with the other end connected to a switch mode power supply. This is not a shock it is a tingling feeling. There is a big big difference between the two.
All power supplies are permitted under the rules to have an earth (ground) leakage value.
Most power supply manufacturers specify this current which should always be lower than 3.5 mA as per the IEC-60950-1 regulations.
Yes there are conditions when you can get faults and those can cause shocks, I am not denying that. But the tingling feeling occurs when a doubly isolated system encounters a ground through your fingers. This is not a fault, and to say it is, belies the fact that you have a very simplistic, almost knee jerk reaction to electricity and being able to feel something.
Leakage current in power supplies may occur due to the EMC filters, which utilizes Y capacitors between the live and neutral conductors. This causes some leakage current to flow from the neutral or the live conductor to the power supply casing which is normally connected to the earth ground.
Most power supply manufacturers specify this current which should always be lower than 3.5 mA as per the IEC-60950-1 regulations. This ensures that the current is very low and cannot harm the person who touches or comes into contact with the power supply case. A power supply with a good earth ground reduces the leakage current significantly by providing a low resistance path to the ground.
That is a quote directly from the link you provided.
You are referencing current between the line and neutral conductors. In my electrical code the three conductors are called âthe ungrounded circuit conductorâ AKA âhotâ or âlineâ, the âgrounded circuit conductorâ AKA âneutralâ, and âthe equipment grounding conductorâ AKA âgroundâ or âearthâ or âearthing conductorâ or âgrounding conductorâ.
My electrical code does not allow the neutral conductor to be used as a protective ground. (another name for the âequipment grounding conductorâ). Anyone who has studied electricity will know that there is voltage drop along a current carrying conductor. If a human body comes between the conductor and earth ground there may be a sensible potential imposed. That is why you donât use the neutral as a ground.
All the above aside, we are not discussing EMC filters or SMPSâs. We are discussing an electric shock being received from an electrical appliance. I am more convinced the ever that the fault is in the water tank itself. Most aquariums I have seen are made of glass, a very good insulator. If current is flowing from the water inside the aquarium through a human touching the water and a most probably properly earthed electrical appliance then the fault is from something in the water.
Aquariums typically have submersible or partially submersible heaters and most of those heaters are made of glass, which can crack, allowing the water (a conductive liquid) to come in contact with the electricity inside.