I have created Automatic Chicken Coop Door Opener on MEGA 2560. The idea was simple. Get electric actuator (12V - 36V, max 3 I) and power it by a simple laptop power supply (19V, 3.5 I). Then connect it to relay module and controlled it by Mega. Some switches, LCD to present some data, temp. and time module, write a program and Voilà!
I have connected everything property and wrote code. Everything should work just fine. But no, when the actuator is turned on, lcd first blink several times and then whole program stops. I did some research and I think that the actuator engine make a noise that affect on arduino.
What should I do to eliminate this? I have already tried several things:
power the relay by independent power source, and controlled it by a opto-isolator PC817. Should work, since there is galvanic isolation with arduino, but it didn't. Still blinking and suspending.
put some capacitor between Vcc and GND on arduino - no change. I have read about noise reduction with capacitor and try electrolytic capacitor 25V 4700 uF.
Maybe i made a mistake during 1 or 2. If you have any suggestion please help.
You'll need to show us exactly how you have connected things - photos and sketches.
Some details of exact part numbers for motor, power supply etc. The more information the better.
Hi,
Have you tried leaving the actuator power supply on all the time, remove the relay you use to switch it on, this may be causing your interference.
Then see if your problem occurs.
The other thing is, that supply is a LAPTOP supply, and as such may not have the response to transient loads that starting your actuator will produce.
If you leave the actuator supply off and just look at the relays working, does it lock up?
I had a similar problem with a project. It involved using a 5VDC opto isolated relay module and a contactor (large relay). Tried many things but what eventually worked was eliminating the LCD. - Scotty
Tom, I red your post and checked your suggestion. Something interesting was happened. I removed relay and connected wires. When the actuator power supply was connected to the same AC power socket (230V) as arduino power supply, problem occurred and program was stopped, but when I connected it to a different socket (it has independent wire plugged to electricity meter) nothing wrong happened.
Then I connected relay and problem occurred again.
My sketch has over 2000 lines. Tomorrow I will create small sketch to control relay. Then I will post results.
Hi,
Okay smolog, its looks like its switching interference, try to keep your AC wiring clear of any DC.
Can you post a picture of your project please.
Try putting a 0.1uF Capacitor across the actuator terminals.
Twisted pair for all your 24V wiring would be good. Never run power wiring parallel to
sensor cables.
Don't power the relay modules from Arduino Vcc, or if so add lots of decoupling at the
relay board(s). Check the current consumption of your relays doesn't exceed the
5V regulator's ability.
The way you implement an H-bridge using two SPDT relays is flawed. You should use
one DTDT relay. With two relays you cannot guarantee you won't short-out the
DC supply as the two relays are not guaranteed to switch at the same speed in lock-step.
With your current setup the only safe way to reverse the actuator is power down at the mains,
wait a few seconds for the DC rail to drop, then switch the other relays and power back up
again.
Mark, I didn't know that something like DPDT relay exist. However the fact is that I used third relay to turn on/off the actuator supply. Now, during the tests I don't use it, because it doesn't matter.
Today I will use the opto-isolator and independent power source for relays again. Maybe I did something wrong during previous test.
I am sorry for the delay in posting. I think I found the problem. I have talked to the actuator producer which said that this is because DC motor generate interference on electrical wiring. What he said is I need to use some filtering near the motor and problem should be solved. I did what you can see in attachment and interference has gone (for now ;D ). I have used a chokes and a capacitor.
I don't know the value of the chokes. There is no information on them. The capacitor value is 43uF
I also added photo of my project. It's a little scary, but what can I say. I did my best
If you think that there is something that should be corrected, please tell me.