cncb

Thanks. There is no decoupling capacitor on the supply input for the arduino, I suppose I should really try that out. What would you suggest is a good type/value capacitor to start with? I'm powering the arduino with 12VDC from the din rail power supply. I've attached the spec sheet for reference, and as well as the schematic. Thanks for your help.

Try a 100uF capacitor each side of a 1mH choke.Also put this on the 5V line out from the arduino to the relay board.You said earlier you have tried to isolate things, how have you tried to accomplish this?

It would look like you need to get some RC suppressors for the AC Relays. Whenever you switch off a coil you get are probably goint to get some noise - might get lucky and switch at zero crossing but...

They make RC suppressors that you can get from an industrial suppliers. Check for an Allen-Bradley distributor.

Another possible method is to put some ferite beads on the lines running to the Arduino board. ou are getting induced voltage spikes that are affecting the low voltage side of your control box.

Thanks for link and info. You mentioned to use a choke on "either side", what did you mean by that? The schematic on that page shows a choke/inductor wired in series with the + side of the supply to the IC, after the cap. Perhaps you meant on the +5VDC out to the relay board as well.

For the relay board, I take it that it would be best to put this at the input terminals, rather than on the arduino output since there is a decent separation of those points in wire length.

I tried even a preliminary try with a 100uF cap that I had with no noticeable difference yet. I will have to buy some different size chokes to try.

cncb

It would look like you need to get some RC suppressors for the AC Relays. Whenever you switch off a coil you get are probably goint to get some noise - might get lucky and switch at zero crossing but...

They make RC suppressors that you can get from an industrial suppliers. Check for an Allen-Bradley distributor.

Another possible method is to put some ferite beads on the lines running to the Arduino board. ou are getting induced voltage spikes that are affecting the low voltage side of your control box.

Thank you for the advice. Perhaps that is what happening and why it is a bit random, depending on where it is switched. In regards to the RC suppressor I will investigate it more. I found a good writeup by S+S, http://www.sprecherschuh.com/library/techdocs/get/TECH_Surge_Suppression_109.pdf

I doubt that I will get this accessory for my contactor, as it isn't as high end as the S+S but I could try to replicate it with individual components.

cncb

So I did some more testing and tried a few things. I have to buy some ferrite beads/chokes to play with, but I still wanted to isolate the power sources. This time I took it a step further, which I've detailed below.

1. The most apparent problems occur when the solenoid is switched off, however the contactor has some less noticeable issues.

2. Sometimes the AC contactor with no load, being switched "off" resets the arduino or ripples the DC supply enough to reset it. This isn't noticable by eye but by the way it reacts, it drops all outputs in a way (in my limited experience with the arduino) that could only be done by a reset, and prints the serial in a way that could only be done by reset.

4. I tried adding an addon Contactor RC Snubber to the coil, no #2 problems with it installed, same as simple LL, LV operation. No resets apparent at all and no half flashes of LEDs on the relay board, it seems perfect.

5. Keeping the RC snubber in, and powering the dc bus from a bench supply on House Circuit 1, AC Transformer on House Circuit 2, and the rest of the power for the box on House Circuit 3, the problems are just as apparent if not worse than before. Sometimes causing up to 3 cycles on the solenoid inadvertently until it appears the arduino gets enough ripple to reset itself and de-energize the outputs, so to speak.

Any ideas on how this tiny AC solenoid load is causing these problems? Even being isolated on completely different circuits? I'm confident that the RC snubber has alleviated the problems on that side, and I even put a considerably larger inductive motor load on the contactor and it works flawlessly. Everything leads back to these darn solenoid valves! I will try the decoupling circuit when I get some of those components in from mouser.

I think you are not understanding the term isolated. It means that the two systems have no common connections and that includes ground. In order to isolate a controller from the thing it controls you need an isolating circuit. The simplest of these is an optical isolator or opto isolator for short. I don't think you have these and so you can't claim your system is isolated.

Quote

how this tiny AC solenoid load is causing these problems

There are two ways that interference can get from one part of the circuit to the other.1) Conducted - normally through ground connections or the power supply2) Radiated - suppress with snubbers and ferrites

cncb

I understand what you're getting at but I've isolated the power sources as far as I physically could. So let me describe my latest test results.

1. I isolated the AC transformer power to a precision lab grade power source, and I isolated the DC bus to another BK precision dc power supply. I left off the 120VAC bus because after that, the pump is the only thing needing AC power.

