PickyBiker
Posts: 68
Joined: Tue Nov 26, 2013 6:26 pm
Location: Texas

RPi and Sainsmart 8 relay board

Wed May 17, 2017 8:16 pm

I bought a Sainsmart relay board for a sprinkler project that will be directly connected to an RPI. The documentation says it can work this way but I find that 2 of the relays "chatter" when turned on. The chatter is very frequent on one of the 2 but very intermittent on the other. The relay board is getting 5V from the RPi and it looks rock solid and clean on a scope. The driver input pin is going low and staying low and it too is nice and quiet. The output of the opto-isolator is showing the chatter. Once the chatter starts, I would guess the relay is activating/deactivating 10-20 time per second and it can last several seconds. That would pretty much raise cane with the sprinkler valves.

Has anyone else experienced this? Is there anything that can be done to fix it?
Is there a better 8 relay board out there that works with RPI?

Thanks

BTW: This is the second item I purchased from sainsmart that doesn't seem to work as advertised. The other item was a 6 DOF accelerator/gyro.

User avatar
DougieLawson
Posts: 36105
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: RPi and Sainsmart 8 relay board

Thu May 18, 2017 4:43 am

Do NOT bridge vcc to jd-vcc. Connect jd-vcc to a five volt supply. Connect vcc to 3V3 (pin#1) on your RPi. Connect GND to pin#6 on your RPi. Connect the other eight pins to eight of the GPIOs.

The way I drive relays is to use an MCP23008 or MCP23017 I²C chip as they are safe at 5V. Programming those I²C chips is trivial.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

PickyBiker
Posts: 68
Joined: Tue Nov 26, 2013 6:26 pm
Location: Texas

Re: RPi and Sainsmart 8 relay board

Thu May 18, 2017 4:49 pm

Yes I see you are correct. Pi is a 3.3V device so, the relays should be powered by 5V at JD-VCC and the Pi logic side should be powered by 3.3V at VCC.

Thanks for that.

Further investigation shows one of the transistors on the 8 relay board is bad and so is one of the Pi pins. I guess that's what I get for hooking up 5V to a Pi GPIO.

Return to “General discussion”