0

Background

I have a raspberry pi with a moisture sensor that suffers from corrosion. My setup is similar to the one described in this raspberrypi.stackexchange question about corrosion of a moisture sensor.

A solution to this problem, suggested in this answer, is to coat the PCB in gold finishing.

This is something I would like to try.

Question

However, as I am a complete newby to the field, I do not know what section exactly to "gold finish". Therefore my questions are:

Moisture sensor with two regions highlighted: the connections in green and the rods in orange

  1. Do I need to cover the "connections section" with gold finish? By which I mean the section where the pins are connected to the wires. See the green highlighted area in the above figure.

    I can see that protecting this area might be smart, especially since this sensor is used in a moist environment, but I do not see how gold plating the "connections section" prevents corrosion, which happens on the "rods section".

  2. Do I need to cover the "rods section" with gold finish? By which I mean the two "pointy" parts of the sensor. See the orange highlighted area in the above figure.

    I can see that this might prevent corrosion, but won't this stop the sensor from working by covering its rods?

MuadDev
  • 103
  • 1
  • 3
  • *"I do not see how that would prevent corrosion"* The reason to use gold is that gold is very resistant to corrosion. (If I remember my chemistry, it will corrode in a mixture of sulfuric and hydrochloric acid but that is a rather uncommon fluid...) – Oldfart Aug 18 '19 at 12:29
  • "Gold finish" is usually just a box that you can tick when ordering PCBs from a manufacturer. It will apply to the whole board - all exposed copper areas to be exact. – Turbo J Aug 18 '19 at 12:39
  • @Oldfart Actually, nitric acid and hydrochloric acid, it's called aqua regia. :) – Long Pham Aug 18 '19 at 12:39
  • @Oldfart what I meant was more along the lines of "I do not see how gold plating the "connections section" prevents corrosion, which happens on the "rods section". I will adjust this in the question. – MuadDev Aug 18 '19 at 12:41
  • @LongPham Thank you, I stand corrected, (Good I went into eletronics and not chemistry) I can't edit anymore as the 5 minutes are gone. – Oldfart Aug 18 '19 at 12:42
  • @TurboJ that would have been nice to do. But I already have the components so I wanted to do this myself. I assumed I could buy this finish at a store somewhere and apply it like a thin layer of paint. But from your response it seems that is not a suitable option, am I correct? – MuadDev Aug 18 '19 at 12:44
  • You could gold plate it yourself, but it would be very expensive and involve the use of some unpleasant chemicals. Far easier to get the board made with an ENIG finish to begin with. – Hearth Aug 18 '19 at 12:47
  • 1
    You should be using AC on the probe to minimise electrolysis. Add your schematic. – Transistor Aug 18 '19 at 13:28
  • Why do you need gold specifically? Why not simply coat it in epoxy or some other thin film and amplify the signal if it is too low? I bet using anything else than gold is easier and less expensive. – Harry Svensson Aug 18 '19 at 13:50
  • @HarrySvensson: This moisture sensor works by reading the voltage. For that, the electrodes must be in contact with the soil. – JRE Aug 18 '19 at 14:06
  • @JRE oh, I thought it used capacitive sensing. My bad. – Harry Svensson Aug 18 '19 at 14:15
  • @Transistor as I am a Total newby I have no idea how to use AC with this system and my pi, any guide would be more than welcome! – MuadDev Aug 18 '19 at 14:50

2 Answers2

4

Many of the “hobbyist” soil probe circuit designs actually pass DC current through the probe, which inevitably results in electrolytic corrosion regardless of the metals used. If you only briefly power such a horrible simple circuit and with a low duty cycle you will get less corrosion per unit time. There also should be no flow to ground when off.

Gold will help with corrosion when not in use (you can bury a lump of gold for 100 years and it will look the same when dug up) but not with electrolytic corrosion, in fact it would just reverse the process by which thick layers of gold are sometimes applied (electroplating). The layer of gold on an ENIG PCB is less than a tenth of a micron in thickness typically so it doesn’t take much to strip it down to the nickel barrier.

Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842
  • Thanks for the useful background info about DC current and the gold plating! However, I feel it does not directly address my questions about what parts need to be plated with gold precisely. Although I do now know that it probably will not be feasible for me to do this myself, thanks for that! – MuadDev Aug 18 '19 at 14:54
  • You design and order the PCB made to your specifications with ENIG (cheap) or hard gold (relatively expensive). Any place you don't put solder mask will be covered with a thin layer of gold. The design shown is appropriate- all the mask is removed from areas in contact with the soil, and the mask is only in place to aid soldering in the "dry" area. But, as stated above, that won't help if your circuit is bad, in fact it could make things worse. – Spehro Pefhany Aug 18 '19 at 15:07
  • 1
    Agreed, don't do it, won't help. What could be useful, if you reverse the polarity to put back the layer. Even better, replace the sensor with a capacitive one! They're relatively cheap, and they're completely covered, so no corrosion happens. – Nyos Aug 19 '19 at 01:42
1

Gold can help reduce corrosion, so plating the parts in contact with the soil will help. You don't need to plate the parts that stay out of the dirt, but it won't cause problems if you do.

Gold conducts nearly as well as copper, so the plating in no way interferes with the function of the sensor.

Gold itself doesn't really corrode. That's really the best reason why jewelry is made from it - who wants a bronze ring that turns your finger green from corrosion? Gold just doesn't do that.

The thing is, that gold will "wander" away from the surfaces when placed in a conductive solution. That's part of how electroplating works. Moist dirt is a conductive solution - it has to be, or else the electrodes couldn't detect moisture. The amount of water in the dirt changes the electrical resistance of the dirt, which the electrodes detect.

Over time, the gold from the electrodes will "electroplate" the soil around them. This removes gold from the plated electrodes. At some point, the gold will leave bare patches on the copper and then you get corrosion.

So, gold plating isn't a complete solution but it is better than bare copper.

If you need to plate existing probes, then you could try a small electroplating kit. That one costs around $60. The plating will be thin and not especially even.

Or, you do a simple layout with the required circuitry and have it made from a PCB service. Specify gold plating, and you get a good, even gold plate on all bare surfaces. You just leave holes in the solder mask for your electrodes.


A longer lasting solution is to use capacitive sensing. You might also look into using graphite rods as your spikes, as they don't corrode. Stainless steel might be an alternative, but then you'd need to use AC instead of DC.

JRE
  • 67,678
  • 8
  • 104
  • 179
  • @jusaca: You are right. Corrected the conductivity of gold. – JRE Aug 18 '19 at 13:42
  • Thanks for explaining why the gold is useful, where to apply it and how this potentially could be done. But seeing your answer I would probably go with capactive sensing and/or graphite rods. Also the stainless steel option seems interesting, however I do not know anything about using my Pi with AC current. If you could link to a useful guide/demo about this than that would be fantastic! Thanks anyway! – MuadDev Aug 18 '19 at 14:57
  • I wouldn't say 70% as conductive is "nearly as well". It's still a good conductor but it's a far cry from copper. – Hearth Aug 18 '19 at 15:26