456mb
Posts: 12
Joined: Sat Jul 23, 2016 1:52 am

Relay

Sat Jul 23, 2016 1:58 am

Hi i new here, i have a simple question

i have a raspberry 3B and a relay

Image

only i want test on/off the relay in the raspberry any simple code for testing??? i find in google but i find only for 8 channels or more of three pins

thanks

pcmanbob
Posts: 9298
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Relay

Sun Jul 24, 2016 12:04 pm

You will need to provide much more info on the relay board you want to use the picture gives no info.
A link to a data sheet or other specification sheet is what will be needed.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

drgeoff
Posts: 10676
Joined: Wed Jan 25, 2012 6:39 pm

Re: Relay

Sun Jul 24, 2016 6:38 pm

It is a 5 volt relay. The board has a transistor Q1 to the left of the relay. There is resistor R1 (150 ohms?), probably between the transistor base and the input pin labelled S.

A diode, probably across the relay coil. And an LED, but no sign of a series resistor for it.

gordon77
Posts: 4992
Joined: Sun Aug 05, 2012 3:12 pm

Re: Relay

Sun Jul 24, 2016 7:02 pm

This site Q&A says it will only work with 5v...

http://www.cytron.com.my/p-bb-relay-5v-01

drgeoff
Posts: 10676
Joined: Wed Jan 25, 2012 6:39 pm

Re: Relay

Sun Jul 24, 2016 7:21 pm

That site also says the control input level is TTL. That is 2.4 volts.

gordon77
Posts: 4992
Joined: Sun Aug 05, 2012 3:12 pm

Re: Relay

Sun Jul 24, 2016 8:10 pm

If you follow this link it says the signal input min'n 3.3v max 5v so might work. + supply is 5v.

https://www.parallax.com/product/27115

456mb
Posts: 12
Joined: Sat Jul 23, 2016 1:52 am

Re: Relay

Tue Jul 26, 2016 6:59 am

i buy here https://www.amazon.com/gp/product/B00TO ... UTF8&psc=1

is probability connect direct ? relay -> raspberry ??

5V => + (relay)
GROUND => - (relay)
GPIO => S (relay)

is correct ??

https://youtu.be/3u45htuQeag?t=24s

thanks for your time and help

Return to “Beginners”