Pages: [1] 2   Go Down
Author Topic: Urgent help needed - relay with load resetting Arduino  (Read 2237 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everone,

I have a Arduino Mega2560 with Ethernet shield that is controlling a 5V relay to drive a 12V solenoid used for electronic lockers. The Arduino is powered by an external 12V power supply, and the relay (driving the solenoid) is powered by another 12V power supply. The relay is powered by the 5V from Arduino. Without load (i.e. solenoid connecting to the relay), everything works fine. I can hear the relay clicking. However, with load (i.e. solenoid connecting to relay), the Arduino is reset when the solenoid is turned OFF. It's as if there is a big current surge hitting the Arduino when the solenoid is turned off, but there is already a diode on the coil side of the relay. I also measured the voltage across 5V and 12V rails, and there is no change.

Any advice is much appreciated. This circuit is for my store that is already open for business, but the customers can not retrieve their items due to this problem.

Thank you,
George
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27353
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Schematic & link to parts used?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 1
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the quick reply. Attached is the schematic for the customized 8-relay circuit. Each relay requires two inputs from the Arduino (I am using shift registers to make a row-column matrix to control 256 lockers). Below is the datasheet for the relay.

http://www.punchlight.com/files/relayLEG-5_datasheet.pdf?PHPSESSID=b74e7ea0c06bd20c0a795c669e2ca461

Everything works, except when the solenoid is connected to the relay (connector J) and is switched on and then off - that's when Arduino is reset..

* Protel Schematic.pdf (23.81 KB - downloaded 41 times.)
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27353
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Some of the diodes show clear a connection at pin 5 of the relay to the shunt diode's anode, some do not.
Are actually connected?
I do not understand why you have the 2nd diode from Vcc to the collectors.
Seems like all they would do is add extra load when the relay is energized.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 1
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good observation on the diode to pin 5. It was a mistake in that layout revision, and was corrected by hand soldering on the PCB. Regarding the extra diode to the collector, it is solely for visual notification, so we know which row/column matrix is turned on. Thanks.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27353
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So the "extra" diode is really an LED then?

"The relay is powered by the 5V from Arduino."
The 5V relays require 72mA of current. You have no caps near the transistors or relays. That's a decent slug of current on the 5V line.
Try putting 10uF caps and 0.1uF caps from Vcc to Gnd near the relay pins 4.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 1
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, it's a LED.

Will try the cap tonight and report back. Just to confirm, do I pop 10uF caps or 0.1uF caps at pin 4 to ground? Thanks.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After spending the past six hours debugging, I think I may have narrowed down the culprit. I don't have 0.1uF cap in hand, so I used 0.33uF cap across Vcc and GND at pin 4 of the relay. The problem still persists. Then I stripped down my code, removed the Ethernet shield, and just have a command-line turning on/off a specific relay. That's when I found out that the culprit may be the shift register matrix I am using to control the relays. Attached is the schematic of the shift register matrix, which consists of two shift registers for the 16-bit row and two shift registers for the 16-bit column. If I connect the solenoid to the relay, all 16 row LED's on the shift register matrix are turned on after the relay is turned off. So I added 0.33uF across the Vcc and GND on all four shift register IC's, and added a pull-down resistor on the latch pin of all four shift registers. Now instead of all 16 row LED's turning on when the relay is turned off, the serial port receiving stops working (I can still type to turn on/off the relay). So it is more stable now, but still some interference.

Any suggestion on what to try next? Thanks.

* shiftRegister.pdf (54.05 KB - downloaded 27 times.)
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27353
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't see any part numbers, how do you tell what's what?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 1
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, it's SN74HC595N, 8-bit shift register. http://www.ti.com/lit/ds/symlink/sn74hc595.pdf
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27353
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, assume you have OE/ low and MR high and not floating.

Am confused by this:
"the serial port receiving stops working"
How's that tied in?

You have quite a load on the '595 outputs also.
Looks like an LED with 2-3mA, and 16 transistors with ~4mA each, total of ~70mA on each IO.
Part is only rated for 5V output for 6-8mA, and 70mA for the whole part.
I could see drive issues there causing some of your problem.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 1
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, OE is tied to ground, and MR is set to high.  The serial port is connected to pin 0 and 1 on the Arduino and to the PC.

At any time, only one relay will be enabled, so two transistors and one LED. I can remove the LED to see if it helps. Please keep sending any suggestions you may have, and I will give it a try. I am desperate here. Thanks.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27353
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I can't think of anything else. Time to get a scope and look at signals to see what is actually happening.
Can be an inexpensive thing like this which I use
http://www.pdamusician.com/dpscope/
altho it looks like it's out of stock at the moment.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Italy
Offline Offline
Jr. Member
**
Karma: 1
Posts: 69
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys,
have you ever managed to fix this issue?

I have a similar problem with a relay, car horn, and big 7-segment display all turning on during the time the horn is active!!
 
If you still read this thread I can give more clarification on the problem!

Thanks!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27353
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Clarify away.
Or, start your own topic with your specifics.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1] 2   Go Up
Jump to: