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.

89s52 gets hangs because of relay

Status
Not open for further replies.

gauravkothari23

Advanced Member level 2
Advanced Member level 2
Joined
Mar 21, 2015
Messages
642
Helped
5
Reputation
10
Reaction score
4
Trophy points
1,298
Activity points
6,934
Hi all.
I have made a project where i have connected 3 relays, and connected 220V A.C. solonied to each of this relays.
The realys are connected to 89S52 Microcontroller and drived using BC547 transistor. Where base is connected to port pin 0.1, 0.2, 0.3 using a 1K resistor. And also connected 1N4007 diode on relay coil
Now my problem is when i ON the relay or even sonetimes i OFF the relay the 89S52 gets hang and stops working.
This problem occurs only when load is connected to the output of relay.
Can anybody please help me to figure out where the error is.
 

Hi,

Most probably
* Schematic and PCB layout error (no solid GND plane, missing fast capacitors at each IC supply pin, missing bulk capacitor, wronly dimensionated parts, missing EMV filters at PCB_I/O
* missing snubber (or other overvoltage suppression) at relay contacts

I assume both.

Klaus
 

Hi,

Most probably
* Schematic and PCB layout error (no solid GND plane, missing fast capacitors at each IC supply pin, missing bulk capacitor, wronly dimensionated parts, missing EMV filters at PCB_I/O
* missing snubber (or other overvoltage suppression) at relay contacts

I assume both.

Klaus

i Have added a 100nf capacitor at the microcontroller VCC pin.
what wrongly dimensionated parts.... as the circuit works well... when there is no load connected to the relay...
 

Hi,

Show us your
* schematic and your
* pcb layout
then we are able to verify it.

Without these informations it´s useless to discuss.

Klaus
 

Hi all.
I have made a project where i have connected 3 relays, and connected 220V A.C. solonied to each of this relays.
The realys are connected to 89S52 Microcontroller and drived using BC547 transistor. Where base is connected to port pin 0.1, 0.2, 0.3 using a 1K resistor. And also connected 1N4007 diode on relay coil
Now my problem is when i ON the relay or even sonetimes i OFF the relay the 89S52 gets hang and stops working.
This problem occurs only when load is connected to the output of relay.
Can anybody please help me to figure out where the error is.


Can you debug it? Have you checked the next tasks after switching relay works or not?
You should check your schematic and power supply current is sufficient or not? Are you operating relay and controller on same supply?
Use pull up for relay operating pin of controller.

I think this may help you.

Pankaj
 

U Can Do it like this:
QQ??20171027094505.png
If BC547 Base connect to P0.1,Output Imax more than P1 Port, So U can serise 330Ω resistor between P0.1 to BC547 Base.

..............................
BC547 collector connect 5V VCC

BC547 Collector need connect VCC,don't connect relay.
coz, The collector can withstand more current than the transmitter, so if u connect relay connect base pin, the BC547 will work in an enlarged state, possibly
 

The problem discussed in this thread is obviously related to relays contact arcing. In so far different relays driver circuits, e.g. common collector as in post #6 versus original common emitter shouldn't be expected to change the situation essentially.

There are however some implications of the different circuits. The post #6 circuit has the disadvantage of activation the relays during processor reset which may be unwanted or even absolutely prohibited, depending on the kind of load. The same problem applies to NPN common emitter driver. Reduced relays coil voltage is another disadvantage of the CC driver.

On the other hand, 8051 processors have only low high output current which must be considered when designing output drivers. A common emitter PNP transistor driver is one possible solution.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top