Temperature Control with 555 Delay Help

Discussion in 'The Projects Forum' started by jimnguyen27, Apr 6, 2014.

  1. jimnguyen27

    Thread Starter New Member

    Apr 6, 2014
    6
    0
    Hi All,
    Newbie here in need of some help.

    I am trying to make an adjustable temperature controller for a refrigerator to hold a temperature to an accuracy of about +/- 1°C by turning on and off the compressor when appropriate. I also want my circuit to delay turning on the fridge compressor for about 5 minutes after turning off to prevent damage.

    I am using an LM293 Comparator to compare the output of an LM35 Linear centigrade temperature sensor to a voltage that I set as the reference. Positive Feedback introduces a 20mV hysteresis that corresponds to the +/-1°C accuracy that I want. Once the compressor goes low, this triggers a TLC555 timer in a monostable mode to turn off a MOSFET for 5 minutes, preventing the compressor relay to throw. This FET is "Anded" with a FET driven by the comparator. So basically, the compressor relay can only throw if the there is no Delay and the temperature measured is above the high threshold of the comparator.

    Now my problems...
    I am getting bad oscillations once the comparator goes low and then back high triggering the monostable 555. After a couple of seconds, I hear the relay periodically click like a clock, which is not what i want. Seems like the charging capacitor wants to discharge but is held high because of the trigger? From my understanding, once the comparator triggers the 555, the output of the timer should go high, turning off the FET directly under the relay for at least 5 minutes (after 5 mins, the timer will turn the FET back on when the comparator goes high again). Also, seems like changing the charge resistor on the 555 changes the threshold of the comparator. Setting the resistor to 0 makes the comparator behave more like expected. I have no idea why and it is driving me nuts.

    Attached is a schematic. I omitted drawing the noise caps on the regulator but they are there -. 3.3uF on input .1 on output. Also have .1uF caps to the voltage supplies to all IC's. I also omitted pull down resistor on the FETs. Also attached is a schematic from the PCB which is a little harder to read but has more detail of whats on my actual board.

    Thanks for any input.
     
  2. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,546
    1,252
    First, THANK YOU for posting a schematic with your first question.

    Not sure about the oscillation, I'll dig into your schematic later. But some first thoughts:

    Unless you know of a specific circuit interaction you're trying to isolate, I don't see any reason for the two opamps. The LM293 input stage is more than capable of handling the setpoint divider on the - input and the output of the LM35 on the + input. And the LM35 has a low enough output impedance not to mess up your hysteresis calculation. If that is a concern, go to 1 M for the series R and 4.12K for the input R.

    You can get around the series transistor hookup by connecting the drain of the 555 output mosfet directly to the output of the LM293 and its 1K pullup. When the 555 pulse comes on, the 555 fet will take the gate of the relay drive fet to GND. Or you could use the 2nd half of the LM293 as an inverting driver and connect its output to the relay fet gate. Either way, that open collector output sure is handy.

    And finally, 5 minutes is a looooooong time in 555 land. Usually the leakage current of the timing cap messes up the charge curve for caps above 100 uF. That might be the case here. Neither schematic shows the timing R value. What is it?

    ak
     
  3. jimnguyen27

    Thread Starter New Member

    Apr 6, 2014
    6
    0
    I originally had problems with the LM293 feedback messing up the LM35 sensor output which is being read by a MCU. Im assuming a high feedback resistor will prevent that? I also read that the input impedance of the comparator should be kept low to reduce noise. I'm wondering if 4.12k would be acceptable but will definitely try that and lose the op-amp it it's a possible reason for my problems.

    I may try this to save a mosfet. Though, is there any reason my design wouldn't work (the fet's in series)?

    I know it's long but should be possible right? I checked the datasheet for my cap and the leakage current for around 5 min is 165uA. Exact timing is not important. 5 min +/- 1min is what im aiming for so the timing R is around 30k. however, im getting oscillations as soon as i turn R to anything greater than 0.
     
  4. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,546
    1,252
    165 uA is the charging current for the RC timer at the start of the cycle; it decreases as the cap charges up. I popped over to Digi-Key and looked at two different 10,000 uF caps. The leakage currents were 5x and 10x your best case charging current.

    Doesn't explain your oscillation, but not good.

    ak
     
  5. wayneh

    Expert

    Sep 9, 2010
    12,154
    3,061
    What MOSFETs are you using? You're only putting 5V to the gate, and this won't do it for a regular MOSFET. And the output of the 555 won't even get to 5V.
     
  6. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,813
    1,105
    What is the Vgs turn-on threshold of your FETs (which I assume replace the BJTs T1,T2 in your schematic)? The 555 output voltage (<5V) would need to turn its FET (T2) fully on.
     
  7. jimnguyen27

    Thread Starter New Member

    Apr 6, 2014
    6
    0
    What is the best case charging current if I may ask? And how would this effect the 555 besides changing the timing?

    Im using a power supply to mimic the temperature sensor since its a pain to cool it and warm it up constantly and got rid of the op amp. So far, no oscillation but the relay turns off intermittently when its supposed to be on (driving on a led). I thought it was a dip on the comparator output but o-scope shows nothing. Any reason why the 555 is false triggering?

    As for the mosfets, I am using the 2n7000 and the 2n6660. It's all I have in supply. Datasheets show their typical threshold is around 2.1V.
     
  8. jimnguyen27

    Thread Starter New Member

    Apr 6, 2014
    6
    0
    Yeah i replaced the BJT's with mosfets as i was getting bad voltage drops. The fets are proving to work a lot better (sorry, forgot to edit the drawings). The typical Vgs is about 2.1V for these Fets and im getting a 4.95 output on my 555.
     
  9. jimnguyen27

    Thread Starter New Member

    Apr 6, 2014
    6
    0
    Did some more research last night and I suspect that the oscillations might have been due to the LM35. The sensor may oscillate when connected to a capacitive load and since it's on a 3 foot shielded cable, that might be the problem. Putting an RC Dampening circuit described in the datasheet should fix this. Doesn't quite explain the 555 oscillating since the delay should ignore subsequent triggers until it times out. Perhaps the sensor cable is introducing a lot of noise to the circuit? Going to do some more testing tonight.

    Still couldn't figure out the false triggering though. When feeding a steady input from a supply to turn on the compressor, the 555 will sometimes trigger and turn off the compressor. This happens a lot less when I stick a O-scope probe on the output pin. Also, when I bump up the timing delay to 4-5 minutes, the false triggering happens even less than that (which is good). Any theories?
     
  10. wayneh

    Expert

    Sep 9, 2010
    12,154
    3,061
    Make sure the wires you are using can carry the currents you are switching. Try adding more ground wires to see if the problems lessen. Voltage fluctuations caused by ohm's law can drive comparators crazy.
     
  11. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,813
    1,105
    Is the compressor fitted with suppression components?
    Do you have a star ground system so that heavy compressor current isn't passing through the 555's ground lead?
     
  12. jimnguyen27

    Thread Starter New Member

    Apr 6, 2014
    6
    0
    Sorry for the late reply, was up late troubleshooting. I actually do not yet have a fridge compressor to turn on and off. I've been simulating the action by taking the sensor in and out of a fridge that we have in the lab and the relay turns on an led when thrown. The compressor we will be using is literally straight out of a mini fridge so i dont know anything about suppression components.

    What I've learned so far... the sensor did not like being hooked up to the comparator input. Even with decoupling resistor and RC damper I had the wrong reading. Followed Analogkid's advice and bumped the feedback resistor to 1Meg and this seemed to fix that problem.
    Need a load resistor on the sensor output. I had the lm35 do all sorts of weird things on me without this (latching, not changing the output, oscillating, etc). My guess this is because of the feedback current and the sourcing sensor current has nowhere to go.
    False is triggering and oscillation is likely due to noise. Not sure how to fix this at this point - just ground the circuit and other circuits in the system the best i can and pray i guess.

    One other issue i found while testing is that sometimes the reading of the sensor gets to a point where it's close to trip the relay off and it will stay there for a while. Then suddenly the relay shuts off and the temperature sensor reading jumps to the correct temperature. In my case I set my reference at 50 mV and when I cooled down the sensor from room temperature, the reading got stuck at 33mv. After maybe 2 minutes, the relay finally shut off and the reading jumped to 11mv. Though setting my reference to 60mv works perfectly. Am I pushing the sensor to it's limits and that is the explanation of this behavior?
     
Loading...