Protect circuit from overvoltage

It is, but you need to make sure you get the right one, there are 4 configurations of BAT54.
bat54.pdf (87.0 KB)

You circuit in post #20, will not work as the two BAT54 diodes are fwd biased.

What is the V1 source?
I think you are over thinking your design.

Can you please post a link to the moisture sensor?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

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.


V1 Source is a Switching Stepdown regulator set to 5.4v

I need the BAT54S?

Does D1/D2 not initially see 120v?

that circuit seems to work to protect ADC IN from DC V2 120V, but what about v1 +5v? and what changes when V2 is a AC sinewave?

Here i think the "V3" is okay for introducing 120Vac into the circuit? I have a couple of questions.

when i test with V2, the voltage at ADC looks okay according to the simulator but does the diode initially see +100v before conducting?

How is this series of diodes reducing the voltage?

How is VM4 only 5.4v with V2 connected?

Why when i connect V3 why do voltages drop so low?

V3=CONNECTED,

V2=CONNECTED,

I need to protect not only ADC IN from the high voltage but also prevent HV from getting onto the 5v rail through the Moisture Sensors Vin wire

AC is good, because it slows down corrosion, but why120volt.
Why not use 5volt AC (50% PWM) generated by an Arduino pin.
Leo..

I'm sorry for the confusion, I'm trying lol.

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,

R2 is the moisture sensor, between 10k-200kohm

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..

That dont sound like a bad idea. i like these suggestions.

The moisture sensors are disposable really, They will probably be OK for now but a redesign is in the future. they should never see a drop of water.

If i configure like you say in #26, How bad would it be if some 120vac leaked onto the sensors ground wire?

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...

Am i off to a good start ?

I think i have a decent range now?

This is where over voltage could be introduced,

Three options that do not need ain protection:

  1. Start with preventing 120 V to get into the water
  2. Prevent 120 V to go into your measurement device (capacitive measurement)
  3. 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

120volt on one side of R4, and "V1 + a diode drop" on the other side.
about 115volt / 10k = 0.0115A = 11.5mA.

Yes, you could increase that value to stay under 1/4watt.
Do increase R2 to 100k though, for max A/D values.
Leo..

Okay then in this circuit i still have i think an acceptable range of ADC.

this would be

(120 - V1 + FORWARD VOLTAGE DROP) / R4 = 1.15ma
(120 - 5.4 + .4) / 100000 = 1.15ma.

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.

does it let other edit this without an account? probably not

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...