Back EMF protection diodes with inductive loads

jedynakiewicz

Senior Member
I intend switching some small DC motors (12v 300mA, brushed) using a TIP125 PNP transistor. I note that the internal circuit of the transistor (Figure 1) shows a protection diode across C-E. Would this be sufficient to deal with the inductive load back-EMF from the motor or do I need a flywheel protection diode across the motor as well?

TIP125.jpg
Figure 1

Similarly, I am switching inductive load using a logic-level MOSFET - STB55NF06L and this also has a diode shown in the schematic (Figure 2)- I understand that this is inherent within the substrate. Is this also sufficient to deal with back-EMF or do I also need back-EMF protection diodes across the inductive load?

MOSFET.jpg
Figure 2

I would appreciate advice and guidance and perhaps some explanation of why these diodes are there within the semiconductors and how they may be employed - I can't seem to find any references on what they are all about in detail beyond being "protection diodes".
 
Last edited:

John West

Senior Member
When the current feeding the motor (or even a relay,) is shut off, a reverse voltage spike is generated by the inductor (motor winding or relay coil.) The diode shunts that voltage pulse to ground in order to protect the power supply voltage from fluctuating severely. If the motor driver IC is rated to handle the motor used, then the internal protection diode will also be rated to absorb the generated pulse.
 

AllyCat

Senior Member
Hi,

The proection diodes built into the transistors are in the "wrong" direction (and to the wrong rail) to maintain the necessary current flow in the load. The required protection diodes need to be across the load to feed current into the "other" supply rail (i.e. either Earth or V+).

Cheers, Alan.
 

jedynakiewicz

Senior Member
John, thank you, but perhaps let me clarify my question somewhat; I wasn't asking what back-EMF is all about, but specifically about the nature of the two particular semiconductors. Yes, I appreciate the nature of back-EMF from inductive devices but what I am asking is if these diodes in the semiconductors mentioned serve that purpose or if they have another function - for example dealing with electrostatic discharge. Also, forgive me, but your statement regarding a motor driver IC is not quite right. An example is the L293NE motor driver that shows internal protection diodes across the outputs but my understanding is that these are there primarily as electrostatic discharge protection and are not rated for the purpose of dumping back-EMF although they are in the right position to do so. The same applies to the SN754410. The L293D, however, does contain back-EMF rated diodes but this information is not highly obvious in the datasheets for these various chips. Also, whereas many texts recommend a straightforward 1N4001 diode to achieve protection, fast-recovery diodes such as the UF4001 are insisted upon by others; i.e. the nature of the diode is seen to be important as well as its rating. You mention that the purpose of diode is to protect the power supply voltage from fluctuating; my understanding is that it is to prevent a reverse current flow back into the semi-conductor which would cause junction damage.

Now, I guess that you can consider that the TIP125 PNP transistor is an IC because the internal components are upon the same substrate, but mostly the TIP125 transistor and other Darlington devices and the MOSFET are regarded as discrete semiconductors and they are not dedicated motor drive ICs. The TIP125 is a general purpose Darlington power transistor; is this a power transistor that is rated to deal with inductive loads without any further protection? I have looked at the data sheets for these devices but I cannot seem to find a rating for the internal diodes; hence my question.

Also, I understand that the diode function indicated in the MOSFET is not an additional diode but is a function of the nature of the substrate and I am seeking clarification/explanation of this effect. I am sticking UF4001s in with both these devices but I am wondering if that is overkill.
 

jedynakiewicz

Senior Member
Hi,

The proection diodes built into the transistors are in the "wrong" direction (and to the wrong rail) to maintain the necessary current flow in the load. The required protection diodes need to be across the load to feed current into the "other" supply rail (i.e. either Earth or V+).

Cheers, Alan.
Alan, thank you, but I can't quite get my head around that... if the diodes were in the other direction then the transistor would have no function; I rather thought that in the direction that they are in they serve to short out any reverse current from damaging the junction. Motor driver ICs appear to place the protection diode directly across the switching transistor because this is the component that we are trying to protect. I do appreciate that discrete protection diodes are usually placed across the inductive load where, in high ratings, they may be incorporated with a resistor drop, but to protect a semiconductor switch from inductive reverse current surely a diode across it is equally effective...or I am missing something?
 

AllyCat

Senior Member
Hi,

