|
Homebrew Equipment A place to show, design and discuss the weird and wonderful electronic creations from the hands of individual members. |
|
Thread Tools |
26th Oct 2006, 2:42 pm | #1 |
Retired Dormant Member
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
|
PC/VGA Card as Wobbulator
Hi,
A rough and ready explanation of how I see this being done. We set up the X display on a Linux system for a somewhat strange resolution and pixel clock. This is nothing new, I've been doing a lot of that recently. Then write a small program which generates an "image" to "display". The "image" consists of the following: On the red channel, we have lines consisting of the RF frequency we wish to produce. On the green channel, we have lines consisting of a steadily incremented number, used to drive the X input of the 'scope to sweep horizontally. On the blue channel, we could use that for marker pulses, but I have a cunning idea, read on... The values for each colour are 8-bit, we have a range of 0-255 where 0 gives 0V and 255 gives 0.7V on the video outputs. This is a bit coarse but I think it's good enough, there'll be harmonics of the pixel clock frequency present but that could be kept high and we could apply dither as well. Thus we won't get a swept frequency output, more a lot of fixed steps. If the sweep output is fed through an LPF we'd get a smooth sweep. I think I have an idea for increasing the number of steps as well if this is done. Also the LPF capacitor could be discharged quickly with the vertical sync pulse ensuring rapid flyback. Now, for markers. If we make several consecutive lines of the "image" contain a fixed frequency where we want a marker, and hold the sweep voltage, the trace on the 'scope will pause here, causing a brighter point on the trace. So instead of the sweep being a sawtooth, we get a sawtooth with steps, the steps being where we want a marker. Example - imagine an image consisting of lines of, say, 4096 pixels each. We want to sweep from 10.5MHz to 10.9MHz, 200kHz either side of 10.7MHz at the centre with markers at 10.6MHz and 10.8MHz. The first line contains an 8-bit 10.5MHz sine wave on the red channel and zero on the green. The last line contains 10.9MHz (R) and 255 (G) respectively. In the middle, we pause and have 10 lines of 10.7MHz (R) and 127 (G). We also have 10 lines of 10.6MHz (R) and 64 (G) before this, and 10 lines of 10.8MHz (R)and 191 (G) after this in the appropriate places. I doubt it'll work out quite like that but it serves as an illustration. Right now I'm more-or-less "thinking out loud" and typing it. Next I need to look at the various limitations on pixel clock, line length, frame length and so on and work it out for real. Then work out an X modeline and write a program to generate the "image" containing the RF and sweep data. Regards, Kat Last edited by Kat Manton; 26th Oct 2006 at 4:45 pm. Reason: Typo |
26th Oct 2006, 3:01 pm | #2 |
Retired Dormant Member
Join Date: Dec 2003
Location: North London, UK.
Posts: 6,168
|
Re: PC/VGA Card as Wobbulator
That kind of vertical sweep, where each successive scan line has an increasingly high frequency is a good idea. It has been used for video applications where a frequency sweep across the screen generates a rate of change of frequency that is too high for measuring filters with sharp cutoff. Not entirely happy about the blanking intervals when using it for an RF sweep.
The fact that the sweep is actually discrete steps does not matter at all. Even my HP network analyser does it like that. Up to 401 of them across the screen. Provided the rate of change of frequency is high enough to get past any AC coupling in the DUT and low enough not to falsify any filter responses then there's no problem. For ordinary radio work this allows a very wide margin. If you were checking a CW filter on a communications receiver it would be rather more critical. I don't think we'll need more than a minimal LPF. The dot clock frequency can be a lot higher than the output sweep unless we are trying to align FM front ends. We will definitely need an attenuator since 700mV is far too much for most jobs. An attenuator will also help with VSWR on the test leads. The return loss of many VGA cards isn't too good though it won't cause significant errors in the narrow band applications we are looking at. |
26th Oct 2006, 3:59 pm | #3 | |
Retired Dormant Member
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
|
Re: PC/VGA Card as Wobbulator
Hi Jeffrey,
Quote:
Edit: Just had a look with the 'scope, no h-sync pulses but there does seem to be a slight discontinuity at the end of every line. It's possible that this is just down to what's on the screen by default. I shall do further testing with an all-white bitmap of exactly the right size. If nothing else, it looks like the blanking interval can be made small. Regards, Kat Last edited by Kat Manton; 26th Oct 2006 at 4:18 pm. |
|
26th Oct 2006, 4:29 pm | #4 |
Retired Dormant Member
Join Date: Dec 2003
Location: North London, UK.
Posts: 6,168
|
Re: PC/VGA Card as Wobbulator
I don't think a small glitch at each H interval will matter. A few microseconds of blanking wouldn't be good, partly because of spurious frequency components but also because it represents an overall DC bias. I know we will AC couple the output but it will cause the waveform to sit offset from zero.
|
26th Oct 2006, 5:52 pm | #5 |
Retired Dormant Member
Join Date: Mar 2003
Location: Bishop's Waltham, Hants, UK.
Posts: 939
|
Re: PC/VGA Card as Wobbulator
As a rule of thumb, 50Hz is a good sweep rate (if it was good enough for Rohde & Schwarz, it's good enough for me!), it is a good compromise between being slow enough to give accurate results, and fast enough to display on a standard scope.
Marker pips occur when a fixed frequency beats with the swept frequency, which gives the characteristc shape. The pips spread if the sweep frequency is to high, or if the is residual modulation on the marker frequency. Jim. |
26th Oct 2006, 6:15 pm | #6 |
Retired Dormant Member
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
|
Re: PC/VGA Card as Wobbulator
Hi Jim,
Well, 50Hz is also a pretty good frame rate for a video card and shouldn't prove too taxing. As for the marker pips, I think I've come up with an interesting way to generate markers; as I'm "drawing" the waveform with a bit of code there's no real difficulty in pausing the sweep at points where we want markers; this should cause a brighter dot along the trace. It should serve the required purpose. Regards, Kat |
26th Oct 2006, 8:16 pm | #7 |
Retired Dormant Member
Join Date: Mar 2003
Location: Bishop's Waltham, Hants, UK.
Posts: 939
|
Re: PC/VGA Card as Wobbulator
The only problem I see with this approach is keeping the general PC generated hash out of the receiver - you may have to have the PC a long way from teh set under test.
Jim. |
26th Oct 2006, 8:28 pm | #8 |
Retired Dormant Member
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
|
Re: PC/VGA Card as Wobbulator
Hi Jim,
I'm suspecting it won't be the perfect replacement for a real one, but working on the theory that a crude and noisy wobbulator is better than no wobbulator at all, I'll be giving this a go. (Most likely it'll be next week before I start throwing code together for this as tomorrow I'm out all day and the weekend's occupied.) It's also an interesting and easy way into DDS, relevant to certain other projects. Regards, Kat |
26th Oct 2006, 9:40 pm | #9 |
Dekatron
Join Date: Sep 2005
Location: Seaford, East Sussex, UK.
Posts: 5,997
|
Re: PC/VGA Card as Wobbulator
Hi Kat, this is mainly a question so I can understand what's going on but could be a problem! My rough calculations show the RGB data rate on my PC screen set on highest resolution is about 75Mhz. Does this mean you will only have 7.5 points/cycle on the 10Mhz sine wave?
|
26th Oct 2006, 10:26 pm | #10 |
Retired Dormant Member
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
|
Re: PC/VGA Card as Wobbulator
Hi,
The nVidia FX5200 (the card I experiment the most with) will go faster than that; 350MHz is the maximum if memory serves. Newer cards will run at 400-450MHz, possibly higher. My main workstation monitor upstairs (20" Silicon Graphics, 1600 x 1200) is currently running with a pixel clock of about 163MHz, though the monitor will accept higher. Modern cards have pretty fast DACs on them, hence the ideas floating around for using them for odd things other than video. Actually, 7.5 points per cycle would be enough. Think about Compact Disc; sample rate is 44.1kHz, frequency response up to 22kHz... Just needs an LPF to take the harmonics off... Regards, Kat Last edited by Kat Manton; 26th Oct 2006 at 10:36 pm. |
26th Oct 2006, 11:21 pm | #11 |
Dekatron
Join Date: Sep 2005
Location: Seaford, East Sussex, UK.
Posts: 5,997
|
Re: PC/VGA Card as Wobbulator
Glad to see it is me being dumb!
|
27th Oct 2006, 10:05 pm | #12 | |
Retired Dormant Member
Join Date: Dec 2003
Location: North London, UK.
Posts: 6,168
|
Re: PC/VGA Card as Wobbulator
Quote:
Audio DACs put all the complexity in a digital oversampling filter which makes the analogue filter requirement quite minimal. The DACs on a PC video card have no oversampling and minimal low pass filtering. This doesn't matter if you are driving a monitor but can be important if you are making a wobbulator or other signal generator. |
|
10th Jan 2007, 3:57 pm | #13 |
Retired Dormant Member
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,700
|
Re: PC/VGA Card as Wobbulator
Hi,
A progress report on this... there's been no progress... I think I'm going to get the recently-acquired Tektronix 585 working first, then return to this. I think a decent 'scope could come in handy. But, I've not abandoned this idea as it seems promising. Cheers, Kat |