need help with water pump

Hey guys whasup? I need help with new water pump that i've just got it's 5-12V I'm trying to build a PID tank fluid controller. usinng sharp IR sensor & arduino UNO But I've have series of problems :roll_eyes: :~ :~ :~ I'm using L298D board to control the pump with PWM but i cant get any result :( (motor just make a sound with 5V plug into the DRIVER IC) should i change the frequency of PWM or not? or maybe i shouldnt use L298???? and by the way when my arduino is connected to my laptop and I plug 12 volt to L298 my laptop turn off but I need my laptop to command motor with serial data....what should i do =(

You need to supply some details about the pump. How much current does it require at full load? In any case, you cannot power a pump using the Arduino or your laptop. You will need a separate power supply for the pump.

hey tnx for answering
I dont know what’s it’s specification
all i can find on it is:
12V
110645850
Made in China :expressionless:
RNCO


it’s a small water pump
based on your exprience could u answer my question?
do i really need to change the PWM frequency or not?
how can i command the water pump with serial?
can i control the speed with L298 D or i have to use power mosfets ?
tnx :slight_smile:

You need to show us a diagram of how you have eveything connected. A photo of a clear drawing will be fine.

My guess is that you don't have an adequate pwoer supply to drive the motor, that's why we need to see how you have things connected.

...R

I explain how i set up my circuit powering arduino with laptop and L298 driver is connceted to a Computer powersupply (it could handle 3 A) this voltage sources is good for a small dc motors (such as toy's motors) but it can handle waterpump......... by theway i havent got my answer ...should i change the PWM frequency or not??????? or can I use mosfet power to to control the water pump speed?????? tnq

fever:
I explain how i set up my circuit

Sorry, but words are not as good as a drawing. You know what you are doing but I don’t.

Have you another motor that you can try with the L298?

Can you connect the power supply to the pump motor without any Arduino stuff and measure the current - and be careful not to overload and damage the motor or the power supply.

If you are using the standard Arduino analogWrite() to generate the PWM then would not be inclined to change it.

Let’s see your drawing and the problem might be solved in 2 minutes.

…R

motor just make a sound with 5V plug into the DRIVER IC)

all i can find on it is: 12V

Clearly you either have no electronics experience or you are not paying attention. You are posting for a hardware problem. That requires a schematic. If you have to draw it with children's crayons or your wife's eyebrow pencil we don't care. Draw the schematic and post a photo of it. Also, FYI 12v does not = 5V 1- Never run any inductive devices off the same voltage powering your arduino. 2- Never run a 12V motor on 5V 3- When you post for electronic problems with motors and drivers post a schematic and the datasheet for the motor. 4-Don't ask software questions when everyone is telling you that your problem is hardware related. (PWM ? at this point who cares ?)

I'm using L298D board to control the pump with PWM but i cant get any result

Without your code we couldn't comment on this issue. We need to see your code first. 5- IF you are going to ask software questions, POST YOUR CODE.

If you have a multimeter, measure the current that the motor draws, when it is powered by 12 V and pumping water according to your needs. Multiply the running current by 5 to estimate the startup current. You will probably need a motor controller than can handle that amount of current, although sometimes you can get away with a motor controller designed for a bit less.

If you don't have a multimeter, now is the time to get one! They are essential tools.

powering arduino with laptop and L298 driver is connceted to a Computer powersupply (it could handle 3 A)

That's irelevant because the arduino can only supply 800mA.

by theway i havent got my answer ...should i change the PWM frequency or not???????

How can we answer that question if we haven't seen your code and have no idea what you mean by "change the frequency" You CAN'T CHANGE THE FREQUENCY ! It is what it is, and I'll bet you don't even know what it is. If you want help with your problem, start cooperating. You asked for suggestions , we gave them to you. Now it's time for you to follow them. 1- Draw a schematic by hand on a blank piece of printer paper and post a photo of it. 2- Post your code 3- Post an updated SITREP (SITUATION REPORT) detailing the current state of your circuit (what works ,what doesn't) When you have done that we'll go from there. If you're not going to cooperate then post on some other forum. We're not going to dance around with you because you don't want to do this or that.

hey guys
tnx for feedback :slight_smile:
like i said i am new to this forum
ok …
here is my code (I’m using simulink to download my model in to arduino. matlab simulink PWM frequency is 490Hz and it’s unchangable i think )
I measured the current and it was 0.7A and if i multiply it with 5 it would be 3.5A
so based on this result what voltage source u recommand me to use ?
for arduino and motor?
L298 can handle 2 A per channel … i probably cant use it right? what if I make to channel parallel?
this code is simple code to run motor…
by the way i did pay attention but i need ur advice on what kind of voltage source to buy for my project

