From: Jim Thompson on
On Sun, 01 Aug 2010 13:03:53 -0700, John Larkin
<jjlarkin(a)highNOTlandTHIStechnologyPART.com> wrote:

>On Sun, 1 Aug 2010 18:11:31 GMT, hal(a)nospam.com wrote:
>
>><snip>
>>
>>On 1-Aug-2010, Jim Thompson
>><To-Email-Use-The-Envelope-Icon(a)On-My-Web-Site.com> wrote:
>>
>>> >You don't really need an accurate current source, just a fairly stable
>>> >one. Dump the current into a reference resistor (you need one of those
>>> >anyhow) and measure it, then use the same current on your cap.
>>> >
>>> [snip]
>>>
>>> Larkin misses the Early-effect/channel-length-modulation errors as the
>>> voltage changes.
>>
>>What would the magnitude of these errors be? Enough to matter?
>>
>>Hal
>
>He's babbling, as usual. The mosfet current source I posted has zero
>errors from those effects.
>
>John

Stepping into it again? Your loop will need a much wider bandwidth
than the ramp rate to counter channel-length modulation... thus I
doubt 0.1%.

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

Spice is like a sports car...
Performance only as good as the person behind the wheel.
From: Jim Thompson on
On Sun, 01 Aug 2010 13:03:53 -0700, John Larkin
<jjlarkin(a)highNOTlandTHIStechnologyPART.com> wrote:

>On Sun, 1 Aug 2010 18:11:31 GMT, hal(a)nospam.com wrote:
>
>><snip>
>>
>>On 1-Aug-2010, Jim Thompson
>><To-Email-Use-The-Envelope-Icon(a)On-My-Web-Site.com> wrote:
>>
>>> >You don't really need an accurate current source, just a fairly stable
>>> >one. Dump the current into a reference resistor (you need one of those
>>> >anyhow) and measure it, then use the same current on your cap.
>>> >
>>> [snip]
>>>
>>> Larkin misses the Early-effect/channel-length-modulation errors as the
>>> voltage changes.
>>
>>What would the magnitude of these errors be? Enough to matter?
>>
>>Hal
>
>He's babbling, as usual. The mosfet current source I posted has zero
>errors from those effects.
>
>John

I don't babble, but you definitely bloviate :-)

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

Spice is like a sports car...
Performance only as good as the person behind the wheel.
From: Jim Thompson on
On Sun, 1 Aug 2010 11:27:29 -0700 (PDT), john1987
<conphiloso(a)hotmail.com> wrote:

>On Jul 30, 6:41�pm, Jim Thompson <To-Email-Use-The-Envelope-I...(a)On-My-
>Web-Site.com> wrote:
>> On Fri, 30 Jul 2010 14:28:46 -0700 (PDT), john1987
>>
>>
>>
>>
>>
>>
>>
>> <conphil...(a)hotmail.com> wrote:
>> >On Jul 30, 5:16�pm, Jim Thompson <To-Email-Use-The-Envelope-I...(a)On-My-
>> >Web-Site.com> wrote:
>> >> On Fri, 30 Jul 2010 14:07:46 -0700 (PDT), john1987
>>
>> >> <conphil...(a)hotmail.com> wrote:
>> >> >Hi,
>>
>> >> >200pF and 82 ohm resistor gives me approximately 9 Mhz frequency and
>> >> >its a high pass filter. SO, does it mean that filter will pass all the
>> >> >frequncies less than 9MHz.
>>
>> >> >Thanks
>> >> >John
>>
>> >> Stop snipping content and look at my drawing.
>>
>> >> � � � � � � � � � � � � � � � � � � � � ...Jim Thompson
>> [snip]
>>
>> >Hi,
>>
>> >I looked at your drawing and also simulated in pspice. Why did you go
>> >for the High pass filter? I tried 220pF and 7.6KOhm. Is HPF more
>> >accurate than LPF?
>>
>> Why did you try 7.6K Ohm when I said 82 Ohms?
>>
>> It's a differentiator, so you place it much higher in frequency than
>> the signal.
>>
>>
>>
>> >The positive peak voltage is + 1 volts and negative peak voltage is -
>> >1 volts. So, 2 volts peak to peak.
>>
>> >I do not know how accurate should be the measured voltage. It would be
>> >desirable to have it as little as possible.
>>
>> Doesn't matter for differentiator. �We're looking for sign change
>> (slope, at the input peak) with the comparator.
>>
>>
>>
>> >when said and done, I will read the voltage into the ADC and read the
>> >numbers and try to monitor the voltage across the resistor.
>>
>> >Thanks
>>
>> >John
>>
>> You said you wanted a transition... as you drew it.
>>
>> Do you want the peak voltage?
>>
>> What is it you want?
>>
>> � � � � � � � � � � � � � � � � � � � � ...Jim Thompson
[snip]
>>
>> - Show quoted text -
>
>Hi,
>
>I am attaching two new drawings to show what I want. I do not know
>about accuracy but i would as say as much as accurate as possible.
>
>First link is as follows
>http://img828.imageshack.us/i/scan0001j.jpg/
>
>Second link is as follows
>
>http://img299.imageshack.us/i/scan0002db.jpg/
>
>I want to sample the peak value of the sine wave by using ADC
>(sampling rate 200ksps). I want to sample the peak value of the sine
>wave at the rising edge or the falling edge of the square wave that
>you can see in the diagram. The edges will trigger the ADC and ADC
>will sample that edge. The ADC can not sample the negative values as
>shown in the diagram. I did not mention the circuitry that can add
>offset to the input signal and make it all positive.
>
>The questions are
>
>1. Is there any way other than RC circuit to get the peak sample of
>the sine wave at the rising and falling edge?
>2. Whats the difference between in this case between using the High
>pass and low pass filter?
>3. How a PLL can help in this case?
>4. Any advice about choosing the right ADC?
>5. I tested the suggested high pass filter using the 220pF and 7.6kOhm
>resistor and found that the edge is occuring at the right spot in
>pspice than the low pass filter.
>
>Thanks
>John
>

My differentiator finds the peaks. You can use that to trigger the
sampler of the ADC, or use the count-up/count-down scheme that John
Fields demonstrated.

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

Spice is like a sports car...
Performance only as good as the person behind the wheel.
From: Jamie on
john1987 wrote:

> On Jul 30, 6:41 pm, Jim Thompson <To-Email-Use-The-Envelope-I...(a)On-My-
> Web-Site.com> wrote:
>
>>On Fri, 30 Jul 2010 14:28:46 -0700 (PDT), john1987
>>
>>
>>
>>
>>
>>
>>
>><conphil...(a)hotmail.com> wrote:
>>
>>>On Jul 30, 5:16 pm, Jim Thompson <To-Email-Use-The-Envelope-I...(a)On-My-
>>>Web-Site.com> wrote:
>>>
>>>>On Fri, 30 Jul 2010 14:07:46 -0700 (PDT), john1987
>>
>>>><conphil...(a)hotmail.com> wrote:
>>>>
>>>>>Hi,
>>
>>>>>200pF and 82 ohm resistor gives me approximately 9 Mhz frequency and
>>>>>its a high pass filter. SO, does it mean that filter will pass all the
>>>>>frequncies less than 9MHz.
>>
>>>>>Thanks
>>>>>John
>>
>>>>Stop snipping content and look at my drawing.
>>
>>>> ...Jim Thompson
>>
>>[snip]
>>
>>
>>>Hi,
>>
>>>I looked at your drawing and also simulated in pspice. Why did you go
>>>for the High pass filter? I tried 220pF and 7.6KOhm. Is HPF more
>>>accurate than LPF?
>>
>>Why did you try 7.6K Ohm when I said 82 Ohms?
>>
>>It's a differentiator, so you place it much higher in frequency than
>>the signal.
>>
>>
>>
>>
>>>The positive peak voltage is + 1 volts and negative peak voltage is -
>>>1 volts. So, 2 volts peak to peak.
>>
>>>I do not know how accurate should be the measured voltage. It would be
>>>desirable to have it as little as possible.
>>
>>Doesn't matter for differentiator. We're looking for sign change
>>(slope, at the input peak) with the comparator.
>>
>>
>>
>>
>>>when said and done, I will read the voltage into the ADC and read the
>>>numbers and try to monitor the voltage across the resistor.
>>
>>>Thanks
>>
>>>John
>>
>>You said you wanted a transition... as you drew it.
>>
>>Do you want the peak voltage?
>>
>>What is it you want?
>>
>> ...Jim Thompson
>>--
>>| James E.Thompson, CTO | mens |
>>| Analog Innovations, Inc. | et |
>>| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
>>| Phoenix, Arizona 85048 Skype: Contacts Only | |
>>| Voice:(480)460-2350begin_of_the_skype_highlighting (480)460-2350 end_of_the_skype_highlighting Fax: Available upon request | Brass Rat |
>>| E-mail Icon athttp://www.analog-innovations.com| 1962 |
>>
>> Spice is like a sports car...
>> Performance only as good as the person behind the wheel.- Hide quoted text -
>>
>>- Show quoted text -
>
>
> Hi,
>
> I am attaching two new drawings to show what I want. I do not know
> about accuracy but i would as say as much as accurate as possible.
>
> First link is as follows
> http://img828.imageshack.us/i/scan0001j.jpg/
>
> Second link is as follows
>
> http://img299.imageshack.us/i/scan0002db.jpg/
>
> I want to sample the peak value of the sine wave by using ADC
> (sampling rate 200ksps). I want to sample the peak value of the sine
> wave at the rising edge or the falling edge of the square wave that
> you can see in the diagram. The edges will trigger the ADC and ADC
> will sample that edge. The ADC can not sample the negative values as
> shown in the diagram. I did not mention the circuitry that can add
> offset to the input signal and make it all positive.
>
> The questions are
>
> 1. Is there any way other than RC circuit to get the peak sample of
> the sine wave at the rising and falling edge?
> 2. Whats the difference between in this case between using the High
> pass and low pass filter?
> 3. How a PLL can help in this case?
> 4. Any advice about choosing the right ADC?
> 5. I tested the suggested high pass filter using the 220pF and 7.6kOhm
> resistor and found that the edge is occuring at the right spot in
> pspice than the low pass filter.
>
> Thanks
> John
>
>
If you are already employing a ADC, then I assume you are using some
sort of uC unit? That being the case, you simply use +/- slope
detection while monitoring the ADC value in a high speed sample rate.

