Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Sine Wave peak to peak value detector.

Status
Not open for further replies.

unexpert

Newbie level 5
Joined
Aug 10, 2010
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,337
Sine Wave

I input a function generator to my board so that I could get a sine wave.
However, the problem is, I need to program my board in such a way that it could detect the peak-peak value and display it on the LCD screen.

How do I go about doing this?
By the way, I'm using PIC18F2620.

I've done some reading where I need to include pwm and stuff but that didn't help much.

Hope someone here could give me some help.

Thank You.
 

Sine Wave

If you want to detect the peak value of a sine wave you can either use an analogue peak detect circuit and read that with an ADC in the PIC, or digitise the sine wave as quickly as possible in the PIC and look for the maximum value. Whether that will work depends on the PIC ADC maximum sample rate and the frequency and amplitude of the sine wave.

Keith.
 

Sine Wave

If the waveform is known to be a sine, you don't actually need a Vpp measurement. You also can calculate Vpp from averaged rectified value or Vrms.
 

Sine Wave

measuring Vpp is not that difficult. it is probably easier not to assume the incoming waveform to be sine.

most likely, you will need to scale the input and then level shift it. After that, it is simply continuously adc'g the input waveform, and finding out the highest / lowest voltage in a rolling window.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top