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.

Relay noise resets microcontroller

Status
Not open for further replies.
What's that current transformer that's being fed directly into the PIC? (with no protection I might add)
 
Hello

Thats a CT with isolated primary and secondary .I pass the current carrying wire through the air gap of the torroid and a scaled voltage appears across the secondary...
So theres no issue there i guess

(anyways...a bit off topic....please check the other thread about DAC current )
 
What's with the three 1n4001 diodes from the +5 volt line with the bypass caps in the lower right corner?
 
[QUOTE {snip}
The switching of Linear loads like tungsten lamps works fine but other loads like Fans,Fluorescent lamps reset the MCU. {snip}
[/QUOTE]

I have had similar problems and the only solution was to in-case the circuit in an iron metal shield, nothing else worked. I used the sheet metal from an ordinary food can and I only had to wrap about 3/4 of the the small plastic box the circuit was mounted in.
Make sure the can is iron by checking with a magnet
 
Hello

Thanks Rolf for the crucial info :)
I will sure try it.
I actually forgot to tell a very important thing about the ckt,
I am using an unisolated 5V PSU for thisthing.
Will this matter?
I know that electronics in washing m/cs use this kind of setup
Thanks and regards
 
Unisolated, which means it's a half bridge recitifer?
 
Unisolated, which means it's a half bridge recitifer?

No.
Unisolated meant ;no step down transformer for the PS.
I use a PI Buck conv.chip operating at 60KHz to get me 5V from 230V AC.
So ckt ground and the mains neutral are same.

I have seen electronics in washing m/c use an unisolated PS for the microcontroller and the relay ,the only addition they use there is using a ZCD switching for the relay.But the noise on the GND line never malfunctions the microcontroller.
What could be wrong?

Thanks and regards
 
I imagine D5-7 is your problem. It does not compensate for transients on the 5v line created like that of the un bypassed relay circuit will generate. Use an LDO for your 3 volts. Add a bypass on the Relay + side first and see if that works. Otherwise get an LDO.
 
Hello Mikebits

Thanks for reading and replying.

What would you say to using a zener diode of 3V3 instead of the D5-7 drop?

I dont mind spending some more current/power but do mind an LDO/costlier part?

Anyways I will try this now.
 
The problem is, your MCU needs a nice clean stable power supply. It is my feeling that you can not get this without a good regulator. You may be able to get around this with playing with filters on your supply, but you could save yourself much trouble with a proper regulator. How much could one cost? Before anything else, try and filter you relay + terminal, that might help. If it were me I would just use a regulator and be done with it.

Consider the old adage, you get what you pay for.
 
Hello Mike

Thanks for the reply.

I have filtered the +5V of the relay and there's some improvement :)

Please also find the 5V PSU I designed attached to this mail.
 

Attachments

  • 5V Power Supply PI.PNG
    5V Power Supply PI.PNG
    26.2 KB · Views: 2,052
I am sure the 5V supply is fine. The problem is your 3v supply is not. You will need to play games to get your 3v supply clean, best thing is a regulator. If your 5v sags or surges when the relay energizes, this sag or surge will be on your MCU supply.

Maybe you can play with many cap values on the relay + pin plus +5v but this is just a band aid, best thing is like I said.

It is common practice to isolate digital supplies and analog supplies for this very reason. Your diode scheme offers little to no isolation of power supply noise.

Good luck
 
Last edited:
Hello Mike

Thanks for the reply.

I have filtered the +5V of the relay and there's some improvement :)

Please also find the 5V PSU I designed attached to this mail.

I really don't know why you are firm on using a non isolated power of 5V direct from230V /110V AC.
In fact even if you use any cellphone adopter, you get a good isolated power and these adopters are now a days very cheap. Use a resistor and 3.3V zener with a 1uF cap to get your 3V supply instead of three diodes. Always ensure that 0.1 is just across pins 5and 14 not far away to either of the pins.
 
Always ensure that 0.1 is just across pins 5and 14 not far away to either of the pins.

Hello sarma

Thanks for replying.

Which are these pins you are talking about?

I think cell phone adapters use some kind of similar ckt I used for 5V,and it is unisolated.Please correct me if i am wrong.

Thanks and regards
 
Use an LDO and your troubles will be over. I hope... :)
 
Last edited:
Use an LDO and your troubles will be over. I hope... :)

That will be the last resort.;)

Anyways theres also a weird problem with this ckt.
I switch a relay and theres a incandescent lamp in the contacts.When I switch this on/off it does it well.But when I try an Inductive load,the MCU jumps to a routine simulating a key press,which is an active high switch,when used.
Is this also relating to the current issue?...or something else...???

Anyways Thanks so much for taking interest in my woes...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top