2. With the power sources provided as such the problems are just as apparent. I get misfires on outputs, followed by erratic output switching, it really takes a mind of it's own, all while keeping the input switch closed. I get multiple cycles as though it's latching onto the solenoid until the arduino appears to drop all and flicker the outputs on the way out, which I thought was a reset. However, as far as I can see, the "reset" and I use this term loosely is no way by that I can see caused by a ripple in the dc supply.

3. My earlier statement of this never happening on a LV level is false (just dc relays and arduino, real vanilla). I proved that yesterday and was stunned. I could get 20 program cycles with different inputs (no ac loads) and it works flawlessly. Then randomly it goes through a cycle of bad ones, flickering, misfires, wrong outputs switched etc as described above. Then I will get through a cycle of say 30 button presses, logic works flawlessly. It's completely random, has a mind of its own and has no consistency what-so-ever.

4. What is consistent and quite constant is that adding any AC coil load such as the solenoid or contactor, pump, severely magnifies that issue. So it's obviously two fold, there is a problem with my microcontroller internally and maybe some downstream stuff I need to deal with too. We are talking about the arduino switching one relay, and that relay switching another relay, two sets of dry contacts. The smaller relay only carries the load of a tiny led pilot light load and a relay coil, it's so small it's inconceivable to imagine that is being affected by flyback. The UNO responds in a way that isn't erratic as noise causes, it literally follows it's own logic, or gets screwed up and follows bits and pieces of my logic that I've written. Outputs aren't just fluttered or flashed, or held stuck open, they follow actual routines. Inconsistent routines, but routines none the less. I also tried a different but similar load inductive load, same problems. I also tested with the same value load but a resistive load, same erratic problems.

I've purchased another UNO that I will try Monday, but I'm baffled. Again I love the arduino and I'm not trying to state that it's the source of the problem but I want to rule it out. I'm totally open to suggestions, I think I've tried just about everything on my list.

The UNO responds in a way that isn't erratic as noise causes, it literally follows it's own logic, or gets screwed up and follows bits and pieces of my logic that I've written. Outputs aren't just fluttered or flashed, or held stuck open, they follow actual routines.

Yes that is noise induced erratic behavior. What happens is that, say a register, probably the program counter, gets a corrupt value in it and that sends the code off executing from some other place in the program. When a processor goes wrong it goes wrong in a big way not just fluttering outputs.

Quote

but I've isolated the power sources as far as I physically could

Maybe it is not enough?

Quote

I've purchased another UNO that I will try Monday

It could be you have a faulty processor, but I still think it is a interference problem. What about the case? Is that grounded to a solid mains ground?What you are seeing is not usual but it is not unique either.

Quote

However, as far as I can see, the "reset" and I use this term loosely is no way by that I can see caused by a ripple in the dc supply.

Often this can be difficult to actually see. You need a good storage scope to catch the impulses. Have you probed round the rest of the circuit to make sure the waveforms are as you expect them to be?

There is only a limited number of things I can suggest remotely, it might be time to get a good consultant in to actually examine your system.

cncb

The UNO responds in a way that isn't erratic as noise causes, it literally follows it's own logic, or gets screwed up and follows bits and pieces of my logic that I've written. Outputs aren't just fluttered or flashed, or held stuck open, they follow actual routines.

Yes that is noise induced erratic behavior. What happens is that, say a register, probably the program counter, gets a corrupt value in it and that sends the code off executing from some other place in the program. When a processor goes wrong it goes wrong in a big way not just fluttering outputs.

Quote

but I've isolated the power sources as far as I physically could

Maybe it is not enough?

Quote

I've purchased another UNO that I will try Monday

It could be you have a faulty processor, but I still think it is a interference problem. What about the case? Is that grounded to a solid mains ground?What you are seeing is not usual but it is not unique either.

Quote

However, as far as I can see, the "reset" and I use this term loosely is no way by that I can see caused by a ripple in the dc supply.

Often this can be difficult to actually see. You need a good storage scope to catch the impulses. Have you probed round the rest of the circuit to make sure the waveforms are as you expect them to be?

There is only a limited number of things I can suggest remotely, it might be time to get a good consultant in to actually examine your system.

Mike,

Thanks for the info, still new to this microcontroller tech and appreciate your advice. Other than using a battery to "isolate" the dc bus what would you do for true isolation of the arduino / relay board supply and the solenoid? (In a way that would be theoretically impossible to cause inductive issues)

I think the next thing will be getting in there with a probe and as you said try to capture different problem areas to get a better idea of what it's doing. I feel like I'm so close that I can't give up now.