Driving DC Motor with L298 and BeagleBoard

Hello,

I want to drive two DC motors with L298 using BeagleBoard-xM (Rev C).
Is it possible to use GPIO and PWM outputs (for speed control) of
BeagleBoard for that purpose? If yes, is there anything that I should
care and do I need to any extra circuit elements?

Thanks,
E. Yazici

Yes, it is possible. The L298 is an old but reliable device.
-You will need to level shift the 3.3V PWM and GPIO signals to 5V.
-Make sure you add your protection diodes.
-I suggest that you run it from the VDD_5V rail.
-Make sure on power up that the driver is disabled

Gerald

Thanks for your suggestions.

I am planning to supply input current of L298 (Vss) from the same
battery that supplies Beagle's power. Is there any disatvantage of
this, or is it better to supply L298's current from the Beagle's
voltage access points (Figure 84. on BeagleBoard-xM System Reference
Manual)? By the way, do you mean DC_5V by "VDD_5V rail", which is the
second pin of expansion connector (Table 22. on BeagleBoard-xM System
Reference Manual)? Is it safe to directly use this source for Vss of
L298?

I will use PWM signal connected to L298's Enable pins, so the driver
should not be enabled without generating the PWM signal.

See below.

Gerald

Thanks for your suggestions.

I am planning to supply input current of L298 (Vss) from the same
battery that supplies Beagle’s power.

Motors are noisy. It depends on the cuurent of the motors. Make sure you do not exceed the current and I would add some filtering and capacitance to keep the 5V rail from being hit to hard with the changes in the loads from the motors.

Is there any disatvantage of
this, or is it better to supply L298’s current from the Beagle’s
voltage access points (Figure 84. on BeagleBoard-xM System Reference
Manual)?

Overall it would be better to supply the moto from an external supply if possible, again, depending on the current. I would definitley use the VDD_5V rail for this if you plan not to use an external supply.

By the way, do you mean DC_5V by “VDD_5V rail”, which is the
second pin of expansion connector (Table 22. on BeagleBoard-xM System
Reference Manual)? Is it safe to directly use this source for Vss of
L298?

As long as you adhere to the above. You are supplying that power externally, so make sure you have the current.

I will use PWM signal connected to L298’s Enable pins, so the driver
should not be enabled without generating the PWM signal.

Good.

Dear Gerald,

Thanks for your valuable suggestions.

Actually I have a vehicle with its motors and batery mounted, but
there is no driving circuit or driving logic on it.

It has two motors that works with 7.2V DC on it and each of them draws
at most 350mA (peak current). The vehicle already has a 7.2V battery
on it. Since I am planning to use same battery for both the vehicle
and Beagle, I have replaced the battery with another 7.2V lion battery
that is 2500mAh. To supply Beagle's power, I am planning to use a
swithcing voltage regulator circuit that converts 7.2V to 5V using
LM2596 by NS and filter the output. The same 5V output will be used to
supply L298 (Vss is logic supply voltage of L298, not the source for
motors).

My total peak current draw is around 2000mA:
DC Motors: 350mA +350mA = 700mA
BeagleBoard and its peripherals: 1200mA
Others: ~100mA

With the help of your suggestions, I decided to implement the above
configuration. Is there any other things that I should concern?

Thanks,
Emre.

It is not totally clear, but it sounds OK. Schematics work better. Make sure you level shift the 3.3V control signals to the L298.

Gerald

Hi new-be here Can you please post schematics if you could successfully control two motors using L298 with beaglebone black i am confused with how to convert levels
from GPIO are you using N2222A for it ?

thanks

Hi I am also trying the same thing with beaglebone black but don’t have level shifting board handy and and may take some time when i order from sparkfun but meanwhile does L298 accepts 3.3v from GPIO and PWM ports ?

thanks,
Digish