Help Wanted Reviewing Capacitive Moisture Sensor

ronsimpson

Joined Oct 7, 2019
4,647
My assumption is there is a ground layer under the top of the board and not the bottom half.

I have never used this IC. It appears to me there are many IO pins with the same function.
When you make the schematic and make the layout, you are free to do things. Many companies have many different people and they must do their job without asking questions. You are using pins 8&9 to connect to the sensor. I think any pin from 8 to 19 will work for this job. Look at the layout and pick pins that make the traces short and easy to connect to.
Same thing again.
That address pin goes to VCC but could go to Ground. (assuming there is only one of these on this bus) You are free to choose where you want the address pin to go. Ground might be easy and VCC might be hard. Again your choice.

I see you have 4.7k pull up resistors. If there are 10 boards on this bus, there will be 470 ohms pulling up. Not good. Leave a place for resistors, you can change to 470k or (not populated) if you want. Just saying you do not need 4.7K at each point along the way, just one.
 

MrChips

Joined Oct 2, 2009
34,628
Again, what are the functions of C1 and C2?
Are the capacitance values correct for their purpose?
The value of C2 doesn't make sense.

If C1 is meant to decouple the power rails of U3, then that is how it should be drawn in the schematics, across VDD and VSS.
 

Thread Starter

CurtCircuit

Joined Dec 19, 2025
18
My assumption is there is a ground layer under the top of the board and not the bottom half.

I have never used this IC. It appears to me there are many IO pins with the same function.
When you make the schematic and make the layout, you are free to do things. Many companies have many different people and they must do their job without asking questions. You are using pins 8&9 to connect to the sensor. I think any pin from 8 to 19 will work for this job. Look at the layout and pick pins that make the traces short and easy to connect to.
Same thing again.
That address pin goes to VCC but could go to Ground. (assuming there is only one of these on this bus) You are free to choose where you want the address pin to go. Ground might be easy and VCC might be hard. Again your choice.

I see you have 4.7k pull up resistors. If there are 10 boards on this bus, there will be 470 ohms pulling up. Not good. Leave a place for resistors, you can change to 470k or (not populated) if you want. Just saying you do not need 4.7K at each point along the way, just one.
I took your advice on switching the pins for the two electrodes to make the design more symmetrical. I also did not have a ground plane on the upper back side before, but I added one. I also swapped the addr pin to GND like mentioned and cleaned up the traces involved.
 

Attachments

Thread Starter

CurtCircuit

Joined Dec 19, 2025
18
Again, what are the functions of C1 and C2?
Are the capacitance values correct for their purpose?
The value of C2 doesn't make sense.

If C1 is meant to decouple the power rails of U3, then that is how it should be drawn in the schematics, across VDD and VSS.
Does this fix what you're referencing with the VSS and VDD connection to the decoupling capacitor? I'm going to fix the capacitor values.
 

Attachments

Last edited:

MrChips

Joined Oct 2, 2009
34,628
Does this fix what you're referencing?
On a schematic drawing, I would hang capacitor C1 off U3 at VDD (pin-20). The bottom leg of C1 goes to a GND symbol.
Similarly, Vss (pin-6) goes to a GND symbol. You don't have to show a connection to the input GND connector. It would be connected to its own GND symbol. In the PCB CAD layout, they are all the same net.

1766251874026.png


Also, there are two styles of drawing devices in schematics.

(1) Draw pins in numerical order as per the IC layout. This is called a wiring diagram,

(2) Draw signals in functional order, regardless of pin numbering, for example, inputs on the left, outputs on the right, power supply at top and/or bottom.

I prefer style (2) because if makes the function of the components and circuits clearer.

Here is an example of a 555-timer circuit drawn using style (2).

1766252451340.png

This is a wiring diagram of a 555-timer circuit.

555-timer wiring diagram.jpg
 

Thread Starter

CurtCircuit

Joined Dec 19, 2025
18
On a schematic drawing, I would hang capacitor C1 off U3 at VDD (pin-20). The bottom leg of C1 goes to a GND symbol.
Similarly, Vss (pin-6) goes to a GND symbol. You don't have to show a connection to the input GND connector. It would be connected to its own GND symbol. In the PCB CAD layout, they are all the same net.

