Monolithic capacitor on l298

MervBlood

New Member
Would someone be able to explain the purpose of the 0.1 uf monolithic capacitor used on the 2 amp motor controller in David Lincoln`s book. It joins the 5v and 12v ground. I cannot find this capacitor in the Maplin website. Is there an alternative I can use? One last question please. I wish to use three L298`s controlled from an picaxe 28x2. Could I just use one capacitor for all three?
Thank you for spending the time to view my questions.
Merv
 

BeanieBots

Moderator
I don't have the book but..
There should be two caps, one for 5v and one for 12v.
EACH L298 should have them fitted as close as possible to the pins.
They are to 'decouple' the L298 from the PICAXE and from each other.
Without, spikes can enter the supply lines and cause resets and other undesired behaviour.

You can use ceramic caps instead.
 

MervBlood

New Member
Hi. The book just has one capacitor, but the motor and 5v share the same ground. Looks like the capacitor is between pins 8 and 9. Could I just use seperate earths and 6 capacitors? Would they all need to be close to the L298`s. Is the capacitor value critical? Thanks
Merv
 

Dippy

Moderator
Assuming there won't be any shrieks of "Copyright", can you post the circuit diagram?
Thousands of us don't have the book.

I, for one, don't understand "It joins the 5v and 12v ground."

If we could see a pretty (and non-blurred) picture it might help.
 

Dippy

Moderator
Merv,
I say this to everyone, so I'll say it to you too ;)

ALWAYS read the Product Data Sheet. Especially if in doubt when reading examples from books. Manufacturers know their product - authors may transpose information incorrectly.

http://www.farnell.com/datasheets/36721.pdf


Have a look at the PIN FUNCTIONs on Page 3.
Read the pin descriptions. You'll see mention of 100nF capacitors.

Look at the Block diagram on Page 1.

Then look at Page 7 and the notes under 'Suggestions' on the same page.
The translation into English is a bit iffy, but you should get the idea.

Remember, not all capacitors are sutiable - even if the value is the same.
They have different characteristics, even within the same category e.g. poly-film or ceramic. They also have voltage limitations so you should ALWAYS check this is OK too.

A good ceramic capacitor is probably the best choice for this.
But, if you only have a poly film then try it. It won't take your face off in a nuclear explosion, but it probably won't be ideal for the job.

If it doesn't work then save up 10p for a good ceramic.
BUT remember, the quality of a circuit will ALSO depend on your track/wiring physical layout and suitable track widths.
If you start sharing PICAXE power and motor power down the same weedy wire or weedy ground then you are asking for problems.
Your components could be ideal, but poor execution will give poor results.

Also, and sadly not mentioned in the book, it is almost mandatory to have a capacitor across the PICAXE +ve & Gnd pins to decouple noise.
This is especially important where spikey/noisy things like motors and high/fast switched loads are used.
(Also important for precise ADC work too but that's a whole different kettle of fish).
 

Phil bee

Member
motor driver

there should be a de-coupling capacitor between pin 9 and 0volt and the same for pin 4, and don't forget to use 2 fast recovery diodes or you will blow the output stage of the drive chip i.e BYW36 of FR305.
 

MervBlood

New Member
Thanks Dippy. I have ordered the capacitors I need. Will try the others anyway, just to see what happens (half the fun). Will also try without. Then I will know how the circuit behaves.
As a begginer to electronics I have many holes in my knowledge and I very much value the input I receive from people like yourself on the forum!!
Merv
 

MervBlood

New Member
Thanks Phill bee.
I am using L298 HN. I beleive these have built in diodes?
Thanks for your input I value it.
Merv
 

Dippy

Moderator
What does YOUR Data Sheet say Merv about the L298HN?

You must read it thoroughly. You can't design things based on "I believe"... ever heard of the Titanic ? :)

My Data Sheet says "L298HN (Multiwatt Horiz.) ". i.e. a package description. i.e. what it looks like.
The same Data Sheet shows two example configurations for stepper motors where diodes are shown, along with the text:
"The external bridge of diodes D1 to D4 is made by
four fast recovery elements (trr <= 200 nsec) that
must be chosen of a VF as low as possible at the
worst case of the load current. "

Does yours have something different? If so, please post it as there may be extra information for others to see.
 

MervBlood

New Member
Sorry. Remember I am a Begginer.
I read in David Lincolns book (page 149) that the L298 had built in protection diodes. Not quite sure what he meant by that as it is clear it needs protection from back E.M.F?
 

BCJKiwi

Senior Member
Just do what it recommends on the datasheet for the L298 for the manufacturer and model you actually have.
 

moxhamj

New Member
Re "I read in David Lincolns book (page 149) that the L298 had built in protection diodes. Not quite sure what he meant by that as it is clear it needs protection from back E.M.F?

Yes, watch the suffix at the end. There is the L293 for instance that does not have diodes, and the L293D which does. The L298 does not have diodes. And there is no L298"D" http://www.roboticscommunity.com/robotics/Design-DC-motor-using-H-bridge-L298-7856-.htm

So you need the diodes, and I guess you might need some suggestions for part numbers as I don't think 4001s will be fast enough. Maybe the diodes used in switchers eg 1N5819 (I use heaps of these) though they are only good for one amp. So you might have to do some searching there. Phil bee had some suggestions (though I think you might need 4 rather than 2 if you are driving a motor)

The datasheet on this chip is great and includes schematics and even a PCB layout. http://www.st.com/stonline/books/pdf/docs/1773.pdf

Also, once you get over an amp, it may be worth mentioning that picaxes don't like high currents near them. Even from circuits that are not even physically connected - eg 3.6kw mains motors. You may get random resets and other odd behaviour. So it might need seperate power supplies plus all the filtering on those supplies, and some thought re bringing grounds to a common point rather than looping ground tracks around the place. Maybe even seperate boards, eg a picaxe board and that driver board in the data sheet.

A handy tip - if you do suspect resets but are having trouble debugging, put a led/220R resistor on one pin on a picaxe and turn that led on for 1 second as the first few lines in the code. Then never turn that led on anywhere else in the code, and now you can see if it is resetting.
 
Last edited:

hippy

Ex-Staff (retired)
Following on from using a LED to flash on reset, SERTXD and a message is probably the easiest if you suspect there are a lot or frequent resets happening. For longer test runs, to spot suspected intermittant resets and for reliability testing, I've found a Piezo to be great for the job. Being audible you don't have to watch the LED or keep Programming Editor Terminal open. You can get on with life, eating dinner and watching TV and not miss a reset.
 
Top