Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Horn causing strange feedback

Status
Not open for further replies.

Huttojb1

Member
hey all,

I'm gonna try and simplify my issue, I have a MICROCHIP Pic18f4680 controlling a relay using an optocoupler, the relay switches the negative side of my horn. The positive side is connected to a bus bar.

When the horn is switched I seem to have weird switching on my PIC, captures capturing and other signals doing weird and wonderful stuff, like it's doing something weird with the battery supply.

When I remove the horn and get the relay to switch with no load it's all good.

What could be going on, how can I stop it???

Jason.
 
Electromagnetic vehicle horns generate all kinds of emi junk, there are 2 kinds one conducted through the power supply, and the other through Rf energy radiating from the horn (probably the oscillating contacts).
Try a diode across the horn, 1000v 6a or higher, with the anode to ground, and maybe as well a 100 ohm 1 watt resistor inseries with a 100n class x cap across the horn to damp as much emi as possible, a diode inline with the arduino power supply and a 100u cap in parallel with a 100nF across the arduino power in might also be a good idea, this'll filter oit some noise and prevent the voltage going below the chips brownout.
That oughta sort it out, if not then you could try moving the microcontroller further away from the horn, and/or put it in a grounded metal box.
If you happen to have a points ignition type condeser then you could put that across the horn instead.
 
Last edited:
A ceramic disc capacitor acts like a microphone. The horn might be vibrating it then it might cause feedback.
 
Try a diode across the horn, 1000v 6a or higher, with the anode to ground, and maybe as well a 100 ohm 1 watt resistor inseries with a 100n class x cap across the horn to damp as much emi as possible

Thank you for your detailed response, I did not realise the effect of a horn, is there any cheap horns I could use instead that doesn't have this effect?

Would I put the diode across the horn at the horn side or my electronics side. There's a 1/2meter gap between the control box and the actual horn.

When you say "100nF class x cap" what do you mean?

a diode inline with the arduino power supply and a 100u cap in parallel with a 100nF across the arduino power in might also be a good idea, this'll filter oit some noise and prevent the voltage going below the chips brownout.

I have a decoupled capacitor across my microcontroller 5v rails, I dont have a diode inline though, and I use a switch mode power supply to step from 13.5v to 5v for the micro rails. Could you please give me a schematic of what protection I would need to put in to stop any interference.

I have monitored the vehicle battery and nothing happening on there, so it must be doing something weird and wonderful. I have another microcontroller that has nothing to do with the horn, and this is monitoring the RPM signal and this is giving me false triggers as well. Does this tell me it's more rf interference???

you could try moving the microcontroller further away from the horn, and/or put it in a grounded metal box.
If you happen to have a points ignition type condeser then you could put that across the horn instead.

Im unable to move or change the box. It's currently in a ABS plastic enclosure.

What is a "points ignition type"?

Thanks

Jason.
 
You would be better off using a 555. PIC's are absolute S H I T when used in any amusement, car or critical application.
 
"interfaced and filtered correctly there is nothing wrong with a PIC in this application"

How little you know. You can wave your hand over a PIC and it will start beeping.
 
Cheap horns will probably be worse, the problem is horns have a vibrating contact which creates back emf, Rf radiation, spikes and various nasties, even air horns have a compressor that will generate junk, but you should be able to deal with it Ok.
Put the diode and 100nf cap / 100 ohm resistor as close as you can get to the horn, on the horns terminals is best, you need to kill the electrical noise at the source.
This is a class x cap, basically its designed for noise suppresion, class x means its rated for mains, we dont need that, being designed for noise suppression we do need:
**broken link removed**
I odnt have schem tools on my works Pc, the diode is so if the 12v vehicle side drops down low enough to reset the chip then the diode disconnects the supply temporarily and the cap powers the chip for a few mS, a diode inline with the smps you have will probably work, as it no doubt will have a large cap on the input side.
If you monitor the battery at its terminals you might not see it, you'd need to monitor the power to the processor, and even then if you use a 'scope it would need to have enough bandwidth to detect any hf noise, it could be though like you say radiated Rf noise causing the issue, the 100nf cap and 100 ohm resistor will dampen Rf quite a bit.
Your not old enough to remember points ignition!, maybe I'm too old, points ignition is from way back in the 70's, ignition system used mechanical contacts in a dizzy or ditributor to switch the coil on & off, they like the contacts in your horn sparked and generated lots of noise, the condenser was to resonate with the coil controlling the spark at the spark plug and reduce flash at the contacts.
 
