Calculate capacitor value

You guys. I have a question.

Please see this schematic.

I want to power solenoids with a 16V pulse using a SPDT MTS - 102. For reasons I dont’t want to get into, that switch has to be a ON-ON type and NOT an (ON) - OFF - (ON) type

I want to use a couple of AO3400 N-channel MOSFETS to power the solenoids. I chose AO3400 because = basic part @ JLCPCB and has decent power rating of 5.7A.

The values of resistor sets R1/R2 and R3/R4 are chosen to prevent the gate voltage from exceeding 12V. (absolute maximum rating). If R4 or R2 receives 16V through the capacitor the gate voltage cannot not exceed 11V.

The MOSFETs start to conduct from around 2V. I want to use the 2 capacitors to set the pulse length. I want the gate voltage to be higher than 2.5V for around 50ms.

Now my question: How do I calculate the capacitor (and resistor) values?
(if it is not painfully obvious by now, I have zero experience with SPICE otherwise I would have tried to simulate).

Pointers (and mostly a formula :stuck_out_tongue: ) would be appreciated.

Kind regards :coffee:

Bas

In order for this to work you will need to have something that discharges the capacitor when the switch is open. For example a (comparatively) high value resistor from the switch end of the capacitors to ground. This will of course cause some current draw from the VCC, so you will have to consider that in your choice of resistor value.

The time constant of a resistor-capacitor circuit is the product of resistance (in ohms) and capacitance (in Farads). So choose a capacitor which gives the time constant at least 50ms plus some margin. If I did a correct quick estimation in the head it would be somewhere around 10uF or a little more.

You will also need to consider the power loss in the transistor during the gradual switch-off, which is comparatively long as it is the “tail end” of the capacitor charge process, which is logarithmic and therefore can be considerably longer than the time constant. It might be advisable to speed up the switch-off by inserting a schmitt-trigger buffer to drive the gate, or diode / zener diode drop between R3 / R1 and gate and a resistor from gate to ground, thus moving the switch off of the transistor up the charge discharge curve of the capacitor where the slope is steeper and thus the switch off time faster.

1 Like

What is the solenoid current?

Current rating is not power rating.

In its datasheet you see thermal resistivity (10s pulse) (junction-ambient) being 90°/W so 1W power makes junction temperature to be higher than ambient by 90°C.
When slowly switching off (you don’t have Schmitt trigger) the relatively high power can be dissipated during relatively long time in your transistors.
For example if solenoid at 16V takes 2A (so R=8Ω) then during switching off there will be a state when there is 8V at transistor and 8V at solenoid and the current will be 1A (8V/8Ω) so the power dissipated in transistor will be 8W so temperature raise can reach 8*90=720°C.
I would not use your circuit for solenoid with current higher then 100mA.
There are special ICs to drive MOSFETs to avoid staying long in transition states. I think in your case the Schmitt buffer or inverter (like LVC1G14 or LVC1G17) could do the job.
There are also special MOSFETs (OmniFET, InteliFET) containing protection circuits - they switch off if their junction temperature gets too high, but their gate needs more current to drive them (it is to power integrated circuit inside).

I agree with @hmk, this is a bit to simple for what you try to achieve.
A formula will never represent real world, for real world encounters drift, aging, temperatur and more.
I think @Piotr is right too, but power dissipation might be a smaller issue, if there is only one shot of 50ms in say one minute?
However, driving a gate straight from a RC appears to be an at least unreliable solution.

Regarding the thermal issues: AO3400 seems to come in a SOT23 package, which, for our purpouses, has practically zero thermal mass. It means that even if you have only one 50ms of power loss due to slow switch off of say 1A or more, you will for sure burn the transistor immediately in one shot.
These small package transistors depend on consistently very fast switching times in order to survive at the currents they are rated for.

If it had been a TO220 or something larger with some considerable amount of metal in it, I could have considered the thermal mass for the short bursts of power loss like you seem to imply.

Thank you for your anwsers.

I would like to handle 5A max. Effectively they would see 2.5A ~3,5A.

Current rating is not power rating.

I misspoke, my bad

Ok I made a new circuit. This time with hierarchial labels. I am gonna need this one in 8 fold. I looked up suitable schmitt-triggers from JLC. Sot23-5 not big or expansive.


(I am aware my LOAD labels share the same name)

I picked new resistor values. I noticed from datasheet that the schmitt triggers are 5V devices. With 16V on top of R1 / R5 the voltage on the schmitt will be ~4.99V.

Are you sure that those 100k resistors R3/R4 are needed? I may want to use even bigger values. I would like that 8 of these puppies are behind a CDU (Capacitor Discharge Unit, a device ment to deliver great currents for these solenoids without drawing too much current from the power lines). This thing won’t charge if there too many leakage.

Anyways back to the circuit at hand. I read that this schmitt-trigger is a push-pull device. I therefor take it is not needed to apply a pull-down resistor on the mosfets’ gates, correct?

Regarding the thermal issues

The Schmitt-trigger should keep the Mosfet open enough to prevent heat development in the first place. With 5V the Rds is around 30mΩ.

Kind regards,

Bas

There is probably no need to use that small resistor values. You could add a zero or two on the back of the value (x10 or x100) and make the capacitor smaller accordingly. The schmitt-trigger SN74LVC is a CMOS component which means that its inputs have very high impedance for the kind of slow voltage changes we have here.
The exception to this would be if you need a certain current through the switch in order to keep the contacts clean. Mechanical switch contacts might have a certain smallest voltage / current requirement, depending on the contact surface material.

Also note that you shortened the pulse time significantly by lowering the 3k3 to 680 Ohm, so you might need to compensate for that.
For an example, 50ms would be possible with R1,R5 = 100k, R2,R6 = 47k and C1,C2 = 330n. For some margin, make that 470n.

