+ Reply to Thread
Results 1 to 9 of 9
  1. #1

    Unhappy PIC stop responding - Strange Problem!

    Hi
    I am facing a very strange problem with my 12F635. I have made a circuit where PIC is controlling 4 relays. I have used RF modules bought cheaply over the internet.

    My transmitter sends a simple signal and based on that the relay is operated at the receiver end.

    The problem is that when I only operate one relay the receiver works fine and only one relay goes on/off. Sometimes even two work fine, BUT WHEN I switch on 4 relays all together, the PIC stop responding to any further command from the transmitter, it just goes blank and does nothing - leaves all 4 relays on. Same thing happens sometimes even if I switch on only two relays and I have to reconnect the powersupply to reset it.

    Can someone tell me what could be the problem - Is it with the hardware?

    I have checked the PICs on the breadboard and connected their Rx/Tx pin together by a wire rather than my RF modules and they work fine.

    I wonder what happens to the receiver's PIC during relay operation.

  • #2
    Join Date
    May 2007
    Location
    Republic Serbia
    Posts
    105

    Default

    Post your schematic and electric work conditions..
    Maybe we can find problem there...
    Regards Robert

  • #3
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156

    Default

    Likely causes:
    • Voltage spikes/noise from relays and/or overcurrent causes Brownout on PIC
    • Voltage spikes/noise from relays induces garbage on receiver
    As Robert suggested; interconnect diagram / schematic will help.

    Things to consider:
    • How are the relays connected?
    • How much current do the relays require from the PIC's I/O?
    • Are the relays isolated from the PIC? How about from the RF Receiver?
    • How many times do you receive the send/receive the control commands?
    • Have you verified the TX PIC is still transmitting information and the RX PIC is not responding (this probably is the case, bust just to be safe)?
    Just somethings to consider.

  • #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    867

    Default

    I would hazard a guess here. Your power supply is not capable of maintaining the supply to your PIC when more than 1 relay is turned on. Due to this, your PIC gets either into a brownout condition or reset (if that is enabled)

    Languer has made a couple of good points you should consider. Have you connected your relays directly to the PIC or are they driven by transistors external to the PIC?

  • #5

    Exclamation Schematic Attached

    Quote Originally Posted by languer View Post
    Likely causes:
    • Voltage spikes/noise from relays and/or overcurrent causes Brownout on PIC
    • Voltage spikes/noise from relays induces garbage on receiver
    As Robert suggested; interconnect diagram / schematic will help.

    Things to consider:
    • How are the relays connected?
    • How much current do the relays require from the PIC's I/O? -
    • Are the relays isolated from the PIC? How about from the RF Receiver?
    • How many times do you receive the send/receive the control commands?
    • Have you verified the TX PIC is still transmitting information and the RX PIC is not responding (this probably is the case, bust just to be safe)?
    Just somethings to consider.
    I am attaching the Schematic. Relays take 30mA. Command is sent as and when switch needs to be turned on/off.
    Tx still transmits as when I switch the receiver off and then on again, it operates fine. It only happens sometimes when both relays are on and sometimes it works fine.
    Attached Images Attached Images  
    Last edited by financecatalyst; - 31st August 2009 at 07:00.

  • #6
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    867

    Default

    The leds are shown the wrong way. If this is how you have them connected, they will not light up. But, this is a minor issue

    Check your power supply. Remove the PIC and force both relays to on via jumpers. In this condition, what is the supply voltage to the input/output of the 78L05? Is the PIC Vdd being satisfied?

    You do not have a decoupling cap across the PIC Vdd-Vss.

  • #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,541

    Default

    Hi,

    +1 for Jerson ...

    AND, once more

    Do not forget the .1or .22 F cer capacitor as close as possible to the power pins ( 1-8 ) s

    a 10F tantalum at the 78L05 output won't be too much nor ...

    instead of the Diode across relay coil terminals, a series RC really goes fine ... but some scope necessary to tune the values ... leaves the power lines much cleaner !

    Alain
    Last edited by Acetronics2; - 31st August 2009 at 09:07.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  • #8

    Question

    Quote Originally Posted by Jerson View Post
    The leds are shown the wrong way. If this is how you have them connected, they will not light up. But, this is a minor issue

    Check your power supply. Remove the PIC and force both relays to on via jumpers. In this condition, what is the supply voltage to the input/output of the 78L05? Is the PIC Vdd being satisfied?

    You do not have a decoupling cap across the PIC Vdd-Vss.
    Thanks for thr reply Jerson. After I switch all 4 relays on, 78L05 input/output is left with 10.9V, still having 5V for PIC.

    Should I increase the resistance for the LEDs as well?

  • #9
    Join Date
    May 2008
    Location
    Italy
    Posts
    825

    Default

    Tray adding the two capacitors and one diode as per the attached schematics.

    It should cure the problem.

    Al.
    Attached Images Attached Images  
    All progress began with an idea

  • Similar Threads

    1. SMS via pic
      By kenandere in forum GSM
      Replies: 15
      Last Post: - 10th March 2010, 10:00
    2. strange serout2 problem
      By KaanInal in forum mel PIC BASIC Pro
      Replies: 2
      Last Post: - 7th January 2010, 09:33
    3. PIC HSERIN problem
      By shaiqbashir in forum mel PIC BASIC Pro
      Replies: 10
      Last Post: - 20th July 2008, 11:08
    4. Strange problem with PBP 2.50
      By Charles Linquis in forum mel PIC BASIC Pro
      Replies: 2
      Last Post: - 16th October 2007, 20:45

    Members who have read this thread : 0

    You do not have permission to view the list of names.

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts