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

Pi Relay and i2c question

Fri Nov 27, 2015 2:21 pm

I see plenty of threads about people struggling with interfacing relays, this may help.

http://www.amazon.co.uk/Raspberry-Pi-Re ... B00WA857JY

( I wouldn't recommend switching mains with it )
Last edited by gordon77 on Sun Nov 29, 2015 5:19 pm, edited 1 time in total.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Pi Relay

Fri Nov 27, 2015 2:55 pm

gordon77 wrote:I see plenty of threads about people struggling with interfacing relays, this may help.

http://www.amazon.co.uk/Raspberry-Pi-Re ... B00WA857JY

( I wouldn't recommend switching mains with it )

The separation looks pretty good, I'd want to test it (to destruction if necessary) with an insulation resistance test meter before sticking it on mains.

Image
Doug.
Building Management Systems Engineer.

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

Re: Pi Relay

Sun Nov 29, 2015 3:11 pm

I've been looking at using one of these but I am confused by i2c.

I am using Raspbian & Jessie and have an RTC which is configured by adding 'dtoverlay=i2c-rtc,ds1307' in /boot/config.txt.

Is this using i2c-0 or i2c-1 or maybe neither ? as the relay needs 0 or 1.

It uses bus=smbus.SMbus(1), where 1 = /dev/i2c-1 or 0 = /dev/i2c-0

and with the RTC how is i2c working when 'dtparam=i2c_arm=on' isn't enabled in /boot/config.txt ?

Thanks

Gordon

User avatar
Tage
Posts: 287
Joined: Fri May 24, 2013 2:29 am
Location: St Thomas, Ontario Canada

Re: Pi Relay

Sun Nov 29, 2015 4:34 pm

there is practically no distance between power traces and the pins that connect to the coil which means that if you connect it to mains voltage you have a very dangerous situation.
BMS Doug wrote:
gordon77 wrote:I see plenty of threads about people struggling with interfacing relays, this may help.

http://www.amazon.co.uk/Raspberry-Pi-Re ... B00WA857JY

( I wouldn't recommend switching mains with it )

The separation looks pretty good, I'd want to test it (to destruction if necessary) with an insulation resistance test meter before sticking it on mains.

Image

Return to “HATs and other add-ons”