View attachment 360885


Also, there are two styles of drawing devices in schematics.

(1) Draw pins in numerical order as per the IC layout. This is called a wiring diagram,

(2) Draw signals in functional order, regardless of pin numbering, for example, inputs on the left, outputs on the right, power supply at top and/or bottom.

I prefer style (2) because if makes the function of the components and circuits clearer.

Here is an example of a 555-timer circuit drawn using style (2).

View attachment 360888

This is a wiring diagram of a 555-timer circuit.

View attachment 360892
Is this what you meant?
 

Attachments

ronsimpson

Joined Oct 7, 2019
4,647
Post #8; is GND and GND the same? I think so but I have been fooled too many times. Sometimes a "GND" is a comment and not a net name.
 

MrChips

Joined Oct 2, 2009
34,628
I hate to be picky but since you are now learning, you need to know these things before max shows up.
Know the difference in ground symbols. We draw ground symbols pointing downwards.

1766257673321.png
 

Thread Starter

CurtCircuit

Joined Dec 19, 2025
18
On a schematic drawing, I would hang capacitor C1 off U3 at VDD (pin-20). The bottom leg of C1 goes to a GND symbol.
Similarly, Vss (pin-6) goes to a GND symbol. You don't have to show a connection to the input GND connector. It would be connected to its own GND symbol. In the PCB CAD layout, they are all the same net.
The board's power has to also go by that decoupling capacitor.
 

Attachments

MrChips

Joined Oct 2, 2009
34,628
The board's power has to also go by that decoupling capacitor.
We understand that. You do not have to show a wiring connection to nodes of the same net. Just label them appropriately. The same goes for GND connections. The goal is to make the schematics less congested while indicating component function.

AAC Ground Sensor Module.jpg
 

Thread Starter

CurtCircuit

Joined Dec 19, 2025
18
We understand that. You do not have to show a wiring connection to nodes of the same net. Just label them appropriately. The same goes for GND connections. The goal is to make the schematics less congested while indicating component function.

View attachment 360910
Do you know if my current design for the circuit board should work? I'm worried I'm gonna order it, it will show up, and then I'll find something I missed or something necessary for it to work.
 

ronsimpson

Joined Oct 7, 2019
4,647
I don't know that IC. I looked at the data sheet and decided I am not getting paid enough to look through all that. So, no, I don't know if it will work.
Please tell us how you know how much moisture is there. What is the idea?
 

Thread Starter

CurtCircuit

Joined Dec 19, 2025
18
Please tell us how you know how much moisture is there. What is the idea?
The two copper electrodes at the bottom of the board measure the dielectric constant of the soil. Water has a much higher dielectricity than soil, so you can tell generally how wet the soil is. The IC turns the analog values into digital values that can be shared by I2C to the microcontroller.
 

ronsimpson

Joined Oct 7, 2019
4,647
Water has a much higher dielectricity
Does the IC make an ac signal on one electrode and then measures how much signal appears on the other plate?
I remember people arguing about the copper electrodes. Some soil will eat up copper in time. I think people were putting silkscreen and solder mask over the copper to protect it, but other people said that will stop the measurements. I don't remember the talk very well. I think some people used exposed copper and measured resistance and some insulated the copper and measured capacitance.
 

Thread Starter

CurtCircuit

Joined Dec 19, 2025
18
Does the IC make an ac signal on one electrode and then measures how much signal appears on the other plate?
Yes, that's how it works. And I don't mind too much about the lifetime of the copper because it's meant to be in a consumer electronics product, and it should last around a year in the ground.
 

Thread Starter

CurtCircuit

Joined Dec 19, 2025
18
I think people were putting silkscreen and solder mask over the copper to protect it, but other people said that will stop the measurements. I don't remember the talk very well. I think some people used exposed copper and measured resistance and some insulated the copper and measured capacitance.
I researched this and apparently you can put a silicone coat over it, it will mess with the readings but the offset is constant, so it's easy to program around that.
 

MrChips

Joined Oct 2, 2009
34,628
If you are using an MCU to measure soil moisture, you don’t need an external IC. You can do it with the MCU alone. I can show you how.

For electrodes, use platinum wire or graphite.
 
Top