Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Relay interfacing problem ,controller becomes reset

Status
Not open for further replies.

Prashant_vaghasia

Newbie level 4
Joined
Apr 20, 2012
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,346
i have problem with my project, gsm based automation.while do device on by applying port pin 0, ,controller becomes reset.
 

get rid of led and 1k going to pin 40 vcc=5v
 
  • Like
Reactions: tpetar

    tpetar

    Points: 2
    Helpful Answer Positive Rating
sorry sir but i cant understand what u say

---------- Post added at 17:25 ---------- Previous post was at 17:20 ----------

this problem occured when a.c. device connect with relay.
 

There is lot of discussions going on about this, search this site with relay and reset..

Quick reference..

Do you have 0.1 uf cap between vcc and ground? and it should be placed near to vcc and ground.
 

Several care must be taken to avoid relay induces spikes to microcontroler.

As nandhu said, a decoupling capacitor close to relay, other close to regulator, and other close to uC, is already mandatory.
Other important thing, is an antiparalel diode close to relay.

Don´t forget to arrange supplied 12V devices faraway from those supplied with 5V, and shield all with GND.

+++
 

Where i connect decoupling capacitor, even when manually on/off ac supply make controller reset
 

Try putting a diode across the relay coil. Otherwise a pulse is generated in the coil when the relay is de-energized.
 

sorry sir but i cant understand what u say

---------- Post added at 17:25 ---------- Previous post was at 17:20 ----------

this problem occured when a.c. device connect with relay.
wow did not see that before the ac grd of the relay contacts ...is it the same/joined to ac shown connected to mcu pin 20 ?
if so disconnect them now instantly .before u get yourself electrocuted your self or/and anybody near u

next use proper words for ac .. your relay contact r getting ac phase(not positive ac) and the other contact is connected to neutral (not ac grd) i hope... if u r really connecting relay to grd disconnect it now instantly.
before u get yourself electrocuted your self or/and anybody near u
more your circuit is getting +12v with ref to return/-12v or and the 7805 is getting -12v or return or zero
no need for diode the driver has internal diode
 

Try using a relay in which the AC lines are all outside its coil. In some small models, the AC current passes inside the coil. Also you may need adding a simple RC snubber between two AC terminals of the relay. For the RC values you may like starting with R=150R and C=10n (high voltage).

Added:

R and C are in series

High voltage (of C) > 2 * Vrms * 1.414
or simply equal or greater than 3 * Vrms
 
Last edited:

You are feeding your 5 volt regulator from the 12 v supply through the led and it's current limiting resistor, that will cause all sorts of problems by limiting the supply to 12 ma (approx). That will cause supply voltage variation and associated micky mouse problems!
Any +ve power supply illuminating led should have the resistor wired to ground/negative.
 

This can be moved into "dangerous prototypes make if you dare" thread group.

Maybe its to late for most of parts in your circuit, but you can try:
- 100nF closes as possible to +/- of uC.
- Diode protection on relay by default.
- Remove that 1K and led before 7805, the same for 1K and led on pin 31 and 40, you must feed uC with electricity.
- Probably you kill uC, try with new (if you connect AC wire on lower side).


Of course attention on AC wires and connect it only on relay working contacts, not on coil.

First try circuit without 220V on relay contacts, test it, and later connect load on relay contacts, with special attention on high voltage and on your safety.

What I longer watch this circuit I'm more and more scared. ;-)
 
Last edited:

AC ground connection ? Don't know what mains system you have?
As a NZ registered Electrician I would be connecting a proper mains rated relay contacts in this method ..
phase to one of the relay contacts, the other contact to the load device, the other side of the load device to neutral.
What you have shown in your drawing is a wiring method for a relay that is normal practice in low voltage circuits. I was familiar with that method in my earlier career as a Telecommunications technician.
 

I hope so that GSM survive attack from sufficient potential of alternating electrons, but max232 should do the job.



Upsss I step back this words about max232 I just saw grounding of GSM modem to AC.

Lets make some new project with new parts.
 
Last edited:


this is situation ,plz help me,i m confused because this is my final year project and i cant find solution
 

Hi Prashant,

First, most here were confused because, on your schematic the AC neutral terminal is drawn exactly as the DC ground (reference). I am sure that in your real project its AC side is totally isolated from the DC side... right?

Second, I was also sure (hence I wrote you message #9) you are using this small model of relay (your post #14) in which the AC current passes inside the coil. I hope you can use a relay in which all AC paths are outside the relay coil as the Finder relay shown here for example (notice its 5 pins, 2 of coil and 3 of AC are seperated).

Kerim

Note: Don't forget the RC snubber mentioned on #9 (15 years ago. I had your problem in my my first RF controller for doors).
 

Attachments

  • FinderRelay.png
    FinderRelay.png
    37.5 KB · Views: 74
  • FinderPins.png
    FinderPins.png
    3.3 KB · Views: 88
Last edited:

Did you remove 1k and resistor from two places from your circuit ?

Did you add 100nF closed as possible to uC ?

Did you add protection diode to relay ?


Of course disconnect 220V at all from circuit, from start try just with 12DC from battery or power supply, watch relay contacts with unimer (ohm meter) to see when is connected when is not.
 

Yes it is for ULN.

Also where is capacitors for 7805 before and after ???

7805_Phone_Charging-Circuit.jpg


Add one 100uF before 7805, 10uF and 100nF after 7805 (100nF last like on circuit).

Did you check that you have 5V on uC ?
 
Last edited:

Yes it is for ULN.

Sorry, I didn't get your point. For each output of ULN IC there is a diode connected to pin 10 which in turn is connected to 12V of the relay. Is there something else I missed?

---------- Post added at 09:17 ---------- Previous post was at 08:57 ----------

Hi Prashant,

Now let us analyse the 12 to 5V supply.

For relatively low current (below 50 mA) the in/out voltage drop of 7805 is about 1.5V.
Also if the LED is red, its forward voltage for low currents is about 1.8V

Assuming 12V is constant then the maximum current that lets 7805 works properly is:
5V + 1.5V +1.8 = 12V - 1K*Imax
Imax = ( 12 - 5 - 1.2 - 1.8 ) / 1
Imax = 3.7 mA

Don't you think it is rather very low for your controller parts?
It is not enough to supply the 5mA of the 7805 alone :)

So I am sure you did a minor mistake while drawing your circuit.
Your supply LED is connected to ground instead (it will light by the 12V, and its current about 10mA)
I guess your 12V is directly connected to pin 1 (input) of 7805... right?

Do you like me continue?

Kerim
 
You are feeding your 5 volt regulator from the 12 v supply through the led and it's current limiting resistor, that will cause all sorts of problems by limiting the supply to 12 ma (approx)...

This component placed there is unnusual.
It´s the main reason of the problem, despite other cares as advised must be performed.


+++
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top