An inductor "insists" that its current flow is maintained (in the short term) by generating enormous voltages (if necessary) that can destroy most semconductor devices. The current direction is indicated by the arrows in the device symbol and thus the diode for your PNP would need to be (or point) from emitter to collector (which would indeed make it useless as a transistor). Generally the "flywheel" diode will be connected back to the same supply as the load is connected.

As you say, the "built-in" diode will be either inherent in the design (e.g. a parasitic collector-substrate diode) or to protect against static (or other) reverse (not "overswing") voltage hazards.

Cheers, Alan.
 

Hemi345

Senior Member
Hi,
The required protection diodes need to be across the load to feed current into the "other" supply rail (i.e. either Earth or V+).
Cheers, Alan.


It might be easier to use something like an L293D that supports two motors, has the diodes built in and will allow you to easily reverse the motor direction. Just watch out for the ~1.3V drop.
 
Last edited:

srnet

Senior Member
I do appreciate that discrete protection diodes are usually placed across the inductive load where, in high ratings, they may be incorporated with a resistor drop, but to protect a semiconductor switch from inductive reverse current surely a diode across it is equally effective...or I am missing something?
A diode across the transistor would protect its CE, but without a diode across the motor\relay what happens to the the high voltage spike it generates ?

Kill the spike at source.
 

westaust55

Moderator
Another perspective:


The flyback/freewheeling diode does not shunt any energy back into the supply.
It's purpose is to in effect short the inductive load when the voltage across the load is revered on power disconnection thus preventing voltage spikes in the circuit.
The diode MUST be across the load to achieve this function - it can it be across a different component in series with the load.
At the instant of power disconnection From the load, the energy in the inductive element will not have dissipated so the flyback/freewheeling diode must be able to handle a current at least equal to the normal current flowing through the inductive element.

There are many of the better quality relays with DC coils that include a flyback/freewheeling diode across the coil within the relay case.
 
Last edited:

flyingnunrt

Senior Member
My understanding is, that it is like a 'flywheel' it continues to supply energy after the supply has been removed.
ie it induces the supply of current which continues to flow in the same direction but with nowhere to go,
hence the voltage spike.
It is not like a car coil that creates a big spark with a collapsing field acting on a secondary coil.
 

inglewoodpete

Senior Member
The flyback diode keeps the energy that was stored in the coil's magnetic field within the coil-and-diode circuit. This actually has the effect of keeping the relay operated longer after the external energy source has been removed.

Remove the diode and the energy "escapes" the coil-and-diode circuit, allowing the relay to release more quickly but can have a disruptive effect on nearly components. As mentioned previously, this effect forms the basis of a car's ignition coil.
 

BeanieBots

Moderator
Simple answer. NO.

The built-in diode is not in the correct location to protect the transistor from inductive flyback voltages.
As already correctly described, the diode needs to be across the laod and also it needs to be close to the load, not at the end of a lead going to the load.
 

jedynakiewicz

Senior Member
A most interesting discussion is emerging here... SRNET says that the diode across the C-E junction will protect it; Beaniebots says it will not...and others infer not...

Let me elaborate on my interest in back-emf. My original post was asking only if the diode across the C-E junction in-built within the Darlington PNP transistor will have the rating and recovery time to prevent back-EMF from damaging the transistor. My thoughts emerging so far are that it is in the right place to do this but I don't yet know if the characteristics are correct though I am beginning to think that they are. I never asked about quenching relay coils - I accept that sticking a diode or diode-resistor combination across the coil is definitely the way to do things. My enquiry was about driving a 12 volt 300mA motor from the high side with a PNP power transistor. (it has to be high-side switching because there is more than one motor and they have a common negative to ground)

In view of the condundrum, I connected the transistor via one gate in a 2803A to a 20X2 and ran the motor at 14 volts, cycling the power on and off every five seconds to see if I had any problems. Six hours on and the thing is still running smoothly with no adverse effects. So crudely, the back-EMF seems not to damage the C-E junction of the TIP125 nor does it appear to interfere with the operation of the PICAXE chip but I still do not know what that inbuilt diode is intended for by the manufacturer.

Most of the posts here seem to treat back-EMF as something to get rid of immediately, but some motor control circuits make use of the back-EMF. Firstly, shorting out a motor with a reverse-diode will lead to electronic braking - not an effect that is always wanted - I certainly do not want to electronically-brake the motor in this case. Furthermore, I am also interested in monitoring the back-EMF that is generated by the motor in order to control the speed. This is done with the many "feed-back controllers" that are available for d.c. motor control. I am considering how I might measure the back-EMF through a voltage-divider and into the ADC of a PICAXE to give load-independent control of the motor speed. Back-EMF is not always a problem but can be an asset! I just want to make sure that it doesn't damage any of my components.

