So i have a dc motor and l98n h-bridge and external power sup with 7.2V. When i try to create a loop with different pwm signals, i got beep sounds on low pwm's. Here is my simple code:
const int pwm = 2 ; //initializing pin 2 as pwm
const int in_1 = 8 ;
const int in_2 = 9 ;
//For providing logic to L298 IC to choose the direction of the DC motor
void setup()
{
pinMode(pwm,OUTPUT) ; //we have to set PWM pin as output
pinMode(in_1,OUTPUT) ; //Logic pins are also set as output
pinMode(in_2,OUTPUT) ;
}
So the problem is when i use 200 as a pwm there is no problem. My dc motor is working correctly but when i try do it with my low pwm like 10-20 (to 80 actually). a beep sound only i got. Why is that or anyone know the solution ? Thx for helps.
The 298 loses at least 2V, and at higher current that's about 4V iirc. You have not much more than 3V or so at the mptor. On top of that you're pwm-ing that away to about nothing.... not enough to get the motor started.
298's not much good for low vlotage motors, where relatively speaking the voltage loss is more than in a higher voltage case.
Actually my main goal is moving my motor slowly so i can park my car prototipe, i used 100 as pwm but its too much for me. Do you think 3v power sup gonna be the solution for me. I mean if i use 3v psu and 50-100 pwm thats gonna be a solution for me ?
ardy_guy:
The 298 loses at least 2V, and at higher current that's about 4V iirc. You have not much more than 3V or so at the mptor. On top of that you're pwm-ing that away to about nothing.... not enough to get the motor started.
298's not much good for low vlotage motors, where relatively speaking the voltage loss is more than in a higher voltage case.
oh sorry now i got it. So i need more voltage right ? I have 27V psu maybe it can be enough
That was just a try to see if the PWM frequency was the problem.
If you want the motor to be silent, you have to move the PWM frequency outside of your hearing range.
<30Hz or >20kHz.
Leo..
Hi,
What DC motor are you using, what are its ratings, voltage, max speed and does it have a gearbox?
What size are the wheels?
If it is a hobby motor rated at 3000rpm or more and it has no gearbox, you will have very little chance of getting it to run slow and provide any decent torque.
TomGeorge:
Hi,
What DC motor are you using, what are its ratings, voltage, max speed and does it have a gearbox?
What size are the wheels?
If it is a hobby motor rated at 3000rpm or more and it has no gearbox, you will have very little chance of getting it to run slow and provide any decent torque.
Can you post a picture of your project please.
Ofc i can even post a video about it.
here is my video about my project. left one is my dc motor. As you can see sometimes it sounds like beep and not moving efficiently. Thats my real problem. And since i am trying to do automatic parking car i need to make my car slow.
Hi,
You are using a RC car that is setup motor wise for SPEED, if you want LOW SPEED you will need more gearing I would say,
Does your motrt have any part numbers on it, it will be rated in the 1000's of rpm.
Can you rotate your motor by hand and tell us how many turns it needs to rotate your driver wheel one revolution?
What is the diameter of your driver wheel/tyre?
Thanks.. Tom...
PS.Have you run the RC Car on the floor to see how it runs under load?
I'm facing the same problem. I'm using 100RPM 12V Geared DC Motors (4 of them) connected to a single L298N.
I can hear a beep sound and there's no motor movement.
What could the problem be? Low current? Low voltage (I'm using a 12V power supply)?
The beep sound comes from the PWM. The PWM has that frequency you hear. At full duty PWM you won't hear it because the motor runs and keeps noise and probably won't have any parts resonating with the PWM frequency. At half duty you might hear it, especially if the motor doesn't run on half duty. Instead it catches the PWM frequency and resonates with it, creating the beep. At lower duty you will still hear it, but it probably fades when duty approaches zero.
If you connect the PWM out to a piezo buzzer, you will hear a similar sound like what your motor does, when it receives the PWM but doesn't rotate (due to too heavy load). The 50 % signal is probably the loudest in your buzzer. As people have pointed out, raising the PWM frequency to the ultrasonic band will make the audible beep disappear. But it won't make your motor run better on low PWM values.
There could be a current problem but you have provided no information that would enable us to tell. What is the current rating of the power supply? What is the stall current required by the motors? How have you connected the 4 motors to one L298N? AFAIK you can't control 4 motors independently.
It could also be a voltage issue because the L298N can drop several volts. There are much more efficient motor drivers available these days.
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?