Sinking current from 9V into a PIC pin.


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: Sinking current from 9V into a PIC pin.

    Firstly, it all works as expected ...as per the circuit diagram! (btw: I'm more of a FET, Opamp, Valve type fella vs transistors!).

    Ok, so why use a PNP......because I want the LEDS to source their current from the 9V rail *not* the PIC IO pins...therefore I need to switch the voltage into the LEDs...is there any other way of acheiving the same result that's more elegant?

    Re the digital trannies....I found them yesterday & have some sitting in a cart with my RS Account ...

    http://docs-europe.electrocomponents...6b804694cd.pdf


    (it can handle 100mA, & I'm working on about 5 LEDS @ 18ma, so that should be ok)

  2. #2
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Sinking current from 9V into a PIC pin.

    I confess that I did not look at the PIC device being used, but if RC5 is a standard pin (can be 5V or 0V and can sink or source current) then I think if you measure the circuit being proposed, you will see the transistor really is not doing anything - in fact, it will be on at all times.
    Instead you need an NPN transistor. The base gets connected directly to RC5, The collector to 9V and the emitter to the LED Anodes. This limits the voltage seen by all PIC pins to 5V or less (closer to 3V), and supplies the current from 9V (The PIC still needs to sink that current)
    You may well damage the PIC trying out the circuit shown in the drawing.

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