Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Relay spike in microkontroler problem

Not open for further replies.


Newbie level 3
May 30, 2007
Reaction score
Trophy points
Activity points
I have alredy build a microkrontroler system in car, with attiny2313, but i have some problem:

The system work unconsistenly if we running another equipment that used relay, we used 1 source (battery). example if we turn the head lamp on, horn in car, the system trigered by them.

I suspect that came from inductance discharge noise from the relay, but i can't fix it.

Any advice.....? thank's.

A relay across the relay coil is a simple solution, did you tried it?

Why dont you post this in microcontroller section


You don't want to direct-drive a relay from an IC unless
you are really sure it's got output drivers meant for the
application. The inductive kick can overrun ESD clamps
and stuff current into the substrate with unpredictable,
but seldom desirable results. Using an external transistor,
relay driver IC, even a tougher SSI buffer IC, anything
to get return currents and flyback currents out of the
big brain is a good idea.

Then you have the ground bounce problems that any
abrupt current switching can cause; that wants the load
and return paths all off board if possible, with only coil
currents managed.

In automotive systems you have to beware the load dump
event, the alternator has fairly poor and slow load step
response and the battey is expected to backstop it. But
that can fail with poor connections to ground or B+, or
an aged, internally resistive battery. 60V spikes are a
design "abnormal condition" and you never, ever want
to assume "12V" is 12V. Use at least a "40V" regulator
like a 78xx series, or a DC-DC supply with similar or
better overvoltage margin.

Be sure you have a freewheel diode for the coil somewhere,
if it's not embedded in the relay itself. And if it is, be sure
you respect the coil polarity because now it has one.

I think nandhu015 meant "a diode across the relay coil". This works well, but it does slow down the relay denergize time because the relay coil current decays slowly.

@nandu : there is good solution to fit diode across the relay coil in internal system but for external relay it doesn't work well , i will sell this system out and i can't makesure that the buyer can fit dioda in every relay in their car.

@dick_freebird: i will re design the PCB (better ground plane), and fix the system regulator, and put filter transformator on it.
what the best inductance value on that filter for aoutomotive application ?

Thank' for reply's

Not open for further replies.

Part and Inventory Search

Welcome to