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


    Did you find this post helpful? Yes | No

    Default Re: Not getting the full output from pins

    The coil resistance measures at 180 or 181 among three of them. The datasheet is here:
    http://panasonic-denko.co.jp/ac/e_do...txs.pdf?via=ok
    The p/n is TXS2-3V

    I have tried pins most of the pins to no avail.

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Not getting the full output from pins

    Most devices sink current much more readily than they source current. My guess is that if you connected the + side of the relay to 3.3V and the - side to your PIC pin, the PIC would drive the relay perfectly.
    Charles Linquist

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Not getting the full output from pins

    And here is some proofName:  PicOutput.jpg
Views: 821
Size:  142.5 KB
    Charles Linquist

  4. #4
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Not getting the full output from pins

    If your relay draws 16.8mA at 3.3V, then it has a coil resistance of about 200 ohms (R=E/I). At 1.8V, it is sourcing 9mA. Looks like your device is slightly BETTER than specifications.
    Charles Linquist

  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

    16.8 is off the data sheet which is probably based on 3 volts. It is far easier to change to a 18F1320 than change the board from sourcing to sinking the relay. I have already changed the code to use the 1320 but it still leaves me a little bothered like I am missing something. If it is just a quirk in the 1827 or in the lot I bought then that is what it is. However, that seems to be the least likely of scenarios which makes me think I have done something wrong in the setup. I am about out of hair and some pretty smart people have looked at this already with no results. I am pretty close to just going with the 1320 for everything and burying this issue in the book of unsolved mysteries.

  6. #6
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Not getting the full output from pins

    Why do you think it is "unsolved". The datasheet shows what you can expect from the chip. Remember, the relay draws 16.8mA *when it has 3.3V across the coil* ( it is a 196 ohm resistance). If you put less than 3.3V across the coil, the draw will be less. If you measure 1.8V across the coil, then the PIC is sourcing 9 mA. Since the coil has 1.8V across it, the PIC has 3.3V - 1.8V = 1.5V.
    The datasheet says that at 9mA, you aren't guaranteed to be able to source any current at all.

    This is not "black magic".


    And if you look at the datasheet for the PIC 18F1320, you will find that it is *NOT* guaranteed to work either. You may find some that do work, but the datasheet shows they wont. You need to SINK, not source the current from the relay to guarantee your circuit will work.


    Name:  18F1320.jpg
Views: 817
Size:  65.9 KB
    Charles Linquist

  7. #7
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default Re: Not getting the full output from pins

    As Charles mentioned you would be better off going with the PIC as a low-side driver, but the best route would be to use some cheap low-side driver like a BS170 MOSFET.

    Switching from one PIC type to the next may not always guarantee it's going to work from one to the next if it's operating border-line.

    And a quick look at the relay datasheet does not show they have internal diodes. You will for sure want a flyback diode across those relay coils.
    Last edited by Bruce; - 1st August 2011 at 16:15. Reason: internal diodes
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  8. #8
    Join Date
    May 2011
    Posts
    42


    Did you find this post helpful? Yes | No

    Default Re: Not getting the full output from pins

    Unsolved is relative to my world. Until it makes sense in my pea brain, it is unsolved. However, it is solved now.

    Thanks for all the help. I was unaware of the graphs posted here and when I went back to look for them I realized I had a preliminary datasheet for the 1827 that did not have them. I didn't even think to account for the internal resistance of the PIC when trying to understand why it wouldn't work.

    Thanks for the catch on the diode Bruce. Thankfully the board was designed for a previously discontinued relay and a 1N4007 is installed for each of the relays. For some reason when I changed to the current relay I thought they had a diode installed. Luckily I never removed the clamping diode from the assembly instructions so they kept getting installed.

    Thanks again for everybody's help.

    Also, it does work as a low side driver.

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