1

Consider the following RC delay circuit, meant to accept short input pulses without triggering, but to trigger on a continuous input:

schematic

simulate this circuit – Schematic created using CircuitLab

The goal is to power the "component of interest" (here, the coil of K1, but it could be anything) if the input sees +12V for longer than "about a second". The timing doesn't need to be precise. (And, yes, I'm aware that there ought to be a diode across K1's coil; I didn't want to clutter the circuit for what's essentially a stand-in.)

As shown, the simulator says this works. However, is this a reasonable choice for R and C? In theory, I can increase or decrease R as long as I change C by the opposite amount. Given that I don't need precise timing, is there any reason other than component cost why I should either a) stick with these values, b) use higher C and lower R, or c) use lower C and higher R?

Good answers should describe the benefits and drawbacks of all three options.

Matthew
  • 481
  • 2
  • 12
  • 2
    Bad solution use transistor as comparator. At some voltage the device will be in active mode and relay's coil current will rise slowly. Contacts may shutters. – user263983 Apr 06 '23 at 16:47
  • 1
    What if the input voltage were only (say) 3 or 4 volts? The MOSFET may overheat in some circumstances. At 10 volts the input would have to be present for a bit more than a second. In other words, define more accurately what you expect to happen and think about circuit abuse. Also consider that the threshold voltage for the same MOSFET in a batch may be significantly different to others. – Andy aka Apr 06 '23 at 16:48
  • @user263983, the MOSFET selection seems to make a significant difference, though? Maybe you'd care to actually *answer* https://electronics.stackexchange.com/questions/653083 rather than leaving a not-very-helpful comment here? – Matthew Apr 07 '23 at 16:12
  • @Andyaka, the input is (nominally) 12V. I'm aware of the variation in threshold voltage, but as noted, I don't need exact timing. Simplicity is higher priority. – Matthew Apr 07 '23 at 17:15

1 Answers1

2

In general, you'd try to make the capacitor as small as possible, and therefore the resistor as large as possible, simply because capacitors are larger and more expensive than resistors. The limiting factor is the leakage current of the capacitor and any device(s) connected to it. Since you've connected it to a MOSFET gate, which is essentially an open circuit at DC (maximum leakage current is 0.1 µA for the IRF540), you can make the capacitor extremely small as long as the resistor delivers significantly more than 0.1 µA, it'll work fine.

For example, if you have a 10 V input signal and 0.1 µA leakage, you could use a resistor as large as 5.1 MΩ together with a 1 µF capacitor (which results in 2 µA resistor current and a 20x safety margin). You wouldn't even have to use an electrolytic cap anymore, a ceramic SMD cap would do, making the circuit a lot smaller.

As the commenters already mentioned, the circuit you showed isn't particularly great as it'll torture the MOSFET by turning it partially on for extended periods of time as the circuit transitions from the "off" to the "on" state. Your relay might also be quite unhappy about that and wear out quickly. Ideally, you'd add a comparator with hysteresis in front of the MOSFET gate.

winny
  • 13,064
  • 6
  • 46
  • 63
Jonathan S.
  • 14,865
  • 28
  • 50
  • 2
    When prototyping it's easier to add extra capacitance in parallel to the existing capacitor rather than replacing the resistor with a larger one. – D Duck Apr 06 '23 at 18:51
  • Ugh. I'm really not looking forward to redesigning this with an additional DIP8 and *at least* five more resistors. That's likely going to require a bigger board. How unhappy is an IRF540 or an FDP3682 going to be, really? Those aren't rinky-dink resistors, and at least the sim doesn't show them passing more than a few nA in "partially on" state? – Matthew Apr 07 '23 at 17:26
  • Maybe I'm not poking around enough, but mega-ohm resistors seem expensive and not terribly common. I'm not sure that's worth switching out a 40¢ cap for a 10¢ cap, especially when I only plan on making a few of these? – Matthew Apr 07 '23 at 17:29
  • @Matthew Megaohm resistors are extremely common, cheap, and readily available. Digi-Key, for example, will sell you a 4.7 MOhm resistor for 0.1 cent each (type "WR06X475 JTL"). In other words, you get 1000 of them for a single dollar. Or 10.000 of them for 8 dollars. They're basically free. Depending on the current drawn by the relay, the "partially on" state may or may not be a problem. What's the relay coil's resistance? (You could probably use a cheaper MOSFET, too, if you want to really save cost - but it's probably not relevant for "a few" of those circuits.) – Jonathan S. Apr 07 '23 at 19:47
  • Weird. I swear Octopart is giving me totally different search results now, as compared to this morning. Then again, their site *does* seem to be acting up lately... Relay is a G5LE-1A4 DC12, RC = 360Ω. As to cheap MOSFETs, see https://electronics.stackexchange.com/questions/653083. BTW, is *that* what you mean by "partially on"; the time when the MOSFET *starts* to switch from high- to low-resistance, *not* when it's sitting comfortably under the gate threshold? The simulation shows < 3 nA for the latter, and *that* looks like it may be from the gate. – Matthew Apr 07 '23 at 21:59
  • 1
    Yes, that's what I mean: When you slowly ramp up the gate voltage on a MOSFET, the current flowing through it will gradually increase. That means that you're not rapidly turning the relay on, but instead slowly ramping up the voltage applied to its coil as well. It's exactly what happened in the simulation from the question you linked. With a 360 Ohm relay coil at 12V, power dissipation in the MOSFET will not be a problem as the current is rather low and a BS170 will work nicely, but the relay may malfunction due to the slow ramp. For fast switching, you must use a comparator with hysteresis. – Jonathan S. Apr 08 '23 at 00:24