Hot tub controller works on the bench, but...

Discussion in 'The Projects Forum' started by gregbrainerd, Apr 23, 2009.

  1. gregbrainerd

    Thread Starter Member

    Apr 3, 2009
    27
    0
    Hi All,

    I need a little help here and from the posts I've read, there's a lot of brain power on this site. It's been 20 years since I messed with circuits, and I must have forgotten something important.

    I'm building a controller for the heater for a hot tub, and it worked great on the bench using a gallon bucket and an old heating element for a coffee cup. When I put it in the tub, it will work fine for a while, but then it sticks in the "on" position.

    What's changed from the bench to the tub is that the test run used a single 9V relay to switch the cup heater on and off and there are two relays (one for each leg of the 240V).

    When the heater wouldn't shut off, I pulled the LM339 out of it's socket, and the heater was still on. That put the problem in the transistor or the relay. When I grounded the drain, the relays shut off. My first thought was that the relay has inductance and maybe when it's field collapsed, the transistor picked up some charge and continued to conduct, hence the 2200Ω R4 dropping resistor. No luck on that idea.

    Next thought was that the electrons might rather return to the transistor instead of fighting 2200Ω to the positive bus, so I put a 1N4004 diode to stop that. Still no luck.

    I'm missing something simple here. This can't be that hard. Any help would be greatly appreciated.
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Is your thermistor a positive temp coefficient of negative temperature coefficient device?

    hgmjr
     
  3. yourownfree

    Active Member

    Jul 16, 2008
    89
    0
    It appears your mosfet is turned on all the time by the 2.2k resistor going to the positive rail instead of the negative. When the 339 gets activated it will then supply the voltage necessary for turn on.
     
  4. gregbrainerd

    Thread Starter Member

    Apr 3, 2009
    27
    0
    Thanks for the responses!

    The question on the thermocouple is a good one. I did all the tests with the thermistor from the last controller I had. At the desired temperature, I had 3K ohms from the old one and 4000 ohms from the one currently in the tub. I just added an extra 1000 ohms for the test. If one's a positive coefficient and the other is negative, that would explain a lot. If I remember correctly, the one in the tub had 14k ohms at 65 degrees and 4000 at 110 deg.

    About the mosfet being turned on by the 2.2k- it sure looks like that from the schematic, but I botched my drawing. The diode and the resistor are between the transistor and the relay. I'll attach an updated drawing. My apologies.

    Thanks again for the help!
    Greg Brainerd
     
  5. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    I think the diode is still misplaced in the new diagram. I suspect that the diode is actually in parallel with the coils of the relays. The diode most likely is there to protect the mosfet from damage by the flyback voltage from the coil when the coil is de-energized.

    The placement of R4 (2200 ohm) looks a bit suspicious as well.

    hgmjr
     
  6. gregbrainerd

    Thread Starter Member

    Apr 3, 2009
    27
    0
    My thinking on the diode was that it would stop the electrons from returning to the transistor and the R4 would give them a route to positive without dropping the voltage at the relay (transistor on) below its threshold. If the diode were in parallel with the coils, wouldn't the current bypass the relay so it wouldn't close?

    Thanks for the help! I know just enough about this to be a hazard to myself and those around me.
     
  7. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    The diode is normally placed in parallel with the coil so that it is reverse biased during the energized coil state and briefly forward biased during the de-energized coil state.

    hgmjr
     
  8. yourownfree

    Active Member

    Jul 16, 2008
    89
    0
    i agree with Hgmjr you need a diode across each coil (1N4001) or similar or it will never work right, they will hang and also they are for protection. Get rid of the diode inline at the source of the mosfet, it is only dropping your your voltage down about .7 volts.
    place it across the source and drain for protection. The resistor needs to go from gate to gnd. Then meter the voltage at the 339 output when it is suppose to turn on. is it enough to turn on the mosfet. if it turns on in reverse then swap your therm. with r3. Now if the voltage is tripping ok at the gate of the mosfet then see if ther mosfet is turning on, to see if it is still ok and has not been compromised by earlier experiments. should work fine after that.
     
  9. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    You will also need to provide a pullup resistor on the output of the LM339 since it is an open-collector output.

    Perhaps the 2200 ohm resistor was intended to be used in that capacity.

    hgmjr
     
  10. gregbrainerd

    Thread Starter Member

    Apr 3, 2009
    27
    0
    Oops- another defect in the diagram. There's a 10k resistor between pin 2 on the LM339 that's the pull-up resistor. I need to re-do the diagram- apparently I can't read my own chicken scratches. I'll do that later today and send it on. That work thing is getting in the way of playing with curcuits.
    Thanks again
     
  11. gregbrainerd

    Thread Starter Member

    Apr 3, 2009
    27
    0
    Okay- here's the right diagram for the tub control circuit. I looked at the circuit as well as my sketches and this is how it's done. It may not be right electronically, but it's right as a representation. Come to think of it, it's not right electronically, or it would work.
    Thanks again for the help!
     
  12. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    It appears that you forgot to attach the diagram.

    hgmjr
     
  13. gregbrainerd

    Thread Starter Member

    Apr 3, 2009
    27
    0
    I probably look like the biggest ditz to ever post on this site. In real life I'm actually a normal person of normal capabilities.
     
  14. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    With D1 in the orientation you have it pictured in your most recent diagram, you are going to find that the relays will not operate at all. The diode is going to prevent the flow of current to the load since it will be reverse biased.

    hgmjr
     
  15. gregbrainerd

    Thread Starter Member

    Apr 3, 2009
    27
    0
    I must admit ignorance there. I thought the schematic diode pointed in the direction you wanted the electrons to flow, so that's how I placed it. When I put it in the circuit, I set it one way and current didn't flow, so I turned it around. The relays do operate- they just sometimes don't open. Too bad I don't live near the coast- If I can't get it to work, I could use it to boil lobsters in commercial quantities.
     
  16. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    When you say "the relays sometime do not open", do you mean they don't open at the desired temperature setpoint?

    hgmjr
     
  17. gregbrainerd

    Thread Starter Member

    Apr 3, 2009
    27
    0
    Yes- the tub will hold temperature for a few hours to a day or so, then it starts to over heat. If I unplug the connection between the pressure switch and the diode, the fault is cleared and the relays open. I've let it run up to 130 degrees to see if it would shut off on it's own, but no luck on that mission. That baffles me. I like it when something either works all the time or doesn't work at all.
     
  18. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    It sounds like maybe your thermal sensor assembly is not water tight and so some water is getting into the assembly and shorting the thermal sensor out.

    hgmjr
     
  19. gregbrainerd

    Thread Starter Member

    Apr 3, 2009
    27
    0
    That could be the case. I'll try to figure a way to test it and if it's bad, I have another one from the last controller that I did all the bench tests with. It's a pain to swap, but I'll give that a try. Thanks for the help!
    Greg Brainerd
     
  20. gregbrainerd

    Thread Starter Member

    Apr 3, 2009
    27
    0
    I tried swapping the thermistor, and I still have the problem. I pulled the thermistor out of the circuit, and the heater kept running. I shorted the thermistor, and the heater kept running. I'd expect the heater to stop if the resistance at the thermistor were infinite.
    The wires for the pump run across the face of the board, about an inch away. This is a long shot, but could that affect the transistor?
     
Loading...