240v makes picaxe reset.

mymps3

New Member
Hi all. Im fairly new here. I have a picaxe circuit that uses 3 transistors and 3 relays to switch some 240volt traffic lights but sometimes the chip seems to get glitchy. The time delay seems to double or maybe triple. Is there any info on how to stop voltage spikes or any info on a better voltage regulator circuit?? Many thanks, Greg.
 

eclectic

Moderator
Welcome to the Forum Greg.

Could you re-post your question in the
Main /Active Forum.

I'm sure you'll then get plenty of replies.


The Sandbox is normally used
just for test posts.

e
 

BeanieBots

Moderator
Welcome to the forum. [moved to active forum]

Noise supression is a massive topic in its own right, so there is no easy 'quick fix' or explanation of what to do. Most of it comes down to experience.

However, there some 'standard practices' which should help a great deal.

Firstly, keep all mains wiring well seperated from any of the PICAXE circuitry.
Make sure you have 100nF physically as close as possible to the PICAXE power pins.
Fit 100nF as close as possible to the regulator input and output pins.
Also fit 10uF close to the regulator output.
Fit a cap at least twice the size of the regulator output capacitance to its input pin.

The largest spikes will be when the relay opens and/or closes due to inductance in the leads between power source, relay and load. Keep supply and return leads close to each to minimise the effective inductance and radiation. Fit a 100nF and 10R in series across the relay contacts to absorb the energy spikes. NOTE, THE LOAD WILL NEVER FULLY SWITCH OFF ONCE THESE ARE FITTED.

Also, make sure there is a catch diode across the relay coil.

Take these very basic steps and things should become much more reliable. If your load is inductive or involves motors, then you will need to take further steps and pay more attention to layout.
 

mymps3

New Member
I have just added those components as per your recommendations. Unit is on test and hopefully the problem is fixed. Many thanks for your help!
 

Dippy

Moderator
And remember those tips for DC circuits to where you have large (poss. inductive) loads being switched.
Applying an oscilloscope to tracks when switching can be very educational.
 

moxhamj

New Member
There is another thread going with some comments about resets. Perhaps it is timely to try to sort this one out.

Firstly, I don't think this is a picaxe problem as such. More a problem relating to the pics themselves.

Secondly, I've got about 50 picaxes doing all sorts of nifty things around my farm. Indeed, without picaxes I would have no water so it is all fairly important that it works. Also, I'm the crazy guy who bypassed the cooling fan controller on my car (after the standard mechanical solution corroded and cooked my engine) and replaced it with a picaxe. If that picaxe fails to turn on, I cook another engine, but it all has worked fine for three years, and I think I can say that I can build picaxe circuits that can survive in the engine bay of a car.

BUT - I still get resets and odd behaviour near 240V. The three culprits are 3.6kw motors, flouro lights and high current DC nearby. Of these, flouro lights turning on are the worst. The problem tends not to manifest itself on the workbench, but rather, when a circuit is assembled in situ and has wires more than 1 metre attached to the boards. These can be data wires, or they can be power supply wires.

I suspect that every wire behaves as an antenna, even wires that I might designate as "earth" or "ground".

I also suspect a solution involves something like a metal box, and every wire that goes into that box, especially supply and earth wires, goes through a ferrite of some sort. Maybe a few turns round a toroid won't hurt either (I've had some partial success with toroids).

In fairness to pic chips, I've also had problems with 4000 series CMOS and CMOS 555 timers. Robust chips include old school TTL, 324 op amps and 555 timers. But in one case, even those were beaten by the very close proximity of a large motor, and in the end the only solution was relay logic. Amazing what you can do with relays, but I digress...

One of the circuits in my pump controller is a DIN rail mounting timer. It has a led and a pot, and seriously, it does nothing more than a 555 timer connected to a relay. But, it cost over $150. We had a flood a few years back and everything had to be pulled to bits and dried out, and it was fascinating to see what the inside of this timer circuit contained, particularly as it was designed to sit right next to multi-kilowatt contactors on a DIN rail. It had metal shielding inside the box. There were filtering components, including some I didn't really recognise.

Bottom line is these things are really robust.

I wonder if it is possible to 'robustify' a picaxe? Metal box, ferrites, LC filtering on all wires going in and out. Local regulation inside the box?

And given all these components cost money, which ones can you leave out for which circuits?
 

hippy