If anyone would have any advice or thoughts upon how I might monitor the back-EMF from a 12 v. motor to give load-independent speed control then I would be delighted to hear of it. I am thinking along the lines of using taking the ADC reading and modulating a PWM output accordingly - just thoughts at the moment - I know the classic way of using back-EMF is using it to raise the supply voltage (which drops under spindle load) so that current may increase proportionately.

I would probably have been better starting a separate thread with regard to the MOSFET - this I will be using for solenoid-generated inductive loads but my understanding of the operation of the inbuilt diode is that this can handle pretty decent current flow in the reverse direction. I have now found a section in a datasheet for the device I mentioned that tabulates the "source-drain diode" characteristics with a continous rating of 12 amps and a pulsed current rating of 48 amps - more than enough to protect the device from back-EMF, but of course not killing the back-EMF at source as several people have pointed out correctly.

Thanks to all for the thoughts so far- a proper discussion is emerging rather than just some answers to questions; please keep going.
 

srnet

Senior Member
Nope, you misunderstood. I am in agreement with Beanibots.

As putting a diode across the coil will prevent a reverse voltage of greater than the diode Vf developing, the same must be true of a reverse diode across CE.

However, with no diode across the coil the spike will still be there, the collector will have to go highly negative and likely destroy the CB junction instead, and maybe lots of other components in the circuit as well.

Whether some circuits allow a small amount of back EMF for control purposes is irrelevant, in the normal case you need to kill the spike at source by putting a diode directly across the coil.

Even if your getting away with in a specific circumstance, its very bad practice to not fit the diode because a circuit survives a few hours without one.
 

Buzby

Senior Member
'Back EMF' is different to the transients that the flyback diode is there to catch.

The transient is caused by breaking the inductive circuit, which is what the commutator does a few times per rotation, or the PWM does at a whatever frequency it's running at.

Back EMF is caused by the dynamo effect of the rotating motor, and is related to the speed of rotation.

Adding a flyback diode to catch the transients will not stop you measuring the back EMF.
 

jedynakiewicz

Senior Member
All becoming clearer by the minute...thank you gentlemen. I think that I am starting to get my head around this.

Buzby, thank you for this differentiation; I had not thought it through that way. Of course, there is a difference between the transient that arises by virtue of the magnetic field collapsing within the core of the coil as the commutator opens and the EMF that is generated by the continued rotation of the armature then acting as a generator - I had not quite separated that out; I was conflating the terms. Now I am trying to reach to the depths of my A level physics and remember Maxwell's principles; does the generator effect maintain the same polarity as the motor? If it does then the flyback diode will not short it causing braking; if the polarity is reversed then it would... I need to do some further reading or perhaps you may have the direct answer. Then, of course, the back-EMF from the generator will still be available to measure - and at a level which, via a voltage divider, would be safe for the ADC. Am I now getting my ideas in order?

Srnet, I didn't think about the CB junction; I only thought about the CE. I see your point now. But why does the Darlington have a diode within its make-up? This is what put me on the wrong track in the first place.

I do appreciate the time that you are taking to sort out my understanding of this topic - most patient of you.
 

westaust55

Moderator
With respect to the TIP125 BJT type transistor, looking through several datasheets none indicate a claimed purpose for the diode.
However two (ON Electronics is one, Power Innovations is the other) do have a parameter given in the datasheets that gives some insight.


Unclamped Inductive Load Energy (1) E 50 mJ

(1) Ic = 1.0 A, L = 100 mH, P.R.F. = 10 kHz, Vcc = 20 V, Rbe = 100 Ohms

Without a freewheeling diode across the coil/motor, the energy has to be dissipated somewhere and that diode provides a path for the energy to dissipate into the power rails and rest of the circuit.

From the Power innovations datasheet (same 50 mJ):
4. This rating is based on the capability of the transistor to operate safely in a circuit of: L = 20 mH, IB(on) = -5 mA, RBE = 100 W,
VBE(off) = 0, RS = 0.1 W, VCC = -20 V.

