I want to grab TV Tuner Raw Samples for implementing FM receiver.
I need to have mechanism to Tune desired frequency and then grab Samples of that frequency, in this case it would be IF samples and then implement FM receiver over it.
I have already seen various examples at codeproject but they are not working on raw samples instead getting decoded data for video and audio.
Can any one tell me how to do this under windows. Programming language could be c, c++, C# or VB?
For analog decoding, you need to apply Kalman filters to extract the actual data from the signal/noise. Usually, this is done with C or C++ code. Java would work as well; however, since this is highly performance sensitive, VB would not be recommended, and C# would be equivalent (IMO) to Java. Personally, I'd use C/C++ as appropriate to deal with this.
Let me get this straight. You want to demodulate IF signals digitally from a Windows PC? Isn't this sort of insane? IF signals are usually around 20 to 100 MHz in frequency, depending on application, meaning that your analog-digital converter would have to run at about an order of magnitude faster (0.1 to 1 GHz). Such an ADC unit, as a raw chip (SMD), would probably retail for about 300$, and as a proper PCIe board (and well insulated for EMI), would be a few thousands. Your typical TV Tuner will have a clock in the 16 to 32 MHz range, and does most of its filtering and demodulation before ADC occurs. What you can do, is adjust the TV tuner's filtering and demod (that's called "tuning"), and stream the data directly from the ADC sampling to your PC for further processing (e.g., AM, FM, PM, CDMA, etc.). I imagine this is what you want to do. And this is called a Software Defined Radio.
Then, you should look at the GNU Radio which is a C++/Python library and front-end program to create SDRs and play around with that, and it can do lots of DSP. Also, look at this work on rooting TV tuners and re-purposing them as cheap SDR RF-hardware and having fun montoring all sorts of signals (as long as you go the right antenna and LNB module), like aircraft signals and satellite downlinks.
Personally, I'd use C/C++ as appropriate to deal with this.
I think that's good. I wouldn't go any "higher" for this, except maybe for the some high-level Python scripts. Pretty much what the GNU Radio project does.
For analog decoding, you need to apply Kalman filters to extract the actual data from the signal/noise.
I've never heard of an analog Kalman filter. Can you elaborate? There are tons of different kinds of analog filters (beyond the classic 1st or 2nd order low-pass / high-pass / band-pass / notch filters). And, of course, Wiener filters and Kalman filters are widely used in digital processing, but they would be pretty hard to implement in analog systems, and AFAIK, they don't exist. I doubt that you can design an analog circuit that solves an algebraic Riccati equation.
Mike you are right i want to implement SDR from ADC samples. But still unable to find Windows API or library to get ADC samples directly for processing. I have Gadmei UTV382 usb tv tuner and it's nor supported by GNU Radio or any other SDR application i have seen many opensource SDR applications but they don't support it. Majority of SDR applications support RealTek chipset. Do You have any idea how to do it in my case ? is there any generic library that can be used here for capturing ADc samples?
From what I understand, making an SDR out of a TV tuner relies on two things. First, the electronics on the TV tuner chip must be wide enough (in bandwidth) to be interesting, meaning that its RF filtering front-end must be reasonably wide, and the DSP chip must be fairly fast. This is kind of guaranteed by virtue of the fact that a TV tuner needs this kind of speed and front-end filtering to be able to tune to a wide array of TV signals. Second, the DSP chip on the TV tuner must be hackable, and reasonably rich in functionality too. I believe that the RealTek chipsets are more popular for that exact reason, although I'm no expert in this. These are things that can vary a lot between manufacturers:
- The operating system running on the DSP chip, if any at all. This is usually a micro-Linux system, with varying degrees of usability (i.e., how "reduced" the environment is, as it can often reside somewhere between micro-Debian release and a barebone custom Linux build of a few MB in size). But it might very well be that there is no operating system at all, just a flashed program, in which case the protocol to communicate to it will usually be proprietary and would need to be reversed engineered by lots of poking and probing on xterm.
- The availability of options in the DSP filtering implementations. Some manufacturers might just flash a fixed simple DSP program with virtually no options besides what you need to tune different channels. Others might use a feature-rich DSP program and simply use a fixed set of settings, which you can hack-away and thus expose a rich DSP program to do some upstream filtering or simply forward raw samples at some tunable baseband.
- Whether there are any protections that will make it hard to "get in" the chip. If you're lucky (as is the case with RealTek chips), a shell is exposed from the USB interface itself (and if there's a password, well, that's another little road-block, but easily overcome). On the other hand, it might be a bit harder than that (e.g. open it up and find a UART / TTL / JTAG interface to tap into), but rarely impossible, because manufacturers generally want to keep some way to get into the chip (debugging, repairing, diagnosis, etc.).
This all depends on the choices that the manufacturers took in their product. Today, with inexpensive hardware, more often then not, I think the manufacturers go down the route of a feature-rich chip, a micro-Linux distro, an easy to access and familiar shell accessible from the USB interface, and merely disabling / enabling features in software (for different product lines). I know that this is certainly what I would do if I were to build chips like those. And I think this is what RealTek does and probably many others. The fact is, what makes life easier for the engineers building / testing / maintaining the products is also what makes them easier to hack / re-purpose / re-program. So, the it might be possible that your specific card is hackable. But, if you can't find code that works for it, you'll have to write it yourself (and that's what it's all about after all! What's the fun in hacking if you just pick off-the-shelf instructions and code?). Seek out the online SDR enthusiast, and see if you can figure out how to reproduce the hacking steps for your hardware (or just go buy a realtek one), they'll probably be better equipped to give you detailed info on how to go about it (I don't know enough about this to really help, I just know embedded stuff and some basic tele-com knowledge, but I don't know much about SDRs, per se).
My USB TV Tuner (chinese made, gadmei utv382) has XCEIW XC4100ACQ tuner and SUNS AV600 Chip (DSP chip), i dont know what this DSP chip is clone of because it's chinese chip. Tools for Realtek don't recognize it as they would do for Realtek. I don't know if this chip offers shell for interfacing. I am also working on Windows 7.0 so having getting trouble sorting things out. Trying hard to hack it.
I think i have to write driver myself, but datasheet of dsp chip suns av600 is not available on internet. Maybe sniffing usb messages/protocol between vendor TV Tuner Software and USB Device is the solution, but that way i could get only decoded data (video+audio), as commands would be meant for Decoded signals and not for I Q samples that i require. Any ideas on getting Raw I Q samples this way? And any freeware usb sniffer?
Have you had any luck with this