0
\$\begingroup\$

I would like to implement a PWM controlled current source to drive 24V proportional solenoid valve using Arduino. What I need are the following:

  1. Input will be 5V PWM with 5000Hz frequency, duty cycle will increase the load current.
  2. The solenoids I need to use have internal resistances varying between 10-25 ohms.
  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.5A, which means at %100 duty cycle (5V) the load current should be 2.5A for any solenoid I am driving (if it can draw it), so no matter the load resistance.
  5. My switch has to be at high-side, thus the load should be at low-side.

What I have tried so far are the following:

  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 OPAMP 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 500mA and Solenoid 2 can still draw 1A, thus 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

  2. 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 high-side if it worked.enter image description here

Link: Current source with op amp and transistor

  1. Also tried the circuit below, but here, what to do with OPAMP's output is not clear for me. Do I read it from another pin and compare my PWM output and the reading and change my PWM accordingly at 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 third, I am not certain about what to do with OPAMP's output. I think this one is the closest one out of all to what I desired, 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 circuit above, I choosed resistor values to create such gain that 100% duty cycle 5V pwm input would translate to 2.5A 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 shunt resistor and feeding it back. But still maximum should be 5V input for 2.5A I load

EDIT#2: Guess what I need is 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 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 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 at 12:32
  • 1
    \$\begingroup\$ @TimWilliams Ok. Agree also for the power dissipated in analog behavior. \$\endgroup\$
    – Antonio51
    May 19 at 12:39
  • \$\begingroup\$ You would need a supply of 65V or so minimum to reach this goal with PWM. \$\endgroup\$ May 19 at 13:00

2 Answers 2

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 at 12:37
  • \$\begingroup\$ Is the input, pure only PWM ? Or filtered as @Tim Williams pointed in his comment ? \$\endgroup\$
    – Antonio51
    May 19 at 12:42
  • \$\begingroup\$ input is only PWM \$\endgroup\$
    – norbel
    May 19 at 12:43
  • \$\begingroup\$ NB: I did not try the last picture with PWM. Load is wired directly to ground. \$\endgroup\$
    – Antonio51
    May 19 at 13:33
0
\$\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 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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