This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Interface MSP430 to 5V relay



Hello, I have been having some major problems with how to get my G2231 to connect to a 5V relay I got. I am developing a driveway alarm type system that takes input from two PIR sensors and then actuates a relay based on the inputs. However, the relay I selected had to be rated very large, its a 240v 30A relay, but uses a 5V coil. It draws about 200ma and I need to be able to control it with my micro. I have tried a couple different methods from Sparkfuns website for using that relay, but it requires 5V, so I was hoping someone here could help me out and give me a quick explanation or a link to an article. Thank you. 

  • Well for one, the the 2232 only goes to 3.3V max so it is unlikely to ever pull in a relay at 5V or be able to supply that current needed to initially pull in the relay. Your best option is to use the port output to drive a FET which in turn is used to drive the relay at the required voltage and current, but the best method to provide electrical isolation between the processor and relay is to use a optocoupler. The processor will be able to drive the LED, which in turn drive the transistor for switching the relay. A even better option is to use a opto relay.

    So, get a opto relay and use that to turn on the main relay. Here are some links to help you out:

    http://www.learnabout-electronics.org/ssr_01.php

    http://www.opto22.com/

    http://en.wikipedia.org/wiki/Solid_state_relay

    http://nz.element14.com/jsp/search/browse.jsp?N=500005+1000360&Ntk=gensearch_001&Ntt=opto+relays&Ntx=mode+matchallpartial

    http://nz.element14.com/jsp/search/results.jsp?N=500005+1001914&Ntk=gensearch_001&Ntt=opto&Ntx=mode+matchallpartial&isGoback=false

    Hope it's some help to you.

  • Hi Clay,

    have a look at the ULN2803A. They are cheap and easy to use. Another advantage of this device were the build-in output clamp diodes.

    The ULN2803AN comes in a PDIP package - handy for breadboard use.

    Rgds
    aBUGSworstnightmare 

**Attention** This is a public forum