"interfaced and filtered correctly there is nothing wrong with a PIC in this application"

How little you know. You can wave your hand over a PIC and it will start beeping.

I see Colin's showing his knowledge (barely above zero) off again :p

As the OP has provided no details whatsoever it seems likely a 555 would cause problems as well, PIC's are pretty well 'bomb proof' if you use them properly.
 
"interfaced and filtered correctly there is nothing wrong with a PIC in this application"

How little you know. You can wave your hand over a PIC and it will start beeping.

Of all the arrogant and INCORRECT comments I've read on ETO over the years, that has to be one of the most absurd.
On a more humble note: I never knew that disk caps could act like a microphone! Very interesting, and it makes sense! it sounds like a good project to test this weekend. Thanks, audioguru!
 
Thank you all for your comments.
post the schematic of your circuit, you probably have insufficient filtering

Thanks Jamie, there's no probable about it, I know my power filtering isn't great. I'll get something drawn up and posted

post the schematic of your circuit, you probably have insufficient filtering

Thanks Jamie, there's no probable about it, I know my power filtering isn't great. I'll get something drawn up and posted

Put the diode and 100nf cap / 100 ohm resistor as close as you can get to the horn, on the horns terminals is best, you need to kill the electrical noise at the source

I'll try this, thank you.

I don't think the PIC is resetting (brownout), I think I'll know if it was because it will go through its start up code and it isn't. I definitely think it's rf interference.

Jason.
 
I am an audio guy. To me a horn is a speaker used to page people who are outdoors. I now know that this horn is a car horn (basically a buzzer).
Yes, ceramic has piezoelectric properties and generates a signal when it is vibrated at a frequency near its physical resonance. A ceramic capacitor should never be used to couple audio or in an audio filter.
 
I am an audio guy. To me a horn is a speaker used to page people who are outdoors. I now know that this horn is a car horn (basically a buzzer).
Yes, ceramic has piezoelectric properties and generates a signal when it is vibrated at a frequency near its physical resonance. A ceramic capacitor should never be used to couple audio or in an audio filter.
Thank you for your comments, I'm looking to try as suggested or look for a digital horn (car)but to be honest, when searching for a digital horn one comes up very similar to the one I have.

Jason.
 
"interfaced and filtered correctly there is nothing wrong with a PIC in this application"

How little you know. You can wave your hand over a PIC and it will start beeping.

hahaa good one mate
what do you think powers nearly all of the aftermarket car alarms out there?
and a lot of aftermarket CDI / Electronic igition systems
I build all sorts of electonic control modules for automotive use and dont have issues with the PICs beeping when I wave my hand over them
 
have issues with the PICs beeping when I wave my hand over them

I had that problem once.

Soon fixed when I found my mistake.

(Floating inputs creating interrupts, what a dumbo!)

JimB
 
Hmm, just going to add this, seen the plate spark from a car horn once that had breather holes that I could see through. For a moment at each.. well, start of the pulse as the plate contacts would be considered a short circuit at that point.
The horn might (as well as causing noise) be pulling the line each cycle resulting in a overgrown pulse antenna from the wire and momentary surge across the relays contacts.

Yes A Diode and cap would help reduce this from returning to the relay by percentages. Tho not help much with any chassis grounding issues.

A trick to help might be to route a 14-18 gauge wire to the main battery if possible for the PIC supply, the chassis is a random path component, a value of current travel may pass from the front (emitting object source) to the center of a car then head back to the front with the battery is in the front area when the chassis is used as a common ground point to begin with per example, unless the current has a clean more direct path to the battery common. Automotive primer, paint, and weak contacts from bolts or spot welds are not really efficient. Omitting rust, because I don't like talking about rust. :meh:

A jumper wire tied in from the PIC common to the battery common to test.
 
I had that problem once.

Soon fixed when I found my mistake.

(Floating inputs creating interrupts, what a dumbo!)

JimB
yes this.
its common practise to set all unused pins as outputs and set them low, or alternatively pull them to ground through a suitably sized resistor

still, once he posts a schematic we can see what we have to work with
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top