Arduino + Relays

Hello. I'm using an Arduino Duemilanove 328 board controled by the Pduino object of Pure Data. I'm using a Mac-Mini to run the Pd-Extended.

Attached to the Arduino, I have six relays connected to outputs 2 to 8. These relays control the switching of 9V lamps. These outputs are HIGH for at most 30 to 60 milliseconds and I access them at most 20 times per second.

The system works well for around 30 minutes, but then, the Arduino board seems to stop receiving signal. The only way the Arduino restarts working is by restarting the computer.

I need to leave the system working for several hours. Any suggestions?

Thank you very much.

Stab in the dark without code - could it be the millis roll over issue?

could it be the millis roll over issue?

not after such a short time I think you have 50 something days before that happens.

60mS is quite a short time to trigger a relay, what sort of relay is it? 20 times a second is again pushing what a mechanical relay will give.

It could be that as the coils warm up they are slightly higher in resistance and are not being given enough time to switch current.

Attached to the Arduino, I have six relays connected to outputs 2 to 8.

Do you use transistors to switch the relays? The outputs only can deliver 20 mA per port.

hese outputs are HIGH for at most 30 to 60 milliseconds and I access them at most 20 times per second.

Do the relays switch correct? It seems that the signals are to fast for relays.

Please check you power supply. May be the power regulator switches the power off because of to much power consumption.

60mS is quite a short time to trigger a relay, what sort of relay is it?

Do the relays switch correct? It seems that the signals are to fast for relays.

30 to 60 milliseconds is enough for triggering them during the first 30 minutes the system runs. Then the Arduino seems to stop working at all. When I restart the computer, everything works fine again.

I’m going to photograph the Relays and send all it’s specs.

Thank you!

You DO have "the diode" across the relay's coil, don't you?

If this makes no sense to you: Unplug your Arduino/ relays thing NOW, and find out about "the diode". (Shunts reverse emf arising when voltage removed from coil).

30 to 60 milliseconds is enough for triggering them during the first 30 minutes the system runs.

Yes but as you have found out this is not sustainable. You must be working right on the limit.

Then the Arduino seems to stop working at all.

Are there any other indications that the arduino has stopped or is all that it is doing on the output side is switching the relay?

When I restart the computer, everything works fine again.

So does the computer crash or is it just the arduino?

Do you have enough supply decoupling? http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

sounds like to many miliamps maby ?

sounds like to many miliamps maby ?

Sorry that's just twaddle, it makes no sense.

There you are the Relays' specs:

http://www.photoblog.com/skrako/2010/06/25/

Do you have enough supply decoupling?

It seems that not decoupling may have caused the problem, but would that make all the 6 relays not work because of that noise? Wouldn't it start to work in a strange way instead of completely stop all of them?

Thanks!

There you are the Relays' specs:

No that is not the relay's specification, that is a schematic of how you have wired up the relay. A relay specification will give things like the coil resistance and the pull in time. Unless this is something special it is operating faster than any mechanical relay I have ever seen.

Wouldn't it start to work in a strange way instead of completely stop all of them?

It depends in what way it fails, it could well be that the arduino processor or the PC is crashing. However, please try and at least double the pulse you give to the relay and see if that makes things better.

Just noticed you appear to have a 6V relay being driven by 9V, that is not good as they will get hot and burn out.