In the attached diagram, can the relay be powered (the blue ovals) from the same source as the PIC? Would it make sense then to use the optocoupler or a diode would suffice since I would not be able to achieve circuit isolation with the former anyway?
I am hoping to power the relay using the same source as the PIC to reduce complexity.
In the attached diagram, can the relay be powered (the blue ovals) from the same source as the PIC? Would it make sense then to use the optocoupler or a diode would suffice since I would not be able to achieve circuit isolation with the former anyway?
I am hoping to power the relay using the same source as the PIC to reduce complexity.
When driving relay coils I always power them from the input side of the voltage regulator.
As your output is a home appliance so it will switch on more hours.When the relay takes power from the voltage regulators output same as PIC, the voltage regulator getting too much heat.
So when I selecting a relay I always use >8V relays & feed power from regulators input side.
Hi Eric
I got the idea from an article that uses a relay driven from a PC parallel port which uses a optocoupler to provide "better" isolation to protect the port. Wouldn't the concept apply similarly to PIC? Or this is just overly-designed? From your posting, you are ok with powering the relay with the same source as the PIC?
Hi Gayan
Sorry my attachment was a little misleading. The appliance is not a TV or device that would be switched on for hours, but couple of 2-3 mins with longer periods in-between. Even so, I don't think a lot of heat should be generated : The PIC end would be powered from a 9V Wall-wart which is then converted to 5V using a 7805. So power loss = (9V - 5V) * 100mA(max) = 400mW. Is my assumptions correct then?
Hi Eric
I got the idea from an article that uses a relay driven from a PC parallel port which uses a optocoupler to provide "better" isolation to protect the port. Wouldn't the concept apply similarly to PIC? Or this is just overly-designed? From your posting, you are ok with powering the relay with the same source as the PIC?
Thks for the prompt response! I just want to be sure: by transistor driven, do you mean something like the attached? The relay I have has the following ratings :
-10A 250VAC
-10A 30VDC
- COIL : 5VDC
Thks for the prompt response! I just want to be sure: by transistor driven, do you mean something like the attached? The relay I have has the following ratings :
-10A 250VAC
-10A 30VDC
- COIL : 5VDC
there is another reason why you don't want to power the relay coil from the same rail as the PIC - Vcc will jump all over the place and the PIC won't like it. You could use a large bypass cap to mitigate the problem but it's better to use a separate rail for the coil. I've see random system resets due to that problem.
Also, powering the opto's LED and PT from the same rail negates the primary reason to have the optoisolator - isolation. This is why people are saying to just power it directly.
By the way, on the base of the transistor in the last drawing, use a largish resistor (100K to 470K) from base to gnd to prevent start up glitches from causing the relay to engage.
I am feeding an unregulated wall-wart 9V into a 7805 to get a regulated 5V for my PIC. Would taking the 9V to power the relay considered providing a separate power rail? Thks!
I am feeding an unregulated wall-wart 9V into a 7805 to get a regulated 5V for my PIC. Would taking the 9V to power the relay considered providing a separate power rail? Thks!
hi,
Providing the relay is rated for 9V operation, if its 5V, running it at 9V would cause overheating of the coil.
You could connect a 3V9 zener diode [suitable current rating] in series with top of the relay coil.
Or choose a suitable series resistor.
there is another reason why you don't want to power the relay coil from the same rail as the PIC - Vcc will jump all over the place and the PIC won't like it. You could use a large bypass cap to mitigate the problem but it's better to use a separate rail for the coil. I've see random system resets due to that problem.
Also, powering the opto's LED and PT from the same rail negates the primary reason to have the optoisolator - isolation. This is why people are saying to just power it directly.
By the way, on the base of the transistor in the last drawing, use a largish resistor (100K to 470K) from base to gnd to prevent start up glitches from causing the relay to engage.
Could you please clarify what does it mean by same rail. I have a problem when the AC load is connected to the relay. I powered both the pic micro controller and 5v relay with 5v. The controller hangs after a couple of seconds. It happens only when I connect the AC load. Some noise is travelling back to the micro controller. I have also used a diode across the relay. Now I am planning to use optocoupler, but still planning to keep one power supply (5v) powering both pic and the relay with 5v Orelse I can do voltage division and supply 3.3V to the pic micro controller and 5v to relay. (since many say that using same voltage and power supply for pic and relay causes problems)