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 connected to PIC fluctuating

Status
Not open for further replies.

Aditya070390

Newbie level 6
Newbie level 6
Joined
Dec 12, 2012
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,384
Hai everyone!!

I have connected a 30amps relay to GP4 of PIC12F508 through a bc547 transistor.The code is written to turn it on at certain input condition and turn it off at some condition. The logic is working fine. The relay turns-off perfectly but while turning ON it switches ON for a fraction of a second and switches OFF after a delay of nearly 1 0r 2 seconds it repeats lik this again and again.finally after 4 or 5 spikes like this, it rests in ON condition. I have attached the part of that code and also the circuit,i dont know where am wrong.Please help me out.
Code:
        bsf GPIO,4
	nop
	nop
	call	 Delay_30;delay of 30 seconds..
	call   	 Scan
	btfss	 currinput,1
	goto	 Full
	btfsc	 currinput,2
	goto	 run
	goto	 Back

Sch.jpg
 

hello


if you are sure about the software....
does it works fine with a Rsistor+led instead of the relay ?


Do you have a load driven by the relay contact ? or just the coil ?
because you can also get spike from the load , if 30 Amps in the driven circuit.
add RC accross contact.

You better have to add a resitor between Base and ground to fix the Vbe potential
when without commande from the PIC
and get the transistor in blocage status. .. 12V on collecteur , no IC current
This renforce noise immunity from spike comming from the coil.
and capacitor ,if you are not hurry to put relay ON ..
less DV/DT => less disturbance
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top