1
\$\begingroup\$

I would like to implement a PWM-controlled current source to drive a 24 V proportional solenoid valve using an Arduino.

What I need:

  1. Input will be 5 V PWM with 5000 Hz frequency, duty cycle will increase the load current.
  2. The solenoids I need to use have internal resistances varying between 10-25 Ω.
  3. My circuit should give the same load current for ALL solenoids at an exact duty cycle.
  4. My maximum load current should be 2.5 A, which means at 100% duty cycle (5 V) the load current should be 2.5 A for any solenoid I am driving (if it can draw it), so no matter the load resistance.
  5. My switch has to be at the high side, and the load should be at the low side.

What I have tried so far:

  1. Even though I need my load at the low side, I tried implementing this circuit by inputting my PWM from Vin to see if it gives a specific current for any solenoid I use at a certain duty cycle, as I thought the shunt resistor and op-amp would create the current no matter the load, but it did not work for me, the load resistance is still effective, so for example at 50% duty cycle Solenoid 1 is drawing 500 mA and Solenoid 2 can still draw 1 A, so the current is not the same for ALL solenoids at a certain duty cycle as I desired.

enter image description here

Link: https://circuitdigest.com/electronic-circuits/voltage-controlled-current-source-circuit-using-op-amp

  1. I also tried the following circuit, which is similar to the previous one, but the load resistance is still effective. Again, this switch is low-side too, but I thought I could translate it to the high side if it worked.

enter image description here

Link: Current source with op amp and transistor

  1. I also tried the circuit below, but here it is not clear to me what to do with the op-amp's output. Do I read it from another pin and compare my PWM output and the reading and change my PWM accordingly in software?

enter image description here

Link: https://www.edn.com/monitor-pwm-load-current-with-a-high-side-current-sense-amplifier/

  1. And lastly, I tried the circuit below, which is similar to the third circuit, but the solenoid's and shunt resistor's places are different. The result is similar as the third; I am not certain about what to do with the op-amp's output. I think this one is the closest one out of all to what I want, because the switch is high-side, and the shunt resistor is between load and ground.

enter image description here

Link: https://www.analog.com/en/analog-dialogue/articles/current-measurement-in-solenoids.html

For all the circuits above, I chose resistor values to create such gain that 100% duty cycle 5 V PWM input would translate to 2.5 A load current. But for every one of them, load resistance was effective, the load current was not the same for a certain duty cycle.

Any help would be appreciated. Thank you already.

EDIT#1: Instead of getting the same current on all loads at a certain duty cycle, I guess the duty cycle should be changed accordingly to get the same current on all loads, by sensing the current on the shunt resistor and feeding it back. But the maximum should still be 5 V input for 2.5 A Iload

EDIT#2: I guess what I need is a current limitting PID loop, any help?

\$\endgroup\$
9
  • \$\begingroup\$ NB : First schematic, driving gate of IRF540 with a 10kOhm is not "really" good, especially if your inputs a PWM (should be 10 Ohm). \$\endgroup\$
    – Antonio51
    May 19, 2022 at 11:42
  • 1
    \$\begingroup\$ @Antonio51 I think it's meant the input is a PWMDAC (i.e. MCU output --> VREF switch --> filtered PWM) and so the circuit is analog (op-amp, not comparator or driver). Note that the first two circuits are analog/linear so will dissipate up to half the output power, (24V * 2.5A)/2 = 30W. A heatsink is required. \$\endgroup\$ May 19, 2022 at 12:31
  • \$\begingroup\$ @norbel: note that 2.5A requires R <= (24V / 2.5A) = 9.6 ohms, so exactly zero of your specified range will fully satisfy your current range requirement. I suggest looking at the solenoid datasheets to determine what actual voltage and current range they require. \$\endgroup\$ May 19, 2022 at 12:32
  • 1
    \$\begingroup\$ @TimWilliams Ok. Agree also for the power dissipated in analog behavior. \$\endgroup\$
    – Antonio51
    May 19, 2022 at 12:39
  • \$\begingroup\$ You would need a supply of 65V or so minimum to reach this goal with PWM. \$\endgroup\$ May 19, 2022 at 13:00

3 Answers 3

1
\$\begingroup\$

There are cheap boost converter chips to drive LED strings with constant current. They have PWM inputs to set the target current and some support grounded LED connection. This would be an energy efficient way to control your valves and cover all requirements. If you can use more than 24V supply voltage, a buck converter offers more options and there are more on the market. Can your 25 Ohm valves accept 2.5A at all?

\$\endgroup\$
1
  • \$\begingroup\$ hello, no 25 ohm valves won't accept 2.5A but for future valves with less resistance I have to implement maximum 2.5A \$\endgroup\$
    – norbel
    May 19, 2022 at 17:39
0
\$\begingroup\$

About your TRY 1

Here is what happens when driving resistor (your R1, first picture) is too big ...
R1=10k -> magenta curve. Not very usefull and dependent of the value of load (my R3).

enter image description here

The DC analysis seems however correct, Note that this is "analog" behavior.

enter image description here

Here is the case when my R2 = 10k and R3 varies from 1 to 24 Ohm (stepping x2). Sorry, little text error in picture.

enter image description here

Same but R2=100 Ohm.

enter image description here

This case for load wired directly to ground. Not tried with PWM, ONly DC Dynamics.
A "translator" for command voltage is been used. (0..5A -> 0..5V to 24V..19V).

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ thank you, its just the circuit from the link, I typically use 100 ohm as gate resistor works just fine, yes 10K is high \$\endgroup\$
    – norbel
    May 19, 2022 at 12:37
  • \$\begingroup\$ Is the input, pure only PWM ? Or filtered as @Tim Williams pointed in his comment ? \$\endgroup\$
    – Antonio51
    May 19, 2022 at 12:42
  • \$\begingroup\$ input is only PWM \$\endgroup\$
    – norbel
    May 19, 2022 at 12:43
  • \$\begingroup\$ NB: I did not try the last picture with PWM. Load is wired directly to ground. \$\endgroup\$
    – Antonio51
    May 19, 2022 at 13:33
0
\$\begingroup\$

You can try using the motor driver from Texas Instruments. For example, the DRV8873H (or DRV8873S).
Why did you come up with 5kHz? I always thought that the suitable frequency for these proportional valves should be 200-1000Hz

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.