Not getting the full output from pins


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    May 2011
    Posts
    42

    Default Not getting the full output from pins

    I didn't think I would be back so soon but I am stumped again. I have a circuit that turns little Panasonic PCB 3v relays on and off. Their coils draw 16.8 ma so they are well under the PIC supply limit and they have internal diodes. When I have the 16F1827 attempt to turn the relay on, there is about 1.8v measured at the output pin and the relay doesn't quite have enough to click over. I have done the same circuit with 628As and 1320s with no problem. I am thinking it is something to do with a register setting I have yet to find but I have about 20 hours into finding it with no results. I have disabled the comparators, set the ports for digital, and played with just about every register I could find int the data sheet. I finally used the "All Digital.php" file from Mr. Taylor which has worked on everything for me in the past but not this. Any help with this would be much appreciated.



    INCLUDE "ALLDIGITAL.pbp"
    Include "modedefs.bas"
    define OSC 16

    OSCCON=%01111010 ' 1320


    do
    high porta.3
    high portb.2
    pause 500
    low porta.3
    low portb.2
    pause 500
    loop

  2. #2
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: Not getting the full output from pins

    The obvious question... What's the IO pin voltage measuring with no relay connected? (if it's 3V, yet you're only getting 1.8V when driving the relay, then it's your relay pulling too much current for one pin - try paralleling two pins & having them both drive the relay coil....if that doesn't work, then it's your power supply feeding the PIC (incidentally, is the PIC power supply pin holding up at 3V when connected to the relay coil?). The normal method is to drive a transistor from the IO pin which in turn drives the coil.

  3. #3
    Join Date
    May 2011
    Posts
    42


    Did you find this post helpful? Yes | No

    Default Re: Not getting the full output from pins

    I should have included this and I apologize. I haven't measured the pin alone without a relay because the board is assembled but the other PICs bring the pin to 2.1v with the relay connected which seems about right. It is only the 1827 that seems to have issues. The supply voltage stays solid at 3.2v at the VSS and VDD pins when the relay is "on" or attempting to be on. I understand a transistor driving the relay is the preferred method but there are some other considerations that make that difficult which is why these relays were chosen. They appear to have been designed to be driven directly with a uC and they work wonderfully with everything but the 16F1827 which is what makes me think it has something to do with the setup of the PIC and not a hardware issue.

  4. #4
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: Not getting the full output from pins

    Well in your situation, I'd still be inclined to either desolder one side of the relay coil, cut the track feeding it etc (or if your 1827 is SOIC package, consider lifting the pin off the PCB with a scalpel while reflowing the pin with a soldering iron) ...just to prove you are getting 3V out of the particular pin (which pin is it by the way?) ....what's the DC resistance of the coil? Assuming it's spec'ed for 3V supply, then for @16.8mA it should be about 178Ω ? (if you've 1.8V being dropped across it, you can easily confirm the current flowing through the coil - which might be higher than your anticipated 16.8mA). If the DC resistance of the coil is any lower than 120Ω ...then the PIC @3V will likely baulk.
    Last edited by HankMcSpank; - 1st August 2011 at 00:11.

  5. #5
    Join Date
    May 2011
    Posts
    42


    Did you find this post helpful? Yes | No

    Default Re: Not getting the full output from pins

    I didn't pull it off the board but I did set up an identical circuit on a breadboard and found the following:
    Two pins together does power the relay but it sounds like a very lethargic actuation. It isn't as snappy of a sound as a relay with the other uCs.
    A pin without relay does output 3.2V
    When the pin is connected to the relay the relay is only drawing (or being supplied) 10 ma and the voltage drop is 1.8ish
    The relay draws 17 ma when connected to the power supply.

    It does appear for some reason the PIC cannot supply enough current for the relay. It is puzzling me because it is well within the PIC's capability and the other two PICs I have power it just fine.

    I am inclined to just use a 1320 for the application but it leaves me wondering what I am doing wrong with the 1827.

  6. #6
    Join Date
    May 2011
    Posts
    42


    Did you find this post helpful? Yes | No

    Default Re: Not getting the full output from pins

    I have also tried it with a 12HV615 at 3.2 volts and it works.

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