How to deal with parasitic induction

I am having a problem detecting when a 24 VAC sprinkler circuit is on. This should be pretty easy, but it is not working.

I am getting false ON reporting through the Arduino DI port. I never get false OFF reporting. The false ON reporting sometimes waffles on/off for several hours at very short interervals – like ½ sec on, ½ sec off. At other times it incorrectly reports solid ON (without waffles) for hours at a time. It always correctly reports ON when it is actually on. Although I have not been able to prove it, I believe that the problem is caused by parasitic induction.

A schematic of the configuration is attached.

The sprinkler controller is a Richdel mechanical sprinkler controller, mounted in the garage. It is powered by a 24VAC transformer in the basement, and is connected by zipcord wire. There is a 3-position “manual” switch on the controller which I have physically moved into the basement for convenience. The switch is connected to the controller by an unsheathed “cable” of three conductor twisted leads. The switch positions are Off (sprinklers never run), Daily (sprinklers run every day), and Auto (sprinklers run according to the day wheel / switch in the controller. My wheel / switch is set for Monday, Wednesday and Friday.

The circuit is designed for the Arduino to detect the “enabled” state of the sprinkler controller. In the enabled state, reading the DI port should get a value of 1. In this state the controller will operate the sprinkler valves next time the motor driven rotary switch engages. As the diagram shows, the enabled state will occur when the manual switch is in the Daily position, or when the manual switch is in the Auto position and the day is Monday, Wednesday or Friday. At all other times (when the manual switch is OFF, or the switch is set to Auto, but the day is not Monday, Wednesday or Friday) the controller is in the disabled state and reading the DI port should get a value of 0.

I constructed and tested an opto detector using 2 parallel but opposite LEDs and a 32k ohm current limiting resistor. I have made and used many of these and they work quite well. One of the LEDs is encased in shrink tubing with an LDR. The other is mounted on a prototype board. In addition to its “backflow” function in the AC circuit, the 2nd LED provides a visual indication of the circuit for my occasional curiosity. I debounce the Arduino input by reading the DI port for 250 ms and then averaging the result. I used this very opto detector in a different 24VAC circuit last year.

The Arduino, the manual switch, and the transformer are all in the basement, which is about 35 feet away from the controller in the garage.

At times when the Arduino should be reporting an OFF condition there is a 2.3 VAC drop across the opto detector. This should be 0 VAC. I believe that the 2.3 VAC is caused by induced current in the opto detector circuit. I think the 2.3 VAC is high enough to pass current through the LED (approximately 0.7V required for turn-on). I do not have the equipment to measure the AC current through the induced voltage circuit. It seems to be enough to turn on the LED with a rather dim light.

There is also a very odd behavior of this circuit that I believe is important to consider. During times when the sprinklers DO NOT run (because the manusal switch is OFF, or the switch is in Auto and this is not a run day), then the DI port reports a solid ON state before and after the rotary switch engages, and an OFF state when the rotary switch is engaged with each of the solenoid circuits (the sprinkler valve would be ON if it was a run day).

My speculation is that this odd behavior may be explained as follows. When the rotary switch rotates into the ON position for a solenoid, it provides a new direct return path for the induced current. I think the voltage source (induced) is too weak, and the current is too low to affect the solenoid. But I think it, or the incandescent run light, essentially provides a shunt around the opto detector. This significantly reduces the induced voltage across the opto detector. The reduced voltage is below 0.7V, so the previously dimly lit LED turns off, and the DI reports a value of 0.

The zip cord and the 3-conductor wire for the switch are routed along a parallel path from the basement to the controller in the garage, a distance of about 35 feet. I thought this was the cause of the induced current. To prove this I ran a long extension cord from the Arduino in the basement, up the steps, around the corner, through the door and down the length of the garage to the sprinkler controller. I removed the 24VAC zipcord connections from the transformer and the sprinkler controller and powered the sprinkler controller through the extension cord. This made no difference. I then re-powered the controller with the zip cord, and ran the signal wire for the opto detector through the extension cord. This also made no difference.

Next, based on my speculation about the shunt that occurs when the rotary switch engages, and in spite of my inability to prove the source or cause of the inductance, I attempted to “fix” the erroneous reporting by installing a resistor, with a somewhat arbitrarily chosen value of 20k ohm, in parallel with the opto detector. When the sprinkler circuit is OFF, this provides an alternate path around the opto detector for the induced current and results in a DI value of 0. When the sprinkler circuit is ON, there is a full 24 VAC drop across the opto detector (as well as the parallel “shunt” resistor), and the DI reports a value of 1. This seems to work.

My questions are:

#1 Am I correct in believing that the problem is parasitic induction? If not, then what else might it be?

#2 Is a “shunt” resistor the best way to deal with this problem? Or is there a better method of reducing or eliminating the parasitic induction?

Most of the articles I have read about eliminating parasitic induction deal with high frequency circuits, in the megacycle or gigacycle range. My circuit is 60 cycle.

sprinklerWiring.pdf (191.8 KB)

There are no relays in any of this circuitry, and the Arduino is only powering a voltage divider consisting of an LDR and a 32k resistor. Was this post intended for a different thread?

Indeed it was, my mistake.

No, I would add a capacitor across the 24VAC line near the opto isolator (on the 24V side of the isolator resistor) Perhaps a 0.1µF (would be like 20K ohms at 60Hz).

Your assumption of the absence of high frequencies is not quite right. The voltage "spikes" caused by the solenoids and perhaps other sources not in your schematic have high frequency content.

Consider the upper frequency can be estimated by fr = 0.35/ (rise time of the spike). So for fast spikes the high frequency content can be substantial.

Techie note: Actually fr is the -3db point of the frequency content.

Knowing just how you have organised your wiring - decent photographs - would be critical to determining the problem.

Hi, @cdj15
Sprinkler Circuit Diagram;

Have you tried to use an semiconductor OptoCoupler, rather than an LDR?

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

Hi,
Use a Opto-coupler and rectify and filter the DC, that should provide enough impedance to help fix the problem.
sprinkleraaa

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

While parasitic induction is a thing it only becomes significant at high frequencies, so it is not the cause of your problems.

That sounds like a floating input.
This is how you should treat inputs:-
http://www.thebox.myzen.co.uk/Tutorial/Inputs.html

Hi,
What is the resistor value in series with your LDR?
Have you got the LED and LDR sealed together and in darkness so no other light hits the LDR but the LED?

A picture of your project would help immensly.

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

Thank you JohnRob for your response suggesting the use of a capacitor instead of the resistor.

As I noted above, over several days when the sprinklers are off (manual switch in OFF position) there is significant variation in the erroneous reporting by the original circuit. For the opto detector this should be an open circuit and measure 0 VAC, but it actually measures about 2.12 VAC, with some +/- variation.

In order to characterize the circuit and understand what fixes might work and which don’t, I monitored the configuration and observed the frequency of erroneous reporting. Based on my initial observations I chose an interval of 4 days. With the original circuit there was never a 4 day interval without errors. Unfortunately, when this time interval is applied to each circuit variation it significantly slows down the ability to report results.

After applying the resistive fix I saw no errors in a 4 day interval. As noted above, the voltage across the parallel connected 20k resistor & opto detector shown in the diagram was 0.27 VAC. After receiving JohnRob’s resonse I replaced the 20k resistor with various capacitors and observed the following measurements across the parallel circuit. The “addl R” column is the calculated impedence based on the capacitor, and assuming a 60 cycle interference. The “addl current” column is the additional current draw from the transformer when the sprinklers are in the enabled state and there is 24 VAC across the circuit.

circuit		        measured	addl R.	addl current

original circuit	2.12 VAC	0	       0
w/20k resistor	    0.27 VAC	20k	     1.1 mA

w/0.070 uF cap	    0.335 VAC	37.9k	 0.6 mA
w/0.099 uF cap	    0.244 VAC	26.7k	 0.9 mA
w/0.110 uF cap	    0.210 VAC	24k	     1.0 mA
w/1.04 uF cap	    0.021 VAC	2.5k	 9.4 mA
w/25 uF cap	        0.000 VAC	106 	 226 mA

I would like to understand some elements of design theory.

On one hand, when the manual switch is OFF, the opto detector is in an open circuit and the voltage across the opto detector should be 0. The 25 uF cap achieves this result when the manual switch is OFF. However, when the switch is on, and the sprinklers are enabled to run, there will be 24 VAC across the opto detector and the 25 uF cap. The cap leg of the circuit will draw an additional 226 mA from the power supply (the transformer). This seems like a heavy additional load that is added for the purpose of achieving an induced voltage to 0 when the circuit is open. It also seems like the additional load could overtax the transformer, or at least add an undue burden.

Alternatively, it would seem like the erroneous reporting can be reliably eliminated if the induced voltage can be kept below, say, 0.5 VAC. The 0.1 mF cap, and even the smaller 0.070 uF cap, seem like they would achieve this, and either of these come with an additional load of 1.0 mA or less.

My current questions are:

#1 Are my above comments a correct analysis?

#2 I do not question that the capacitor is a better solution than the resistor, and I intend to use it. But I would like to understand why, and I need some help with this.

With the resistor, I believe the additional power consumed by the circuit is dissipated as heat, which is wasteful and an undesirable byproduct. Does the capacitor counter the inductance without generating heat? I think the circuit impedence would be calculated as Z = (R**2 + (Xl – Xc)**2 ) **1/2. This formula (and particularly the Xl –Xc part) suggests that the addition of the capacitor counters (reduces) the inductive EMF, and this reduction does not generate heat. Is this correct? Is this a wrong line of thinking?

So lets talk a little more about the circuit.

  1. Your mystery voltage is caused by capacitive coupling from one wire to another. For Inductive coupling to be a factor the currents would need to be significant. Here the currents are mostly 0.

Just a note: Klein voltmeters for electricians has a mode where a 10K resistor is put across the voltmeter input to squelch the capacitive coupling making troubleshooting mains circuitry easier.

You did not identify the series resistor of your opto input. I cannot be sure but will the 2.12 volts trigger your opto?
Because you mentioned the false "ON" conditions are only occasional then:

  1. the opto is right on the edge of triggering the inputs under normal conditions
  2. there are voltage spikes that occasionally trigger the opto.

The 24VAC opto detector uses a 32k series resistor. This is the same construction I have used with a number of 24VAC detectors for several years. I selected this value by experimentation and after testing a number of devices with this construction (white LED paired with LDR) and finding that they were quite reliable.

This very opto was being used in a different 24VAC circuit for about 4 years until last year. But this is a different circuit and as you suggest, I think that the 2.12 V is, indeed, triggering the opto. In this circuit I expected this voltage to be 0 when the switch is off. That’s what put me onto trying to identify where the 2+ volts is coming from. My guess is that if the voltage swings a little higher, then I get an erroneous report of solid ON, and if it is on the edge, then the reporting waffles.

With capacitive coupling there may be another element to consider. As noted in the diagram, the opto detector is about 35 feet from the sprinkler controller. This means that in the OFF mode, there is 35 feet of dead wire that is being capacitive coupled. In 2 other cases that have been in use for a few years, the appliance (the furnace gas valve, and the furnace fan), is about 20 feet from the Arduino. However, in these cases the opto detector is positioned at the appliance rather than on the Arduino board. This means that there is about 6 inches of AC line (e.g. gas valve to detector), followed by about 20 feet of DC (detector to Arduino).

Could this difference in the location of the opto detector explain why I don’t see errors with these other uses, but I do with the sprinkler controller?

Hello,

As suggested, I replaced the resistor with a 0.1 uF cap. Unfortunately it was not labeled with the voltage rating and it burned up when the 24V circuit was turned on. I am guessing that it was rated at 10V.

I intend to order some new parts. However, I would like to have this circuit running now, while I wait for the new parts to arrive.

My question is:
What is the disadvantage, or problem, with running this circuit with the resistor?

I find that rather improbable. :frowning:

None. As far as I can see the 10k has little or no effect either positive or negative.

If you capacitor burned up I doubt it was a 0.1µf. (based on typical parts).

Can you tell us (or photo) the number on the side of the capacitor?