MCU Restart , when it is going to operate a Relay..

Microcontroller Topics
Post Reply
User avatar
prasanga
Posts: 1
Joined: Sat Jul 18, 2009 11:37 pm

MCU Restart , when it is going to operate a Relay..

Post by prasanga » Sun Jul 19, 2009 12:29 am

Hi All .

I designed some machine to automate the textile cutting operation. This application is based on PIC Microcontroller.
And in the circutary I am using a 24 V relay for on and off the solenoid valve , which control the pnematic circut of the cutter.
My question is , when the 24 V relay getting on microcontroller is getting restart. Can any body help me on this ?

Thanks,
Prasanga
NTSH1996
Sergeant
Sergeant
Posts: 19
Joined: Sat Jan 02, 2010 12:57 am

Re: MCU Restart , when it is going to operate a Relay..

Post by NTSH1996 » Sat Jan 02, 2010 7:22 am

hw did u connect the relay. send the scemetic.
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: MCU Restart , when it is going to operate a Relay..

Post by Neo » Sat Jan 02, 2010 1:31 pm

This is a very common problem. I would recommend you to isolate the microcontroller circuit from relays using optocouplers (Aloso known as Opto-isolators). This is the best solution.

In the other hand you would try to use Power FETs instead of relays. Solid State Relays (SSR) can also be a good but an expensive solution.
User avatar
Magneto
Major
Major
Posts: 430
Joined: Wed Jul 15, 2009 1:52 pm
Location: London

Re: MCU Restart , when it is going to operate a Relay..

Post by Magneto » Fri Jan 08, 2010 5:10 pm

Hi Friend ,
relay.JPG
relay.JPG (10.08 KiB) Viewed 11363 times
Here is the circuit for connecting the Relay. Make sure to connect a Diade ( Rectifier Diode like IN 4001) inbetween
the coil of the Relay. (Between two control signal terminals) Diode should be connected reverse bias. This Diode is very much help full to avoid restarting the microcontroller , when the relay is operating.

And it is better to connect the microcontroller signal to Relay through a opto couple. This will minimise the effectes of external circuit , to the microcontroller control circuit

Good Luck
Kavee
Corporal
Corporal
Posts: 3
Joined: Tue Jan 12, 2010 11:48 am
Location: Colombo

Re: MCU Restart , when it is going to operate a Relay..

Post by Kavee » Tue Jan 12, 2010 1:19 pm

As neo correctly stated, this is a very common problem which has many solutions depending on your design requirements. A very good design practice for any microcontroller is to have output isolation (whether built-in isolation is provided or not). This essentially means NOT connecting output pins DIRECTLY to external circuits.

Common practice is to use opto-isolators (opto-couplers). These silicon devices has an LED and Opto-Transistor coupled inside a plastic packaging, which isolates two sides electrically. No electrons passed from one side to the other. But Signal is picked up and carried from one circuit to the other means of light. When buying opto-isolator, always check the specification to see if that can handle the load side of the circuit (in your case the relay coil voltage and the current).

Another approach is to use a transistor or better a FET. This acts as a buffer/amplifier which provides necessary isolation and power to drive the load.

Since you are using a Relay, which is an inductive load, back EMF has to be suppressed using a blocking diode.
Attachments
Transistor isolated output driving a relay
Transistor isolated output driving a relay
relay interface 2.jpg (21.01 KiB) Viewed 11359 times
Opto-isolated output driving a relay
Opto-isolated output driving a relay
relay interface 1.jpg (22.25 KiB) Viewed 11359 times
Post Reply

Return to “Microcontrollers”