Arduino, solenoid driver and current limiter

Last year, I designed a solenoid control board based on Arduino UNO which is still working very well. The board was based on ATmega328p (arduino standalone) and used an optoisolator 6N136 to isolate the high power from the low power circuit and I used a MCP1406 as MOSFET driver for the FQP30N06L.

Now, I would like to update my board by adding a current limiter in order to set the maximum current to 2A.

I saw the Maxim 17525 Adjustable Power Limiter and I tried to integrate it in my previous design. I did the connections in this way:

  • SETI: I connected a 18.7k resistor to SETI output to limit the current to 2A as specified in table 3 at page 18 in the datasheet.
  • CLTS1 and CLTS2: I left unconnected the port CLTS1 and CLTS2 to set the continuous mode as described at page 13
  • OVLO: I connected a 100k resistor to OVLO port to set the overvoltage to 27V as reported at page 12
  • UVLO: I connected a 340k resistor to UVLU for undervoltage (9V)
  • OUT: I connected the output of the device to the drain of the MOSFET.

The solenoid can work at 12VDC/24VDC at 2A.

The PWM-input specified in the schematic is the PWM output from the ATmega328.

The circuit (without the current limiter device) works very well and I tested it a lot without problems.

I would like to know if I correctly integrated the current limiter in the below drawings or if I did some mistakes.
(I'm sure I did some mistakes :slight_smile: )
I cannot test the circuit with the current limiter because it is a SMD component and I would like to be sure that the connections are correct before to burn the components :smiley:

Can you give me some suggestions, please?

Thank you!

Are you seeking the most complicated solution for a simple problem?

I'm sorry, I forgot to mention that I need to change the maximum forwarding current by software. At the moment, I set the current at 2A by using R17 resistor, but I want to replace it with a digital potentiometer controlled by Arduino (via I2C protocol). In this way, I can change the maximum current without changing the circuit every time. The MAX17525 device can limit the current from 0,5A to 6A and it is perfect for me.

I would like to avoid to use a resistor to limit the current and I would also like to avoid the voltage dropping.
The solenoid needs 12VDC and it needs to be controlled by PWM.

At the moment, I'm perfectly able to control the solenoid proportionally with the circuit above, but without the MAX17525 device. I'd like to know if I correctly integrated this device and if the circuit makes sense with this solution.

For what purpose do you need PWM?

It were easier if you measure the current and adjust the PWM duty cycle as required. No FET driver and current limiting chip required.

I use PWM because the solenoid valve is used for an hydraulics proportional valve to control the oil flow.
The valve is not ON/OFF, but it opens accordingly with the user input.

I have different valves which require different maximum currents and I want to avoid to test each valve and to adjust the pwm each time. Moreover, I need to change the max current by software depending on some user inputs.

I guess the limiting chip is the only solution to my problem..

You think it's wise to reduce power to the whole circuit, instead of only the solenoid.
Leo..

If the valves behave differently you don't need current clipping, instead you need proper feedback for a PID regulator.

Trying to current-limit a PWM power circuit is doomed to failure.

Use a high-side driver with current feedback. I really like the BTS5012 for 12-15V systems and the BTT6010 for 24-28V. Those chips are much more than you need and hence almost bullet-proof. There are others in the family that may be more appropriate for just 2A.

With an appropriate RC filter on the feedback pin, your Arduino can control the current in the solenoid very accurately.

Wawa:
You think it's wise to reduce power to the whole circuit, instead of only the solenoid.
Leo..

I'm reducing the power only to the solenoid, the whole circuit will use the main power souce.

MorganS:
Trying to current-limit a PWM power circuit is doomed to failure.

Use a high-side driver with current feedback. I really like the BTS5012 for 12-15V systems and the BTT6010 for 24-28V. Those chips are much more than you need and hence almost bullet-proof. There are others in the family that may be more appropriate for just 2A.

With an appropriate RC filter on the feedback pin, your Arduino can control the current in the solenoid very accurately.

I checked the datasheet for the BTS5012 and if I understand it correctly, it offers a proportional output to read the current values. I do not know if this solution would be better than mine. Moreover, I should change the design of my board to use another driver and I would like to avoid to change it since the board is working very well with the FQP30N06L.

Why do you think the MAX17525 would be a bad idea? what are its side effects?

If it was a theoretical ideal circuit with no inductance or capacitance then the PWM would deliver little pulses of exactly 2A to the load.

Your circuit diagram does not show a lot of capacitance so I expect the solenoid inductance will dominate. Analyze it as an RL circuit with your planned PWM pulse duration. When the pulse starts, the full supply voltage will start charging the inductor. Current will rise until it hits the maximum defined by the MAX chip. Look closely at the datasheet to see what it does with a rapid rise.

The datasheet says:

In many power applications, an input filtering capacitor
is required to lower the radiated emission and enhance
the ESD capability, etc. In hot-plug applications, parasitic
cable inductance, along with the input capacitor, causes
overshoot and ringing when a powered cable is suddenly
connected to the input terminal. This effect causes the
protection device to see almost twice the applied voltage.
An input voltage of 24V can easily exceed 40V due to
ringing. The
device
contains internal protection against
hot-plug input transient. on the IN pins,with slew rate up to
30V/μs. However, in the case where the harsh industrial
EMC test is required, use a transient voltage suppressor
(TVS) placed close to the input terminal that is capable of
limiting the input surge to 60V (max)

and:

Enables Fast Startup and Brownout Recovery

Thermal Foldback Current-Limit Protection

1.5x, 2x Startup Current Limit Options

Moreover, my circuit has a good input filter with a large capacitor. I post the while circuit here so you can get an idea.
What do you think?

I'll try again.
I think you shouldn't reduce power to the opto coupler and U$4.
Leo..

You only have about 5.8uF downstream of the current limiter so all of that good stuff in the datasheet is useless. You are charging an inductor, not a capacitor.

It also seems like this chip is upstream of a reverse-polarity-protection diode. It is not rated for negative voltage so there is no protection.

What is supplying this 12V that needs such a large capacitor (2200uF) on the input?