Controlling 12v circuit with 5v control with high side switch

Discussion in 'Digital Circuit Design' started by Devin Dandurand, Oct 13, 2017.

  1. Devin Dandurand

    Thread Starter New Member

    Oct 13, 2017
    8
    0
    I have a project that requires me to switch a 12v circuit with 5v control. Wondering if anyone could show me a schmatic and possibly how it explain works. And if it is possible. Ultimately i would like to control a 12v relay with a 5v signal on the high side with out additional 5v relays.

    Thanks you in advance

    Devin
     
  2. AlbertHall

    Distinguished Member

    Jun 4, 2014
    4,268
    976
  3. Devin Dandurand

    Thread Starter New Member

    Oct 13, 2017
    8
    0
    Thank you. Are we creating a voltage divider on the pnp base?
     
  4. AlbertHall

    Distinguished Member

    Jun 4, 2014
    4,268
    976
    Yes, although the circuit would probably work well without the top resistor driving a relay. The emitter-base resistor on the top transistor is there to make sure the transistor can turn fully off. Even when off there will be some leakage current through the NPN transistor. The emitter-base resistor allows this current to flow, but not produce enough voltage to turn in the PNP transistor.
     
  5. Devin Dandurand

    Thread Starter New Member

    Oct 13, 2017
    8
    0
    Any idea how i would calculate the values of the resistors needed? Sorry ive been tring to wrap my head around this for a few days
     
  6. AlbertHall

    Distinguished Member

    Jun 4, 2014
    4,268
    976
    How much current does your relay coil need (or what resistance is the coil)?
     
  7. Devin Dandurand

    Thread Starter New Member

    Oct 13, 2017
    8
    0
    I will have to get that information. This is a long distance project. And haven't had the relays in hand and it seems to be a not commonly used relay due to lack of a data sheet. I will get that information. Thank you again for all your help.

    I am unable to switch the low side due to the relays always being connected to ground and being this is to retrofit an existing product. Bad part is i have to redisign the entire board. Lol
     
    Last edited by a moderator: Oct 13, 2017
  8. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    5,659
    1,607
    Sort of. It is a voltage divider, but the intent is something else. The series resistor from the base to the input limits the base current to a value that is safe for both the transistor and the uC output. The resistor go GND is needed only if the uC output can not go low enough to guarantee that the transistor turns off. For a normal uC output pin like a PIC or Arduino, it is not needed. Typical values would be 1-10 K for the series resistor and 10-100 K for the shunt.

    ak
     
  9. Devin Dandurand

    Thread Starter New Member

    Oct 13, 2017
    8
    0
    Coil resistance is 80 ohms i found a data sheet
     
  10. AlbertHall

    Distinguished Member

    Jun 4, 2014
    4,268
    976
    This should do the job. Note the diode is important to protect the PNP transistor.
    upload_2017-10-13_17-37-8.png
     
  11. Devin Dandurand

    Thread Starter New Member

    Oct 13, 2017
    8
    0
    You are the man. Albert thank you very much.

    How did you determine correct resistor values?
     
    Last edited by a moderator: Oct 13, 2017
  12. AlbertHall

    Distinguished Member

    Jun 4, 2014
    4,268
    976
    The relay needs 150mA, so to be sure the PNP fully saturates it needs a base current of 15mA. There will be about 11V across R3 and it needs to pass more than 15mA (733Ω - next lower standard value 680Ω). The NPN collector current is therefore 15mA and will need 1.5mA base current. There will be about 4.3V across R1 (2866Ω - next lower standard value 2.7k.
    My general rule is to make the base-emitter resistor equal to the base drive resistor which gives the values of the other two resistors.
     
  13. Devin Dandurand

    Thread Starter New Member

    Oct 13, 2017
    8
    0
    Thank you ive learned much from you.
     
  14. philba

    Member

    Aug 17, 2017
    325
    90
    out of curiosity, why the desire for a high side switch? Using a low side switch, it can be done with a lot fewer parts. (1 NPN or N-MOSFET, 2 resistors and a diode)
     
  15. Devin Dandurand

    Thread Starter New Member

    Oct 13, 2017
    8
    0
    This is an going to retro fit an existing system. So i dont have the option to re wire there relay block

    Works perfectly thanks again
     
    Last edited by a moderator: Oct 13, 2017
Loading...