A motor while still rotating does act as a generator (usually less efficient) and the polarity does not change so the diode within the transistor package provides a path for energy back to the supply rail.
I leave it to you to determine if the energy from the motor when regenerating exceeds the 50 milliJoule rating of the TIP125.
 

boriz

Senior Member
A protection diode needs to be rated specifically with respect to what it is protecting against. I have always assumed that the majority of internal protection diodes (unless otherwise explicitly stated) offered minimal protection, probably only useful against low levels of static during handling and only small spikes in circuit. I always add an external diode, selected according to an estimate of the anticipated magnitude of the back EMF.

The magnitude is proportional to the inductance and the current. So to make a useful estimate you need to have at least a rough idea of these two things.

Is 300mA the nominal motor current? Did you test it unloaded (prolly much less than 300mA)? For proper protection you have to assume the worst case scenario, and that's the stall current. Do you know the stall current for that motor?

The inductance and the stall current should be your staring point for selecting a protection diode. Both can be measured easily enough. So the question 'is this diode protection enough?', cannot be answered without more detail about the diode and the load.
 

g6ejd

Senior Member
In figure 2 it clearly shows a zener diode, from which I infer it is a DS protective measure against high voltages/static.
 
Last edited:

AllyCat

Senior Member
A motor while still rotating does act as a generator (usually less efficient) and the polarity does not change so the diode within the transistor package provides a path for energy back to the supply rail.
Hi,

To clarify that statement, the polarity of the Voltage across the motor does not change but the direction of Current flow potentially does (it is now a generator not a motor). The diode across the TIP125 (PNP) could indeed protect against this reversed current (a diode connected directly across a transistor which conducts in the same direction as the transistor makes it virtually useless as a transistor!). Thus the diode might indeed "protect" the transistor if you manually rotated the motor shaft in its normal direction (without any power applied to the circuit).

However, a (simplistic) equivalent circuit of a small (d.c. commutated) motor or generator consists an inductor (that of course has some d.c. resistance) in series with a voltage source, which represents the "back emf" (or simply the voltage produced, in the case of a generator). If a voltage is applied to the stationary motor, then the current initially rises rapidly (restricted initially by the inductance) until potentially limited by the resistance. This inrush current can be very large, leading to potential damage, hence the use of "slow start" (current-limiting) circuits with larger motors. As the motor starts to turn, the rotor generates a voltage (the back emf) which reduces the voltage across the inductor/resistance and lowers the current to the normal running value.

Thus in a "steady state" (motor spinning at a final constant speed) with a 12 volt supply, there might be perhaps 10 volts "back-emf" and 2 volts across the inductor/resistance. If the power supply to the motor is then removed, the 10 volts back-emf indeed remains but the inductance will attempt to maintain the same direction of current flow. The voltage on the "positive" motor terminal will fall until current can continue to flow into the motor (inductance). This will normally be through a "catching" or "overswing" (which is actually an underswing in the case of a PNP high-side driver) diode from the earth rail. If that diode is not present, the voltage will continue to swing more negatively until the inductor "finds" a path for the current to flow. This may well be through the PNP transistor when its maximum (collector-emitter) breakdown voltage is exceeded (which may then lead to destruction of the device).

Cheers, Alan.
 

jedynakiewicz

Senior Member
Westy, Boriz, g6ejd and Alan, a plethora of valuable guidance indeed! Thank you. This thread is turning out to be most informative and helpful.

I will review all the above and think it over. One thing that I had not considered is the additional effect of switching via PWM - as Buzby makes mention of earlier on. I realised that the making and breaking of the current by the commutator caused transients as sparking occurs - I rather thought that that is normally supressed capacitatively. What I had not given thought to was the effect of PWM switching. Because the commutator is still in unbroken contact with the brushes as the PWM cuts off, there will be a significant back-EMF generated by that pole of the motor. This will occur at the PWM rate and follow the null time in the duty cycle; I never gave that any thought...

Earlier on in post 12, Beaniebots mentions that the flyback diode needs to be as close as possible to the motor, not at the end of the leads going to the motor. Now this is feasible if the motor is unidirectional in rotation, but many d.c. motors are used in a reversible manner - H-bridge drivers often contain the flyback diodes internally (L293D, for example) so I don't quite see how locating flyback diodes can be done at the motor unless it is unidirectional. Also, if it works okay within H-bridge drivers, what would be the advantage of locating the diodes at the motor itself? Furthermore, we seem to rely on the internal flyback diodes in the ULN2803 without many problems.

Westy, you clearly have a better approach to searching datasheets than I; those data are what I was searching for in vain.

Alan, your elaboration of Westy's statement on polarity is most cogently put together and informative.

Boriz, your point about stall current is taken. I will check this out - fortunately one of my multimeters has a peak value function which should make this easy to do. When I have looked at this before I seem to recall something in the region of 700mA, but I will check again. I rather think though, for a 12v motor at this rating, the ubiquitous 1N4001 should be just fine.

A lot to think about, but this forum is enormously informative and the guidance is much appreciated.
 

srnet

Senior Member
Also, if it works okay within H-bridge drivers, what would be the advantage of locating the diodes at the motor itself?
For one think of the RF interference you could generate, fast moving spikes nice long motor leads as aerials ...............
 

AllyCat

Senior Member
Hi,

Yes, I was about to post the same as srnet. Also, once the current gets back onto the main PCB there's a risk that it will go where it shouldn't. :(

It's much easier to say "put the diode(s) directly on the motor" than "make sure you use twisted pair/screened motor cables and connect the diode(s) to a valid star point and (insert whatever else I've forgotten) ....". Incdentally, locating the diodes inside the driver ic is potentially quite a good position (a star point), because of course everybody remembers to put a decoupling capacitor directly across the ic supply/ground pins of every ic. ;)

Cheers, Alan.
 

jedynakiewicz

Senior Member
Gentlemen, you have me a little confused... In the context of the H-Bridge I am envisioning reversing motors as I mentioned. I can just about see how I could rig four diodes at the motor terminals to achieve the diodes at the motor but this would also require running a + and ground out to the motor as well the motor supply leads. I normally do use twisted pairs to supply the motor and I always put a decoupling capacitor across every i.c. (http://www.picaxeforum.co.uk/showthread.php?22516-Decoupling-best-practise/page2 - post 15 with illustrations).
In another post I asked about sticking ferrite beads on the motor supply cables at the motor end in addition to the 220nF capacitor to clamp out RF but the replies that I got suggested that their use is more involved and complicated than I thought it to be ( http://www.picaxeforum.co.uk/showthread.php?22689-Interference-supression-for-small-D-C-Motors )
Anyway, I am a little lost by the last two posts replying in this thread- are you really advising that four wires should be run to each motor in order to pop in the diodes? Surely in the context I mentioned, 220nF ceramic across the motor terminals, perhaps with additional capacitors from the motor leads to the grounded casing, is more than sufficient?
 
Last edited:

Dippy

Moderator
I'm only skim-reading this so forgive me a long drivel and for any re-iterations.
It appears that loads of good info has been supplied to give you good start to experimentation and measurement.

For a simple relay a flyback diode will suffice as suggested by BB and others.
When a MOSFET is used (e.g. typically as a low-side switch) the internal body diode doesn't help.
It doesn't 'do' flyback on it's own.
An actual diode across the coil bit is needed to divert that 'reverse' voltage back to the supply line.
Read up on inductors and energy stored therein.

As I burble here I am doing a design to switch big contactors (a big posh relay) with the smallest circuit possible.
Trust me, a 24V contactor coil produces enough back emf to give you a shock :)

In (DC) motors we have to be a bit more careful.
There is the generative back-emf and, when PWM'd, an inductive switching back emf.
In DC motors the generative bEMF is a contributor to it's maximum speed.
But when PWMing it this is complicated by the reactive switching component.
A diode here can deal with that component, and often boost performance.
Diode rating should be selected with care as mentioned by Boriz

In a bridge scenario diodes cannot be used on the motor without some switching.
I've tried this with a relay in the past but most people don't.
Careful use of transient suppressors and caps may help.
The switching back-emf (if I may differentiate with a made-up phrase) can be handled with manly components and , to quite a degree, by balancing the switching speed to the motor characteristics.
Switching speed is a balance of efficiency and noise - fast (cooler) switching , however, will produce larger reactive spikes and noise. Slower switching speeds of transistors will reduce the reactive peaks but will get hot and may fail.
The generative back-emf (or regen) can be handled by the body diodes when using MOSFETs.
However, be aware, that the body diodes tend to be slow and paralleled fast diodes are sometimes used to augment.

In ALL cases a suitable capacitor at the relay/motor/diode/power junction down to ground is a good idea.
This acts as a reservoir and reactive pulse absorber - aiding performance AND reducing noise in power line.
This because it partially absorbs the back-emf and allows the leading edge surge of the next duty to be supplied (partially) locally - rather than a pulse down the power line. And as the power line will have significant LR that may reduce performance AND produce noise.
(This same technique should always be considered in PWM switching of any power device like LEDs too).
Wiring/tracks should be as big and butch and short as possible.

My last experience (2 years ago so brain is fading) was with the Infineon 'HybridPack' IGBT block. Albeit a 6bridge BLDC design that had a chuffing great ceramic cap as the 'reservoir'.

Get playing :)
 

