Spectrum analyser project |
Please note: Work in progress |
The idea: To make an on-line satellite spectrum analyser which is able to point to various satellites.
In order to connect to the internet I needed a server. The only one I have here is an old SparcStation10. Advantages: Easy to program, gcc complier works well and reliable. Can work php and perl also if needed.
Because it would be much easier to physically interface with a PC (using National Instruments a/d and digital i/o board) and a plug in GPIB board I seriously considered using a PC but I was not happy to even contemplate using Microsoft software in a server and learning how to set up Linux with the interface boards was an unknown. I decided to use the SUN machine and the programs to be in C since that was the only way to get the SUN GPIB board to work.
Problems to be solved:
1. Getting a GPIB board to connect the HP8560A to the SUN. Obtained a SBUS GPIB board via Ebay. (about 15 years old)
2. Getting software drivers for SUN SBUS GPIB board. From National Instruments (note only in C code)
3. Writing software to produce a gif file. Use gd software package. (see credits below)
4. Writing C software. Use gcc to generate a cgi file to deliver the gif file in response to http request.
5. Writing software to respond to web page requests. Note return of web page html text not used, the program return a gif image only. (see credits below)
6. Sending messages to the motor, to the LNB (hi/low volts and 22kHz tone) and reading analogue antenna position: Used SUN serial port B and ByVac BV4113 stepper motor controller.
Progress report 28th March 2007:
The SparcStation10 is working well with Solaris 9, and I have developed C program software that will convert 601 measurement values into a gif image (see example below).
I have obtained an S-BUS GPIB interface board ( National Instruments NI SB-GPIB ) via eBay that is now physically installed in the SparcStation10
Problem: I have a more recent, and incompatible, software package NIpcigpib. I need to downgrade the software NI-488.2 to SB-GPIB or GPIB/TNT. I think it is called NICsbgpib.
Example outputs so far:
| This first spectrum analyser image is a
601 x 601 pixel gif file. It incorporates two colours: grey = gdImageColorAllocate(im, 128, 128, 128); There is a white line plotted from top left to bottom right and graticule graticule lines drawn up/down and across. /* draw test line from top left to lower right */ |
![]() |
| This second spectrum analyser image gets
rid of the experimental lines above and now incorporates some useful
spectrum analyser screen graticule lines, shown in green. green = gdImageColorAllocate(im, 0, 255, 0); Thse are plotted using c code like: /* plot graticule line down */ /* plot graticule lines across */ In addition a spectrum analyser plot is shown (in white) comprising some test data numbers in an array of 601 elements. the majority of the numbers in the array are 293. Note that they are plotted with larger numbers downwards. I will have to fix this later. If you leave an array variable undefined in C it comes out as anything and the image is a load of white spikes.
|
![]() |
22 April 2007: Today managed to get the serial interface B on the SPARC to talk to the BV4113 stepper motor controller. First managed to do it with Hyper-terminal then with c program commands: Set up of serial port is
fd = open(sPortName, O_RDWR | O_NOCTTY | O_NDELAY);
my_termios.c_cflag = B9600 | CS8 |CREAD | CLOCAL | HUPCL | CSTOPB;
my_termios.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL | ISIG);
Connected up 12 volt supply for motor in differential mode and tested the following commands.
MA1 motor start moving left
MA2 motor start moving right
MA0 motor stop
Tried and tested Ok running it to the limit switches each way.
Attached 10k potentiometer to output and read the position 0 - 1023 in text initially, then in two hex bytes which makes it easier to put into an int value.
Program developed so as to send short run bursts in either direction.
Problems with non-linearity of potentiometer, so ordered a replacement high quality 2k pot.
13 May 2007 mounted dish in garden with manual motor control.
15 May first operation with computer control. Colin obtained first full spectrum image remotely via web site page.
17 May. Changed antenna position input data format from two bytes binary to variable number of ASCII characters. The binary input occasionally contained break characters
Credits and copyright statements relating to the gd
software subroutines:Credits and license termsIn order to resolve any possible confusion regarding the authorship of gd, the following copyright statement covers all of the authors who have required such a statement. If you are aware of any oversights in this copyright notice, please contact Thomas Boutell who will be pleased to correct them. COPYRIGHT STATEMENT FOLLOWS THIS LINE
END OF COPYRIGHT STATEMENT More details here: http://www.boutell.com/gd/ |
Credits and License Termscgic can be used free of charge, provided that a credit notice is provided online. Alternatively, a nonexclusive Commercial License can be purchased, which grants the right to use cgic without a public credit notice. Thanks are due to Robert Gustavsson, Ken Holervich, Bob Nestor, Jon Ribbens, Thomas Strangert, Wu Yongwei, and other CGIC users who have corresponded over the years. Although the implementation of multipart/form-data file upload support in CGIC 2.x is my own, I particularly wish to thank those who submitted their own implementations of this feature. More details here: http://www.boutell.com/cgic/ |
29 May 2007: Increased the centre frequency resolution to 1 kHz step size. Needed extensive char character to long integer conversion work doing. Added the possibility of a software frequency adjust parameter in 1 kHz steps. Note accuracy is still about +/- 1 MHz due to DRO type LNB. Initial estimates are that displayed signals have freq error of +950 kHz.
30 May 2007: Dismantled the garden mounted antenna.
31 May 2007: Removed 2m band beam off pole at end of house and attached the antenna instead. It was a major job requiring the use of a rope to lift up the antenna end and of the pole. Looks hopeful. Will have to resolve clearances with a TV antenna. Re-terminated outdoor end of cables and sealed up the angle potentiometer. Motor drive, potentiometer and coaxial cables will be much shorter eventually.
Started 25 Feb 2007, amended 17 May 2007 Eric Johnston. Copyright Satellite Signals Ltd, 2007 All rights reserved.