Ex-Staff (retired)
Firstly, I don't think this is a picaxe problem as such. More a problem relating to the pics themselves.
Not, as you note later, really a problem particularly relating to the PICmicro themselves. Any component can misbehave when subject to enough external interference though some are by their nature more immune than others.

Active and programmable components are more likely to be affected as a single glitch can throw them completely off course and lead to domino effect failures. Passive components, though they can be affected, are more likely to resume doing their job


I wonder if it is possible to 'robustify' a picaxe? Metal box, ferrites, LC filtering on all wires going in and out. Local regulation inside the box?

And given all these components cost money, which ones can you leave out for which circuits?
I would say the great majority of projects appear to work reliably without any additional shielding, filtering and such like, often without the minimum recommended components and with 'best practice' thrown to the wind.

Ultimately what needs to be included is what ever is needed to overcome adverse interference and what can be left out are those things which don't contribute to removing it. That can only be assessed by analysis of what interference there is, or by guessing what there will be and designing towards that.

It's often more about environment, application and usage than particular circuits though there will often be 'best practice' in particular cases on what may go wrong with a particular type of circuit or application.

It's perhaps more about education than anything else. That circuits seemingly work so well when thrown together leads people to be surprised when they don't work in more hostile situations. My analogy would be that as people we are generally safe going about our everyday business without taking much care, don't expect to get hit by lightening any time soon, and may therefore expect it to be the same when standing next to a Van der Graaf generator ;-)
 

BeanieBots

Moderator
Flouro's will always be a major issue due to the nature by which they work. To start, they require an arc of many 10's of kVs. This is obtained by colapsing the current in the ballast inductance and hence tends to manifest at switch on. It is not possible to suppress this at source because the flouro would not strike. Keeping it out of your sensitive electronics requires sheilding against both radiated and conducted noise.
 

mymps3

New Member
My project is still going well. I even used my angle grinder off the same power point and the picaxe circuit is still happy. No glitches.Thanks heaps!!!!!!!!!!!!!!!!





Welcome to the forum. [moved to active forum]

Noise supression is a massive topic in its own right, so there is no easy 'quick fix' or explanation of what to do. Most of it comes down to experience.

However, there some 'standard practices' which should help a great deal.

Firstly, keep all mains wiring well seperated from any of the PICAXE circuitry.
Make sure you have 100nF physically as close as possible to the PICAXE power pins.
Fit 100nF as close as possible to the regulator input and output pins.
Also fit 10uF close to the regulator output.
Fit a cap at least twice the size of the regulator output capacitance to its input pin.

The largest spikes will be when the relay opens and/or closes due to inductance in the leads between power source, relay and load. Keep supply and return leads close to each to minimise the effective inductance and radiation. Fit a 100nF and 10R in series across the relay contacts to absorb the energy spikes. NOTE, THE LOAD WILL NEVER FULLY SWITCH OFF ONCE THESE ARE FITTED.

Also, make sure there is a catch diode across the relay coil.

Take these very basic steps and things should become much more reliable. If your load is inductive or involves motors, then you will need to take further steps and pay more attention to layout.
 

BeanieBots

Moderator
Glad you got it sorted and thanks for reporting back.
Your angle grinder might not be as good a test as you think. If it's UK CE marked, then by law, it must not put out excessive interferance and will have suppression components fitted.
 

mymps3

New Member
Welcome to the forum. [moved to active forum]

Noise supression is a massive topic in its own right, so there is no easy 'quick fix' or explanation of what to do. Most of it comes down to experience.

However, there some 'standard practices' which should help a great deal.

Firstly, keep all mains wiring well seperated from any of the PICAXE circuitry.
Make sure you have 100nF physically as close as possible to the PICAXE power pins.
Fit 100nF as close as possible to the regulator input and output pins.
Also fit 10uF close to the regulator output.
Fit a cap at least twice the size of the regulator output capacitance to its input pin.

The largest spikes will be when the relay opens and/or closes due to inductance in the leads between power source, relay and load. Keep supply and return leads close to each to minimise the effective inductance and radiation. Fit a 100nF and 10R in series across the relay contacts to absorb the energy spikes. NOTE, THE LOAD WILL NEVER FULLY SWITCH OFF ONCE THESE ARE FITTED.

Also, make sure there is a catch diode across the relay coil.

Take these very basic steps and things should become much more reliable. If your load is inductive or involves motors, then you will need to take further steps and pay more attention to layout.
Thank you !!!!!!
 
Top