I can speak for option 1 because I am currently using it. The specs on Amazon are incorrect. With the necessary relay card power supply input of 5V (3.3V does not supply enough voltage) the relay card requires only around 1.5ma from each GPIO port to trigger each input circuit, which in turn triggers the relay. However, the coil of each relay requires about 60ma to turn on the relay. Where they got 15 – 20ma driver current I have no idea (Maybe they forgot the decimal point). So, yes, if you turn on a lot of relays simultaneously, you would need an external power supply like I am using, especially if the pi is using power hungry USB devices. Also, a transistor or other similar device is necessary to safely connect the GPIO pins to the relay card input. In addition, the inputs are active low. Also, If you look at the specs of each card, you can also see that the solid state version output is only rated at 0.1 - 2 Amps, while the other one is rated at 10 Amps. I don't know anything about the solid state version of this board, but even if it takes a lower total current (trigger plus coil current), be careful to check the schematics of the card to insure it can safely be connected directly to the pi without additional separation/protection circuitry.sebastienb wrote: From what i've read on the board, option 1 works but requires a little more power to trigger all the relays (using an additional power supply). Since option 2 uses electronic relays instead of mechanical ones would it be simpler to use and able to be powered by just the Raspberry Pi ?
Or just a simple 7 cent transistor will suffice as I am using:klricks wrote:You would need level converters between the GPIO pins and the relay board
Something like this:
http://www.amazon.com/SparkFun-Logic-Le ... +converter
Note if you select each link in your post and then click the URL button your links will be click-able.
I was hoping someone would reply about the SSR version; that's good to know for future builds. It was not available at the time I ordered mine, although it would not have worked for my application anyway, as I need between 2 -3 Amps per relay.abishur wrote:I'm using the solid state version of their card and like it a lot. For example, the SSR version uses the GPIO as outputs (so you trigger the card by writing a one) whereas the non-SSR version uses them as ground meaning you have to write a zero to them to trigger the relay. Additionally, if you use the non-SSR version you need to make sure that you have things set right so you're not trying to feed 5V into one of the GPIO (yes it goes through an LED first, but it's bad practice to rely on LEDs to provide the necessary voltage drop to make it not damage things )
All that said, either one *will* work sufficiently. You just need to take a couple extra steps with the non-ssr version
Ah that is an important difference as well. The SSR version has a max load of 2A per relay, whereas the non-SSR version can handle up to 10A!pjc123 wrote: I was hoping someone would reply about the SSR version; that's good to know for future builds. It was not available at the time I ordered mine, although it would not have worked for my application anyway, as I need between 2 -3 Amps per relay.
Good point. I had originally looked into using individual SSR's that control high current DC loads (high being around 10 amps), but they were prohibitively expensive, so I settled on the Sainsmart mechanical relay version.ryanjennings wrote:I haven't used either yet, but have both to try at some point. Just wanted to add to the conversation that the SSR version won't switch DC.
I did something similar with Fritzing, and had some made up by Aisler (who do the Fritzing fab) as a pHAT for ZeroW with a web server in Python. In my case I inverted the logic back, so 0 on the GPIO means relay off, 1 means relay on.fixedd wrote:Just wanted to put this out there... I laid out a board to drive the non-SSR version using transistors to pull the input pins to ground. The schematic/layout is available at https://github.com/fixedd/RPi_SainSmart_Interface
So you have picked a relay board that is designed to be driven by 5v and uses 5v inputs on the control inputs as well, as its designed for the arduino not the pi.freddyja wrote: ↑Sun Nov 26, 2017 1:59 amI decided on option 2, the SainSmart 8-Channel 5V Solid State Relay Module Board. I'm try to use it with my rpi 3, to control my xmas lights. I attached all the gpio to each channel on the relay, the vcc to the 5v pin and the gnd next to vcc to gnd pin on rpi and have not connected anything to the gnd on relay to the bottom of the channels. But it does not turn on, I'm I doing something wrong, is there a test for the relay
gordon77 wrote: ↑Sun Nov 26, 2017 9:04 pmIs this the same board https://www.amazon.co.uk/SainSmart-8-Ch ... 5WMK4YKA7C?
It says it should work with 2.5v input
but freddyja said it did not work, so I suspect that the 2 resistors on the base of the transistor used to drive the LED & SSR as show in the diagram on the original link are spec'ed for 5v input not 3.3v but as you cant read the values I am only guessingInput control signal voltage: 0V - 0.5V Low stage (SSR is OFF), 0.5V - 2.5V (unknown state), 2.5V - 20V High state (SSR is ON); SSR Output (each channel); Load voltage range: 75 to 264VAC (50/60Hz); Load current: 0.1 to 2 AMP