Hi Folks,
I have a small 3V dc motor ( hobbyking Q-BOT quadcopter) connected to a L298N h-bridge running on 7.2V Lipos. I use the enable-pin to control motorspeed by pwm with the arduino. Also the input-pins are controlled by arduino.
I expected to see a massively overpowered Motor and limited max. pwm to 50% in the beginning, but the opposite happened: even with 100% pwm, the motor runs pretty slow.
Does the h-bridge need higher voltage on the enable- and input-pins?
Do I need transistors to switch the direction- and enable pins to 7.2V?
Should I use a different code for pwm than analogWrite? ( 470Hz probably to slow?)
I don't see any problems off hand.
Did you use a voltmeter across the motor? What voltage did you read?
No, you don't need to drive the enable or direction pins to 7.2V. 5V is what they are designed for. The problem is that the L298N is an old bipolar motor driver chip that has about 3V voltage drop total between the motor supply/ground pins and the output pins that you connect to the motor. Have a look at the Vce(sat) figures on the datasheet at https://www.sparkfun.com/datasheets/Robotics/L298_H_Bridge.pdf. Therefore, you need to provide power to it at about 3V more than you want to drive the motor with. Alternatively, use a modern mosfet-based motor driver chip.
What current do the motors take? It might be that they take too much for this chip.
3V drop would explain a lot.
The Motor is very tiny. It wont draw more than 0.5A.
Would I get better results with a ULN2003 Driver? I could also use a single MOSFet to drive a dc Motor with PWM on the gate, right?
If you don't want to reverse the motor direction, the mosfet should be just fine as a driver. Put a resistor between the arduion and fet , and put a protection diode across the motor.
o_lampe:
The Motor is very tiny. It wont draw more than 0.5A.
Who knows, unless you measure it. Size has nothing to do with much.