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.
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.
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.
Last edited by RussMartin; - 5th September 2007 at 23:10.
Russ
N0EVC, xWB6ONT, xWN6ONT
"Easy to use" is easy to say.
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 )
![]()
Thanks,
Johan
Last edited by Johan; - 6th September 2007 at 02:57.
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.
Charge the capacitor via a constant current source. This will give you a linear curve.
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?
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.
Bookmarks