Hi. I'm looking to use the same relay with my Pi and I'm a noob. Isn't it an active low relay? Is there a way use the same setup with the 3.3V to Vcc and 5V to JD-Vcc, but so that the Pi's signal to the relay is so that high is active and low is off? Is that what other people use the transistors/resistors for?DougieLawson wrote:It looks OK. There appears to be opto-isolators on the SainSmart board, those will protect the RPi GPIO pins. Don't jumper JD-Vcc to Vcc.
Set pins 11, 12, 13 or 15 high and the relay should activate.
As far as I can see you don't need to add additional transistors/resistors for the opto isolators. But, I can't find a datasheet that tells what voltage / current is needed for to activate the opto-isolators.
I'm not disputing that at all, but in my (ignorant) experience I had to use an MPC23017 AND transistors to get reliable switching, I believe because of the indicator LEDs on the Sainsmart, which I did not try to bypass.Richard-TX wrote:The whole transistor issue is one that is based in ignorance.
Answering my own question: While many of my GPIO pins are indeterminate during boot, only pin 8 was swings with enough voltage to activate a relay, so I just removed that pin from my set and all is good. And I set the pins high at the end of boot. I guess I could use pull-up resistors on all the pins, but it doesn't seem necessary.cycleops wrote:I have a similar SainSmart board (but 8 channel) -- everything works just fine except at boot when some of the relays switch on and off rapidly -- does anyone know if there's a way to prevent this without disconnecting the board?
It says here, https://www.amazon.com/SainSmart-101-70 ... B0057OC5O8 , that it takes 15 to 20 mA per relay. This says, http://raspi.tv/2013/rpi-gpio-basics-5- ... h-rpi-gpio, "The maximum recommended current draw from that supply is 51 mA. This is the total for all the 3V3 GPIO pins. ... The maximum current draw from any one pin should not exceed 16 mA." Now if you have one of those 8 channel relay modules running all eight relays, that's clearly going to be over the limit in total current and it is very possible that each relay is over the limit, if only a little bit. Your experience, instability and whatnot, seems to suggest, I think, that you are right to be wary. And the other poster who seems to be hinting that there's no problem actually removed the LEDs from the circuit, apparently. So it seems like at some level everyone is sort of in agreement that there are issues.Douglas6 wrote:I'm not disputing that at all, but in my (ignorant) experience I had to use an MPC23017 AND transistors to get reliable switching, I believe because of the indicator LEDs on the Sainsmart, which I did not try to bypass.Richard-TX wrote:The whole transistor issue is one that is based in ignorance.
Users browsing this forum: luckdragon and 11 guests