[SOLVED !] Transistor switching - odd behavior at odd voltages


Closed Thread
Results 1 to 12 of 12
  1. #1
    rackley
    Guest rackley's Avatar

    0 Not allowed!

    Default Transistor switching - odd behavior at odd voltages

    I'm using transistors to switch external loads for my PIC project. I'm using NPN transistors (specifically these) with the PIC's output pins connected to the base of the transistors. The load it is switching is NOT 5v - it's about 14-15v (automotive eventually, but still on the bench right now.) It's actually switching the GROUND for the device, not the power. So the emitter is tied to the ground plane and the collector goes to the screw terminal to be connected to the device's ground wire.

    When I test it using the regulated 5v on-board, the transistors completely turn on/saturate to 5.00v, and turn off to 0.00 volts. But if I use my volt meter on the ~14v supply voltage, it turns on/saturates to about 14.8 volts, but it only "turns off" to about 6.38 volts. Why is it still letting through 6 volts with a 14/15v load but totally turning off for a 5v load?

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #2
    Cruster
    Guest Cruster's Avatar

    0 Not allowed!

    Default

    Which PIC are you using and which output port - as some outputs are open collector so will float high but pull down low. Are you connecting the port directly to the transistor base or through a 1K(ish) resistor?

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #3
    Prolific Poster See_Mos's Avatar
    Join Date
    Feb 2004
    Posts
    1,322
    Thumbs Up
    Received: 19
    Given: 0
    Total Downloaded
    1.01 GB

    0 Not allowed!

    Default

    The way you are using the transistor should not be a problem. The most likely cause is a wrong value base resistor. The gain of this transistor is not very good and I think you will need a resistor as low as 100 ohms. I would suggest using a different transistor, even a darlington.

    regards, T.
    My RAM is failing

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  7. #4
    Fanatical Contributor fanie's Avatar
    Join Date
    Oct 2005
    Posts
    7,989
    Thumbs Up
    Received: 31
    Given: 15
    Total Downloaded
    434.52 MB

    0 Not allowed!

    Default

    CMOS is right, I wouldn't use those trannies either -

    Try the ULN2003 or ULN2004's - 16 pin, they have 7 open collector drivers at 500mA each, protection diodes, and built-in base resistors. Can parallel them for higher currents. How much current are you switching?

    Normally only the program pin of the pic should have a pull-up resistor if you want to use that as an output as it is open-collector.
    Fanie

  8. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  9. #5
    rackley
    Guest rackley's Avatar

    0 Not allowed!

    Default

    I'm using a 10k base resistor. It lets through about 0.62 volts, which I was thinking might be too little and I was going to change it to a 1k or so, but the transistor appears to saturate and turn on just fine. Plus, the issue was with the off state, when I get 0.00v from the PIC output pin - the transistor still flows about 6.xx volts through it from a 14/15v supply.

    I'm using the 18F452, ports RE0 - RE2. ADCON1 is set for digital IO on those ports.

    I'm using the transistors to switch standard automotive 30a solenoids, so the current isn't going to be more than 250-300ma max.

    Thanks for the suggestion of the ULN's. Having the built in base resistors and diodes is a great feature and will save some real estate on my board, as well as costs. What is the advantage of using a higher gain/darlington pair when you're just switching a ground?

    Do you think the lack of gain of the transistor is the reason why it's letting 6.xx volts seep through when the base has no voltage/current?

    Thanks,
    Ray

  10. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  11. #6
    Prolific Poster See_Mos's Avatar
    Join Date
    Feb 2004
    Posts
    1,322
    Thumbs Up
    Received: 19
    Given: 0
    Total Downloaded
    1.01 GB

    0 Not allowed!

    Default

    Hi Ray,

    The collector current is a product of the supplied voltage and reisitance of the load so if you measure the output at different voltages or loads you will get different readings unless the transistor is fully turned on. The base current required to make the transistor pass the required current is a product of the collector current divided by the gain of the transistor. In the absence of a DC gain figure we use the HFE gain which for this transistor is as low as 10 for a collector current of 1 amp. As I never run transistors at their specified maximum I will assume a load of 500mA. And I allways calculate for the lowest given HFE value.

    .5amp / 10 = .05 amp base current.
    5 volts / .05 = 100 ohms for the base resitor.

    in practice you would probably get away with something as high as 470 ohms, but not 10K.

    It sounds as if you have the transistor wired corrctly and it should drive the automotive relay without any problem so I suspect a duff transistor.

    The advantage of darlington transistors is that they have very high gain values which therefore requires less base drive = a higher value base resistor and therefore an overall reduction in consunption.

    regards, Trevor.
    My RAM is failing

  12. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  13. #7
    Fanatical Contributor fanie's Avatar
    Join Date
    Oct 2005
    Posts
    7,989
    Thumbs Up
    Received: 31
    Given: 15
    Total Downloaded
    434.52 MB

    0 Not allowed!

    Default

    Just to be sure... Is this what you have ...? That voltage you get makes me feel somethin's not right. (There should be a diode added across the rele)
    Fanie

  14. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  15. #8
    rackley
    Guest rackley's Avatar

    0 Not allowed!

    Default

    Well I was measuring with just the voltmeter from the +14V terminal to the switched terminal. A user on another forum just pointed out to me that I need to put the actual load in the circuit because the minimal current leakage through the transistor will cause the volt meter to read a relatively high voltage. So I'm going to test tonight when I get home and see if that's what's causing me to see this voltage.

  16. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  17. #9
    david
    Guest david's Avatar

    0 Not allowed!

    Default

    Hi,
    I think you are measuring the turned-off transistor leakage current through your voltmeter resistance.
    A good digital meter could be 1 meg to 10meg load so even 1 uA of leakage could drop 1v to 10v depending on your meter.
    Either put the relay in to circuit or at least a somewhat more realistic load (not an open circuit in shunt with a meter) Even a 10k resistor will behave more like the real load.

    Cheers,
    David

  18. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  19. #10
    rackley
    Guest rackley's Avatar

    0 Not allowed!

    Default

    Well I hooked up a relay for the load and things got even more interesting. The relay actuated and stayed actuated. Measuring the voltage across the relay, it goes from 9.31v when the base of the transistor is turned on to 9.20v when the base is turned off. What the heck is going on here?

  20. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  21. #11
    Cruster
    Guest Cruster's Avatar

    0 Not allowed!

    Default

    Is your circuit exactly like the drawing in Fanies post but with a diode in parallel with the relay coil? (Anode to transistor collector) What is the voltage across the transistor (collector emitter) doing?

    Have you tried another transistor in the circuit in case the one you are using is damaged? Do you get the same results?

  22. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  23. #12
    rackley
    Guest rackley's Avatar

    0 Not allowed!

    Default

    Doh! I feel a bit embarrassed to even post this, but someone on electro-tech-online figured out my problem. I looked in the data sheet for my transistor and the collector and emitter pins are reversed from what I thought they were. I had the thing in backwards! How embarrassing :-) Thanks for the help guys!

  24. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Odd USART behaviour
    By Peter Truman in forum Proton Plus Compiler v3
    Replies: 2
    Last Post: 6th November 2018, 10:55
  2. I2Cout - not coping with odd numbers.
    By david in forum Proton Plus Compiler v3
    Replies: 17
    Last Post: 7th February 2014, 09:56
  3. Something odd about %0
    By towlerg in forum Website / Forum Issues
    Replies: 1
    Last Post: 31st March 2013, 17:43
  4. Odd ICSP behaviour
    By Peter Truman in forum Proton Plus Compiler v3
    Replies: 8
    Last Post: 24th December 2010, 09:51
  5. Odd behavior while sim'ing ADC commands on 18F4620
    By Sparky1039 in forum Labcenter Proteus VSM
    Replies: 5
    Last Post: 23rd April 2007, 02:44

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts