Electronics > Projects, Designs, and Technical Stuff

Improve bandwith of peak detector

<< < (5/6) > >>

SiliconWizard:

--- Quote from: marcoccio on July 26, 2019, 02:42:53 pm ---
--- Quote from: SiliconWizard on July 24, 2019, 05:32:34 pm ---
--- Quote from: MasterT on July 24, 2019, 04:52:50 pm ---To OP: What is the arm chip? If it has an ADC, may be you don't need peak detector after all, sampling input fast enough by 12-bits ADC and running peak detector in software.

--- End quote ---

Well... you're right. The OP talks about 500kHz max. Many recent MCUs have several-MSPS 12-bit ADCs, so that should be doable in software without much problem.
Now if a 12-bit ADC would not have enough resolution for the OP's needs, then I think they would be dreaming if they think they can get better than the equivalent of 12-bit with a simple, fast and pure analog peak detector...

--- End quote ---

That was my first thought, sadly, analog implementation is as must, teacher's requirement :palm: . We are using an F103C8T6 which has a 14Mhz ADC.. More than enouth to sample a 500Khz signal. If this gets too difficult maybe i can persuade him haha.

--- End quote ---

OK then... Sure a pure analog implementation is more "interesting" here design-wise... not that it's necessarily a good lesson engineering-wise though, as you have another solution that looks much easier to implement. Keep things simple! Ah teachers... ;D

Edit: quick note: the STM32F103C8 doesn't have a "14MHz" ADC... it's a 12-bit, with a max sampling rate of 1MHz. 14MHz is the max ADC's clock frequency, which is not its max sampling rate. Just making things clear. 1MHz should be fine here for a 500kHz signal, but you'd have no margin whatsoever. Just to make things clearer...

Kleinstein:
A fast peak detector would use a much smaller storage cap. Not 100 nF, but more like < 100 pF. If needed for longer hold time a 2 nd slower (larger capacitor and low bias OPs) peak hold stage could be added after the first. This can be useful with the transistor only version from the link (PDF from AD), that should have a tendency to drift down.

Using the LM393 as a high slew rate OP is also tricky, it may work, but there can be ringing. Not all LM393 may behave the same as this is a common chip produced by several sources. Also the bias current limits the storage time or requires large capacitors.  With the LM399, I would not worry much about the diode leakage - especially as the bias is positive, making it drift upwards, which is bad. A slow down drift can actually be a good thing.

The use of a 2 nd diode has nothing to do with having enough current to charge the cap fast, it is about limiting the negative output voltage. This is especially important if a real OP, and not a comparator is used.

I don't know how fast the base to emitter junction actually is, it could be an issue with a slow transistor.
Usually fast recovery diodes also have higher leakage currents - so high speed comes at a price. A BE junction can be a good source for a medium speed (probably not as fast as the 1N4148) low leakage diode.

David Hess:

--- Quote from: MasterT on July 26, 2019, 04:07:20 am ---
--- Quote from: David Hess on July 25, 2019, 11:49:34 pm ---The least expensive commonly available low leakage diode is the gate junction of a 2N4117 which really is tested down to 10 picoamps.  The 2N4117A is tested to 1 picoamp.
--- End quote ---

I've checked on mouser, they have bav170 that has lower price and lower reverse current. Though data "typical" , but tested with high 70 Voltage.

Still if consider max value 5 nA and 2N3904 - 50 nA it's 10 times difference.  Decent OPA has output current 20 mA, bringing into picture 200 mA transistor gets 10x faster charge time, AND 10x faster discharge. So, what is the point to bother with more complex circuits, except impress your professor.
--- End quote ---

The maximum value is the only thing tested.  While the maximum value for a 2N39056 is 50 nanoamps, its typical value is comparable to the BAV170.  In both cases, you have to grade them yourself if you want to be sure.  And unlike the base-emitter junction of a 2N3904, the BAV170 is slow.

The 2N4117 and 2N4117A have tested maximum leakages of 10 picoamps and 1 picoamp respectively.


--- Quote from: marcoccio on July 26, 2019, 02:42:53 pm ---Thank you for the clarification, i tryed this approach and found it works really well.... But (there is always a but :palm:) i have some doubts about the circuit i came up with. Replacing both diodes with bjt's works, however, now at low input voltages (1V) the diference in voltage between the inputs and the feedbak from the output needs to be almost 100mV higher for the LM393 to stop charging the cap and there is always a 50 to 80 mV diference in charged value at 5v, i can live with that even though it's higher than 2% error.
--- End quote ---

The speed is so much better that it now reveals other sources of error.  More advanced peak detectors use various methods to improve accuracy but 2% is a tough specification for any fast peak detector.

marcoccio:
I'm back, after reading this http://www.ti.com/lit/an/snoaa35/snoaa35.pdf application note from TI i changed the desing for the better... I think. Yes the bjt works so much better that it shows a lot of sources of error that previusly one doesn't take into account.  Here is the dessing:



I'm not able to test the circuit today, on monday i will go to my university's lab and try it. I will update my findings.

I think it is a good compromise between speed and accuracy, 2% error wasn't obtainable for me but maybe it will suffice my professor. Here https://1drv.ms/u/s!AifPFXqjPaa5jO0mQEpj4kh6gF_2dg is the multisim file if anyone want's to play with it. The file uses vanilla libraries.

SiliconWizard:
Maybe you could replace the TL061 with an opamp with smaller input offset (and slightly faster?).

Have you characterized your error? Is it mainly a gain or offset error?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod