Connect with us

PWM circuit with a mind of its own...

Discussion in 'General Electronics Discussion' started by markcurling, Jan 4, 2016.

Scroll to continue with content
  1. markcurling

    markcurling

    5
    0
    Jan 4, 2016
    Hi all, newbie here, I've just joined the forum as I've been pulling my hair out over this one for too long!

    Scenario is as follows:
    I have a large bar fridge, which uses two noisy 12V fans to cool its heat sink. First of all I added an SSR so that the fans only run when the compressor is active. Then I went a step further and added a circuit to throttle the fans based on the temperature difference between the heat sink and the ambient temperature. This works brilliantly and reduces the noise of the unit ~70% without a significant impact on efficiency. HOWEVER, there is a bug in my circuit that I can't seem to solve!

    I'll add a sketch of my circuit below (apologies if my symbols aren't all correct!). I can look up the values of all the components if need be.

    The compressor and fans operate for a few minutes every 15 minutes or so. I take the 12V from the fans and use a voltage regulator to give me 5V for the logic level, so the whole circuit powers up and down for 3-4 minutes in intervals.

    There are two thermistors - the top one attached to the heat sink, the other at room temperature.
    There is also a potentiometer network which allows me to fine tune the sensitivity.
    Both of these feed an op amp which produces the desired input range for a TC648 fan controller
    This then sends a PWM signal to a MOSFET to drive the fans

    My problem is that the circuit works fine in testing, and most of the time when hooked up to the fridge. However, occasionally I'll walk past and it won't be working, i.e. the compressor will be operating but the fans won't be running (and the hence the heat sink gets stinking hot!). If I reset the circuit it immediately works fine.

    I've exhausted all the reasons I can think of why this isn't working. It shouldn't be my wiring as the fault existed both on the breadboard version and the soldered version. Can anyone suggest any potential reasons? Or if not...a reasonable way to debug it?! It's a pain as it happens so infrequently!

    Thanks a lot,
    Mark

    2016-01-04 18.09.00.jpg
     
  2. Alec_t

    Alec_t

    2,927
    796
    Jul 7, 2015
    Welcome to EP!
    Two points:
    1) Is your FET a logic-level type?
    2) There is no back-emf protection diode across the fan.
     
  3. Harald Kapp

    Harald Kapp Moderator Moderator

    11,003
    2,503
    Nov 17, 2011
    Plus it is a good idea to decouple the fan's +12 V line and the 12 V line that is input to the voltage regulator by a suitable inductor, e.g. 10mH. Also add an input capacitor to the voltage regulator. And ensure that the ground wire (0V) of the regulator and the fan is capable of carrying the current of the fan without noticeable voltage drop (i.e. the wire has very low resistance).
    See this reference for some more information on motor induced noise and how to avoid it.

    Furthermore it is good practice to decouple every IC by a ceramic bypass capacitor (typ. 100nF) from VDD to GND as close as possible to the IC's pins.
     
  4. Alec_t

    Alec_t

    2,927
    796
    Jul 7, 2015
    Did you see this part of the 648 datasheet?
    Shut-down.PNG
     
  5. markcurling

    markcurling

    5
    0
    Jan 4, 2016
    Hi all,

    Thanks a lot for your inputs - really appreciated!

    @Alec
    Yes it is a logic level MOSFET (I was a bit out of my depth choosing a MOSFET, but went with this one)
    I didn't include a diode as I didn't see one in the examples given in the datasheet, happy to add one, but I'm not sure that it could explain the behaviour?

    @Harald
    I can add the inductor and capacitor, but are either likely to cause the problem, and would you know why? The ground wire is short so I hope wouldn't cause a problem

    @Alec
    I have Vas grounded, so it would only shutdown if Vin drops below 0.65V and doesn't then rise above 0.95V, which shouldn't be the case
     
  6. hevans1944

    hevans1944 Hop - AC8NS

    4,560
    2,132
    Jun 21, 2012
    @markcurling Would you go ahead and pencil in the component values and shoot us another photo?

    I don't see anything wrong with your circuit yet, other than pin 2 is the inverting input (-) of the op-amp and pin 3 is the non-inverting input (+) and you have labeled them backwards. Feedback connection is correct, so I assume this is a clerical error.

    It does look like the CMOS PWM controller is "latching up" somehow since "resetting" it (presumably by removing and restoring 12 V DC power) makes it all good for awhile. Consider the advice given in section 5.5 Latch-up Considerations and section 5.6 Power Supply Routing and Bypassing in the Microchip datasheet.

    Intermittent faults can be a real bitch kitty to troubleshoot. Do you have a multi-channel digital oscilloscope with a deep memory that you could use to monitor some test points on this puppy? At least one analog channel and a few digital channels would be most helpful. It would be most useful to capture events just before the failure occurs, using appropriate triggering of the 'scope to detect the failure.
     
  7. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    651
    May 8, 2012
    Am I missing something here?

    I don't get the purpose of the ambient temp thermistor. I would think that the temperature of the heatsink should be of exclusive concern. After all, even if the ambient temp is 30 deg F you would still want the fan to turn on if the heatsink is too hot.

    Here's a scenario... You're heatsink is getting hot. The heatsink thermistor is a gnat's ass away from producing the ON trip voltage. At that moment your AC kicks on and and the ambient temp thermistor changes value and effectively overrides the heatsink thermistor.

    On the other hand... It got chilly today and we don't get many. So chilly days are enjoyed with hot Saki. :D

    Chris
     
  8. Harald Kapp

    Harald Kapp Moderator Moderator

    11,003
    2,503
    Nov 17, 2011
    Neither inductor nor capacitor cause the problem. It's the lack of these components that is a possible (not necessarily the main) source of trouble. A motor induces a lot of noise on the power supply lines. Properly filtering the noise is generally a good first step towards debugging a circuit.
    Also the capacitors across the IC's pins are a general measure to provide impulse current to the ICs when they need it (e.g. when transistors are switching as in the motor driver IC) without introducing too much voltage sag on the supply lines (which could distort the operation of other components).
     
  9. markcurling

    markcurling

    5
    0
    Jan 4, 2016
    @hevans
    Here is a pic with the values - yes I labelled the op amp backwards.
    I did consider those sections but eventually came to the conclusion that they shouldn't be affecting me. However, perhaps something in Harald's explanation could trigger a latch-up condition. Sadly I don't have access to a proper oscilloscope - I used Xoscillo on an Arduino to build it. I could set up this and a multimeter and spend a day sat in front of it waiting for it to happen...! I won't catch the moment of failure, but it would be useful to try and get a read of the states of the pins whilst it's in 'failure mode' to narrow down the part of the circuit that is causing it. This is my last resort for a rainy day!

    @Harald thanks a lot for the explanation, perhaps I am confusing the IC somehow. I could try adding these extras one by one and seeing if one of them solves it.

    @CDRIVE sorry perhaps I didn't explain it well; the fan blows ambient air over the heat sink to cool it down. The effectiveness of the cooling depends on the difference in temperature between the heak sink and the air - if the heat sink is hot because the room is hot, then blowing air over it won't help!


    2016-01-05 10.44.48.jpg
     
  10. Harald Kapp

    Harald Kapp Moderator Moderator

    11,003
    2,503
    Nov 17, 2011
    What do you mean by this statement?

    Plus: Don't forget the back diode as in Alec_t's post #2!
     
  11. davenn

    davenn Moderator

    13,765
    1,920
    Sep 5, 2009
    yes it will !! for the same reason sitting in front of a fan on a hot day cools you down ... it's all in the air motion
     
    Martaine2005 likes this.
  12. davenn

    davenn Moderator

    13,765
    1,920
    Sep 5, 2009
    and you should have decoupling caps on the input and output of the 7805 preferably 0.01uF or at minimum 0.1 uF
     
  13. markcurling

    markcurling

    5
    0
    Jan 4, 2016
    Ha sorry sloppy wording - I mean perhaps the possible problems you suggest are providing a momentary condition for the IC the latch-up. Apart from the fan controller latching up, I can't see a route by which the circuit will sustain itself in a mode of failure?

    • Back diode on the fan
    • 10mH inductor (in series between +12V and the fan?)
    • Input capacitor to voltage regulator (1 micro F polarised or 100nF ceramic?)

    VDD is already decoupled to ground, albeit with a 1 micro F polarised capacitor

    @davenn only if you're sweating so have latent heat to remove (assuming air temp > body temp), but the thermodynamics is a little off topic :p
     
  14. davenn

    davenn Moderator

    13,765
    1,920
    Sep 5, 2009
    100nF = 0.1 uF but as I said preferably 0.01uF ( all ceramic or mylar )
     
  15. Harald Kapp

    Harald Kapp Moderator Moderator

    11,003
    2,503
    Nov 17, 2011
    Sorry, Dave, not quite exactly:
    • A person in front of a fan is cooled by the evaporation of sweat due to the air blowing over the skin.
    • A heat sink will be cooled only as long as the air fanned over it is cooler than the heat sink - even if that means that the air is warm already. It's the temperature difference that counts. When you blow hot air over a cool heatsink the process is reversed: the air will cool down and the heatsink will warm up. This is how heat exchangers work.

    Regards,
    Harald
     
    hevans1944 likes this.
  16. davenn

    davenn Moderator

    13,765
    1,920
    Sep 5, 2009
    yes partly, but I still feel cooling effect fully clothed where there is no sweat and even if there was the moving aire cannot get at it due to the clothing ;)
     
  17. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    651
    May 8, 2012
    Yes, I fully agree that there's no point in blowing air over a device that's the same temperature as the device.

    Along with the other comments made regarding decoupling practices it's good practice and sometimes absolutely necessary to have an anti-ringing resistor (snubber) in series with the MOSFET gate and the controller output. You don't appear to be employing one.


    Chris.
     
  18. markcurling

    markcurling

    5
    0
    Jan 4, 2016
    Wow the list grows! I read through section 5.4 of the controller data sheet and was under the impression I could get away without in this instance.
     
  19. hevans1944

    hevans1944 Hop - AC8NS

    4,560
    2,132
    Jun 21, 2012
    I had the same thought after I read the datasheet for Microchip's PWM fan controller. It appears to not need anything more than a single NTC thermistor to control a heat-sink fan. Well, that along with four resistors and four by-pass capacitors. See Figure 5-1 Typical Application Circuit on page 9 of the Microchip datasheet.

    Hop
     
  20. Alec_t

    Alec_t

    2,927
    796
    Jul 7, 2015
    But if you don't blow the air then the heatsink will get even hotter than normal. I would have thought the fridge doesn't care what the room temperature is; it's the absolute temperature of the heatsink which matters.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-