Randys Bench

A repository for projects past and present

Leave a comment

A Side of Python – Addendum

I thought I’d add some additional information on the PyDSA python-based spectrum analyzer discussed in the previous post. I thought it might be interesting to bring out the double conversion SW receiver I had boxed up to see how well the receiver’s VFO frequency (metering) matched up with PyDSA’s readings as well as the MC3356 SA’s display. Below shows the (still not enclosed ) receiver below:

For this experiment I’ll be using a DIY magnetic near field probe as well as a 3T pickup coil for the measurements which are then coupled to the Rigol DSO / MC3356 SA. These will be used near the VFO and the 2nd IF coils, but not so close as to pull the frequency too much. The initial tests picking up the VFO oscillations showed a rather limited effect as witnessed by the frequency counter readings. The DIY probes are shown below. Pretty simple builds using bits and pieces from the bins:

So first I looked at the receiver’s VFO coil region with the pickup loop. The VFO was set to a frequency of 20MHz: Here’s what the Rigol DS1054z showed:

VFO coil: 10MHz / Div


Detail: 20MHz VFO setting – 400KHz / Div


2nd IF Stage coil: 10MHz / Div


2nd IF Stage coil: 5MHz / Div Mag Field Probe

Next, using the PyDSA program and the Rigol DSO as the RF front end I re-visited similar measurements of the receiver’s HF coil’s…

SW VFO low end 16.3MHz input


SW VFO high end 23.8MHz input


SW 2nd Mixer coil low end 16.3MHz VFO freq / 10.7MHz IF frequency

Note: 1st spike is the 10.7MHz IF


SW 2nd Mixer coil high end 23.8MHz VFO freq / 10.7MHz IF frequency

The results indicate descent correlation between methods used for the experiments attempted. I plan at some point to expand the testing at a future point as well as get the receiver boxed up…we’ll see how that goes!

73 Randy


Leave a comment

The MC3356 Spectrum Analyzer…and a side of Python

Well I’d like to report I’ve made significant progress on enclosing the MC3356-based Spectrum analyzer but in fact I’ve accomplished little to this point. I managed to get a suitable module arrangement that will work with the chosen box (it’s really a bit small but, it’s what I have).


Secondly I made a quick pass on a front panel template (below).

But my attention wondered a bit when I ran across a post concerning a Python-based spectrum analyzer (PyDSA) which uses a Rigol DSO as a digitizing front end which feeds a data acquisition software based system. The program code was originally written for use with a Rigol DS1102 model but revisited in order to accommodate a DS1054Z scopes programming requirements.
Original Python project link:

You’ll find this PyDSA.py file in the distribution download located here:

My familiarity with Python was pretty much zero (and still is) when I began to setup the python environment on my Win7 x64 machine. Fortunately the process was straight forward enough to get things going after a little on-line reading. But, there was definitely some glitches along the way. Getting one of the program’s dependencies installed proved to be a challenge that lasted for a few days of frustration. PyVisa 1.4 simply would not install no matter what I tried. I was ready to give up on this till I made a slight change in the programs .cfg file which amazingly worked…don’t know why.

Below is a scan using the antenna that came with the RTL-SDR I bought a few years ago covering 0Hz to 200MHz. Evident is the FM radio band (88-108MHz) at center of plot:

Next is a scan of the 1MHz output from my square wave generator out to 50MHz:

Below is a plot from the MC3356 SA with a 500KHz square wave input:

Below is a plot from PyDSA with the same 500KHz square wave input:

If you’re not interested in loading Python and it’s dependencies below is a link to a windows executable which contains a few enhancements. Just run PyDSA exe from within the directory structure provided:


In my case there’s a caveat…I was unable to to get the auto-scan to function properly whether I tried the PyDSA .py file or the compiled version. I think it must have to do with my Rigol DS1054z DSO and it’s firmware rev…don’t know for sure. So your mileage may vary. It does however work well in single scan mode. If you have any questions leave a comment. Happy to help.

