Help me on RC circuit


Closed Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2007
    Posts
    56

    Default Help me on RC circuit

    Hi !,

    I am designing simple RC circuit.
    how to get most linear charge/discharge output ?

    My RC circuit has a 10k resistor and 47uF capacitor, it seem the output is not linear

    If I change the R to 1k and the C to 470 K, according to rule, I will get the same charge/discharge time, but will the output become more linear?

    Thanks

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Are you talking of a 10K pot? If so is it a linear or audio?

    If the PIC you are using has ADC you may want to look at it.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Exclamation

    If you are referring to a simple RC circuit, neither the charge nor the discharge curve will change.

    Both sets of values you give yield a time constant of 470 milliseconds. It takes one time constant to charge the capacitor to about 63 percent of the voltage applied or to discharge the capacitor to about 37 percent; and it takes five time constants to fully charge or discharge the capacitor.

    Changing values will not affect the shapes of the charge and discharge curves:

    <IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1967&d=1189029501">

    How are you using the RC circuit? What are you trying to do?

    Both curves are most nearly "linear" (but still not perfect) for the first 20 percent.
    Attached Images Attached Images  
    Last edited by RussMartin; - 5th September 2007 at 23:10.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  4. #4
    Join Date
    Jun 2007
    Posts
    56


    Did you find this post helpful? Yes | No

    Default

    Thanks guys,

    RussMartin: Yes , this is exactly my problem, I want the curve to be as linear as possible.

    I am tring to make a ramp . Any suggestion how to flatten the curve ( from red to yellow dot lines )

    Name:  RC2.gif
Views: 582
Size:  109.1 KB

    Thanks,

    Johan
    Last edited by Johan; - 6th September 2007 at 02:57.

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    What are you trying to accomplish in the long run? There might be a better solution than RC.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default

    Charge the capacitor via a constant current source. This will give you a linear curve.

  7. #7
    Join Date
    Jun 2007
    Posts
    56


    Did you find this post helpful? Yes | No

    Smile

    Mack: I am welcoming any other solution
    The circuit is to dampen sudden voltage changes of a potentiometer ( voltage divider ), what important is the linearity of the output


    Jerson: could you please tell me how to make constant current charging schematic that suit my need?
    Attached Images Attached Images  

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    I really cannot understand what will be the difference if the charge/discharge will be linear or exponential relative to the pot circuit. As long as the pot is at a position the capacitor will charge and stay at that charge. A new pot position will give little or more change at the output but then again it will stabilize at the new level.

    A current source will charge the capacitor linearly (Q=C*V, Q=I*t, t=C*V/I).

    But as is your example, I don't know how it can be accomplished or what the result would be. The Current source will charge the capacitor and then will stop function because there will be no current to flow untill you will change the pot to a higher level. For a lower level a second curent source would be needed to discharge.

    Ioannis
    Last edited by Ioannis; - 6th September 2007 at 07:56.

  9. #9
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Does the voltage on pin#3 in your drawing change or is the change only from the pot position?
    Either way a ADC looks like the way to go. The capacitor in your drawing will serve to "dampen" any voltage change (in its range) making Vout smooth.

    If you have not used ADC before, take a look here.
    http://www.rentron.com/PICX2.htm
    http://www.rentron.com/PicBasic/LM34.htm
    http://www.rentron.com/serial.htm

    If you are expecting large spikes you would set up the voltage divider so that the maximum voltage in would still be a maximum of 5 volts out of the divider.

    The ADC is linear. With an 8 bit setup, 0 volts will read 0, 2.5 volts will read 127 and 5 volts will read 255. 10 bit will have a 1024 step range.

    If the voltage is never more than 5, say 3 volts. The reference voltage can be set for this and you will still have full scale.
    Dave
    Always wear safety glasses while programming.

  10. #10
    Join Date
    Jun 2007
    Posts
    56


    Did you find this post helpful? Yes | No

    Default

    Thanks for your responses

    Well , this is not a simple circuit indeed. I have found the explanation about it on Nutsvolt , February 2007,p20

    Thanks again

Similar Threads

  1. Circuit Design Question
    By bradb in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 11th August 2009, 08:18
  2. Short circuit portection circuit ?
    By iugmoh in forum Schematics
    Replies: 1
    Last Post: - 21st December 2008, 21:33
  3. Basic PIC circuit acting weird
    By FIONEX in forum General
    Replies: 3
    Last Post: - 9th October 2008, 01:04
  4. Circuit reliability issues
    By hkpatrice in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd November 2007, 14:55
  5. Replies: 3
    Last Post: - 29th October 2006, 09:16

Members who have read this thread : 1

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