All one needs to do is first use the base line values to determine the
direction of the slope, set a flag and when that direction changes or
remains the same as the last reading, you take the last reading and
average with the current reading.. that should give you a close value
to work with.

If you are not working with uC's, then why the ADC ?. One could use
the square wave results of what every one has suggested to you thus far
and employ edge triggering, that will operate a sample and hold circuit
to record the peak voltage, one circuit for each polarity via the +/-
transitions of the square wave. These value at some point can then be
used to drive other functions.

Seems like an eliminatory circuit me. Did something similar years ago
using 4066's and FET input op amps for sample and hold to drive a ADC
in the joy stick port of a Commodore 64 to receive weather FAX.

Oh well.


Don't pay no mind to me, I'm just a poor inbred person from Maine,
where every one is related.

Jamie.


From: Grant on
On Sun, 01 Aug 2010 09:17:59 -0700, Jim Thompson <To-Email-Use-The-Envelope-Icon(a)On-My-Web-Site.com> wrote:

>On Sun, 1 Aug 2010 16:00:54 GMT, hal(a)nospam.com wrote:
>
>>
>>On 1-Aug-2010, Jim Thompson
>><To-Email-Use-The-Envelope-Icon(a)On-My-Web-Site.com> wrote:
....
>>> Are you not deluding yourself that you know "constant-current" to 0.1%
>>> accuracy?
>>
>>Probably so - hence my request for suggestions. I suppose that I should
>>have emphasized that this is not only something that I do for enjoyment, but
>>to _learn_. As such, I would welcome feedback on not only that I *am* going
>>wrong, but *how* as well.
>
>Yep. A welcome change in SED direction.
>
>Pondering that, it's going to be tricky to make a loop-stabilized
>current source that tracks a slewing capacitor's change in voltage
>(Early-effect or channel-length modulation).

Wish my memory or filing system was better, there's a circuit I saw
that used an opamp to supply fixed voltage offset to an RC to get
linear cap charging. It's related to capacitor multiplier circuits
and ramp generators.

Constant voltage across resistor == constant current into cap over
the working range of the opamps.

But I can't find the thing, does it ring a bell?

Grant.