Switching a 12vdc motor with a transistor

Discussion in 'The Projects Forum' started by Rich2, Aug 17, 2015.

  1. Rich2

    Thread Starter Member

    Mar 3, 2014
    52
    1
    hello, I'm switching a small 12v fan on and off with a transistor (bc337) I've got an NTC variable resistor on the base up to the sipply and a 47k pot to ground. All works well when I warm up the sensor, the motor starts and goes off when it cools down. However when the transistor is off it starts to get hot. There is still about 40ma going through the motor windings. Is there a cure for this? Maybe it needs a diode or something?

    Thanks, Rich
     
  2. pwdixon

    Member

    Oct 11, 2012
    488
    56
    What's happening is that the transistor is not switching so much as just limiting the current enough to stall the fan. What you need is some positive feedback and hysteresis to flip the transistor completely off or on. You do of course also need a diode across the fan to protect the transistor when the fan is turned off.
     
    Last edited: Aug 17, 2015
  3. Rich2

    Thread Starter Member

    Mar 3, 2014
    52
    1
    Thanks for that, yes that's the diode I was thinking of. How could I switch the transistor off more completely? I suppose the base would need to be more negative, when I turn the pot down fully it grounds the base and switches off then but it throws out the sensor range.
     
  4. Rich2

    Thread Starter Member

    Mar 3, 2014
    52
    1
    Also when the motor runs it takes 70ma and the transistor is cool. When the motor stops it takes 40ma and gets hot.. Why is that ?
     
  5. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,813
    1,105
    Why? Because there are several Volts across the transistor and still 40mA current. Power (heat, in Watts, that the transistor has to dissipate) = Volts x Amps.
     
  6. Rich2

    Thread Starter Member

    Mar 3, 2014
    52
    1
    Of course
     
  7. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Here is what is going on in your existing circuit:

    264.gif

    which shows Collector voltage V(c), The load (collector) current, and the power dissipation in the transistor (violet trace) vs base current . Note units on plot.

    Note that the peak power dissipation occurs when V(c) is approx. half of the supply voltage.
     
  8. Rich2

    Thread Starter Member

    Mar 3, 2014
    52
    1
    Thanks Mike, I wonder if using a relay would help although I want to keep it simple.. what about a Schmitt Trigger? I remember they come on and off more suddenly. It's a long time since I was at college, forgive my rustyness
     
  9. Rich2

    Thread Starter Member

    Mar 3, 2014
    52
    1
    What about a zenner diode in the emitter? It would be reversed biased until the transistor switched on so far then suddenly conduct and the fan would start.

    Are these ideas any good
     
  10. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Here I am trying to find the sweet spot on your temperature sensor. Does the circuit look familiar?

    264a.gif

    Note that everything you are interested in happens as the resistance of the sensor varies from ~40KΩ to ~80KΩ.

    It would be good if your circuit had a snap-action with a trip point around 50K, ideally with a bit of hysteresis, too.
     
    Rich2 likes this.
  11. Rich2

    Thread Starter Member

    Mar 3, 2014
    52
    1
    Yes that's my circuit. The sensor reads:
    240k at 3c
    90k at 20c
    30k at 55c (in my tea this morning )

    I want the fan to come on at about 30c. What do you think about using a zenner diode?
     
  12. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Adding a Zener, by itself, does not turn the circuit into a Schmitt trigger. It needs an non-inverting amplifier to achieve positive feedback, i.e. a Schmitt trigger, which requires two transistors, each an inverting amplifier.

    Here is a Schmitt Trigger with hysteresis that has the fewest number of parts I know... I set it up so that the switching points are 41KΩ and 46KΩ.

    In the simulation, V(sensor) = V2 sweeps from 100KV to 30KV and back to 100KV. R1 is the simulated sensor, whose resistance is a linear function of V(sensor), such that 100kV=100KΩ.

    Note that I purposely made R2=R3. R4 sets the hysteresis.

    Note the switching points are shown at the cursors.
    265t.gif
     
    Rich2 likes this.
  13. Rich2

    Thread Starter Member

    Mar 3, 2014
    52
    1
    Thanks Mike, I can build that tomorrow. Only thing I haven't got are the 39k resistors. I've got (22k +10k) or 47k.

    I think the 555 is good up to 100ma isn't it.
     
  14. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    200ma

    Here is a solution using only the resistors you have on hand.

    107.gif
     
    Last edited: Aug 17, 2015
  15. Rich2

    Thread Starter Member

    Mar 3, 2014
    52
    1
    It works hurrah! I've used 2 x 47k resistors instead of the 39k ones. It uses 5ma when off and stays cool. Only thing is it doesn't switch on until 50c and I would like it a bit lower so do I change the 3.3k resistor?
     
  16. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    784
    The best way to switch the transistor off completely, would be to use a Schmitt trigger - but then you'd have only on/off operation.

    PWM may be the way to go, if its a computer fan, it'll have a BLDC motor so a bit of smoothing of the PWM output might be needed.

    In simple terms; your PWM can be as simple as a sawtooth generator and a comparator, the usual text book example is made with a dual op-amp, but you can use a single op-amp as the comparator and some other means of generating the sawtooth. Any type of unijunction oscillator will do - the programmable unijunction can be simulated with a complementary pair of small signal transistors.
     
  17. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Did you try the circuit in post #14?
     
  18. Rich2

    Thread Starter Member

    Mar 3, 2014
    52
    1
    Yes #14 works. All i want is an on/off fan switch Ian so i'm not bothered about PWM. as i said though i could do with it coming on at a lower temperature so what resistors should i change? Something i've noticed also is that when i'm gently warming the sensor up with the soldering iron underneath, the motor will start slowly at first for a few seconds until it gets even warmer and then it suddenly starts fully, when the motor is running slowly the chip does get warm. it always switches off suddenly when cooling down.
     
  19. Rich2

    Thread Starter Member

    Mar 3, 2014
    52
    1
    No sorry its post #12 diagram i didnt see the other one. i will change it to #14
     
  20. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    784
    There was a series of articles in monthly instalments in Everyday Practical Electronics on Schmitt triggers, goes into designing for specific threshold voltages - before 2005 as far as I can remember.

    You can probably order reprints of those articles from the publisher - but if you google, the issues may still be floating about on the web somewhere.

    Here maybe:

    http://david.alfa-romeo.eu/elektro/EPE/
     
    Last edited: Aug 17, 2015
Loading...