Solenoid continuous operation safeguard - Page 1
Forum section: electronics / projects

author: HwAoRrDk
author_rank: Super Contributor
timestamp: February 05, 2021, 09:39:45 pm
content: I have a solenoid that gets quite hot when actuated for long periods, and I want to put in place some kind of safeguard against continuous operation. Like, controlling MCU crashes, gets stuck in a loop, etc.Had a crazy idea to use a PTC resettable fuse that is underrated for the nominal current draw of the solenoid, so that if it is activated for more than a few seconds (normal operation is to pulse it once for approx. 1 sec), the fuse will trip and cut off power to the solenoid.The solenoid draws 2A, so after looking at some PTC fuse datasheets, I think if I use a 0.75A fuse with the attached trip curve ("0.75A/24"), it will trip after 3 seconds.Is this a stupid idea, or not?

author: bdunham7
author_rank: Super Contributor
timestamp: February 05, 2021, 09:55:52 pm
content: It is common, although a bit more complex, to use a circuit that provides a brief 'activate' pulse followed by a continuous 'hold' current. Most solenoids only take a small fraction of their activation current to hold them, but you'd have to determine that experimentally and then add safety margin. The simplest theoretical implementation is to use a capacitor and resistor in parallel, but that is not really practical so typically you would see some system, either two-paths or a full-on then PWM setup. If you want this mainly as protection in a system that would not normally overheat the solenoid, then you want a simple analog circuit.A PTC might work in theory, but I'm not sure how reliable the setup would be in real life. One issue would be that if you release the solenoid and then reapply it while the PTC is still hot, you wouldn't reach the activation current. If your standard pulse is 1 second, you'd have to make sure that the PTC didn't heat appreciably during that period and that your off time was sufficient that the PTC would fully cool between cycles.

author: Someone
author_rank: Super Contributor
timestamp: February 05, 2021, 09:58:26 pm
content: Capacitor mediated pull-in then hold is ok for "agricultural" designs:https://www.electronicdesign.com/technologies/analog/article/21798400/whats-all-this-solenoid-driver-stuff-anyhowMost things using solenoids fit in that category and won't notice a x000uF capacitor in the BOM/SWaP

author: penfold
author_rank: Frequent Contributor
timestamp: February 05, 2021, 10:11:54 pm
content: I'm assuming that under normal conditions you wouldn't allow it to stay actuated and its only in the event of a fault that you need something to trip?I would advise against relying on the trip characteristics of a PTC since because they're very sensitive to temperature and if you end up relying on tripping slowly quite often, its lifespan will be reduced (take that with a small pinch of salt because I can't remember the exact numbers, but I'd suggest investigating reliability info if you do end up tripping it frequently)A more elegant approach may be to use a one-shot/monostable to force a maximum single shot on-time, you could also use a watchdog timer to enable the solenoid driver.If you'd prefer to keep it enabled for longer periods, you could look into dual-level current driving where you use larger current to make any sudden actuation and a lower maintenance current to "maintain" its position (typically used in relays but also applicable to solenoids)

author: ajb
author_rank: Super Contributor
timestamp: February 05, 2021, 11:04:15 pm
content: Since you mention an MCU, if you've got a spare PWM channel then you've got a peak-and-hold driver that may remediate your concerns about overheating--just add a few lines of code. There's an inductor built into that solenoid, and presumably you already have a flyback diode, so you're effectively creating a switch mode constant current driver without the feedback (well, you could add the feedback if you wanted). You'll still need to deal with dV/dt at the switching node. If that's an option, then it's kind of silly to burn a bunch of power in a series resistor--although if the solenoid is very small maybe it doesn't matter--unless your application would object to the switching noise or something.A watchdog timer should do an adequate job of protecting against crashes or (if you implement it carefully) software loops, but you could also combine switching peak-and-hold with an external hardware one-shot as penfold mentioned if you want the extra protection. Maybe one of those external watchdog ICs would be a nice easy solution for that.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: February 05, 2021, 11:27:42 pm
content: Quote from: bdunham7 on February 05, 2021, 09:55:52 pmYes, it will just be for a safeguard - the solenoid will not overheat in normal operation. With a ~1 sec pulse at worst at an interval of a few minutes, at best maybe only a couple of times a day, it wouldn't get a chance to.Quote from: bdunham7 on February 05, 2021, 09:55:52 pmYes, that had occurred to me, but hopefully the operation intervals will be far enough apart in time to not make it an issue.Quote from: penfold on February 05, 2021, 10:11:54 pmYes.Quote from: penfold on February 05, 2021, 10:11:54 pmHmm, yes, varying ambient temperature may be a problem with this approach. The trip curves are typically defined at room temperature, and elevated ambient temps will significantly alter the characteristics. Looking at the datasheets again, it seems just a 10C increase in amb. temp will reduce the current rating by about 10%.If I were to allow for this and wanted to try and increase the rating of the fuse, component selection seems to thwart me. If a 0.75A fuse doesn't have enough margin, the only seemingly available next greatest current rating of 1.1A has a trip curve that indicates it will trip (if at all) only after 100 seconds.Are there any SMD PTC fuses in 1210/1812 size for 24V+ that have any intermediate current ratings?Quote from: penfold on February 05, 2021, 10:11:54 pmI had thought of using a 555 timer to do this, but I thought "what's the point?" if a (for example) crashed microcontroller with a stuck on GPIO will just re-trigger the timer again after the time-limited pulse output has occurred?

author: nctnico
author_rank: Super Contributor
timestamp: February 05, 2021, 11:40:41 pm
content: Using a PTC fuse is a bad idea. These are highly temperature dependant and not made to go through many activation cycles.Using a capacitor or PWM are the best approaches. You can even do PWM in software. Running it from a couple of hundred Hz to a few kHz is OK and you'll only need a few crude steps. Just hear at which frequency it doesn't resonate (and makes too much noise).

author: penfold
author_rank: Frequent Contributor
timestamp: February 06, 2021, 12:54:19 am
content: QuoteI should have clarified I was thinking of a rising edge triggered monostable, if its not cost sensitive I would recommend one of the Analog Devices TimerBlox family, but the SN74LVC1G123 from TI looks suitable and cheapHow long would it be stuck for? Its also not a good idea to leave the PTCs "tripped" for significant lengths of times, there's a list of advisory notes in most of the Littelfuse data sheets, other manufacturers might actually give some limits on sensible operating modes.

author: IDEngineer
author_rank: Super Contributor
timestamp: February 06, 2021, 01:48:32 am
content: Quote from: penfold on February 06, 2021, 12:54:19 amThat'sexactlyhow I implemented a similar protection circuit on a high current MOSFET circuit recently. The MCU had a PWM output but it ran independently of the core, meaning that if the code ceased functioning the PWM would continue to drive the MOSFET. Normally such autonomous peripheral operation is a plus, but in this case we needed some way to guarantee turnoff within a short period of time after CPU runaway.What I did was (re)trigger the 'G123 using a spare I/O pin on the MCU. Every time the MCU passed through its main loop it XOR'd that pin, which generated nice edges plenty often to keep the oneshot triggered. Its Q output drove the +IN of a FAN3100T, whose -IN was driven by the PWM output. The only time CPU cycles were required was if the duty cycle needed to be changed, and that was a write-once-use-indefinitely thing because the PWM peripheral ran autonomously once configured. Otherwise a single instruction (to XOR the pin) kept things running... and the deadman time was easily configured by the selection of the oneshot's RC components. About as elegant and efficient as possible.I kinda hated using two IC's to implement this solution, but once I ran the BOM and real estate numbers I realized I couldn't duplicate the logic and gate drive functionality with discretes for less money or less space. The 'G123 is dual-sourced (TI and NXP) and IIRC I found a pin compatible second source, with a different part number, for the FAN3100T too.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: February 06, 2021, 05:19:33 am
content: Quote from: penfold on February 06, 2021, 12:54:19 amOh, I'm a dummy - of course, it's edge not level driven, so if the trigger signal doesn't change state again, the timer won't re-trigger.I always forget that there's a multivibrator in the 74-series. That's cool, because the 555 only works with 4.5V+, and I would need to operate with 3.3V, which the SN74LVC1G123 does.Maybe I could even use the fact the '123 has A, B and CLR inputs to my advantage, and have it so the CLR is a kind of 'safety catch'. A is tied to ground, and CLR has to first be high in order for a rising edge on B to trigger a pulse.Maybe I will go with this approach, and not use a PTC fuse. Or, rather, not rely exclusively on the fuse - I will probably still include a properly-rated one.I'm not going to do PWM, as I don't think I have an available PWM channel on the MCU.

author: IDEngineer
author_rank: Super Contributor
timestamp: February 06, 2021, 08:41:25 am
content: You can always synthesize PWM manually in the firmware, if you have an extra I/O pin and can get away with lower frequency. In fact you could use that same PWM signal to trigger the oneshot... then you only need a single I/O pin and still have the hardware deadman protection if the code locks up.

author: penfold
author_rank: Frequent Contributor
timestamp: February 06, 2021, 02:55:32 pm
content: Quote from: HwAoRrDk on February 06, 2021, 05:19:33 amDefinitely include some SC protection, even if its not demanded by any standard its just good practice.With the CLR input, if its there and don't cost owt, you might as well use it. If you have a psu rail monitor on board could be worth using that to CLR to monostable in case of unpredictable behaviour during startup/shutdown/psu fault events.. I'm guessing that's getting a bit overkill though