I don't know enough about snubbers, so I'm hoping for some advice here. I'm using an Arduino Mega to control a 2 relay module. The relay turns on a water pump and when it turns the pump off the Arduino either resets or freezes or both. This doesnt happen when connected to another device (like a light) or when connected to nothing. Only when the relay is connected to the pump does this happen. Help would be very much appreciated as I have ran out of things to try and I don't under stand this diode, snubber business. Thanks in advance!
Does your relay module have opto-isolation (JD-Vcc pin)? I was just reading another thread a little earlier today which has a useful diagram showing how to wire up a relay module that has opto-isolation so that the power supply being switched is completely isolated from the arduino output pin.
Ty, ill have a look at that. I do have the jd-vcc pin and here's a picture of the project.
OK i couldn't post a picture because it is too big. I did read that post though, and would like some help understanding what I have read. I have the 2 relay module, very similar to his 8 module. I have VCC IN1 and GND hooked up to the 5v and GND of the arduino and IN1 goes to a digital pin. I can turn an AC light on and off no problem. However the inductive load of the water pump causes the arduino to freeze or reset. Am i supposed to have the jumped pins connected to something or is that all handled internally. JD-VCC is jumped to VCC
What you need to do is remove the jumper on the JD-VCC pin and remove the ground you currently have connected from the arduino to the relay board. Once you do this you need to power the coil of the relay with a separate 5v power supply by using the JD-VCC pins and the ground pin.
Once you do this the arduino is not physically connected to the relay.
below is the image I was referring to from the other thread
Thank you very much for that explanation, I will get right on that and post back if it worked. I've been losing my mind over this, thanks for the reply regardless of the results.
Initial tests seems to be going well, TY so much. I have to let it run for a few days to be sure but it wasn't making it more than a few minutes before. Thank you again.
No problem, glad it seems to have helped
Ok, it is still happening but less frequently now. Must be on the right track, what would you suggest now. It would happen every time the pump shut off before. Now it makes it a few cycles before it freezes. Any more suggestions, this has been the best progress in days.
I dont have much experience with this myself. You could have damaged your Mega board before you isolated it but also the problem could be Electromagnetic interference. Take a look at this link for some more info about that
You'll need an MOV across the pump or the relay's NO and COM terminals.
If the pump is 120VAC, here's a 150VAC rated MOV I recommend using.
If the pump is 240VAC, here's a 300VAC rated MOV I recommend using.
Ty very much, I don't believe the board is damaged because it still operates fine unless the pump is plugged in. Runs consistently longer but I'm going to try the MOV. Thanks for your insight and what exactly will that do for me?
The MOV will suppress contact arcing by clamping the voltage spikes. This reduces radiated RF interference and prolongs the life expectancy of the relay. The reduction in RFI should eliminate the problem.
Also, make sure the DC wiring is routed separately and away from the AC wiring. It's also good to increase the distance of the relay module from the Arduino if possible.
It's also a good idea to configure all unused input pins using INPUT_PULLUP, which will reduce the interference that can be picked up and enter the MCU.
dlloyd:
The MOV will suppress contact arcing by clamping the voltage spikes. This reduces radiated RF interference and prolongs the life expectancy of the relay. The reduction in RFI should eliminate the problem.Also, make sure the DC wiring is routed separately and away from the AC wiring. It's also good to increase the distance of the relay module from the Arduino if possible.
It's also a good idea to configure all unused input pins using INPUT_PULLUP, which will reduce the interference that can be picked up and enter the MCU.
Thank you again for the speedy response. Thanks for clearing things up. The wiring is as separated as its going to get and same for the distance from the relay to the Arduino. I have not changed all the unused pins to have pull ups enabled, but I will try this. Also to be very clear is a snubber (R-C) circuit going to give me a similar effect to the MOV. I really don't mind getting the MOV but the faster I can get the componenets i.e. (RadioShack) the better. Don't have a lot of time left for testing. I also am lead to believe the MOV would be better but the snubber would work. Finally, either circuit should be in parallel across the pumps + and - terminals, correct? Clarification on all of this would be great. Thank you again.
Yes a snubber would work, but the component values need to be calculated for the size of the pump load.
Yes, connecting the suppressor (MOV or snubber) would ideally be connected across the pump power terminals.
Thank you so much, last question before I attempt this. RadioShack sells one MOV and mine probably wont have it in stock, BUT if they do, this one should work fine right.
RadioShack Add
Spec Sheet for the V130LA20A MOV
http://www.jameco.com/Jameco/Products/ProdDS/34462.pdf
Yes, that one should be fine. It'll allow for 8.3% mains over-voltage. I went with 150VAC to allow some more room. It might be somewhat more prone to failure in electrical storms.