Page 1 of 1

Help really Needed

Posted: Wed Feb 08, 2012 9:03 am
by az1987
Hey guys,
I need some help with a small project I'm doing.
I have a radio receiver hooked up to a serial port and have it
streaming on a web page. I need to create a spectrum plot which will
show the given frequency strength.

I have the chart all ready i just need a way to extract the data from the radio so it goes onto the graph. Anyone know how to do this ?

Also for the chart i will be using google charts

Re: Help really Needed

Posted: Wed Feb 08, 2012 9:14 am
by Eric!
You need to run an FFT on the data to get power versus frequency. Then take that data and plot it. You'll need some kind of Javascript solution to feed this data continuously in real time. I think google charts are all static...not sure.

Re: Help really Needed

Posted: Wed Feb 08, 2012 9:21 am
by az1987
Someone on the google chart community did this for me.
http://jsfiddle.net/uTAjq/

If i could use that to get to work with it, that would be great

Re: Help really Needed

Posted: Wed Feb 08, 2012 9:27 am
by Eric!
Is your data in time, voltage?

I still don't think that chart will stream data in real time, but I can help you with the data. This class will do the FFT calculation to convert time and voltage to frequency and power
http://www.phpclasses.org/package/6193- ... -data.html

Re: Help really Needed

Posted: Wed Feb 08, 2012 9:38 am
by az1987
Its in frequency and strength

Re: Help really Needed

Posted: Wed Feb 08, 2012 10:13 am
by az1987
I've just asked about, and according to them.
Assuming you can get a real-time data stream from your server, yes, you can have the chart update in real-time.

Re: Help really Needed

Posted: Wed Feb 08, 2012 5:32 pm
by Eric!
Then all you have to do is provide the data to your chart from your server using whatever connection method/format google chart needs. You're probably going to have to figure that one out on your own or ask the chart group how the chart fetches the data.

Re: Help really Needed

Posted: Wed Feb 08, 2012 5:37 pm
by az1987
So how do i get this FFT to work then?

Re: Help really Needed

Posted: Fri Feb 10, 2012 7:46 am
by Eric!
If your data is already in power vs frequency you don't need to run the FFT. The FFT is a numerical technique used to convert a amplitude vs time sequence to a power vs frequency sequence. I wrongly assumed that's where you were having problems. I don't know what issue you have now it seems like a the pieces are solved and you just need to put them together.