EMI (electromagnetic interference) from coil?

I am trying to use a Nano Every to turn a 12V electric horn on and off at specified times. I am assuming the horn has a coil. The timer program running on the Nano is triggered using a wireless remote and an Adafruit M4 receiver card connected to the Nano. I first tested the circuit with a light bulb instead of the horn (because the horn is very loud), and the program ran fine. When I wired up the horn, though, the program did not run correctly: the timer does start, but after that it does strange things. The Nano drives a solid state relay (CPC 1907B) to activate the horn, and it appears that the SSR uses an LED, so I assume the output side is opto-isolated from the Nano itself. Diagram given below.

If shielding is required, that is a problem because of the remote. I don't have a good way to ground it, either.

Any help is greatly appreciated.

There are electric horns that use an electric motor to vibrate a diaphragm. Then there are electric horns that are in reality electronic horns with a loud speaker. If you are getting EMI from the horn, get one that is electronic, not motor or vibrator driven.

Have you tried a flyback diode across the horn terminals? How about a link or photo of this horn?

2 Likes

Do you know the current rating on the horn? Is it more than the light bulb?

This probably isn't "the problem" but the solid state relay should have a current limiting resistor for the internal LED. The LED is rated for a typical forward voltage drop of 1.2V and a current of 1.5 to 5mA. That's 3.8V across the resistor and if we want 3mA that's 3.8V / 3mA = 1.27K so you can use a resistor of 1K or 1.2K, or something else close.

When I was building/testing an alarm system I might have done the same thing but then I stuffed rags in the horns. It was very effective in attenuating the volume.

What kind of 12 v source do you use?
Horns can take quite high peak currents.
And, as already suggested, may produce high back currents.
You can put your controller in a metal cage...
Have you tried the ssr without the microcontroller but with the horn? (2 k resistance to either + or - of 12v source)?

1 Like

Since you have connected grounds and use the same power source the optoisolation is mostly useless.

Sorry, forgot the current-limiting resistor (950 Ohms) for the relay input.

The horn manufacturer does not provide much information. It draws 3 A. Photo below:
image

I was reading about flyback diodes but wasn't sure if it would do any good in this case.

I am using a 12 volt battery for power. The whole thing needs to be self-contained.

A car battery? Or something smaller?
You will need the fly back diode (unless it is included in your horn).
It needs to go with the band towards the plus...

And that is in itself dubious! :face_with_raised_eyebrow:

As a mechanical horn, it is actually drawing current in impulses, which is pretty much the source of your problem. The 3 Amps may be the average current but the individual impulses may be more like 10 Amps. :astonished:

That is the current for which the flyback diode needs to be specified.

You kidding? :roll_eyes:

That too. Can the battery supply enough power to the horn without dropping the supply voltage to the processor?

Some relais have built in diodes... it is not impossible... ...maybe unlikely...

If the terminals are non-polarized, then you can be sure there is no internal diode.

I have seen some DIP reed relays that have built-in diodes.

The battery is like the kind used in e-scooters. It is rated 5 A-hr @ 0.25 A. The data sheet says at 3 A, the capacity is 3 A-hr.

The horn does not have +/- leads, so definitely no diode.

Here is the schematic of the SSR:
CPC1907

Just want to say thanks for all the replies! This is the first time I have posted a question to this forum, and I wasn't sure what to expect. My experience with some other (software) forums wasn't nearly this good.

Did you test the ssr with the lamp again,?

Is there also an alternator connected? And spark plugs...
I mean is the battery part of a scooter?
What is the resistance of the horn coil?
Is the ssr designed for dc or ac? The scheme shows it is symmetrical...

The horn would appear to be an electromechanical type so as already said it WILL produce large current pulses, and potentially very large voltage spikes.
IMHO the most likely source of your problems is the current flowing in the ground line.
The negative terminal of your battery needs to be a "star point", connecting directly to the horn "ground" and a seperate wire from batt - to the "electronics".

While the nano every will take a 12V supply I'd suggest you include a regulator to provide the 5v - or at the very least a simple rc filter to protect the nano from spikes. I see no decoupling in your schematic.

.. and a flyback diode across the horn terminals.

Update:
I tried adding a flyback diode (10 A, 1000 V) across the horn terminals. I also tried powering the Nano with a separate 9 V battery. Neither change helped.

I added some wire so I could move the horn about 3 feet from the Nano+RCVR+SSR. The code got further but still did not run correctly.

If you haven't already tried it, separate the ground so the speaker is not on the same ground as the rest of the circuit. also you could try fitting a ferrite filter to remove interference. speaker wires etc are well known for picking up interference in unshielded and or unfiltered circuits.

Like I said .. use a star point - ESPECIALLY ON THE EARTH SIDE; and decouple the supplies