Sinking current from 9V into a PIC pin.


Results 1 to 17 of 17

Threaded View

  1. #10
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

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

    Hi Sayzer,

    I'm just learning about driving LEDs & PWM here.

    I want to be able to have numerous LED patterns (hence the individual PIC connections to the LEDS, but also a 'common' dimming ability (hence the PWM to the, tranny controlling the supply to all the anodes).

    What I was ideally after was to connect the 'common' supply (controlled by the transistor) for all the LED anodes to 9V. This would save some heat losses, whereby the 9V gets regulated down to 5V first, & then feed the anodes.

    the problem of course with using an unregulated power source, is that when the voltage starrts drooping (as the battery life fades), then the current through the LEDS will be less.

    9V battery = plenty of LED brightness
    7.8V battery = less LED brightness.

    My idea was to monitor the voltage level of the battery within the PIC and then have an adjustable PWM ' maxceiling' to suit, therefore....

    Fresh 9V battery = PWM value of 220 *max*
    7.8V battery = PWM value of 255.

    In other words I get the PIC to regulate the 'effective' voltage as presented to all the common anodes based on the battery voltage its monitoring.
    Last edited by HankMcSpank; - 23rd March 2011 at 09:34.

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