Rules | Recent posts | topic RSS | Search | Register  | Log in

Sampling

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing
Author Message
km



Joined: 26 May 2004
Posts: 32


Post22 Jun 2004 10:37   Sampling

How to make a system takes 128 samples for an analogue waveform Question
Back to top
tryagain



Joined: 14 Jun 2002
Posts: 9


Post22 Jun 2004 13:50   Re: Sampling

Can you offer more detail imformation?
Back to top
clivechen



Joined: 29 May 2004
Posts: 65


Post23 Jun 2004 11:32   Sampling

do you want sorce code or the hardware!?
Back to top
lamom



Joined: 23 Jun 2004
Posts: 13


Post23 Jun 2004 13:01   Sampling

yo man, u first have to know the period between each sample. and, what is your system mean???
Back to top
pimr



Joined: 19 May 2004
Posts: 81
Helped: 6
Location: India


Post23 Jun 2004 13:22   Re: Sampling

hi
first of all determine the highest frequency of the ur analogue wave u may use cro.
once u know the frequency u can choose adc with sampling period greater than twice the highest frequency and take samples of it.if u want to take 128 samples u have to adjust samplng frequency accordingly.
hope this helps
pimr
Back to top
panda



Joined: 29 Jan 2004
Posts: 41


Post23 Jun 2004 13:25   Sampling

yes. what is sampling frequency? what is the bandwidth of input signal? what is your system?
your question is very not clear.
Back to top
km



Joined: 26 May 2004
Posts: 32


Post23 Jun 2004 19:08   Re: Sampling

Hi, sorry for not giving more information in my question Embarassed

The purpose of my project is to design, built and test a low-cost electronic system that will analyze the characteristic of analogue waveforms. It must able to measure the frequency, mean value, rms value, peak-to-peak voltage and duty cycle of an analogue waveform.The processed results can be displayed on a LCD screen. The electronic system will be implemented primarily through the use of an analogue circuitry (that will make sure the input voltage falls between 0 to 5V), a 8-bit A/D converter (TLC548), a PIC16F628 micro-controller (I cannot use a built-in ADC PIC), and a LCD Alphanumeric 20 X 4.
Arrow
My project is going to measure these values for an analogue waveforms 50/60Hz mains. The number of 8-bit samples that I need to take is 128 because 256 is not enough to store in the PIC 16F628. My question is how to make my system take 128 samples from the analogue waveform Question

I also facing problems in writing the code for my project(assembly language). Can somebody guide me to write the code for frequency, peak-to-peak, average, and duty cycle measurement of an analogue waveform?

Thank You Wink
Back to top
DarkJedi



Joined: 25 May 2004
Posts: 145
Helped: 9
Location: Lima, Perú


Post24 Jun 2004 3:28   Re: Sampling

mmmmm, kinda a digital osciloscope, i think i've seen that somewhere over here....

Well, if you want to sample a waveform, u can use a sammple and hold ciruit, is not hard to buil, u can use mosfet transistors and copacitors to make it, check this pdf paper.

DOwnload it here or check it on the web:

http://www.eecg.toronto.edu/~kphang/papers/2001/jwong_SH.pdf



Sorry, but you need login in to view this attachment

Back to top
km



Joined: 26 May 2004
Posts: 32


Post24 Jun 2004 19:20   Re: Sampling

The ADC (TLC548) already has a built-in sample and hold!.
Back to top
DarkJedi



Joined: 25 May 2004
Posts: 145
Helped: 9
Location: Lima, Perú


Post25 Jun 2004 3:16   Re: Sampling

Here is what i think, looking at the datasheet of the ADC, there is a chip select pin that sincronises de digital data, put in that pin a frecuency you want generated by the PIC, of course u have to take in consideration the sincronisation with the rest of the circuitery, and then simply count 128 raising edges of falling edges of the chip select pin to get the exactly 128 samples u want, after the samples are taken the chip select pin remains high.....

Does it sounds good?
Back to top
asit



Joined: 22 Mar 2002
Posts: 94
Helped: 3
Location: India


Post25 Jun 2004 7:47   Sampling

You first have to make a zero cross detector, as you may want to start sampling at zaro-crossing.
Back to top
km



Joined: 26 May 2004
Posts: 32


Post26 Jun 2004 1:59   Re: Sampling

What you mean by a zero cross detector? Question Where do I need to put this zero cross detector at?
Back to top
asit



Joined: 22 Mar 2002
Posts: 94
Helped: 3
Location: India


Post26 Jun 2004 8:03   Sampling

As you want to capture only 128 samples, you may want to start the sampling at the zero-crossing to capture the complete cycle. I can be a stand-alone circuite generating an interrupt at ZC, so you can start sampling. Or, you can make a program to look for ZC ( start of the cycle) and start writing the values in the array when ZC is detected in software.

As you need to sample mains, which is repeatative, I suggest you to visit http://users.cableaz.com/~cappels/dproj/wfc/wfc.html

look for Minimum Mass Waveform Capture for a simple solution for high resolution (but slow) technique.

Good Luck!
Back to top
km



Joined: 26 May 2004
Posts: 32


Post27 Jun 2004 15:55   Re: Sampling

For the " Minimum Mass Waveform Capture ", do I need my ADC as well? If yes, how should I connect the zero cross detector in my project? Before the ADC OR after the ADC? Idea
Back to top
km



Joined: 26 May 2004
Posts: 32


Post27 Jun 2004 16:21   Re: Sampling

DarkJedi wrote:
Here is what i think, looking at the datasheet of the ADC, there is a chip select pin that sincronises de digital data, put in that pin a frecuency you want generated by the PIC, of course u have to take in consideration the sincronisation with the rest of the circuitery, and then simply count 128 raising edges of falling edges of the chip select pin to get the exactly 128 samples u want, after the samples are taken the chip select pin remains high.....


I'm not quite understand what you have said. Sad hmm.. The frequency that I have to put to the chip select pin - Is it the 50Hz mains? What you mean by "take in consideration the sincronisation with the rest of the circuitery"? Can you explain more details to get 128 samples?

PS: Sorry for my poor understanding. Sad
Back to top
hichen



Joined: 06 Jan 2004
Posts: 14


Post08 Jul 2004 8:33   Re: Sampling

You need to know the signal 's frequency.
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap