I am trying to control four 4-Channel IRF540 MOSFET Switches modules using an Arduino MEGA. I am having trouble in powering these boards and the Solenoid Values connected to them.
Is it possible to power all the four boards using the Arduino (maybe by connecting all V+ of all the boards to a 5V pin on the Arduino)?
What should I use to provide power to the Solenoid Values connected to the MOSFET Switches boards? (marked by a ? in the schematic)
The pins marked as S will be going in the PWM capable digital pins in the Arduino.
I am new to Arduino and Electronics in general. Thanks for spending the time and considering my question.
The answer is quite obvious. I am extremely new to electronics. Can you elaborate how much current will be sufficient for all the 15 valves. A link to which PSU I would use would be very helpful.
Thanks.
There is datasheet available for the MOSFET used on that board. But i was not able to find any datasheet or information regarding the board. Here is a link to the IRF540 Datasheet
Will this PSU power both the Arduino and the valves?
If only the Arduino, a 5V PSU would be appropriate. This could not be connected to the barrel socket of the Mega, it would need to be connected to the 5V and ground pins. The +5V from the PSU could be split to power the MOSFET boards, depending what current they require.
Ask the seller for the data sheet. If they can't provide one, either take your business elsewhere or ask for a free sample so you can take some measurements.
Now you are contacting yourself. The forum members here are very helpful, but if you give contractory answers, no-one will be able, or willing to help you.
The 5V can come from the Arduino or the Arduino's regular 5V power supply. The 5V driver circuitry doesn't need much current.
Most solenoids need higher voltage & current so you normally need a separate power supply for them. If you happen to have 5V solenoids (unlikely) they can share the same power supply but the solenoids will require more current than the Arduino so you need a "hefty" power supply and you can't power them through the Arduino.
Or a 12V power supply can also be shared since the Arduino has a built-in 5V voltage regulator,
But solenoids generate noise spikes on the power supply when switched and with a shared power supply that noise can get into the Arduino it can cause it to reset or crash so a separate power supply tends to be more foolproof.
In most situations the voltage is constant (when on) and the current depends on a load. So the power supply voltage should be "exact" and it should be capable of delivering the necessary current. It's OK to have excess current capability.
For example, here in the U.S. there is 120VAC at the power outlet and that 120V is always there. If you plug something in (and turn it on) current flows. A 100W light bulb "draws" more current than a 10W bulb. If you plug-in two toasters or two hair driers you get excess current and the breaker blows, dropping the voltage to zero.
Note that the MOSFET board should be designed-rated for inductive loads. It probably is. A solenoid or motor has a coil which is an inductor and when it's switched off you get a very-high momentary "kickback" voltage that can destroy a MOSFET (or other devices). You don't get that kickback with a regular light bulb or LED.
From that, I would estimate that the boards could draw up to (5-1.2)/470 = 8mA per channel from the Arduino, a total of a little over 100mA for all 14 channels. With a 1A 12V power supply for the Arduino, the Arduino's onboard regulator could overheat, so I would not recommend a 12V PSU for the Arduino. With a 1A 5V PSU, there should be no problem (the Arduino's onboard regulator would be bypassed).
Another option would be a DC-DC or "buck" converter to take power from your 12V PSU for the valves and make 5V power for the Mega and the MOSFET boards. The boards will need around 100mA, plus maybe another 50mA for the Mega, so even a 1A buck converter should be enough.