mamalik
Posts: 1
Joined: Sat Nov 24, 2012 2:38 pm

Using logic level converter

Thu Dec 06, 2012 3:21 pm

Hi,

Can this device be used to safely control relay from Raspberry PI.

https://www.sparkfun.com/products/8745?

Thanks

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: Using logic level converter

Thu Dec 06, 2012 5:07 pm

No, not directly. It only allows the raspi's 3.3V inputs and outputs work with 5V sensors and the like, and it probably won't handle enough current to drive a relay.

To drive a relay you'd need something that could handle a bit more current, like a transistor or a ULN2003 chip or something. Here's one post:

http://www.raspberrypi.org/phpBB3/viewt ... 37&t=10130

In there someone lnked to this example (don't try the mains wiring bit though!):

http://www.susa.net/wordpress/2012/06/r ... sing-gpio/

But there are lots more examples if you can find them in the "Projects" forum sections.

Return to “Automation, sensing and robotics”