Joined April 2013
·

Luke

Germay
·
·

Hey Craig,

sorry for my late reply. Thank you so much for your advice.
I managed to setup up everything and think that i am fine with that. But now i'm facing a problem i did not expect to come up.

I connected the relay to the pi like this:

Pi (5V) --> Relay (5V-VVC)

Pi (GND) --> Relay (GND)

Pi (GPIO17) --> Relay (Pin1) // for wiringPi that should be Pin 0

I followed you and installed the wiringPi-lib.

I connected the Relay to an external 12V-supply.

Then i used following commands in terminal:

*> gpio mode 0 out // Relay switched

*> gpio write 0 0 // nothing happend

*> gpio write 0 1 // nothing happend

I have no clue what i'm doing worng. Do you have any idea why the 2 last commands do not have any effect on the relay?

i really really could need some help with that.

best greetings, luke

PS: Not sure if that is bad or ok. Tested the 5v-Pin on the Pi and only got 4,79V. Don't know who exact the Relay works. But i also tested the GPIO17 vs. GND with the same commands in the terminal. Result:

*> gpio write 0 0 ==> Tester goes 0V

*> gpio write 0 1 ==> Tester goes 3,3V

Hey Craig,

just read your post. I'm looking for a relays-board to control kind of a locker with my Raspberry Pi. I came up to the same one you are using here. Just would need the one with 16 channels - but same brand (SainSmart).

Only problem i got is what you described about the level of PINs on the Raspberry. Is it really true, that the relays turn on (switches) when PIN gets low? I mean i really try my best you get the point why they would have done such a sh*t. That board looks just awesome to me not only because of the optos.

As i mentioned before, i'm trying to control the door of a locker with that. If Raspberry crashes for some reason - door opens. O.o
That should never ever happen.

Can you tell me about your experience with that board? did you figure out to get it working like "off-off" and "on-on"?

best greetings, luke

Achievements
1 Karma
0 Total ProTip Views