DC Motor runs continously on low speed

Hello!

I need some help. I just want to run a 6V DC Vacuum Motor Air Pump.
I'm using an external 5V power supply, an IRFZ44N mosfet, an ESP32 and a 10k ohm resistor.
Instead of running for 2 seconds and pausing for 2 seconds as i declared it in my code, the motor continously runs but at very low speed. This is my Code:

const int pumpPin =  25;   // initialize digital pin 9 for pump control

void setup() {
  // initialize the pump pin as an output:
  pinMode(pumpPin, OUTPUT);
}

void loop() {
    digitalWrite(pumpPin, HIGH);   // send signal from pin 9 to circuit
    delay(2000);                   // wait for 2 seconds
    digitalWrite(pumpPin, LOW);    // end signal
    delay(2000);                   // wait for 2 seconds before repeating loop
}

Schematic: ESP32 replaced with ard uno (i'm using gpio pin 25 on esp32)

When i run the simulation on tinkercad everything is working as expected. I double checked all the wiring. So my guess is a faulty component. Does anyone know, what it could be and how to fix it?

Datasheets:
ESP32 https://cdn.shopify.com/s/files/1/1509/1638/files/ESP_-_32_NodeMCU_Developmentboard_Datenblatt_AZ-Delivery_Vertriebs_GmbH_10f68f6c-a9bb-49c6-a825-07979441739f.pdf?v=1598356497
DC Pump https://www.pollin.de/productdownloads/D330067D.PDF
Mosfet https://cdn-reichelt.de/documents/datenblatt/C160/IRFZ44N.pdf
Power supply http://www.handsontec.com/dataspecs/mb102-ps.pdf

What happens if you pull out the FET?
It is useless with a 3.3V controller, a logic level MOSFET is required.

To begin with, you'll need to use a logic level mosfet.
No idea why you have a 10k resistor across the motor terminals.
Show a circuit diagram (not fritzing) and include power supply details as well as component details.

Normal arrangement to set up a mosfet like this is run a 10k to ground from the gate terminal.
This is to make sure the gate turns off when no signal applied.
Some will also use approx 100R in series with the gate as well.
Not good to run motors on breadboard, they simply will not handle the load current.
Most here will not go searching your links for information, put it all here.

2 Likes

Hi, @tortellinitoni

Can you please post some image(s) of your project?
So we can see your component layout.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

An NPN transistor would be better
This circuit will work.

x

Thanks for all the helpful answers! First i will get logic level mosfets. I decided for IRF520 on modules. Hope that will fix it. Sorry for the mistake, i'm a bloody beginner :melting_face:

IRF520 will not work

Hi,
Why have you got the 10K across the motor?


It should be between gate and source.

Tom... :smiley: :+1: :coffee: :australia:

Hi Jim, can you explain why? As far as i understood the gate triggers between 3.3 and 5V and it can handle up to 1A without heatsink. Could you suggest a working NPN transistor?

Hi Tom,
I changed it to that but it didn't changed sth. Motor still running at very low rpm.

I'm sorry. Just saw that you already suggested a transistor

The IRF520 data sheet only specifies parameters for Vgs from 4.5V to 15V. The gate threshold voltage has a max of 4V, so it definitely will not work at 3.3V.

The transistor part number is on the schematic I provided. Mouser has then in stock.

The ZTX690B is a little cheaper and will also work.
Are you able to order from Mouser or Digi-key where you live?

Not necessarily............ use a logic level mosfet, simple and relatively cheap given current handling capabilities.
IRLZ44 should do the job when configured correctly in the circuit, many others.

Both Digi-Key and Mouser list that part as obsolete.
I don't recommend parts that are obsolete

Try mouser part numbers,

942-IRLZ44NPBF
and
844-IRLZ44PBF
in TO-220 packages, and in the thousands.

https://au.mouser.com/c/?q=irlz44

Tom... :smiley: :+1: :coffee: :australia:

It's still obsolete

Crap...........
Just one instance, 100's of the things.

https://www.ebay.com.au/sch/i.html?_from=R40&_trksid=p4432023.m570.l1313&_nkw=IRLZ44&_sacat=0

Thanks for the advice! It seems that irlz44n has better availability in Germany where i live. I watched Dronebot Workshops video on transistors and mosfets but i still do not know exactly why i should choose a mosfet over a npn or the other way around. what are the reasons for one or the other?

Hi,

You have a 6V supply and a 6V motor, if you use an NPN transistor the transistor will drop 0.7V, so your low voltage motor will receive 6 - 0.7 = 5.3V.
A MOSFET will drop less than that say 0.2V so your motor will receive 6 - 0.2 = 5.8V.

(5.8 - 5.3) / 6 = = about 8%, and that can be a lot on a small motor.

The smaller volt drop means less energy wasted in the semiconductor and more used in the motor.

Tom... :smiley: :+1: :coffee: :australia:
PS. Anyone feel free to adjust my equations, these are just of the top of my head at the end of a long week....