Hi, I'm using an arduino UNO board and a l298n motor driver and for power source I'm using tow li-ion batteries that their total voltage is about 9V.
I connected two with 500rpm and they run too slow even when I directly connect them to power source.
when I use two motors with lower rpm they work fine but I don't know what's the problem with these motors.
and this is the code:
void setup() {
// put your setup code here, to run once:
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
analogWrite(6, 255);
analogWrite(11, 255);
digitalWrite(7, HIGH);
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
}
my power source is 8V and 1.5AMP. my motors are DC 12V and their stall current is 0.15.
If you can tell me what's the problem.
thanks for your help in advance.
Read the forum guidelines to see how to properly post code and some information on how to get the most from this forum. Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.
You can go back and fix your original post by highlighting the code and clicking the </> in the menu bar.
The ancient and inefficient L298 sucks up 2V to 4V of the motor power and that power is wasted as heat. Get a better driver, one that is appropriate for the motor(s).
Try using lower voltage batteries and the motors will not even get warm. Try to run a hundred volt motor from 9 volt..... It will not even show a hick up.
You need to explore the meaning of volt.
No one can till we know the rated voltage and stall current. Pololu has some good motor drivers at good prices and they have great instructional pages for each of their products.
With a power supply of 8V and the L298 driver, the motors are getting 6V or less. No wonder that a 12V motor is not running very fast.
It is unlikely that the stall current is 150mA. That is more likely the unloaded running current. The stall current is probably on the order of 1 to 1.5A (or more).
The stall current can be several times the running current. The stall current will be drawn, briefly, every time that the motor is started. The stall current should be listed in the motor data sheet. In the absence of a data sheet, the stall current can be estimated. To estimate the stall current, measure the motor winding resistance. Zero your meter lead resistance before measuring the motor coil resistance. Take several measurements rotating the motor a bit between readings. Use the lowest reading in the calculation. The estimated stall current is the motor supply voltage divided by the measured resistance.
My recommendation is to use a 12V power supply capable of supplying the stall current once that stall current is known and a modern driver (see Pololu) that can handle the stall current.
Please do not update old posts, if you are asked for information, post it in a NEW post.
Updating old posts makes the thread hard to follow, as questions asked in the thread look stupid and a waste because you have provided the answers BEFORE the request.