Arduino, time constant / precision for switching higher currents

Hi everyone

I'm new to the arduino world. I have a project in mind where I would need to feed a small solenoid with a defined (high) current for a very short time interval (in both directions). I was wondering regarding the limits to do so with the help of an arduino and MOSFETs. Can I switch in the range of micro seconds? If not, whats the smallest number which would be possible? Any idea on how the current signal would look like?

If it is too challenging, I could probably just discharge a capacitor loaded to a specific voltage? But then it will be difficult to precicely set the desired electrical charge.

Thanks for your help.

You can set an output, enabling the MOSFET, use delayMicroseconds(us) and reset the output.
You need to add some micros for the execution time for those code lines.

The solenoid takes lots of time to create the magnetic field. Much longer than a short pulse you are wanting.

Plus, the inertia of the solenoid prevents it from moving that fast. 1/10th of second will probably be foo fast for it.

And, this isn’t the issue, but each instruction takes a certain amount of time. I did an experiment once with an Uno once alternating high-low in a loop to see how fast it would go, but I’ll have to look-up the results.

I found my results - With an Uno, if you write a high immediately followed by a low you get a pulse of about 3.3uS. That’s faster than I’d mis-remembered! :wink: That’s with C++ and digitalWrite(). You might be able to go faster with assembly/machine language (or with a library).

The solenoid will not have that much turns, maybe around 100 turns, certainly below 200. Inductance should be around 0.015 mH and time constant should be in the range of 5 micro seconds! I will have to experiment, but at least theoretically it should be like that.

On an Uno or similar AVR based 16MHz processor, the minimum resolution of micros() is 4 microseconds. So 4-8-12-16 us would be the best you can do easily.

With assembly language, you can create pulses as short as 62.5 ns. That’s 1 / 16,000,000.

Microsecond and even millisecond pulse rates will absolutely require a dedicated gate driver circuit to turn mosfets ON and OFF without them self-destructing in very short order. The faster you switch and the higher the current, the more difficult it becomes. There will be practical limits for every configuration.

There's the time constant of the coil, and there's the time it takes for the mechanism to actually move. The latter is the slowest for sure. Also the smaller the inductance of the coil, the weaker the field generated, and the weaker the fore enacted on the core of the solenoid, making it move slower.

Recently playing with a micro relay (similar kind of device) I found I needed to give it some 10 ms to switch. Pretty good for a relay, but four orders of magnitude slower than the us pulse you're asking for.

Microsecond and even millisecond pulse rates will absolutely require a dedicated gate driver circuit to turn mosfets ON and OFF without them self-destructing in very short order.

No need for gate drivers when doing millisecond pulse rates. It is routine to do 490 or 980 Hz pulses (1 ms resp. 0.5 ms on average - i.e. PWM) without gate drivers. Going down to microseconds is a different story of course.

Thanks for your inputs.

To clarify: there are no moving parts. I would like to experiment with the magnetization of AlNiCo magnets. Depending on the pulse length, the remenance Br should be different. Do you know any specific chip which would be suitable to do pulse lengths in the range of micro seconds? I also do not know what the actual switching time of MOSFETs is. Is it short enough or would I need someting else?

Hook up a signal generator, maybe a power transistor, send pulses and measure the voltage across the coil as well as the current through the coil using an oscilloskop.

An Arduino can easily produce sub-microsecond pulses. You will have to use PORT register calls rather than digitalWrite() as the latter is slow, taking 1-2 us to complete while a PORT write takes one processor cycle (62.5 ns at 16 MHz).

The on/off switching times of MOSFETs you can find in the respective datasheets. The catch here is that they will often give time as a few ns, but that does not take into account the time it takes to charge the gate. You have to look for a MOSFET that can comfortably deliver the current you need, while having a low gate charge for its size.

You can find the gate charge in the datasheet as well; this can be simplified by approaching it as RC circuit with the gate charge as the C and the gate resistance as the R. Base on your supply voltage you can now calculate how much current you have to deliver to or draw from the gate to make it switch fast enough (use an RC calculator), now you can pick a suitable gate driver.

To have an example data sheet:

gate charge is 7.6 nC
gate resistance is 2.3 Ohm

RC circuit calculator: Resistor–Capacitor (RC) Circuit Calculator • Electrical, RF and Electronics Calculators • Online Unit Converters

time constant is independant of the voltage?
The current I need would be in the range of 10-20 A.

Sorry for the silly questions. I know I have to learn a lot about electronics. My intention of the thread was primarily to find out what is possible to get some guidance.

The RC constant is indeed independent of the applied voltage.

For a MOSFET you need to reach a specific voltage for it to be switched properly on. If you look up some gate charge curves, you will notice its not linear. First it rises at a certain pace until the threshold voltage is reached; there it plateaus out as charge continues to build up and the MOSFET starts to switch on, and then continues to rise at another pace until it's fully on. That's why you see the list of different charges under "total gate charge".

Ignoring the nitty gritty details above (and remember you can have a factor of 2 error in the final calculation which is still good enough) 7.6 nC is similar to a 7.6 nF cap; if you want to charge such a capacitor to 5V in 0.1 µs you need to deliver 500 mA to the gate.

Switching off is similar but may be a little slower as it is only fully off when you're below the threshold voltage which can be as low as 1.35V for this part.

As you have 12 or even 24V available you could use that for the gate, those gate drivers are designed to do just that. This allows you to use non-logic level MOSFETs as well.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.