Hello! First time poster here, sorry if it's not the right section.
I need to control a 24V proportional solenoid valve using arduino. The valve is controlled by the current, that goes from 0 to 165mA. I've not found in the datasheet (provided below) if it can be controlled by PWM which is what I'm thinking to control the valve. Do you think it could be used?
I did some research and came to these two circuits below.
One using a current source controlled by the arduino using the voltage regulator LM317. Did I get the calculations right?
The other using a mosfet 2N7000 to control the current by the Vgs. I'm not sure if this MOSFET is good for the circuit because the current can reach 1A with 5V in the gate. Can you give me recommendations?
So, which one of the circuits do you think will work better to control the solenoid by the current?
I don't see how that could work. Voltage regulators like a relatively stable input voltage, I don't think they can work with a PWM input. More importantly, the Arduino pin can only supply 5V and 40mA absolute max, so there's no way the regulator can supply 165mA output at 24V.
Please provide some context to your questions. If you try to quote someone's entire reply, the forum will automatically remove it, even if it's only short, which is annoying. So just quote a short but important part of the reply you are responding to, like I am doing.
Thank you for the reply.
But I should use voltages lower than 5V right? I'm afraid if I use 5V as the 255 analogWrite it will fry my valve. I don't know if I'm reading the datasheet right but in the graph Id by Vds it gives 4A for 2.5V in the gate. Sorry if the question is stupid, I'm new to electronics.
Yes, your question reveals your level of knowledge. Your power supply is 24V and your valve is rated for 24V. The valve's coil will draw the current it needs, no more, no less. The MOSFET cannot increase that voltage or current, only decrease it.
The figures you saw in the data sheet were probably the maximum currents that the MOSFET is rated for under those conditions.
My concern is that the valve will emit an audible sound at either 480Hz or 960Hz which might be annoying. If that happens, there are ways to change the PWM frequency so that the sound is above audible frequencies.