One other thing…If you’re not aware of Fran Blanche’s YouTube channel and Podcast I highly recommend you take a look. She works on many interesting projects and has a refreshing take on science and electronics…

See you soon…Randy

Leave a comment

The MC3356 Spectrum Analyzer…time for a proper box

While our house moving is ongoing I’ve still a few things which haven’t been boxed up yet (and a few I’ve unboxed…don’t tell my Wife please!). A few of the bits & bobs I’ve uncovered recently are the MC3356 Spectrum analyzer boards and it’s intended enclosure. Time to do something about it I’m thinking.

But first, Let’s see if the SA fared well enough after being relegated to storage for a while.

Getting things hooked up again it would seem all is well but needs a calibration re-visit. Looking at the VCO ramp linearity the breakpoint adjustment was a bit off.

VCO Breakpoint final adjust


Below, once the ramp breakpoint is optimised and the sweep cal pot tweeked, we find a spectral range quite near a maximum of 80MHz…not bad:

10MHz square 10MHz/Div

Next a detail of the previous plot harmonic shape charactor:

The linearity is not quite where it needs be on above plots but I think could be coerced a bit closer with a few more iterations of pot adjustments as they tend to interact with each other. Possibly it could use a few more breakpoint additions to the circuit to compensate for the inherent nonlinearities of varactor tuning…not really an issue. It is after all, a simple spectrum Analyzer. Speaking of issues, I may have reported in an earlier post that my implementation of zero span on the sweep/video card assembly did not work at all. I re-visited that circuit a few days ago and came up with a better, working solution. I added an additional switch position on the span (MHz/Div) rotary switch with a connection to circuit common. This is illustrated below (Rev C):

Find a larger version of the schematic above HERE


Along with this change I would recommend using a multi-turn pot for the center frequency adjustment R31. If not you might want to add back in the fine frequency control which I had previously removed. Here’s an additional plot of the 10MHz sine output from a previous project, the RF sweeper…The zero spur is located at the far left (normal for a superheterodyne SA and good for a calibration point).

So beyond some additional testing It’s about ready for a good boxing….oh I’m still thinking about the audio out feature…See you next time


Leave a comment

The Rev. George Dobbs, G3RJV Silent Key

From http://www.arrl.org:


The founder of the GQRP Club and Amateur Radio author the Rev. George Dobbs, G3RJV, of Littleborough, England, died on March 11. He was 75. Dobbs was reported to have
been in ill health for some time and had been living in a care facility, where his condition deteriorated quite rapidly over the past few days. He was the honorary
secretary of the GQRP Club (G5LOW), which he founded in 1974 to cater to those interested in low-power Amateur Radio communication. Dobbs served as the editor for the club’s quarterly, SPRAT. Dobbs was the author of QRP Basics, The International QRP Collection (co-authored with Steve Telenius-Lowe, 9M6DXX), and Making a Transistor Radio.
He was a frequent Hamvention® attendee, and in 2015, he received the Hamvention “Technical Excellence Award.”

Thanks to Lee Boulineau, KX4TT

RIP George…

Leave a comment

A Few Fall Project Updates

A brief update covering some ongoing projects…

The compact stellar spectrograph (LRCSS) has been coming along nicely. I needed to cut a slot in one of the M42 extenders to accomidate the imaging lens focusing adjustment. Turned out OK although not my finest metal work…Here’s a few current images of what I’ve got.

In a future post I’ll capture a few additional photos of the spectrograph construction that I neglected to provide above.
Next I decided against doing a part 2 of the RSpec spectroscopy software review. Turns out, at least on my current Win7 machine, the needed DirectX drivers (for the ZWO camera) did work but not terribly well. The software video controls are a bit simplistic for my tastes. I think I prefer using Sharpcap for acquiring astro images and video captures. For $15US one gets the additional polar alignment feature as well as dark frame subtraction during live captures and live histogram views. It works well, although doesn’t provide the live spectral profile view which is nice. I’m back to VSpec (freeware) I’ve used in the past for spectral analysis along with a relatively newish program called BASS.
What’s next…Oh I assembled a rather simple illuminated cross hair for the right angle 35mm finder I recently put together to make finder viewing a bit less of a yoga exercise and more of a comfortable experience. And it does!

