Motor (Pump) runs unpredictably

Dear all I've made water pump control scheme on MOSFET transistor (see scheme below) but it runs once I am powering my board.

But this isn't worse - as I use arduino to water my flowers by schedule. And water pump starts running at night :frowning: I've checked code - nothing to show that this is an error in code.

Code could be found here

Looks like due to something transistor became opened.

Could you please advice how to eliminate this? I've checked google - nothing about same issue.

The drawing and code may be what was planned but not necessarily what you have. Give us the code YOU are using and a picture of your connections

Weedpharma

Code is the same as on github - it's quite big to post it here.
All scheme attached. Sorry don't know which software to use to draw schemes on Mac.

Meanwhile searching through Internet I got the idea - what if I put 30K resistor between transistor gate and ground?

The purpose of the R from G to Gnd is to discharge the gate capacitor. The control port would be low so it would discharge via the R1.

Have you tried a different port to confirm the port is ok?

Have you measured the voltage on the output pin?

A clear close up photo of your connections may help.

Weedpharma

weedpharma:
The purpose of the R from G to Gnd is to discharge the gate capacitor. The control port would be low so it would discharge via the R1.
Have you tried a different port to confirm the port is ok?

Have you measured the voltage on the output pin?

A clear close up photo of your connections may help.

Weedpharma

No I haven't tried another port. But I've measured voltage and it's 4,6V when it's HIGH.

I've made photos but they are not so good I think.

Meanwhile I've found the app I've looking for - Upverter

See scheme attached.

What is the voltage when you first turn it on, IE when it should be low and the motor off?

You need to localise the fault. Write a simple program that only turns on the motor when you press a button.

If the motor still turns on when power applied, you have a wiring fault or a faulty port.

Weedpharma

weedpharma:
What is the voltage when you first turn it on, IE when it should be low and the motor off?

You need to localise the fault. Write a simple program that only turns on the motor when you press a button.

If the motor still turns on when power applied, you have a wiring fault or a faulty port.

Weedpharma

Motor runs for a sec when I was resetting arduino.

But seems pull down resistor fixed a problem

andjel:
Motor runs for a sec when I was resetting arduino.

Next time you have a problem, please give ALL information such as this in the first post.

It makes a difference in how to find a solution.

Weedpharma

TomGeorge:
Hi, what is the voltage and current rating of the motor.
Can the motor run on the 12V 1A supply on its own?
Have you got any bypassing on the board you have built?

Have you written a simple code just to turn your motor on and off.

Did you write the sketch, which can be attached to your post if you use REPLY rather than QUICK REPLY, all at once or did you build it stage by stage?
Tom.... :slight_smile:

Hi, Tom. As I wrote seems like I've found the solution - pull down resistor.

Motor can run 5-10V. But don't know current - bought on DX.com.

Have you got any bypassing on the board you have built?
I don't understand the question.
But yes, I've tried simple code and it works.

Did you write the sketch, which can be attached to your post if you use REPLY rather than QUICK REPLY, all at once or did you build it stage by stage?
I don't understand the question.

Bypassing refers to having capacitors of 0.1 uF from 5v to Gnd to remove electrical noise from the power input.

This noise can give spurious results.

Weedpharma