Solenoid powering problem

hey there,
i have a problem with power my 6V solenoid with external power. i built it excatly like seen in the picture, but i have a 6V power supply, 340 mA. nothing fancy. i cutted the plug and connected the plus to the voltage input and the minus to the ground, but there are electric sparks and the solenoid is not working properly..
anyone a idea on this ?
this would be great!
thanks

you need 2 wires between arduino and transistor module, ground wire is missing

[MOS MODULE](http://"https://www.aliexpress.com/item/4000351571220.html?aff_platform=true&aff_short_key=UneMJZVf&isdl=y&src=bing&albch=shopping&acnt=42005546&isdl=y&aff_short_key=UneMJZVf&albcp=373871275&albag=1308419064071836&slnk=&trgt=pla-4585375808811125&plac=&crea=81776241344382&netw=o&device=c&mtctp=e&utm_source=Bing&utm_medium=shopping&utm_campaign=PA_Bing_customlabel1_US_PC&utm_content=customlabel1%3D7&utm_term=MOS" module&msclkid=0a36ebbbabdc1bdb9e248bb55c6f7352)

You shouldn't be using D0 for an output.
That's the serial TTL RX input.
Use any pin other than 0 or 1 .

ok thanks for the answers so far..
i did upload the wrong setup, my setup is exactly like this:

Confirm you have kickback suppression.

Post a vendor link for the solenoid so we can see the specs.

whats kickback supression ?

here is the link to the modul

That MOSFET ‘is not’ a logic level Transistor !

You will need to add a driver transistor to your setup.


For kickback suppression, you need a reversed biased diode across the solenoid, a 1N400X should be okay for this.


EDIT

On second thought, with only a 6v power supply, this is the wrong module to use.

At a 6v volt power supply, you must use a logic level MOSFET.

Time for you to rethink this and redesign the application !


Or - Get an IRL540 MOSFET and swap out the IRF540.

What's kickback suppression ?

This:
https://forum.arduino.cc/index.php?topic=705982.0
Without it your probably killed your transistor.

larryd:
Or - Get an IRL540 MOSFET and swap out the IRF540.

Don't bother.

Get the correct module:

Aliexpress item.

Uses the AOD4184 which will even work reasonably at 3.3 V logic level.

No, it doesn't have the diode either.

If you are switching an inductive load you need a snubber (for AC) or free-wheel diode (for DC).

Your circuit doesn't do this, so high voltages were generated (can be 100's to 1000's of volts
depending on the size of the solenoid - hence the sparking). This may have toasted the MOSFET
and could have affected the Arduino too if you were unlucky.

But using the wrong MOSFET was never going to be good in the first place. Some unscrupulous
people are selling IRF520 modules as Arduino compatible and they simply are not. You
definitely need a logic-level MOSFET for controlling from 5V logic.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.