Hi
I am using the yellow geared motors which come with the 2WD arduino chassis.
I am having a problem with my motor control. I am using an L293E motor driver with 4 flyback diodes, and a 100nf capacitor accross the motor input. The flyback diodes are to prevent the high inductance voltage spike and the capacitor blocks out high frequency noise.
I wrote a simple program where i press a push button, and the motor runs for 5 seconds then stops. The motor works beautifully when i set the enable pin to HIGH, but when i apply PWM on this pin, the motor gives this weird "whistling" noise and it does not spin at all.
I am using a single power supply of rechargeable batteries with 2700mah capacity (6.5V). This is more than sufficient i believe. I have two LM317 regulators connected to the battery. One is used to produce 5V for the microcontroller, and the other 4.2V for the motor. (The motor driver drops 1.2V so the motors see 4.2 - 1.2 = 3V).
Any idea what the whistling noise is and how i can eliminate it and get the motor to spin?
I'd be interested to know how any of you guys are controlling the speed of these motors?
Best Regards,
Yuveer
According to the datasheet, at 1A current the motor driver drops 2.6v typical, 3.6v maximum (you need to add the source and sink output saturation voltages together). So 4.2v is a little low.
You should have a large capacitor (say 1000uF) between the L293E VS pin and ground (the ground connection of the capacitor should be close to where the 2 current sense pins and the flyback diodes are connected).
The whistling sound is probably PWM. You may need to increase the PWM frequency to reduce or get rid of it. if you increase the PWM output to near the maximum (255), I would expect the motor to turn anyway.