Next I purchased a new clock drive for the imaging mount. This being an Orion EQ-1M crystal controlled single-axis (RA only) sidereal rate drive. Arrived the other day. The issue with this particular drive for my mount is that it’s made for one of Orion’s EQ mounts with a 100 teeth RA gear as opposed to my own mount’s 144 teeth gear. This I was aware of from my research and doesn’t present a difficult one. It means that the new drive will run a bit slower in drive rate when using my present system (~ 2/3rd the speed .The crystal in place is a 3.58MHz variety and needs to be replaced by ideally a 5.12Mhz component. I have in my bins some 5.068Mhz crystals which will get me pretty close till I locate an ideal replacement part…

And I think that’s my short story for today…thanks for looking

Leave a comment

Compact Solar Spectrograph with RSpec Part1

As mentioned in the last post I’ve begun an evaluation of the trial version of Tom Field’s RSpec spectroscopy software. Since the target hardware, the Lowres compact stellar spectrograph is far from completion I’ll use the solar spectrograph as the source for the evaluation process. The 1st thing I ran across was that the camera (ZWO) I’m using requires a DirectX capable driver installed for video capture. No worries there. I download and installed the driver and it promptly crashed RSpec when selecting the camera. I noticed that after installing the driver the installation included a simple app (USB CAMERA)to test the camera using the above DirectX video mode. This worked correctly and I saved a test AVI. Going back to RSpec and reopening the camera dialog and everything worked well. Good, it needs to do this reliably. Next I imported an image file previously recorded with Sharpcap. This is a Neon calibration bulb spectrogram capture recorded with the CSS in the 1st order (~1.5 Ang/pixel) shown below:

RSpec, as part of it’s core functionality, includes both spectral references as well as prominent spectral lines of various elements. Neon is included in the element list (other elements may be added easily if needed). I ended up using, to accomplish a simple 2-point calibration, an annotated neon spectral profile found online below:

One could also use the built-in element lines to calibrated the target spectrum but as I’m a newbie to the RSpec software package I deemed this a reasonable place to start. Actually the application includes a 3-point non-linear calibration procedure which I believe would be the better choice. As it is I used the above profile for the 2-point calibration and results of which are shown below:

Included in the above profile is the superposition of the Neon elements data file. The correlation is quite good with the exception of the extremes. This is probably due to lens aberration / non-linearity’s present in the spectrograph. The 3-point calibration would have helped here. Since the early 2000’s I’ve used a Spectrum simulator called Spectrum written and offered by Richard Gray. Link to the program and documentation is here. The program will synthesize (in my case the solar spectrum) any portion from UV to IR at a high resolution and is capable of smoothing out it’s output data file to match the resolution of your own spectrograph. The nice thing is RSpec is capable of reading directly the synthetic data output and display it as a profile graph along with a color/BW spectral image. The data files can be saved within RSpec as a reference and used for comparison(s). Below is the Spectrum program running under Windows:

Here’s a spectrogram I recently captured using Sharpcap of a portion of the solar spectrum covering the Sodium doublet to the Magnesium triplet (~ 515.4 to 591.25 nmeters).

Next we have the imported spectrum and both the calibrated acquired spectrum (red) and it’s Spectrum application reference data file (blue) overlayed in the profile window:

Next we need to correct the acquired spectra profile for spectral response of the instrument.This response is calculated by dividing the acquired spectrum by the library spectrum. (in this case the G5V library file)

Here we’ve added (blue) the data file from our Spectrum prgm. simulation run and smoothed to our instrument resolution:

And lastly a 2nd detail of our calibrated spectrum vs. simulated spectra:

Next time I’ll give RSpec’s built in video input capabilities a go and see if we can capture live spectra of our nearest star.