Sometimes on reboot, relay switches position for a few seconds

Sometimes on reboot, relay switches position for a few seconds

Is there a way to prevent this?

I am using Arduino Yum and the relay is connected directly to output pin, 5v and gnd.

Maybe with some circuitry?

regards,

Sean.

You appear to have posted the same question twice.

found a great link: http://www.codeproject.com/Articles/724881/Arduino-How-to-wire-a-relay

And, does that solve your problem ?

That is the problem you’ve experienced, as this will prevent the Arduino from being fried by the relay and it’s back-EMF.

Consider using a pull down resistor (of relative low value) to control that transistor, in case your Arduino isn’t doing that.