Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


1662 posts

Uber Geek
+1 received by user: 186

Subscriber

Topic # 189608 6-Jan-2016 00:29
Send private message

Hi,

I have a standard irrigation system with 24VAC solenoids. I have built a simple Arduino + ethernet shield connected to a 4xopto-isolated-relay board for controlling each of my 4 sprinklers. I have the 24VAC from the irrigation wall-wart feeding into a rectifier and then voltage regulator to give me 5VDC which I am using to power the Arduino and drive the input circuit on the relay board. The Arduino digital output pins are driving the relays directly. The relays are switching the 24VAC to drive the solenoids.

It seems to work fine most of the time but every now and again when a solenoid shuts off, the Arduino restarts. After some reading I think this is due to EMF spikes caused by the solenoids which results in arcing across the relay contacts and all this *noise* is enough to cause the Arduino to restart. Further reading indicates I need a *snubber* circuit across the relay contacts (capacitor + resistor in series) to dampen this EMF.

However I am unsure of what size C + R to use and if I can buy a pre-packaged device? Any tips on what I might need and where I could get it from?

I found these on the Element14 site - http://nz.element14.com/roxburgh/re1202/rc-network-250v-0-2uf-120r-pcb/dp/2336111 - but I am not sure if they are big enough or even suitable? Also, shipping costs about 5 times the actual device...

Cheers,
Ben

View this topic in a long page with up to 500 replies per page Create new topic
 1 | 2 | 3
21132 posts

Uber Geek
+1 received by user: 4217

Trusted
Subscriber

  Reply # 1462073 6-Jan-2016 01:10
Send private message

That seems complete overkill for this.

Have you identified if its the relay coil itself switching causing it to reset, or if it is actully the relay switching the solenoid doing it? I had issues just switching relays on an arduino causing it to reset.

Are you cable to change the arduino to be powered by a seperate power supply and see if that helps?

I think you just need a small ceramic capacitor across the contacts to stop it from happening, snubbers are needed on a triac based control.




Richard rich.ms

670 posts

Ultimate Geek
+1 received by user: 182


  Reply # 1462086 6-Jan-2016 07:41
One person supports this post
Send private message

In any relay circuit you should have a small diode in reverse polarity across the relay coil.
When the relay De-energizes the back emf can be more than the source voltage.
A simple 1N4007 ( basic rectifier diode ) is sufficient.
You need one across any relay coil

Basically what this is for is if the relay is turned off and the back EMF goes above 0.7v the diode turns on and conducts.

The other thing is what are you driving the relay with? The IC will not have enough sink current to hold the coil, most IC can only sink or source 20mA
Make sure you are using the IC to energize a transistor that in turn energizes the relay.

I hope that helps.

John





I know enough to be dangerous


7664 posts

Uber Geek
+1 received by user: 2521

Subscriber

  Reply # 1462127 6-Jan-2016 09:10
Send private message

ive used one of these with arduino before http://www.seeedstudio.com/depot/Relay-shield-p-693.html

was running 4x 40w cartridge heaters and didnt have any issues with turning off.

I think your issue may be related to the fact you are feeding the arduino 5vdc from the rectifier, when some of the relays activate it could be dragging the output from the rectifier too low and the input voltage of the arduino goes too low causing it to restart. maybe try feeding the arduino with 7+ volts and see what happen.

"The board can operate on an external supply from 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may become unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts. "

my circuit was all run off 12vdc via a PC power supply



1662 posts

Uber Geek
+1 received by user: 186

Subscriber

  Reply # 1462139 6-Jan-2016 09:24
Send private message

@richsm/@Jase - yep I am starting to think you are probably right - sounds like a power supply issue. I have another setup on my HWC whereby I have an Arduino on a separate power supply (via a 9VDC wall wart) which monitors HWC temps etc. I have a solar H20 controller which switches a big mechanical relay to heat the HWC at night if needed. When this relay is switched off at 7am the Arduino that is sitting next to it always resets. 

@SATTV - The relay board is one of these - http://www.hobbyist.co.nz/?q=4-channel-relay-module - i.e. it has built in opto-couplers and diodes etc. So I don't think it is back-EMF causing the problem. And these boards are designed to be driven directly by a microcontroller so I think that should be ok.

I will try beefing up the output voltage from the regular (it is adjustable) but I think that will cause problems on the relay board, since it is being driven by the 5V digital pins, so if VCC goes up to say 9V then the transistors won't latch.

I will also try a separate power supply for the Arduino - but the idea was to have a nice self-contained unit with just the one power supply (24VAC wall wart).

Thanks for your comments so far!

7664 posts

Uber Geek
+1 received by user: 2521

Subscriber

  Reply # 1462144 6-Jan-2016 09:29
Send private message

arduino has its own 5v and 3.3v regulator on it so the 5v outputs will always be 5v+- a little as long as the input supply voltage is enough



1662 posts

Uber Geek
+1 received by user: 186

Subscriber

  Reply # 1462153 6-Jan-2016 09:41
Send private message

Yes, good point - I am currently feeding the output from my regulator (via the rectifier) directly to the relay board VCC and Arduino. Beefing this up to 9V and then powering the relay board from the Arduino 5V pin would be the way to go - thanks for that, should have probably thought of that myself!!

21132 posts

Uber Geek
+1 received by user: 4217

Trusted
Subscriber

  Reply # 1462158 6-Jan-2016 09:52
One person supports this post
Send private message

