Have you connected your CT as shown in your first post? That is, the bottom to 2.5V (or VRef/2) and the top to input pin AND - VERY IMPORTANT - a load resistor shown as 33ohms in diagram? You must...
It can't work wired the way you described. The ac signal must be biased by vcc/2 and be less than vcc peak to peak.
If the serial baud rate is too low it will ruin the sample rate.
If the burden...
Why do want a nasty old analogue peak detector, When you can create a digital one as per my code ?
Using the very cct you posted.
If you realy need to try analogue google ""peak detector circuit"...
Published on - 31st May 2010 18:24
Number of Views: 14251
Since this question has come up again, I thought I'd throw this module out to the masses. It is something I worked on a while back, with DT's help. Amid life's other priorities, it got put on the shelf to collect dust.
The basic idea is that by adding the module as an INCLUDE and inserting a couple of commands inside your code, you can have the PIC send timing data to your PC via the hardware serial port. It's made for 18F PICs (although some 16Fs may work too). You also need a timer that is not being used for anything else.
1) Instructions are included, as well as a small example.
2) It worked well for me, and as I recall, DT in testing.
3) Use it however you want.
4) I won't be able to offer much support, but figure there are enough knowledgeable folks around here that can help those who need it.
Re: YHDC current sensor - the theory please
adjust resister to for the mid current used incase of some nonlinearity... shotkey diode has .3 volt drop
amgen - 2nd December 2025, 01:1710016