Python program that uses the BG7 network analyser which is available from a number of ebay sellers (such as here ). What the actual name of the device is, isn't that clear - but appears to be BG7TBL, with some technical details here
As I have no Windows machines, I needed some other way to use it. I looked at the code that was posted here, but that always crashed when I ran it (I think because I was getting more zeros than it expected). So I wrote my own program to talk to the device that:
- has a guiqwt graphics front end around it
- does mean and max hold
- can zoom and scroll around
- can rescan to the current bounds of the frequency axis
- has a progress bar to show the data transfer from the device
Its early days for the program - I'm sure there are a whole bunch of bugs and missing features. And not having any real documentation about the device doesn't help!
I have done some timings from the device and it appears to send output at around 4.2ms/sample. This means a 6,000 sample sweep will take ~25seconds (6000 * 0.0042). The time per sample doesn't seem to change with centre frequency, number of samples or bandwidth.
This is a screenshot of attaching an antenna to the input and looking at the local DAB transmitter:
And this is the view of FM stereo broadcast stations:
It looks like commands of are the form: 0x8f <command> <arguments>
, where command is:
Command | Description | Arguments | Returns |
---|---|---|---|
x | Receive in log (power) mode | "%09d%08d%04d", frequency, stepSize, numSamples |
Data |
w | Receive in linear (power) mode | "%09d%08d%04d", frequency, stepSize, numSamples |
Data |
f | CW frequency transmission | "%09d", frequency |
None |
v | Get firmware version | No argumens | Byte |
r | Set attenuation level | 2 bytes | None |
m/n | ??? | ??? | ??? |
s | Get the status | No arguments | Version/atten/??? |
e | Frequency correction | ??? | None |
frequency
and stepSize
are in 10Hz steps (i.e. 1000000Hz would be represented by 1000000/10 = 100000).
T.B.D.
These are all available in Debian (and also Python(x,y) for Windows) - fedora users will have to install the first two packages themselves (I believe).
- Look at calibration (tx & rx?)
- Easy way to save data to disk (numpy arrays and screenshots).
- Allow access to an database of known bands (so in my DAB example above, my GUI would have the ability to annotate the DAB channels (11D, 12B & 12D) in my plot).
- Move the GUI toolkit from guiqwt/guidata as they do not appear to be maintained any more.
- Allow better use of GUI with touchscreen - I'm thinking RPi2/BBB with a small touchscreen on it would be a cool bit of test equipment.
Better label of frequency axis (i.e. mega, giga) - as 220MHz is much easier than 2.2e8!- Figure out way the y-axis units are - prolly part of (1)
- Improve GUI to allow easy selection of centre frequency.
- Fix bugs....
- Better error handling (eg. when it can't open the serial port)
- Platform independent way to select a serial port
- Remember settings (frequency, bandwidth, max hold, etc) from last use.