- You've shorted the three sense signals, are you sure they can handle that (i.e. one "essentially connected to 12V, the other two floating.)?
I'm not sure why there would be a problem. The PSU +12V connects to a bunch of stuff separate from this circuit, and to three SSRs (actually, identical SSR networks) in parallel. Each SSR [net] connects to one of the sense pins. If the SSRs are open, why would floating voltage be a problem? If they're closed, I have two parallel paths from the PSU +12V to SENSE.
- What is the function of D3? If it is for polarity reversal on the sense connector, should be before the opamp. If it is for inductive spikes from the relay, it should be antiparrallel to the relay.
Not exactly.
The way this is intended to work; the coil loses current and voltage starts to climb. D3 rejects the spike entirely, not allowing any voltage to be seen. Its job is to mainly to protect U1 (also, everything else "over there"), as my reading of the data sheet made it seem as if the LM393 would be very unhappy about
any reverse voltage spike. Meanwhile, Q1 on the other side "sees" the spike, but IIUC should be able to handle it. "Eventually", the reverse voltage hits 30V, at which point
D1 starts to conduct, clamping the spike at 30V. (Which allows the magnetic field to dissipate faster than a flyback diode.)
- Don't worry about the opampp bias current, its effect is smaller than the resistor tolerance
Okay, thanks!
- D4 is useless
According to the simulation, it is critical, or the whole thing doesn't work. Before reading further, try removing it from the linked simulation and observing the results. Then see if you can figure out why there's a difference.
Back? If you tinkered with the simulation, you'll at least know
what goes wrong. I didn't have D4 originally, and it took me a while to see why it's needed, so don't feel too bad that you missed it. If you look very carefully at the schematic, you can see that, without D4, R3 forms a voltage divider with (hold on tight) R5+R6+R7+R1+R2 (whee!). As a result, C1 can only ever charge to ≈4.5V, not the intended 12V, which completely wrecks the intended timing. (Also, I've since swapped R2 for another 3k, which makes V
ref 6V, and K1 would never be energized.)
- Isn't the LM393 inverting?
...I don't know? Do you mean pin 1 (1OUT) is going to be 12V when pin 2 (1-) is
greater than pin 3 (1+)? If not, I'm not sure what you're asking.
How often do the pulses occur during normal operation? Does C1 have enough time to discharge to avoid the situation where a sufficiently rapid sequence of pulses causes it to charge up and trip the watchdog?
It should. That's why D2 and R4 are there, to pull down C1 very quickly as soon as +12V goes away. According to the simulation, C1 should be ≈0.6V or less after 150 ms of SENSE going open-circuit. (Tested by replacing V1 with a constant 12V and a voltage-controlled switch driven by a 0.3 Hz square wave.)
Honestly, I don't
know for certain, but in theory the worst case would be six signal pulses exactly overlapping so as to produce the equivalent of one long pulse, which should still be well under the "trip" time threshold. More likely I'll see three slightly-extended pulses (the logic upstream of this board already combines two pulses into one signal line) several seconds (if not significantly more) apart. Also, the "fault" is "the box didn't turn itself off". If the box
does turn off, but somehow trips a fault anyway, that's completely harmless. (AC-L is actually driven by the "box", so a false positive is indistinguishable, to AC-T, from a true negative.) However, until I actually build and test the whole system, some of this is guesswork and it's possible I'll find out I need to further tweak the timing.
Also, have you considered a simpler design? The '393 seems a bit overkill to my (admittedly inexperienced) eyes. Would using the RC network to turn on an NPN transistor to steal current from the gate of Q1 be sufficient?
If you look at
the disaster that was my first attempt at a review request, that close to what I
had originally. Note especially the FDP3682 in place of the BS170; that's needed because the BS170 shows a rather slow transition from "fully off" to "fully on" as the voltage crosses its gate threshold. The FDP3682 is
better, but still not perfect. Now, IIUC, you're not suggesting to drive the transistor directly, but I'd be worried that you'd still have the same problem. (I'm told transistors don't like being help in "partially on" state, nor is it ideal for the relay to see a gradual voltage ramp.) A comparator gives a very "digital" signal (either high or low with very fast transition)
and allows for hysteresis as a guard against noise.
That said, if you have a schematic in mind, I'd be interested in taking a look.