LED "capacitance" won't get lower


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Lower the "RC time" is the aim

    Well,

    I see we all have been reading and viewing the same documents and medias already.

    I've tried this with lots of different LEDs (IR, simple colored red/ambre/green/yellow/blue/white, 7seg and even a bicolor one) and they ALL work. Of course, I get different results but it works always.

    Since the way to "measure" the LED with a PIC is to calculate it's discharging time (state change), to make it work fast, I want to REDUCE the "RC time".

    So, if now I'm counting around 4000 counts (see post #1) until the LED goes from state "1" to state "0", I want to speed-up things with lowering this value and make it become something around 100.

    How can I reach this?

    Depending on the surrounding luminosity, the scanning/counting process can vary from a few milliseconds to seconds.

    As mentionned in lots of articles, the surrounding luminosity affects tremendously the discharge time of the LED and compensation is mandatory.

    In my mind, the only way to compensate the longer discharging time due to surrounding darkness is to reduce the voltage applied to the LEDs.

    Is there another way?
    Roger

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,134


    Did you find this post helpful? Yes | No

    Default

    Since the discharge is performed by the PIC itself, I don't see a way to speed the process unless you connect an external Transistor in parallel with the LED. A mosfet perhaps. But that will complicate the things...

    Ioannis

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Let's focus on the issue

    Okay; I probably ask the wrong question. Let me formulate another way.

    If I recall well, the electrical law for capacitors is: Q = U x C = I x t

    Where:
    Q is the Load (Coulomb) - in french, la charge
    U is the Voltage
    C is the capacity (Farad)
    I is the intensity (Amps)
    t is the time (second)

    A.- Is it correct/acceptable to apply this law to LEDs?

    B.- Am I right to think that if I change the charging voltage of the LED, I'm going to modifiy its Load?
    Roger

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex View Post
    A.- Is it correct/acceptable to apply this law to LEDs?

    B.- Am I right to think that if I change the charging voltage of the LED, I'm going to modifiy its Load?
    1- I don't know if it so much applies to LEDs as it applies to the interjunction capacitance of a diode, so, yes, by definition, it does apply to LEDs.

    2- If you change the charging voltage to the LED, I would think all you'd really change is the point at which the voltage dropping from the LED would trip the PICs pin input from logic high to logic low...(one setup charges to 5v, take awhile to drop to logic 0, other setup only charges to 3v, doesn't take near as long to drop to logic 0).

    Why do you want to 'speed up' the discharge process?
    What end result AREN'T you getting now that you really want?

    Just trying to get a handle on what you're after...

  5. #5
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default what am I wanting to do

    Okay skimask,

    I'll try to explain clearly what I'm doing - or trying to achieve.

    I have three 7seg-LEDs (three "digits") connected to a 16F88 @ 20MHz and I want them to act as buttons as well.

    These three 7seg-LEDs display random numbers whithout any decimal point so I use this Dot-Point as the sensor for each 7seg-display.

    I couldn't find exactly in your code how you compensated the effect of the surrouding luminosity but you have surely noticed that, in a dark environment, the discharge time of the LEDs raises drastically.

    Thus, the "scanning time" until the "darkest" (or "pressed") LED is detected can be quite long. In my experience, it can take over a second.

    My idea is to compensate the surrounding darkness by dropping the LED's Dot-Point voltage and hence, reduce the charging/discharging cycle.

    Currently, for testing, I'm working with three digits but my final project would have ten digits (key-pad) so the time to analyse which button is pressed is important.

    Voilą. Hope this helps for understanding...

    It's far too amazing so I can't give-up now; got the same kick as you
    Roger

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex View Post
    I have three 7seg-LEDs (three "digits") connected to a 16F88 @ 20MHz and I want them to act as buttons as well.
    I'm wondering if the case of the 7 segment displays isn't killing your light input, ya know, the covering over the segments themselves...

    I couldn't find exactly in your code how you compensated the effect of the surrouding luminosity
    I just kept scanning the LEDs, keeping track of the highest and lowest result every returned. Just for arguments sake, let's say the highest result I've gotten is 500. The next time I scan, the highest result is 498, I might subtract 1 from my last known highest result. Same thing for the lowest result. I don't rely on absolute numbers. I keep track of the range of inputs, recheck the inputs, see if the same input is the highest more than once, then select the most probable out of the bunch.

    My idea is to compensate the surrounding darkness by dropping the LED's Dot-Point voltage and hence, reduce the charging/discharging cycle.
    I wonder if going the other direction, lighting it up a bit more would be better.
    And it is a neat little thing to play with...
    All in all, I think it's the 7 segment display itself that's going to cause you problems.

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,134


    Did you find this post helpful? Yes | No

    Default

    I have not yet dealed with this kind of touch sensors but have an idea for flotulopex: Use all 7 segments, or at least some of them, to measure the ambient light instead of the dot only. I think you will get more reliable data.

    When I have the time I'd love to experiment on this.

    Ioannis

Similar Threads

  1. Single digit 7 Seg LED clock - PIC16F88
    By thirsty in forum Code Examples
    Replies: 4
    Last Post: - 17th July 2009, 08:42
  2. new and need help
    By smeghead in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd November 2008, 20:19
  3. For next loop using: Led var Byte
    By quester in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th March 2008, 10:16
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. can't even flash an LED
    By bruno333 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 28th April 2005, 13:27

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