L298 driver

MervBlood

New Member
Hi again. I would like to ask one of you for a little help with my latest problem.
I need to build a H-Bridge board using the L298. I would like to keep it as simple as possible. This is a new hobby for me and I am learning quick but have quite a way to go. I checked out the L298 data sheet several times and gained some understanding of it. However when it comes to laying components out on a circuit board I get confused. Looking on the internet I found a circuit that looked straightforward but right in the middle it has a 1000uf capacitor. Why? Can I leave it out?
I plan on running two 12v dc motors under 2A and have two types of diodes to choose from. 1N5404 3amp and 1N 5819 1amp. This is the link to the page I looked at.
http://www.dprg.org/projects/1998-04a/
Thanks
Merv
 
Last edited:

inglewoodpete

Senior Member
I don't consider myself to be a expert with the L298 but I have has some experience with it over the past year.

I have used the L298 in 2 projects. One used a custom made PCB and the other uses stripboard ("vero board").

Care must be taken with the layout, particularly with the 0v or 'ground' tracks. Sudden changes in motor current due to switching will induce voltage differences in the PCB tracks, due to the resistance of the tracks. If this voltage finds its way the the microcontroller (PICAXE in our case), it can cause instability and restarting of the program in the chip.

The diodes need to be schottky or fast recovery types. This is because the motor commutator noise is very spiky and ordinary diodes do not turn on fast enough to capture and dissipate the noise spikes. Use a set of 1N5819 (or alternative 1N5818) schottky barrier diodes. I prefer to mount them on the motor and run the 4 wires all the way to the motor. This is because my motors have been 1 to 3 metres away from the L298 and I want to attack the noise at its source. Other designs I have seen mount the diodes next to the H-bridge.

The capacitors are an important part of noise suppression. Ensure you include 2 x 100nF (0.1uF) as close as possible to the logic and motor power leads of the L298. The larger capacitor (1000uF in your post) acts as an 'energy tank' to store and absorb energy when the motor needs it, particularly when turned on or off. Designs will differ here too. I have mounted a 100uF non-polarised capacitor actually across the motor terminals. In another design, I mounted a polarised electrolytic across the + & - nodes of the schottky bridge. In a third design, a 100uF polarised electrolytic was put near the L298. All work OK.

So there are no hard-and-fast designs but rather, design rules that should be followed. I imagine you want your circuit to work first time. I have over 35 years experience in electronics and still "get it wrong" from time to time. When it doesn't work, I hope I learn from my experience. When it does work, I'm pleased but always wonder: "did I overdesign it?"

Download more than 1 datasheet for the L298. Different manufacturers have more or less information.

Peter

PS The path in your URL should be "....1998-04a/"
 

MervBlood

New Member
Thanks for your input Pete.
I have changed the url.
I have got hold of a lot of 1N5819 schotty diodes so I will use them. You think that I can use double the number of these to be on the safe side? Also it sounds like I can omit the big capacitor or try something smaller?? I am building two boards the seccond will only run a tiny 12v motor on one side and switch a set of lights on the other so this will be less demanding. I will keep my project modular and try to avoid some of those problems! Thanks
Merv
 

moxhamj

New Member
Re Also it sounds like I can omit the big capacitor or try something smaller??

Just a quick point - you can keep replying to your own thread with the little upside down triangle button at the bottom of each comment - rather than starting a new thread. Then all the questions end up in one place which almost certainly will be helpful for someone else down the track.

To bring together some comments on the other L298 thread re monolithics/bypass caps, and the comment above, capacitors are not generally something you can leave out. As inglewoodpete explained very well above, they are like little batteries near to where you need the power. So if a chip needs a bit of power it can get it from its 'bypass capacitor'. A motor needs more juice, especially when it turns on and has to get up to speed. So it has a much bigger capacitor.

I know there are lots of components to buy when starting out. Maybe check out some of the packs of random value components that most electronics stores sell? I started out with a pack of resistors and electrolytic caps and greencap caps and leds and used them up very quickly. And the ones that run out the quickest are the ones you go and buy more of *grin*!
 

inglewoodpete

Senior Member
Merv,

There is no benefit in connecting several schottky diodes together "to make something safer".

No two randomly selected diodes have identical characteristics. If you were to put 2, 1-amp diodes in parallel, hoping to carry 2 amps youwould find that one would start conducting at a fractionally lower forward voltage. Having a lower threshold 'on' voltage would cause this diode to conduct earlier and tend to 'hog' all the current. Once the current reached the diode's limit, its smoke would start to leak out. If the diode went short circuit, the circuit would probably stop working. If the diode went open circuit, all the current would flow through the other diode and pop that too.

If you were to place two diodes in series, you would double the peak reverse voltage capability. Hovever, it also doubles the forward 'on' voltage threshold.

What does this all mean in your circuit? You want to run a 'small' 12v motor on the L298 H-bridge. If 'small' means it draws a maximum current significant less than 2A (eg 250mA), then one set of 4 schottky diodes will be ample. There is no point in putting diodes in parallel because the diodes are only there to quench back-emf from the inductive motor. There will only be millivolts or microvolts difference between the forward voltage of 2 random diodes connected in parallel. The difference would not make any improvement on the protection of the H-bridge. The 1N5819 offers reverse protection up to 40V which is also ample for your situation.

Peter
 
Top