This first one appears to be indeed a simple on/off valve. Apply 24V and it opens.
Control is really straightforward of this one. All it takes is a simple transistor to control, and a flyback diode across the coil for protection.
See the first schematic in this link. Your coil is where the motor is in the schematic. A small BJT will indeed work just fine; if you want to use a MOSFET make sure it's a logic level type. Just see what you happen to have on hand.
That is either 0-10V, OR 4-20mA. Both are very common industrial control standards. The datasheet says the device comes by default set to 0-10V but can be changed to 4-20mA.
The voltage input has a 100 kΩ input resistance, so maximum current (at 10V) would be 1 mA. That can quite easily be done using a PWM output, 12V supply, transistor and RC filter. I don't have a schematic at hand for this, maybe someone else does. Otherwise can draw it quite easily.
Thanks for the information, forgive my ignorance but could a relay also work on the 2-state valve?
Should I put the RC filter between the PWM signal and the transistor or after the 10 V output of the transistor?
You made me think about this a little more This circuit should work. RC filter that takes the PWM and turns it in a 0-5V voltage; OpAmp in x2 amplification configuration to turn that into a 0-10V output.
Power the LM358 with your 24V source (it needs at least 12V and you have 24V available as that operates the other solenoids).
Thank you very much also for the circuit diagram. I would like to ask you, R3 is 4700 Ohm right?
With a simulator I tested the use of a capacitor and a resistor in parallel between the PWM signal and the GND, I saw that it works with 200 μF < C < 2 400 μF, is there perhaps a formula to determine C and R?
R3 and C1 form a low pass RC filter, passing only low frequency signals. The formulas are complex, but there are of course online calculators. This link also explains more of what is going on.
The values I picked are to get to a 34 Hz cut-off. A value low enough to thoroughly filter out the PWM wave (Arduino's default PWM frequency is 490 or 980 Hz), while still offering pretty fast response time. Lower the R and C values higher cut-off frequency, lower them for lower cut-off frequencies.
At 4k7 and 200 µF the cut-off frequency is 0.17 Hz, meaning it takes seconds for a change in input signal to make it through, while with 2400 µF you have to wait a minute or so for the output to react.
You want R1 to be high, to not load the output pin much and to need less power, low enough to compensate for any leakage through the cap and the OpAmp. So something between 250Ω (20 mA pin limit - other MCUs may have lower limits) and 100k (1% of the 10 MΩ input impedance of the LM358, and sufficiently below any leakage of the capacitor).
You want C1 to be small, to be able to get away with a small and cheap ceramic cap rather than a bulky expensive electrolytic. The value I picked for C1 is on the high end for that matter.
The cut-off frequency I aimed for <10% of the 490 Hz Arduino PWM, but also not too low as to allow for faster response (>10 Hz sounds reasonable for controlling a valve).
A long story, I think maybe I should start a Gammon-like blog where I post this kind of considerations. Guess what, there's something about this topic there (but not much).
The switching timeliness is not a problem, I tried on Tinkercad (very professional software , off topic, do you know any open source software for designing and testing electronic circuits?) to simulate various capacities of capacitors and I had seen that range, however from what I have understood, any value between 1 and 100 µF can work.
Forgive the fussiness, I saw in your link that you talk about slightly higher input voltage, can 12V input be fine?