Dippy

Moderator
PS. Body diodes

I think I saw mention earlier that the MOSFET mentioned included a Zener body diode.
Beware of the symbols used. I've seen various 'internationally recognised' symbols for specific diodes.
As far as I know, the intrinsic body diode in a MOSFET is just a 'rectifier' type and can often be slow. Maybe there are other styles, I don't know for sure. Always read the data sheet. I do, and still get it wrong ;)
Sometimes you'll have zeners built into gate side.

All I'm saying , in the cut'n'paste era, is be careful of the headlines and read further...
 

AllyCat

Senior Member
are you really advising that four wires should be run to each motor in order to pop in the diodes?
Hi,

No, not myself, I was simply endorsing the view that the cables to a motor should be considered as a potential antenna, capable of transmitting radio interference. As such, there is some merit in locating the diodes and the "power" transistors (and all associated decoupling/suppression capacitors) close to the motor, but this is probably more relevant to larger motors.

IMHO, the design of a "power" H-bridge circuit on the same PCB as the control electronics (PICaxe or whatever), particularly if using PWM, needs a clear understanding of where the load currents will/can flow under ALL conditions. That's not easy when there are 4 transistors, 4 diodes, 4 "phases" (including the two potential "dead" spaces between alternate drive pulses) and two possible directions of current flow. Not very encouraging when it took around 20 posts in this thread to sort out a single transistor/diode/motor configuration. ;)

On the topic of "zener" diodes (strictly, they're nearly all avalanche diodes in practice), bear in mind that they also exhibit ordinary forward diode conduction in addition to their normally-used reverse "breakdown" characteristic. So showing one in a device symbol may be simply indicating that there is a forward diode present which also exhibits some form of reverse breakdown.

Cheers, Alan.
 

jedynakiewicz

Senior Member
Alan, thank you for that clarification. I think that the idea of moving the bridge next to the motor together with its power transistors is an idea that I may employ. 20 posts to sort out a single configuration is discouraging? I do hope not. The content and discussion nature of this thread has been very educative indeed - there is a lot in here; I note that it has already had over 500 viewings and been given five stars for interest; your last sentence, almost an aside within your posting, is information that I did not know and I think would be difficult to find in casual reading of the subject.

Dippy, you may have skim-read this thread but you have not skimmed on your contribution! - a most excellent and informative summary based upon your obvious depth of understanding and experience in this field. Thank you. As you say, loads of good info has been supplied and I am sure that this thread with its many excellent contributions will be a source of clarification for those looking into this subject in the future. My understanding, -and in consequence the manner in which I control, motors, relays and solenoids has been improved no end by the advice from the many éminences grise who have offered their advice above.
 

inglewoodpete

Senior Member
I think that the idea of moving the bridge next to the motor together with its power transistors is an idea that I may employ.
I'm not sure which "bridge" you are planning to colocate with the motor. The H-Bridge can be remote to the motor: there are benefits to this. However, the bridge rectifier should be colocated with the motor. There should be 4 wires from the supply & processor board to the bridge rectifier, with a fairly beefy electrolytic alongside the rectifier. The bridge rectifier does not need to be too fancy. I used a DI104 DIP full wave rectifier (1A 400V) with a 2A motor with no problems. The PICAXE & H-Bridge were about 2 metres away from the motor, although I did use optoisolators between the PICAXE and L298 H-bridge.
 

BeanieBots

Moderator
And don't forget the humble snubber.
A resistor and a capacitor in series placed close to the motor terminals.
A snubber will not only absorb spikes but it will also help to suppress arcing at the comutator and increase brush life.
For a rough guide on values, choose a resistor which is close to the armature resistance and a capacitor which of a size that will soak up the energy stored (ie keep voltage down to at least supply +25%) in the winding inductance at the maximum current the motor will run at.
Experimentation and a reasonably good 'scope will be required to optimise this if you don't know the motor characteristics.
 
Top