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

Thread Starter

gregbrainerd

Joined Apr 3, 2009
27
Shorting the gate to ground does clear the fault. The thermistor wires are in a sheath, but they feel like they are twisted in there. I could shorten them quite a bit, also.

If the LM339 output isn't going to zero, wouldn't adding the 100k resistor from the LM339 output to ground allow the output to go to zero without significantly affecting voltage to the transistor? On the other hand, if that worked, that would indicate a problem in the LM339 because the output goes to ground in the off state.

If I'm following you, the capacitors will act as filters to smooth any spikes that are induced from either the AC supply or the long leads on the thermistor.

Would switching the FET for a different transistor help? How is sensitivity measured in a transistor?

About the voltmeter on AC- I assume that any AC component is going to be a bad thing- right?
 

CDRIVE

Joined Jul 1, 2008
2,219
Since the FET is already installed you might as well leave it. It's not the cause of your problem anyway. Install the caps and see if it helps. Yes, eliminate as much stray AC as you can.

By the way, the spring analogy is good enough.
 

CDRIVE

Joined Jul 1, 2008
2,219
I spiced this and it was a royal pita! Spicing this kind of transient returned different results when changing the sweep parameters. However these are good enough to see the dangerous spike that an that a relay coil will produce if a protection diode is not used. By the way I used an plain inductor for the tests. Please don't take any of these graphs as exact.

Side note to the membership: I attempted spicing this with two different spice programs and I would be interested to see results from others. I found spicing this to be quirky to say the least.
 

Attachments

Thread Starter

gregbrainerd

Joined Apr 3, 2009
27
Holy Mackarel! It's a wonder I didn't smoke something. I'll get the diode and caps in before I turn it on again. I'll keep you posted.

Thanks for the help!
 

Thread Starter

gregbrainerd

Joined Apr 3, 2009
27
Just an update- I've got the board out on the bench now with the diode and the 100k gate-gnd resistor connected on an adjacent breadboard. I've run it through 30 cycles and it hasn't hung up yet. I haven't added the caps yet, but I also am not running 15A AC current for the pump over the top of the board. I'll permanently install the diode and resistor today, add the caps and test some more.

Thanks again to all of you who have chipped in to assist me on this- your help has been invaluable and much appreciated.
 

Thread Starter

gregbrainerd

Joined Apr 3, 2009
27
The diode across the relays seems to have stopped the hanging in the on state. I've added the capacitor and the resistor in the power supply, but I haven't addad them to the inputs of the LM339 yet- that's going to be a pain to do.

What I'm seeing now is that it goes right to "heater on" when the power supply is plugged in. I've increased the capacitor in steps up to 1.5mF, and the problem persists. I thought allowing more time for the power to ramp up might help.

I switched back to the two 6V lantern batteries that I started with, and the problem was solved. I'm wondering if the AC adapter I'm using is a constant current source instead of constant voltage- it's not labaled and it came out of a junk box, so I don't know it's original purpose. Would a constant current source cause these problems?
 

CDRIVE

Joined Jul 1, 2008
2,219
I'm not sure if it was this thread that I mentioned that I never rely on wall packs for proper filtering, as most of them were intended as bat chargers or to be powering equipment that contain the caps. Did you measure the ripple as I suggested?

I doubt very much that you have a constant current power pack.
 

Thread Starter

gregbrainerd

Joined Apr 3, 2009
27
Before I added the capacitor in the power supply, I had an AC component between 0.01 and 0.02V. After, it was 0.00.

I don't remember seeing a note about not using a wall pack, but I can see how that could be a problem. I wasn't worried originally about voltage variations because all the voltages were relative to other voltages and I figured they would be proportional, so I wouldn't matter. I hadn't planned on the AC component, but the cap appears to have fixed that.

This unit probably was a battery charger- it's labeled 1A, 12V but I'm getting 16V out of it. Not unreasonable to charge a 12V battery. The constant curent was a long shot- if I remember correctly from 3 decades ago, constant voltage is cheap and easy, constant current is a lot tougher to do.
 

CDRIVE

Joined Jul 1, 2008
2,219
I didn't say not to use a wall pack. I was just making a point of making sure the filtering was sufficient when you do use them. ;)

Pack spec 12V@1A means that the output voltage will be ≈12V when it is loaded @ 1A.
 

Thread Starter

gregbrainerd

Joined Apr 3, 2009
27
So the wall packs aren't even a close approximation of a constant anything source. I suppose that's to be expected.

I think I have this figured out, and I feel a little silly. I've made all these modifications to the curcuit and they've been good things to do for the long term health of the circuit. What I wound up with is a consistently repeatable failure mode. That's a good thing- I like repeatability. Every time I plugged it in, it went directly to fail mode. Clear the fault, and it would work fine.

There were a number of ways to clear the fault, but the only one that had anything to do with the planned operation of the curcuit was shorting output to ground- like I'd expect the LM339 to do in the off state.

Back to the diode- it's role in protection the semiconductors has been mentioned several times in this thread. Protect it from what? The +/- 400V spike that occurs when the magnetic field collapses. Those charges can only dissapate through a couple of multi thousand ohm paths, a beefy mosfet or the output transistor of the LM339- which is trying to conduct anyway. I've applied 400V to a device rated for 32V max.

I replaced the LM339 and ran the unit on the bench for 50 on/off cycles, and it didn't hang once. I plugged and unplugged dozens of times, and no hang-ups. It's been unplugged all night, so if it is still working this morning, it's going back in the tub. I'll let you know what happens.
 

Thread Starter

gregbrainerd

Joined Apr 3, 2009
27
It looks like the controller is working as expected. It's run for three days without a hitch, so I'm calling it a success!

Many thanks to all of you who have contributed to the solution- your comments and guidance have been invaluable in this project.

Greg Brainerd
 

CDRIVE

Joined Jul 1, 2008
2,219
It looks like the controller is working as expected. It's run for three days without a hitch, so I'm calling it a success!

Many thanks to all of you who have contributed to the solution- your comments and guidance have been invaluable in this project.

Greg Brainerd
Greg I'm glad to hear that. :D
 
Top