Relay shield cycling relays on Arduino power up

Hi all

I have a seeedstudio relay shield that I’m using to open and close solenoid valves in order to make the perfect Martini without me having to measure the gin and vermouth myself.

However, I have a problem that when the Arduino powers up, it cycles the relays open and closed which means gin and vermouth end up on the floor.

Curiously it does the same thing when I start the Serial Monitor in the Arduino IDE too.

What am I missing from my sketch that means the relays only actuate on my command rather than randomly at boot?

Cheers

Dave

What program you are using?

I’m using Version 1 of the IDE, if that’s what you mean.

But you got me to thinking so I loaded up the Seeedstudio demo code for the relay shield and it also does the same thing, cycles the relays a few times when the Arduino boots.

I’m just powering the arduino off the USB port, but the shield has 9 volts. I’m also powering a LCD off the arduino too, so now I’m wondering if it’s a power sag issue. I think I’ll try running 9 volts to the arduino instead and see what happens.

Thanks for your help :wink:

Make sure you have connect the relay to arduino and solenoid valves in the right way.
and … could you provide the link where you purchase it and which demo code you have used ?

Furthermore, the first post you mentions , when you start the Serial Monitor in the Arduino IDE , arduino will reboot and the program will restart.

regards,
deray