Now, as you have introduced 5V power supply in the circuit, you could connect the switch to that instead of 16V (VCC) and omit R1,R5 or make them low value like 1k for input protection, have R2,R6 = 150k and C like in my previous example.

There are many ways to skin a cat, or a muskrat if you prefer that…

Did you noticed that you inverted its logic?

Yes.
If you don’t have them then your circuit will work only once. Capacitor will stay charged and next time you press button and you get the voltage at output the same as at the end of previous pulse.
You can assume that your capacitor is enough bad to discharge internally but it is not a good design technique.

Hi @bask185

So I, and maybe others, fully understand.

This is based around commercial points (turn out) motors for model railways, which are the coils.
The coils are driven by 12V DC from your 2 X 2000µF capacitors which are charged from a low current source.
You are replacing (or paralleling) the switches with the FETs to alter the controlling method of switching the coils.

Am I correct?

Not really :see_no_evil: . Such a huge massive inverter symbol and I completely ignored it

I’ll take your comments under advisement at my earliest convenience.

Regards

Bas

This is not really a KiCad related thread, so I will be closing it very soon

I thought that this is where the “projects” board was for. My bad

If I ask such questions on engineering stack exchange…that hardly ends well… Have you seen that movie bird box. Those invisible creatures who make you wanna kill yourself, they were based upon stack overflow people :see_no_evil:

Yeah you are correct mostly, but not the 12V part. Some point motors actually won’t ‘go’ on 12V. They prefer 16V

I was toying around with PCB a little. That is some serious amount of components (for me)

Perhaps fun to see. This thing will be my “lever box”. I have one 3D printed prototype for a single one. The thing I am designing now goes underneath it. It is connected via 2 x 12p pinheaders/sockets.

Regards,

Bas

Consider using the Simulation to Tune Cap’s and Resistor’s.

The goal to shoot for is 2.5v min and remain in the 2.5v to 12v max zone for a duration until Voltage toggles to other half of circuit. Basically, would want a flattened Voltage Rise until it toggles. Could select values as needed for enough power (2.5v seems too low for running under load…?)

Could also play with Caps and Resistors to get a Time Constant (Tau) that reflects a desired Voltage at 63% of Vmax (typical Cap tuning stuff Tau = RC).

Video shows using the Tuning feature (no intent to tune your circuit)…

Looking at that PCB 3D (and having in mind that output currents are in a range up to 5A) at first surprising to me was that there are only small elements. But then I thought that may be blocking solenoid diodes (rated for 5A pulses) are assembled directly at solenoids. Are they?

“Projects” is really about discussing your PCB layouts, not the electronic design. The mods spend some time trying to avoid this forum becoming a general electronics design forum and homework solver

Not that I know of, I have used rather small freewheel diodes atm. I will propably replace them for SS54 which can handle up to 5A. I find it hard to pick flywheel diodes. The back EMF current dies out quick so the total dissipation isn’t that great. I think that 1A diodes are already enough. But it is hard to say with so many different solenoids on the market of which you know nothing about except coil resistances. The 5.7A mosfets have sot-23 casings

Look into diode datasheet.
Here for example:
https://www.mouser.pl/datasheet/2/308/1/1N4148WS_D-3150110.pdf
You have:
Continuous Forward Current = 150mA
Repetitive Peak Forward Current = 300mA
Non Repetitive Peak Forward Surge Current informs you that 1A through 1s will damage diode. No problem - you will not have so long pulses. But only 4 times higher current (=4A) needs milion times shorter time (1us) to damage that diode and your pulses are probably longer.
If you give to diode not one but many pulses the save assumption is to limit them to 300mA.
Here:
https://www.mouser.pl/datasheet/2/849/s1a-2577384.pdf
you have DC=1A, and Pulse=6A.

You seem to be resistant to doing basic calculations. P=U*I, U=I*R, τ=R*C are all equations at primary school level. And even a junction temperature rise can easily be calculated thanks to RΘ given in datasheets (Tj-Ta=P*RΘ).
Junction dissipated power decides of temperature rise and temperature damages silicon.

Driven with 4.5V and load with 5A dissipates P=U*I=I*R*I=I²*R=5² * 0.033 = 0.825W. Tj-Ta=P*RΘ so Tj=Ta+P*RΘ=25°C+0.825*90=25°C+75°C = 100°C.
But 90°C/W in datasheet has a note A: transistor has 1in² to dissipate heat and PCB is 2oz copper.
S1A diode with 5A dissipates P=U*I=1.2*5=6W (I took 1.2 from chart) - much more.
And 1N4148 probably more as we don’t have a chart showing Vf rise with current so high as 5A.
Silicon junction can work up to around 150°C. If it reach (even momentary) higher temperature you can expect permanent damage.
Current doesn’t divide itself evenly on the whole junction so local overheats can occur. Any pulse higher than repetitive peak can left after it small regions in junction with small degradations. Many such pulses gradually degrade the junction leading to damage.

1 Like

I agree with the others here. The combination of a SOT-23 package, and a very weak gate drive is a bad combination to drive over 5A. When the Fet turns off slowly, it has the potential to dissipate 16V*5A = 80W momentarily, and that is enough to heat your SOT-23 package t explosion temperatures in milli seconds. (It can be even more because the coils are inductive).

Your diodes also have to be rated for a peak current of 5A.

I would also be tempted to put the whole thing in a microcontroller. Especially the older 8-bitters can deliver relatively high peak currents to drive the MOSfets, and you do not need all the RC combinations but do the timing in software. Or use some 74HCxx schmitt triggers to at least get a somewhat decent gate drive. If you want to switch your solenoids often (more then once every second or so) then you still need a better gate drive or bigger FET’s.