What rectifier are you using? Some of the cheap modules I have got have shut down briefly when there was a large transient on the input. Perhaps try a large cap on the supply to the arduino.




Richard rich.ms



1662 posts

Uber Geek
+1 received by user: 186

Subscriber

  Reply # 1462160 6-Jan-2016 09:53
Send private message

@richms - could you define *large cap*?

21132 posts

Uber Geek
+1 received by user: 4217

Trusted
Subscriber

  Reply # 1462167 6-Jan-2016 10:11
Send private message

1000 to 4700 uF perhaps? I just grab a "whatever" from the pile of crap I have salvaged off other things. Also check the capacitance on the input to the regulator, not all of the boards I have bought have had any signifigant capacitance there, so may be freaking out with the rectified AC, and capacitance there would help with any transient from the relays opening.




Richard rich.ms



1662 posts

Uber Geek
+1 received by user: 186

Subscriber

  Reply # 1462257 6-Jan-2016 12:38
Send private message

Ok - tried the following;

1. Upped the regulator output to 9VDC and use this to power the Arduino, then connected the Arduino 5VDC pin to the relay board - no change.

2. Added a 2200uF 16V capacitor across the VIN/GND pins on the Arduino - no change.

3. Added the same 2200uF 16V capacitor across the 24VDC inputs to the regulator - smoke escaped! Need a cap with higher voltage rating obviously.

What I have found is it is only one of the irrigation solenoids that is causing the problem. 1-3 are fine, but probably 70% of the time 4 is turned off, the Arduino restarts. Nothing different AFAIK but I guess it could be a different solenoid brand or model that was installed by the irrigation guy.

The regulator I am using does appear to have caps across the input but I am not skilled enough to read what size they are. 

Any other ideas out there? Is it worth investing in a snubber circuit and placing across the problematic relay contacts?

Learning alot with this little problem - so that is a positive!!

21132 posts

Uber Geek
+1 received by user: 4217

Trusted
Subscriber

  Reply # 1462262 6-Jan-2016 12:48
Send private message

Keep in mind that rectified "24v" AC from a crappy wall warr is probably getting up close to 40V DC when choosing a cap for there.

Try chucking some small ceramic caps across the relay contacts and see what happens, again the value is not that important as you are not making a tuned circuit, just wanting to make a path for the HF crap that comes from switching.




Richard rich.ms



1662 posts

Uber Geek
+1 received by user: 186

Subscriber

  Reply # 1462263 6-Jan-2016 12:49
Send private message

Ok - have a few ceramics floating around so will try that next. Don't have any higher voltage caps so will leave that to plan B - appreciate your help Rich.



1662 posts

Uber Geek
+1 received by user: 186

Subscriber

  Reply # 1464731 6-Jan-2016 22:17
Send private message

Tried the ceramic across the problematic relay contacts - at first I thought I had nailed it - I was able to switch the relay on/off and it was working just fine, and the Arduino was rock solid. Then I went outside and realised that even with the relay off, the irrigation solenoid was still open and watering!

I tried two different ceramics - one tiny little one and one bigger - same result. 

Tomorrow I will remove the solenoid from the equation and test that switching the relay on its own is ok - but assuming it is fine I am at a loss as to how to solve this.

7664 posts

Uber Geek
+1 received by user: 2521

Subscriber

  Reply # 1464735 6-Jan-2016 22:21
Send private message

can also try connecting the solenoid to a different relay and see if it still does it, that should prove relay board or solenoid



1662 posts

Uber Geek
+1 received by user: 186

Subscriber

  Reply # 1464736 6-Jan-2016 22:22
Send private message

Yep - good tip - cheers Jase - will check that also (will have to be tomorrow tho).

 1 | 2 | 3
View this topic in a long page with up to 500 replies per page Create new topic

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

N4L helping TAKA Trust bridge the digital divide for Lower Hutt students
Posted 18-Jun-2018 13:08


Winners Announced for 2018 CIO Awards
Posted 18-Jun-2018 13:03


Logitech Rally sets new standard for USB-connected video conference cameras
Posted 18-Jun-2018 09:27


Russell Stanners steps down as Vodafone NZ CEO
Posted 12-Jun-2018 09:13


Intergen recognised as 2018 Microsoft Country Partner of the Year for New Zealand
Posted 12-Jun-2018 08:00


Finalists Announced For Microsoft NZ Partner Awards
Posted 6-Jun-2018 15:12


Vocus Group and Vodafone announce joint venture to accelerate fibre innovation
Posted 5-Jun-2018 10:52


Kogan.com to launch Kogan Mobile in New Zealand
Posted 4-Jun-2018 14:34


Enable doubles fibre broadband speeds for its most popular wholesale service in Christchurch
Posted 2-Jun-2018 20:07


All or Nothing: New Zealand All Blacks arrives on Amazon Prime Video
Posted 2-Jun-2018 16:21


Innovation Grant, High Tech Awards and new USA office for Kiwi tech company SwipedOn
Posted 1-Jun-2018 20:54


Commerce Commission warns Apple for misleading consumers about their rights
Posted 30-May-2018 13:15


IBM leads Call for Code to use cloud, data, AI, blockchain for natural disaster relief
Posted 25-May-2018 14:12


New FUJIFILM X-T100 aims to do better job than smartphones
Posted 24-May-2018 20:17


Stuff takes 100% ownership of Stuff Fibre
Posted 24-May-2018 19:41



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.