The moisture sensor is HomeMade, its 2 4x4 inch pieces of copper tape insulted between a paper towel. when the paper towel becomes wet it creates a resistive path between the copper plates allowing voltage to flow.
The 120v sources V3/V2 are only for introducing a rare instance of over voltage into the circuit. I put them there like that so i can switch between them and try to learn how the circuit behaves.
The moisture sensor has 2 wire, 1 for analog ref/ 5Vcc in. and the other wire goes to ADC IN.
I need to protect ADC IN and the 5v supply wire to the moisture sensor/R2 from over voltage,
If you connect the sensor between analogue input and ground, then you only have the analogue input to worry about. The other half of the voltage divider can be a 100k resistor between analogue input and 5volt. 100k for max resolution, because that seems to be in the middle of your sensor range.
Maybe better to connect the 100k pull up not to 5volt, but to a digital pin.
Set the pin HIGH just before you measure and LOW after that, to reduce corrosion.
A capacitive soil moisture sensor (Google it) has no contact with soil/water, so should be more accurate and last a lot longer.
Leo..
You are screwing your measurement. Only 1/1000 of your Vcc will be available for your measurement as your moisture resistor is 100 ohm and your series resistance is 100 kohm...
Prevent 120 V to go into your measurement device (capacitive measurement)
Take care that your device is fully isolated (use batteries or separated power supply). Put the whole lot in a proper box. Doesn't matter if it receives 120V as long as it is not connected to ground, you, or anything else. So basically your problem would then be to transfer the measurement to the user. LCD screen would work, but optocoupler or wireless communication will also work if you need your measurement result elsewhere.
I think i like the idea of using ground for sensor better, Good idea for corrosion protection, I think my last circuit would work. Should R4 be 1/2watt resistor? When ac is connected to this circuit from leaking into sensors, This like i said causes voltage to become low, so either way i think ill know if there is a problem with the sensor, wet/voltage leaking into it/ both.
How long do you think that circuit "#29", assuming its correct, would handle the 120v?
Last circuit makes sense. If R3 is your sensor
Max fault current could be (120 - 5) / 10000 = 0.0115A or 11.5mA.
Max power in resistor could be (120 - 5) * 0.0115 = 1.3watt
There are more Schottky diodes than the BAT54.
The 1N5819 should be in every toolbox.
Leo..
I "10000" you talking about R4 or R3? Does 1.3 watts seem like alot? I have to wire 20 sensors like this. So I'd like to keep the connection count as low as possible.
Could you explain this,
(120 - 5) / 10000 = 0.0115A or 11.5mA.
Like this,
(Inputvoltage - v1?) / r4 is that correct?
Do you think I could get the current through the resistor to below 1/4 watt and still have a usable range for ADC signal
Where is your measurement probe in this circuit?
In your last scheme it was only 100 ohm. So you would need a second resistor with approx. the same value in series...
Im sorry i dont fully understand what you mean, The measurement probe is R6. the resistance of it varies based on dry/OPEN CIRCUIT fully saturated 10k/200k depending on type of water.
How is this all earthed? How do you prevent 120 V entering at ground? At least your probe us connected to ground via its 10 k to 200 kohm resistance...
This might be dangerous. Or cause a earth leakage detection at your mains installation (which would be good from safety point of view).
It would be best to label R6 as measurement probe 10 kohm/200 kohm or 50 kohm as your simulater might not accept a range of values.
Now it is at 1 ohm.... and that is far from reality...