Transistor Affecting Timings?


Closed Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Transistor Affecting Timings?

    Not sure what "out of sync" means either. I doubt the transistors are causing much of a problem and the original idea/suggestion was to ensure that the transistors were driven hard enough to light the LED's. A schmatic/drawing would help if possible. Just an idea, maybe using "HPWM" to set your frequency might help? Perhaps even a combination of "HPWM" and "pause"? Yes I was talking about using 2 transistors. My guess is that you are placing your LED's on the emitter side of the transistors and not the collector?

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,651


    Did you find this post helpful? Yes | No

    Default Re: Transistor Affecting Timings?

    Hi, Ramius

    I see 25 pf as emitter capacitance ... ( see datasheet - Philips p.5 )

    Also have a look to the used components for the switching time tests ...

    Your comments ???

    Now ... your delays are quite long ... could you tell what make you call them " false " ???


    But looking at your program closer ... The false delays are obvious - but for some µs only @ each loop ...

    do not shoot your transistor, but your program lines ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Transistor Affecting Timings?

    Alain - are you posing your questions to me or to Ramius? This thread was started by me so I don't know what you mean by 'false'. The PAUSEs (approx. 1.5 secs while LED is high, 0.5 secs while low) are the whole point of the circuit - I'm using a PIC to create blinking lights which match an existing model.

    Here's the schematic:



    Both PICs are programmed with the same code. For about a minute or so after connecting the power, they both blink their LEDs at the same time but slowly get out of sync (one starts flashing before the other) after about 1.5 minutes. Since I'm trying to create EXACT on/off timings, it looks like if I use a transistor (which I need to do as this circuit will light 4 white LEDs) then I have to do this by trial and error rather than relying on the values in the PAUSE command.

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: Transistor Affecting Timings?

    Here's a video which shows how the two LEDs start off in sync (first 10s) and then gradually go out of sync (last 10s - clip has been edited for length)


  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Transistor Affecting Timings?

    Those look like ceramic resonators. (?) The ceramic resonators aren't that accurate and I bet that the actual frequency differes ever so slightly between the two so your timing drifts. Capacitance in the breadboard may also have an effect on tha actual frequency.

    If you really need to keep them in sync then I'd suggest driving both PICs from one oscillator or sync them thru one of the spare I/O's but I suspect that's not physically possible (?). Next suggestion is to use crystals instead of resonators, moving on from there there's almost no end to how much you want to spend to be accurate - temperature compensated?, oven controlled?, rubidium? - you name it.

    /Henrik.

    EDIT: I looked at a couple of resonators and they had a frequency tollerance of +/-0.5% typically. If you're unlucky and get one at +0.5 and the other at -0.5 (very unlikely but still) the difference between the two is 1%. Your 1000ms delay becomes 995ms on one and 1005ms on the other.
    Last edited by HenrikOlsson; - 19th April 2012 at 06:24.

  6. #6
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    191


    Did you find this post helpful? Yes | No

    Default Re: Transistor Affecting Timings?

    I agree with Henrik, that syncing PIC's is the easiest way to proceed.
    If you use internal 4MHz OSC in master PIC and set GP4 pin to provide Fosc/4 out, then your system will be in sync. Rest of the PIC's will use master PIC clock as reference.

    Two totally independent systems are always out of sync, already from the beginning. Difference might be small at the beginning, but....
    Last edited by Gusse; - 19th April 2012 at 07:48.

  7. #7
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Transistor Affecting Timings?

    Quote Originally Posted by RossWaddell View Post
    Here's a video which shows how the two LEDs start off in sync (first 10s) and then gradually go out of sync
    It should be easy to prove to yourself it has nothing to do with the transistor - make the second circuit exactly like the first and observe how EXACTLY the same loss of sync happens.
    Having 2 unrelated free running oscillators stay in sync is not a reasonable expectation. (Oscillators 101)

  8. #8
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: Transistor Affecting Timings?

    It can be EASY to check the OUT OF SYNC problem by having ONLY 1 of the PIC's with a resonator running and use the OSC output from the one running the resonator connected to the OSC input of one with out a resonator. There by both PIC's will be running at the EXACT same frequency. Unless there is some difference in the code running on each PIC they should not fall out of sync.
    Dave Purola,
    N8NTA
    EN82fn

  9. #9
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,651


    Did you find this post helpful? Yes | No

    Default Re: Transistor Affecting Timings?

    Hi,

    We also could raise scheme 1 ( unbuffered led ) will produce little heat inside the pic chip... then somewhat disturbing the oscillator ...

    .6v loss ( typ. ) @ 10 mA = 6mW ... @135°C / Watt = 1°C !

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  10. #10
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: Transistor Affecting Timings?

    RossWaddell,

    Why don't you use a 16F or 18F PIC series with an internal oscillator. Also, you can drive the 4 LEDs from 4 different ports without transistors. Or with Vcc=5V you can even drive two LEDs per port without a resistor (the PIC has an internal resistance).

    You can also try the same timming experiment that you did above with a 16F or 18F PIC, using the internal oscillator, to see what happens.

    Robert
    Last edited by rsocor01; - 19th April 2012 at 15:01.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

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