12V Relay and MCU not working

Discussion in 'The Projects Forum' started by JBaczuk, Jun 11, 2014.

  1. JBaczuk

    Thread Starter New Member

    Jun 11, 2014
    2
    0
    Hi,

    I found a post on this forum (https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CEkQFjAA&url=http%3A%2F%2Fforum.allaboutcircuits.com%2Fshowthread.php%3Ft%3D71159&ei=h7SYU7C4KMePyATL0oCIBg&usg=AFQjCNH25cG0gKZzCizE1zAINozXLXRBzA&sig2=RP9IwU6xpn7iNhCGiz0W1g) that I've been following to make a relay circuit using an MSP430G2553 MCU and a 12VDC relay for 120V circuits. My problem is the transistor appears to be on, even when the input voltage from the MCU is zero. There is always about .7V on the base of the BJT and about 8-9V on the collector (NPN). I'm not sure why. Here is my schematic:

    [​IMG]
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    Look at using a FET, e.g.2n7000.
    Max.
     
  3. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    But why isn't the OP's circuit working?

    I don't see the problem.:confused:
     
  4. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    Disconnect the 2k res and see what happens?
    Max.
     
  5. crutschow

    Expert

    Mar 14, 2008
    13,016
    3,235
    Two possibilities: Either the voltage at the left of the 2k resistor (RELAY EN)is not zero or R8 doesn't go to ground.
     
    absf likes this.
  6. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,809
    834
    Are the grounds connected to the MCU ground?
     
    absf and inwo like this.
  7. NFA Fabrication

    Member

    Aug 12, 2012
    104
    3
    Is the 10K really needed to keep it low? That is the only difference I see from how I normally drive relays with an NPN. I often use 2n2222's with a 1K between the base and the output of whatever I am using to turn it on.
     
  8. MrChips

    Moderator

    Oct 2, 2009
    12,442
    3,361
    Maybe your transistor connections are incorrect, especially if you are using 2N2222. There are two different lead identifications for 2N2222.
     
  9. Alberto

    Active Member

    Nov 7, 2008
    169
    36
    There is a possibility that the transistor is shorted ( my be the fly wheel diode is badly connected). 0.7 volts and a 2 K resistor to the base will never trigger the the transitor.

    Check with attention all your connection, and replace the transistor with a new one. Make sure that the diode is connect directly accross the coil terminals of the relay!

    Cheers

    Alberto
     
    Last edited: Jun 12, 2014
  10. JBaczuk

    Thread Starter New Member

    Jun 11, 2014
    2
    0
    So the output on RELAY_EN is 3.3V so I have a voltage divider to get the required current on the base of the BJT to put it into saturation. I was leaning towards something is shorting the BJT to force it into saturation, but I checked the diode and it has 12V across it. The ground is the same ground as the MCU. I will try removing the 10k resistor like a couple are suggesting. Thanks for your help!
     
  11. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    Leave it in place and disconnect the 2k to see if it turns off completely.
    Max.
     
Loading...