Pins 5 & 6 are 980 hz. SITREP ? ( Working / not working ?) Wherr are you at as of now ? L293 ? Motor power supply ?(whst is it?) Iz the motor turning ? Pin numbefs on L293 ? Did you read the datasheet ? Check datasheet for pin numbers for Logic power (16) and motor powe (8)r. I don't think you have any motor power (12V) connected. You only have ONE power source connected to L293 There should be TWO ! THAT'S WHY WE INSIST ON SCHEMATICS

Your drawing only shows One. The motor is not going to turn until you put 12V on pin-8.

I still go with my earlier guess that your power supply is inadequate.

As far as I can see an L293 can only provide 600mA and your motor almost certainly needs more than that.

You are feeding 5v into the L293 to drive a 12v motor

As far as I know those L29x devices have a considerable internal voltage drop so your motor may only be seeing 3v.

See how a diagram helps ?

It would be even better if your diagram named the various pins that you are using and showed ALL of the wires including the ground connections.

...R

sorry it's L298d board It's typo

fever: sorry it's L298d board It's typo

That doesn't invalidate much of what I said.

It does, however, lead me to wonder what other mistakes there might be in your drawing.

...R

the L298 has an on-board voltage regulator that can be used to power the on-board logic.

the regulator cannot deliver 5 volts from a 5 volt input. need to put in 12 volts from that power supply.

besides the whole reason for the L298 is to deliver small amounts of power from a large power source.

as a test, wire the pump directly to the 5volt. if that spins, you are good for pump operation.

you do not show direction. the L298 is an H-bridge and if the motor is spinning backwards, you can either reverse the direction of the power out, or swap the leads to the motor.

the boards often have two power inputs.
a main power input and a 5v logic power input. there is also often a switch to allow you to select which you want to use.

As for the 5volt logic side, { NOT POWER INPUT ) you do not show the ground connected to the arduino. it has to be connected. and, you can connect 5volts to the 5v power for logic input from your arduino. the motor power HAS to be separate and from your external power supply.

many of these have a switch that allows you to use the on-board voltage regulator or you external 5v power. you should be able to use that on the fly without damaging anything.

if you have a link to your L298 it would help if you posted it so we could see the device. many have data sheets someplace on the net.

Besides the fact that no GND is shown between the arduino and the L298 ,

(it should be noted here that there are various versions of the L298, some with 6 pins on the input side interface , having only ONE GND connection at the motor power connector making it impossible to isolate the logic power from the motor power and some with EIGHT pins on the input interface , having a SECOND , ISOLATED GND , making it possible to have the motor power isolated from the logic power)

there is only one control signal shown in the drawing (ENA). The four direction lines IN1 ,1N2 ,,IN3, & IN4 are not shown , and no ground is shown. There is a label , written in YELLOW (WHICH IS HARD TO READ BTW) that says "IN1, 5V, IN2, GND" on the L298 but no lines are drawn from that label to the arduino so it is not possible to know what exactly that label means. The concept of a schematic is that a line is drawn where there is a connection and no line where there is no connection. Using that convention , the label means that nothing is connected to "IN1, 5V, IN2, GND" . If there is only ONE GND, please state that. If there are TWO GNDs (EIGHT PINS ON INPUT INTERFACE CONNECTOR instead of SIX PINS) then show the arduino LOGIC GND as separate from the MOTOR power GND (BATTERY or PS ?)

Please REDO the schematic or correct it. Please post a photo of your L298 or a link to the vendor page that shows a photo of it.

hey guys I changed the power supply
and feed the arduino with 12 v 1A powersupply(CCTV adaptor)
and powering the L298 with a computer power supply (12 V and 20 A )
then i upload the program in to my arduino,and set the arduino up to work properly but arduino got so hot
and got no result no motor spin or nothing else…
and then i press the orange button on my arduino ( I think that’s reset button then the orange led on arduino stop working )
so i try to run a simple program on arduino
when i try to upload blink example on arduino i got this (the image below result… does it mean my arduino dead but i have the 5 volt on my arduino port)
could it my Arduino MCU?
=(
my new schematic has been attached
i really need help :((

http://www.vetco.net/catalog/product_info.php?products_id=14337
L298
my L298 has one gnd
I set the in1 to 5V (it’s possible to do so on motor driver board )
and set in2 to GND (//////////)

put PINNUMBERS on the L298 connections so we can see where you connected everything.
The arduino should NEVER get hot ! Something is WRONG !

I labeled the l298 pins i think because i connect the Out 1 & out 4 and Out 2 to out 3 to get higher current i think that's why arduino got so hot and now it's not working what' do u think about whaat the arduino software error when i'm uploading the code?