I'm trying to connect make a simple circuit in which i have an arduino that reads sensor values and when that value goes above a fixed value it triggers the DC Motor and makes it works. To connect both I'm using a MOSFET IRLZ44N, the motor is a simple 5V motor which is connected to an external power source (5V and 1,5 A), the ground of that source is common with the ground of the arduino.
When i run the program with the external power source disconnect it all works well but as soon as i connect it, the arduino goes haywire priting unknows caracters in the serial monitor and stopping working in effect.
This is the desired wiring:. and this is some photos of mine: ..
I know that the capacitor is in the external source terminals instead of being in the motor terminais as in the schematic but I think that isn't really relevant.
I don´t really know what is the source of the problem and I'm really new to this so forgive me for my possible errors.
Your case seems to be a typical and common case here on the forum of a project without using a snubber.
Post your schematic (even if it is freehand) so that we can help you better.
Well, I said that I thought it wasn't relevant because that's what one of my university professors said, and as he pointed out, it's practically the same. Nothing else is different. I'll send the photos. And yes, I am (Gate/port 11).
Sorry I didn't understand what you are asking... If the power source is connected when the mosfet isn't "activated" (I don't know the correct term) ? If that's the question then yes
With the power and motor connected, if the MOSFET is off (not activated) it should be the same as having the motor disconnected. So I would suspect the the MOSFET is bad.
I've though of that as well, but I have a couple of them with me, and I just tested one (run the arduino and it worked fine but as soon as I disconnected and connected the usb to power the arduino for the second time it stopped working again )
I dont believe that I damaging them but I'm really at a loss here...
Now I see the pictures.
So it one of those water pumps and you also have a soil moisture sensor is that correct?
If yes the it does indeed make a difference where the capacitor is connected.
There should be a diode and a 0.1uF capacitor connected directly across the pump terminals.
I can only thank all of you for your patience—I'm doing my best to give you all the information I can. My problem really is the inconsistency of my results, some time is does work and some times it really doesnt. You have said that breadboards cannot handle motor currents but my motor is listed as having between 0.2 and 0.5 amps, can those currents really be a problem?
Thats is correct sir, I have a diode 1N4007 across the terminals, but the capacitor isnt, I shall correct that but I only have with me a 0.68 uF (the one in the circuit and this moment) and 2.2uF, can I use the 0.68 or is that a problem?