1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Thermistor and Comparator Circuit

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by vne147, Jan 15, 2010.

  1. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,241
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    ONLINE
    hi,
    That JFET is a low current device and is not suitable for that load current.

    Try the 2381 the P FET, place the heater resistor from the Drain to 0V

    The 2381 will switch at 7V ok.
     
  2. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ
    Hi,


    I'll keep that in mind thanks. This wasnt a problem with the old interface. Now it seems to be.
     
  3. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ
    Hi,

    This new circuit has other problems too. One is that then the comparator output goes low it pulls the supply for the op amp and associated resistors down to around 1/3 of 7v, which isnt a good idea. Maybe a true voltage regulator ic for that instead of zeners?
     
    Last edited: Jan 28, 2010
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. vne147

    vne147 Member

    Joined:
    Jan 11, 2007
    Messages:
    930
    Likes:
    11
    Location:
    Houston, TX

    I could use a 7805. I have a 100mA output version in a T0-92 package that might work. I also have the standard 220 package ones also. What about increasing the value of the pull up resistor at the comparator output so the supply voltage doesn't get pulled that low?
     
  6. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,241
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    ONLINE
    hi,
    Use the 7805 Vreg, changing the value of the LM pullup will not give the desired result.
     
  7. vne147

    vne147 Member

    Joined:
    Jan 11, 2007
    Messages:
    930
    Likes:
    11
    Location:
    Houston, TX
    Done. Thanks!
     
  8. vne147

    vne147 Member

    Joined:
    Jan 11, 2007
    Messages:
    930
    Likes:
    11
    Location:
    Houston, TX
    Hey everyone. I just finished a second round of testing and my circuit is improving. I made some modifications by adding a few onboard caps to smooth out the supply voltage. I also added an onboard 7805 to use as a voltage reference and placed a cap at the output. I also placed another cap on the inverting input line from the thermistor/415 KΩ voltage divider and swapped out the PNP for a P-Channel MOSFET. Last but not least I clipped off the exposed lead to the thermistor and soldered it to some shielded 2 conductor wire so that almost none of the thermistor leads are unshielded. Here’s an updated schematic:

    [​IMG]

    The test data showed some interesting results. First off, the problems I had with the first round of testing where the voltage at the inverting input wasn’t getting all the way to the upper or lower set points seem to be corrected. Whatever was causing it before (possibly EMI or RF interference) seemed to be fixed by the shielding on the thermistor leads and/or the extra caps. Also, I wasn’t running my dryer 8 feet away this time either :D . Here is a plot showing the voltage at the inverting input of the LM293. I’m not sure what that little blip is after the first cycle but after that it’s smooth and consistent. Almost looks like sim data!

    [​IMG]

    However, as you can see the voltage jumps that I’m getting whenever the comparator changes output states have not been corrected. This time I did monitor the reference voltage to see what was going on and it was indeed changing. When the comparator output was hi and the MOSFET was not conducting, the output from the 7805 (i.e. reference voltage) was almost 5V exactly but when the comparator output was low and the MOSFET was conducting, the output of the 7805 jumped to ~5.3V. This was at a supply of 8 volts. Just to see what would happen, I varied the output of my bench power supply during a time when the comparator output was low to see what would happen to the 7805 output. When I increased the supply voltage to around 10V, the output of the 7805 raised to ~ 5.35V. You can see the affect this had on the inverting input voltage during the first period when the heater is on. It is labeled as “Supply voltage adjustment”. Can anyone figure out why this is happening?

    I also recorded some temp data. The temp is not within my expected range but like I mentioned earlier I question the accuracy of the temp probe on my millimeter. Also, I want to figure out these voltage jumps first and get the circuit working well and then I’ll go start tweaking pots to adjust the range.

    [​IMG]

    Thanks again for the help everyone.
     

    Attached Files:

    Last edited: Jan 30, 2010
  9. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,241
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    ONLINE
    hi vne,
    Will run your 'tested' circuit thru LTS.

    I'll look at the test results today, let you know.


    EDIT:
    Looking at the switching points plot that you posted for the -INV input, a simulation run indicates that the temperature is very close to the -1C thru -5C region, not the +4C thru +14C as your plot shows.

    Due to the LM293 design I would expect to see a small change in the -INV input as the +NI inputs switches due the positive feedback created by the hysteresis resistor.

    I am concerned about the Source of the P FET being connected to the +8V, while the Gate is connected to +5V [via the 1K]
    Using the +8V [Source] as a voltage ref point, the Gate is only changing from -8V to -4V, a 4 volt change.
     
    Last edited: Jan 30, 2010
  10. vne147

    vne147 Member

    Joined:
    Jan 11, 2007
    Messages:
    930
    Likes:
    11
    Location:
    Houston, TX
    Hey Eric, thanks for running the sim. I just realized that the schematic in post # 87 had an error. I accidently omitted the 1KΩ resistor in between the LM293 output and the gate of the NTE2381. I corrected the schematic and edited the post so it is accurate now. The resistor I added is R21.

    The temp felt by the thermistor might be much closer the expected range. It is of course impossible for me to place the thermocouple probe from my multimeter in exactly the same place at the thermistor and on top of that I don't know how accurate it is. I wish I was somehow able to tell the exact temp being felt my the thermistor.

    Should this be the gate is only changing from -8V to -3V? I would think the change would be 5V not 4V. Regardless, can you help me understand why this is a concern?

    Thanks!
     
  11. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,241
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    ONLINE
    hi,
    Look at these images, one shows the Vout swing at the FET Gate the other a modified circuit.

    Note the FET Gate threshold voltage, extract from the datasheet.
    AAesp02.gif AAesp03.gif
     

    Attached Files:

    Last edited: Jan 30, 2010
  12. vne147

    vne147 Member

    Joined:
    Jan 11, 2007
    Messages:
    930
    Likes:
    11
    Location:
    Houston, TX
    So VGS(th) is the voltage from the gate to the source at which the MOSFET will begin conducting. Correct? When the comparator output is high, the gate voltage is 5V and the source voltage is 8V making VGS 3V which is within the 2V - 4.5V range given in the data sheet. So you are concerned because even when the comparator output is high, the MOSFET is still conducting? Am I getting this?
     
  13. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ
    Hi,


    You seem to be indicating that the inverting terminal of the op amp is changing when the comparator switches.
    Because of this you need to show us a plot of your supply voltage AND the inverting input terminal, on the SAME graph. This is meant to monitor the supply voltage to the comparator (5v supply) while the comparator is switching.

    The only things that have control over the inverting input terminal are the supply voltage, the thermistor, and
    the input bias current. The input bias current, even if it changed by the entire amount, would only account
    for about 0.01 volts at the most. Since the thermistor should not be changing, the only thing left is the
    power supply voltage of 5v. If the output load draws down the +8v supply it might cause this.
    Of course if there is something wrong with the comparator that would do it too, or something not hooked
    up right.

    The supply voltage should not be +5.3v at any time. It should be very close to +5v. 5.05 or 5.1 might be acceptable, but
    5.3v is not.
     
    Last edited: Jan 30, 2010
  14. vne147

    vne147 Member

    Joined:
    Jan 11, 2007
    Messages:
    930
    Likes:
    11
    Location:
    Houston, TX
    Yes, I am indicating that the inverting terminal of the op amp is changing when the comparator switches. I can't show you a real plot of both the supply voltage AND the inverting input because I only have the capabiltiy to record a single measurement at a time. If I were to record them seperately and then overlay the two any differences in on/off time would just make interpreting the plot more confusing and difficult in my opinion.

    Here is a plot I doctored to show the effect I'm talking about. The supply voltage (i.e. output of the 7805) varied between 5V when the comparator output was high and 5.3V when the comparator output was low. It is not actual data but I know these were the voltages becasue I measured them real time with a second multimeter (unfortunately one that does not have record capability).

    [​IMG]

    I agree, hence my confusion. I have also checked and rechecked to make sure everything is hooked up correctly and I believe it is.

    I did try something else on my bench but haven't done a full up test yet. I tied the source of the MOSFET to the 5V output of the 7805 instead of 8V. Here is an updated schematic:

    [​IMG]

    When I did this the inverting terminal of the 293 only changed about 5 mV when the comparator output changed state. That seemed to fix the issue but like I said I haven't done a full up test yet. I'll probably try one later today or tomorrow.
     

    Attached Files:

  15. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ
    Hi again,


    Ok, now we are on to something :)

    BTW sometimes if you want to see how the two waves are related in time, you can use two large
    value resistors together and at the center tap connect a smaller resistor to ground, then connect
    the scope across the smaller resistor and the two inputs one to each large value resistor.
    This works if your scope input is high impedance.
    What you see is a strange waveform but usually shows how one wave acts in relation to the other.
    Sometimes one larger resistor and one somewhat smaller resistors in place of one of the larger
    ones makes one wave show bigger than the other, but that gives you just enough information to
    figure out the exact timing between the two, then you can go back to one input at a time knowing
    the time relation then.
    If one resistor is 1 meg and the other is 500k for example, the signal connected to the 500k
    will appear to have a greater effect on the total waveform. 1 meg and 10 megs would show
    one waveform predominant, with the other riding on top of it, but you would still be able to
    figure out the timing from that waveform.
    If you have any problem interpreting the resulting waveform, just post a scope shot here
    along with the three resistor values you use. Probably making the power supply resistor
    much larger than the inverting input resistor would show the inverting input very well
    with the power supply square wave riding on it. The resistor to ground should be 100k or
    less.

    Anyway, now that we know that the power supply is definitely varying, we can look for reasons why
    this would happen. Of course the most obvious would be a bad regulator, but another reason would
    be (since the voltage goes above 5v) that something in the load is driving it high, or simply that the
    load is not low enough to allow proper regulation. The fix is easy, connect a 1k resistor directly
    across the output of the regulator.
    If it is not that then check to see that the circuit is wired exactly as shown in the schematics.
    If anything is different, or some solder short exists, that would surely mess everything up badly
    like this.
     
    Last edited: Jan 30, 2010
  16. vne147

    vne147 Member

    Joined:
    Jan 11, 2007
    Messages:
    930
    Likes:
    11
    Location:
    Houston, TX
    Hello again everybody. I finally got around to doing another test and the circuit is working much better. Adding the regulator definetly helped to attenuate the voltage jumps that are occuring when the ouput changes state but it didn't eliminate them. I'm pretty happy with how the circuit is working. All the measurements are pretty darn close to the predicted/calculated values. Amazing...math works!!!:D And, I'm fairly confident that when I use this circuit in my project and it is not switching a .8A load, it will work fine.

    Thanks to everyone who contributed to this thread and worked with me to iron out the kinks. You were all a big help. Here's one last plot of the voltage at the inverting input of the LM293 during the last test. Looks pretty nice to me!

    [​IMG]
     

    Attached Files:

Share This Page