Yet another interference problem!

Bryang

Member
Hi all,
I know there are plenty of posts on interference - I've been sifting thru them, and from what I can see I've done just about everything except putting the PICAXE in a metal box, but before I pull everything apart, ...

I am using an 18X looking at a few inputs, run an LCD, and on occasion turn on a relay for 0.1 secs to toot a horn (ala salvaged from a car). The system is powered from a 12V battery, and everything works perfectly well including working the relay, until I plug in the horn, then when it's triggered and the horn toots, the LCD (usually, but not always) displays garbage, and sometimes the PICAXE locks up!
The power to the PICAXE is via a 7805, with a 100uF and a 100nF cap either side of the 7805. I have 100nF adjacent to the 18X power pin. I have an IN4004 across the relay solenoid pins.Actually I have a small PCB mounted relay, activating a large high current automotive relay - again with an IN4004 across the solenoid pins (the horn probably draws about 5A).
I really don't want a separate battery for the PICAXE if it can be avoided!
Re metal box - I do have the relay currently mounted inside the same plastic box, so reading thru the posts, I suspect this will be the most likely issue, but before I get started on a big rebuild to give it a try by remotely mounting the relay, I thought I might try for any suggestions for something else I might have missed.

Cheers
Bryan.
 

BeanieBots

Moderator
Good post, clearly explains what you have done so far and good description of circuit. Also, a very good example of why we bang on about not using micros in a car! And that's just a problem with the horn.

Anyway, I'm assuming your horn is the mechanical type. That is, it has a coil which pulls in a diaphram which in turn opens a circuit releasing the diaphram and so on. This type is a MASSIVE spark generator.
There are two parts to noise. Stopping it from getting in and preventing the creation of it.
You've taken 'fair' steps on your power supply but the level of generation from a horn will need a lot more. However, as the horn is the only source (you don't have ignition, generator, ABS etc as well) it is probably better to concentrate on reducing the noise production.

You've already hit on the most obvious change. Move the main relay as close as possible (electrically and physically) to the horn. Take the wires for the horn/relay direct to the battery.

If possible, open the horn up and fit a resistor & cap in series across the spark gap. About 10R+100nF should be a good starting point. If you can't get inside, then fit them a close as possible outside.
Do NOT run the cables to your PICAXE close to the horn power cables. This also applies to the two leads which drive the main relay.

Fit a resisistor in line with the input to the 7805 between the 12v and the 100uF cap.

There's quite a bit more you can do with inductors but try these tips first.
Layout is going to be one of the more critical issues so pay attention to cable routing.
 

manuka

Senior Member
Brian- 100nF across anything electromagnetic usually tames interference. Solder these right at the device terminals, not way down the supply leads. Stan
 

Bryang

Member
Thanks guys:)
It all makes sense & should be pretty easy to try on my setup too - definitely worth a go :)

cheers
Bryan.
 

inglewoodpete

Senior Member
Another point. Try to keep the 0v paths for the PICAXE and relay/horn separate all the way back to the power source. Run 2 wires or separate PCB tracks as appropriate. A large pulsing current (caused by a heavy load) in the 0v circuit of a PICAXE can cause all sorts of noise to upset it.
 

MFB

Senior Member
Add diode & capacitor to reg'

I am afraid there is rarley a substitute for using a metal box and passing all wires, in and out, via feed-thru capacitors. However, you could try one last trick. The voltage at the input to the regulator may well be dropping below its operating limit (about 7.5V) at the moment that the horn starts. You may be able overcome this problem by placing a diode (few amp version) in series with the input of the regulator and adding a large (say, 1000uF) capacitor between the regulator input and ground. When the battery voltage drops, the diode is reverse biased and the regulator is kept running from the large capacitor. I have used this technique successfully to keep electronics operating when using a car’s starter motor.
 

Bryang

Member
This is how it went...

Hi,
Thought I should give some feedback after all the helpful suggestions, particularly as other thread readers might wonder what the answer was!
Well, I started with what looked easiest to do, considering how it was packaged so far... I put a 100nF Greencap in series with a 10R-1W resistor between the two posts on the horn, which I mounted a little further away (from about 15cm to 30cm, because that was as far as the wire allowed that I already had there).... and having now run it for much of the day, it hasn't missed a beat:)
So that's all it took this time, but I think when I next pull it out of the box, I'll look at adding a few more options as suggested above. The larger cap & resistor in the line before the reg sounds like a go, and if I end up doing another PCB for it one day, I'll pay more attention to how I run the tracks.

Cheers.
Bryan:)
 

BeanieBots

Moderator
Thanks for letting us know how it went. All too often many suggestions are posted and nobody ever knows which was used or if it did the job. Feedback on results is just as important as the suggestions themselves.
Glad you got it working OK.
 

MFB

Senior Member
Series diode, not resistor

Yes, thanks for the feedback. When revising your design it would be better to use a diode in series with the input reservoir capacitor, rather than a resistor. The way it works is that under normal circumstances the capacitor is charged to within about 0.7 volts of the battery voltage, but when this voltage drops (due to starter motor operation etc) the diode is reverse biased and the capacitor can only discharge into the regulator. Provided that the capacitor is large enough for the load, the regulator can continue operating until the battery voltage recovers.
 

BeanieBots

Moderator
True enough if starter motor brownout is the problem. Not the case here.
If it's a noise problem then a diode still presents low impedance to the noise.
A choke would be better but as the PICAXE is not consuming much current, then a simple resistor is adequate.
If the horn is pulling the supply below regulator brownout then there is a far more serious battery underspec issue that needs to be resolved.

Anyway, the problem is fixed. (by noise supression)
 

MFB

Senior Member
Belt and bracers anyone?

It was brownout that I was alluding to, because a resistor (or choke) will of course discharge the capacitor as fast as it charges. However, there is no reason not to include a choke in series with a diode if noise is also a problem.

A car battery does not have to be faulty for its voltage to drop significantly when the starter motor is operated. Ever wonder way the CD player radio etc drops out when the starter motor kicks-in?
 

Dippy

Moderator
I would have thought it was common sense to have FUSE - Diode - LCR (+transient suppressor) filtering on input...(?)
 

MFB

Senior Member
Even more common sense to use POLYFUSE-diode-LCR. That way to don't have to remember to keep a spare fuse at hand.
 
Top