Monday, 12 August 2013

Receiving Radio Noise

What Are We Receiving?

One of the main aims of this project is to receive noise. Actually what we will be receiving is the energy produced by neutral Hydrogen atoms when its electron changes spin direction. I don't want to get into the science in this blog but I have included a link for those that do ( Wikipedia Hydrogen line info ) but suffice to say that Hydrogen Atoms produce a radio signal on 1420 MHz that we can receive with our Radio Telescope. This is known as the Hl line and can tell us a lot about our Universe.

We don't receive a signal just at 1420 MHz. Instead, because things in our Universe are moving away or towards us, the radio frequency is shifted slightly up or down due to the Doppler Effect much as a siren changes tone as it moves toward or away from us. Some classic Galactic Charts of the Milky Way show a pronounced peak in the frequency when we look at different parts of our Galaxy.

Image courtesy of
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
This Hl chart recorded by Marcus Leech shows the offset from the center frequency of 1420.4058 MHz while centered on Cygnus. Note that the data shown in the chart is averaged over a period of 20 minutes from 40 samples. Marcus uses Gnu-Radio with an SDR receiver. We will have a look at this shortly.

Our Milky Way Galaxy is in the shape of a disk with a super massive black hole at the center. As it has evolved over time, arms have formed in the disk allowing us to see greater density in different parts of the Galaxy. Our Solar System is located in one of the arms so we see different star density in different directions.

The constellation of Cygnus lies in the area of one of the arms that moves toward us resulting in an increase in the frequency of the signal. If we looked elsewhere we might see a corresponding decrease in frequency if that part of the Galaxy was moving away from us.

One of the most exciting discoveries of the 20th Century would have to be Ewen and Purcells reception of the Hydrogen Line emission. Reported in 'Nature' in 1951, the document is worth a read Ewen and Purcell, Nature 1951

Receiving at 1420 MHz.

In a later post I will take us through building the hardware we will be mounting at the focal point of our dish antenna. While we are using a 2.4 Meter mesh dish to receive our neutral hydrogen it must be noted that a smaller dish will work although not as well. The above image from Marcus Leech was obtained through a system using a 90cm solid metal dish. The main difference with bigger dish size is a resulting larger signal peak above the noise.

Noise sources can be external and internal. If we replace our antenna feed with, say, a 50 Ohm resistor at room temperature we see noise in our receiver system plus whatever our resistor produces. This is a good way to get a 'noise figure' for our receiver. Of course each part of our receiver contributes its own little bit to our overall 'internal noise'.

When we connect our feed point antenna to the receiver our noise level should increase. If we point our antenna at the ground we will receive a higher level of noise. This is because warm objects emit radiation. If we then point our antenna at the sky we should see a drop in the level. We should now see a Noise Floor consisting of Internal Receiver Noise + Thermal Noise + Galactic Noise.

The SDR Receiver.

I am building my receiver as a complete modular unit so I can swap out a section if needed. It consists of a horn and cavity made with copper and fiberglass PCB material with a monopole antenna (4.6cm) placed 1/2 wavelength (8.8cm) from the rear of the cavity. Following this is a 28db gain Low Noise Amplifier. This is our first source of unwanted noise. This should contribute only about 0.3db of noise to our overall receiver noise. Any noise created here will get amplified later so its best to have lowest noise figures early on.

The next part of the receiver is a Bandpass Filter tuned to 1420 MHz. This limits unwanted signals on other frequencies getting into our receiver. Loss through the filter should be in the order of 1db and our 3db point is about 150MHz. I have used the microstripline 3 pole design from an article on 1296MHz Bandpass Filter and reduced the striplines slightly for 1420MHz. After this we have a second high gain low noise amplifier with approximately 20db gain and a noise figure of 0.8db.

At this point the received signal enters the SDR. The Software Defined Radio consists of two devices. A radio tuner (this can be an E4000(60MHz to 1700MHz) or R820T(24MHz to 1850MHz)) which does the actual Radio Frequency Tuning and the RTL2832U which converts the RF signal to a digital I/Q signal then serializes it for our USB connection. These are available on Ebay now for around $10.

I have read some reports but yet to run tests and confirm for myself that the SDR has a noise figure of around 3.5 to 3.7db.

The Raspberry Pi.

We need to plug our SDR into something. I'm using a Raspberry Pi computer as the host for our data as well as controlling the frequency of the SDR. In a previous post I have covered the software installed on the Raspberry Pi to interface with the SDR. Essentially the Raspberry Pi works as a server allowing us to connect to it from another computer. This can be a local computer a short distance away or if you have sufficient bandwidth > 2 Mb/s you can connect from the Internet.

Our Raspberry Pi then works like a Data Pump with an IP address we can connect to. We can receive data packets that are digital samples of our RF data that was converted in the SDR receiver. Several different software packages can take this data and process it for us, whether it be SDR# on a Windows computer and present it as a spectrum / waterfall display or more preferably using Linux and Gnu-Radio and the massive advantages of designed block processing models with Gnu Radio Companion (GRC).

GRC - Wideband FM Flow Graph

Gnu Radio - Wideband FM Receiver FFT Plot

Flow graphs can be designed in GRC to use the RTL_TCP block as a remote connected SDR receiver. Your Gnu Radio data processing can then occur on a powerful computer remote from the Dish Antenna and SDR receiver with its Raspberry Pi data pump.

Gnu Radio on Linux Mint

I thought I'd end this post with a quick run through for setting up your own data processing system. After having experimented over the last few months with different configurations I highly recommend Linux Mint as the operating system of choice. Gnu Radio installs and runs extremely smoothly and should have no problem with an SDR receiver as your signal source.

I have a preference for Linux Mint 14 (Nadia with Cinnamon). They do have different desktop interfaces so you might prefer the later Linux Mint 15 'Olivia' with the Xfce desktop. Head over to their website at and pick a version to try out. Its probably best to have a minimum of a Core2Duo processor and at least 2 GB of ram. Make sure you download the right version, either 64bit or 32bit, for your motherboard. Note that the 32bit version will run on 32 or 64bit hardware.

You should see a list of Mirror sites. Download from one closest to you and save the ISO file. Burning the ISO to a disk will depend on your current operating system. If you have Windows 7 you'll probably have a DVD burner program. If not then it might be worthwhile googling how to burn an ISO to a DVD.

Once you have your DVD ready, boot up your computer using the DVD with Linux Mint and go through the Live DVD experience. At the desktop run the Install Mint icon and fingers crossed you should now have installed Mint. Note that you can do a Dual Boot and have Windows 7 and Linux Mint on the one machine if you have the hard drive space. For our purposes though we want this to be our workhorse for analyzing our Radio Astronomy data.

You should now have a working Linux Mint operating system. Its time to set up Gnu Radio. I've seen comments from many people on hundreds of forums that make hard work out of getting Gnu Radio installed and working. By far the best way is to visit Marcus Leech's website at SBRAC and get his script for installing Gnu Radio. The file at is a shell script. You should see text starting with '#!/bin/bash'. Copy and paste the text to a file on your desktop using Gedit or similar text editor and call it ''. Right click the file, select 'Properties' and tick the box to allow the script to execute as a file.

We should now run the shell script. Right click and 'Run' or select 'Open in Terminal'. The script should now start checking for files it needs, downloading source files and compiles the software then installs it. This will take a long time! Be patient. On a slowish computer it could take over an hour.

Once installed you should have a new menu item called GRC. Marcus Leech has written a brilliant Gnu Radio Flow Graph for Radio Astronomy called 'simple_ra.grc' which is anything but 'simple'. It does however provide some really useful tools for Radio Astronomy observation.

Plug in your SDR receiver to a spare USB port and get started playing with Gnu Radio. I have set up a section on my Amateur Radio website at with useful files I've collected including Gnu Radio Flow Graphs that you can plug in to GRC and experiment with your SDR receiver.

My next post should have some interesting build information and photos of the Focal Point receiver hardware.


Robert Arrowsmith.

Wednesday, 10 July 2013

Part Six. Setting up the Dish Controller.

First Look at the Arduino

My Radio Astronomy project is slowly taking shape. The LCD shield for the Arduino Uno controller arrived today. I paid an extra $1.60 for express post from Hong Kong and it was here in three days. Amazing! It did have $28 Hong Kong dollars worth of stamps on it!

Over the last couple of days I've been putting together some preliminary software for the Arduino to communicate with the LCD shield and the L298 motor driver shield. Mostly its 'sample' code that is available for testing shields and makes it quick to run through some ideas I've got for the actual Dish Controller software.

So far it reads the six pushbuttons on the LCD shield and shows on the display which button has been pressed. I'm really pleased with the look of the display backlighting.

The stack of three boards together looks pretty cool although the L298 motor driver shield is covered by the LCD shield which makes it difficult to access the terminals for the motor power wiring. I think it may be best to bring out the wiring from the motor drive shield to a separate terminal block to give easy access for wiring back to the Azimuth and Elevation motors.

Here's a picture of the three boards stacked together. I've obtained a suitable IP66 diecast metal box for the Dish Controller and power supply to be located in. I was a bit concerned about the height of the stack of three boards but it appears there's enough room to mount it with clearance.

Some thought has gone into the power supply for the Dish Controller. I'm not happy using a switchmode power module, tempting as they are. For most people they are an off-the-shelf regulated power box but I suspect the amount of high frequency noise that would be generated by a switchmode box would be unacceptable and no amount of filtering or shielding could minimise it enough.

I've settled for a toroidal power transformer with 2 x 15 volt windings capable of about 1.6 amps each. This fits nicely at one end of the control box and should give adequate current to power the motors. As the L298 motor driver is limited to 2 amps and the Arduino is using Pulse Width Modulation to limit the power to the motors I think this should be sufficient.

The dimensions of the box are Width 146mm, Length 222mm Height 55mm (including the lid).

One of the tasks this box will also be needed for is providing power and junction wiring for the Raspberry Pi and SDR receiver module mounted at the focal point of the dish. A CAT5 network cable will run from our main computer to the Raspberry Pi through this Dish Controller box and a USB cable will run from the Raspberry Pi back to the Arduino as Dish Position commands will be coming from the Raspberry Pi.

I suck at diagrams.

In my next post I should have the power supply built up and providing power. The Arduino should also be doing some basic functions with controlling the Azimuth and Elevation motors.


Rob Arrowsmith.

Saturday, 6 July 2013

Radio Astronomy Station. Part 5.

Steering The Dish

Its been a busy few weeks in the workshop here. Researching hardware design criteria, cutting and drilling metalwork and general putting things together to see how they looked. 

So the next step in my Radio Telescope Station design has revolved around redesigning the mount for the 2.4 meter mesh dish so I can use the linear actuator I had purchased to move the dish from zero to 90 degrees elevation. The original dish mount was designed as a Polar mount with a single actuator to swing across the ecliptic where Geostationary satellites are located. This has meant changing and adding to the original mount to give the actuator full movement from zero to 90 degrees. Not an easy thing to do.

At the same time I've been looking at options to move the dish around horizontally from zero to 360 degrees. It turns out I have an old antenna rotator in my junk box that may be usable so I'm investigating how to drive it with the rest of the hardware I'm building. The big problem is whether the rotator can handle the weight and stress of the dish. I may even change the dish mount hardware to reduce the overall weight.

Using An Arduino

The other work has been centered on the dish controller electronics. In a previous post I'd mentioned about using the excellent and somewhat ubiquitous Arduino microcontroller platform in the form of the Arduino Uno. Designed as a modular platform the main board has two rows of connectors allowing other 'Shields' to be plugged in depending on the project needs.
Arduino Uno

In my case I'm using a Shield with a Motor Driver L298 to control two electric motors, one in the linear actuator for Elevation of the dish and one in a rotator for Azimuth position.

I had ordered two of the Arduino Motor Drive shields from a Hong Kong supplier through Ebay over six weeks ago and after repeated requests to find out where the goods were and why I hadn't received them I eventually had to put in a dispute with Paypal. It was only $20 for two boards but they quickly refunded the amount. If they ever arrive I'm sure I'll be quick to send them back the $20.

Motor Drive Shield
In the meantime, when it looked like the boards wouldn't arrive, I ordered two more from another supplier for $24 total. Not surprisingly they arrived in 9 days. Needless to say, got a five star rating. Buy from them through Ebay, its about 20% cheaper that way.

I've now managed to put together a pin connection chart for the Arduino.

Arduino Ports.

Arduino Ports
PB5/SCLK...13 Elevation Motor Direction
PB4/MISO...12 Azimuth Motor Direction
PB3/MOSI...11 PWMB - Elevation Motor Drive
PB2/SS........10 LCD Display Backlight Control
PB1/OC1.......9 LCD ENABLE
PB0/ICP.........8 LCD SELECT

PD7/AIN1......7 LCD 7\
PD6/AIN0..... 6 LCD 6 \ LCD 4 Bit Data Bus
PD5/T1......... 5 LCD 5 /
PD4/T0......... 4 LCD 4/
PD3/INT1..... 3 PWMA - Azimuth Motor Drive
PD2/INT0..... 2 Azimuth Pulse Counter
PD1/TXD....... 1 USB Serial Out
PD0/RXD....... 0 USB Serial In

PC5/AD5........Elevation Pulse Counter
PC4/AD4........Elevation switch 90 Degrees
PC3/AD3........Elevation switch 0 Degrees
PC2/AD2........Azimuth Limit Switch 360 Degrees
PC1/AD1........Azimuth Limit Switch 0 Degrees
PC0/AD0........LCD Keyswitch Analog Input

My Arduino hardware design includes a 16x2 LCD Display Shield that sits on top of the Motor Driver Shield. The great thing about this is the ability to get visual feedback when in field adjustments are being performed. The LCD shield also has some small pushbuttons connected through a resistive ladder to one of the A to D pins of the Arduino. Part of the software will be able to read button pushes to adjust UP/DOWN and LEFT/RIGHT control of the dish.

Ebay image of the LCD Shield
When the LCD shield arrives I can start testing the Arduino software.
So far I'm getting together a bunch of example code for the various parts of the controller.

In the next post we'll be looking at the software in some depth and how the dish position is adjusted. I might even have a preliminary enclosure design for the control hardware. There are a few nice IP66 rated waterproof boxes out there that I want to have a look at. I'm steering towards using one with a clear lid that lets me see the LCD Display while the system is in use. I also have control of the LCD backlighting so I can turn it off when not in maintenance mode.



Sunday, 2 June 2013

Using your SDR Pi. Fun stuff.

Tune In with your Pi.

Grab yourself a powered set of computer speakers. One of those amplified ones with the Bass Reflex box and two speakers.

If you're ready to have a bit of fun with your Raspberry Pi and SDR receiver connect the speakers 3.5mm stereo plug into your Raspberry Pi audio out socket. Power up your Raspberry Pi with your USB SDR plugged in and log in when the command line prompt appears. You might want to make sure your SDR stick has the cool little antenna plugged in that came with it.
RasPi + DVB + Speaker plug = FM Stereo

You could also do this remotely using PuTTY on your Windows PC or just use 'SSH' on your Linux computer.

The RTL_SDR software we installed in our Raspberry Pi has a pre-made 'FM' mode that we can call from the command line. If you are now logged in just enter the following:

rtl_fm -f XXX -W -s 200000 -r 48000 - | aplay -r 48k -f S16_LE

NOTE: Replace the XXX with the frequency you want to listen to in Hertz. For our purposes you can enter the frequency for 100MHz as 100.0e6 as per the screen grab below. Its there just after the '-f'.

 Our Raspberry Pi is now an FM Radio Tuner that we can set to pretty much any frequency from 50MHz up to 2200MHz (with a gap around 1100MHz).

While we are building the rest of our Radio Astronomy Station we now have a neat way to play with our Raspberry Pi and SDR receiver. If you want to have a look through the command line options for the FM Receiver try entering:

rtl_fm --help

This results in the following output.

pi@raspberrypi ~ $ rtl_fm --help
rtl_fm, a simple narrow band FM demodulator for RTL2832 based DVB-T receivers

Use:    rtl_fm -f freq [-options] [filename]
    -f frequency_to_tune_to [Hz]
     (use multiple -f for scanning, requires squelch)
     (ranges supported, -f 118M:137M:25k)
    [-s sample_rate (default: 24k)]
    [-d device_index (default: 0)]
    [-g tuner_gain (default: automatic)]
    [-l squelch_level (default: 0/off)]
    [-o oversampling (default: 1, 4 recommended)]
    [-p ppm_error (default: 0)]
    [-E sets lower edge tuning (default: center)]
    [-N enables NBFM mode (default: on)]
    [-W enables WBFM mode (default: off)]
     (-N -s 170k -o 4 -A fast -r 32k -l 0 -D)
    filename (a '-' dumps samples to stdout)
     (omitting the filename also uses stdout)

Experimental options:
    [-r output_rate (default: same as -s)]
    [-t squelch_delay (default: 20)]
     (+values will mute/scan, -values will exit)
    [-M enables AM mode (default: off)]
    [-L enables LSB mode (default: off)]
    [-U enables USB mode (default: off)]
    [-R enables raw mode (default: off, 2x16 bit output)]
    [-F enables high quality FIR (default: off/square)]
    [-D enables de-emphasis (default: off)]
    [-C enables DC blocking of output (default: off)]
    [-A std/fast/lut choose atan math (default: std)]

Produces signed 16 bit ints, use Sox or aplay to hear them.
    rtl_fm ... - | play -t raw -r 24k -e signed-integer -b 16 -c 1 -V1 -
                 | aplay -r 24k -f S16_LE -t raw -c 1
      -s 22.5k - | multimon -t raw /dev/stdin


Saturday, 1 June 2013

Radio Astronomy Station. Part 4.

The Software Defined Radio.

In Part 2, I discussed the various parts of the Radio Astronomy Station and the Raspberry Pi with a USB Software Defined Radio (SDR).

In Part 3 we went through getting the Raspberry Pi working. You should now have a RasPi with a USB Keyboard and Mouse plugged in, power connected with a micro USB mobile phone charger and a screen plugged in to either the composite video RCA socket or getting an awesome picture through the HDMI connector.

If you successfully reached the Linux Rasbian login prompt you should see:

raspberrypi login :

Enter your username which should have defaulted to 'pi'.
Enter your password which is 'raspberry' if you didn't alter it with raspi-config.

You should now see the login message telling you when you last logged in and the GNU/Linux message telling you about free software!

If you have an ethernet cable from your RasPi to your router you should have an active internet connection. The login message we saw earlier shows the IP address of the RasPi. Most likely something like '192.168. something dot something'. It depends on how your router is set up.

We can now do some cool stuff to test our RasPi. On the command line type 'top' (without the quotes) and hit enter. You'll see the current time, how long your RasPi has been active for, how many users are logged in and also the amount of hard work your RasPi is doing. To exit from 'top' just hit 'q' and you should end up back at the command line prompt.

Raspberry Pi running 'top'

The picture here shows two active logins, one from the keyboard and one remote login.

Remote Login

The ability to log in remotely to the Raspberry Pi or in fact any Linux computer is a pretty cool thing to do. You might want to look at installing a program on your PC for logging in with SSH (unless you already use a Linux computer and have all the tools you need). On a Windows PC I use a program called PuTTY ( to log in. Its fairly easy to use. Just dont be put off by the options for using it. Only need three things. IP address, Username, Password to do a remote login. Make sure you use the 'SSH' option.

If you have a Linux PC, just open a terminal window and type 'ssh -l pi (ip address)'. Thats a lower case L not a 'one'.
Update Your Pi.

Ok so thats the hard part over. Your Raspberry Pi is running, you've seen 'TOP' give you a rundown of whats going on. If you haven't done so yet, now might be a good time to Update your operating system. Assuming you have a working internet connection enter the following:

sudo apt-get update

*(Note - 'sudo' means 'superuser do' and 'apt-get' is the cool updating and software installing tool).

Linux being the secure operating system it is, you'll be asked for your password. You should then see your Linux Raspbian querying a bunch of different websites asking for updates on files etc. You can now go ahead and run those updates by entering the following:

sudo apt-get upgrade

Your RasPi already knows your password was entered so it should now start downloading all the relevant updated files for your Linux Raspbian operating system. You were probably also asked if it is ok to download and install xxx Megabytes of updated files.

Once the downloading and upgrading is finished you may want to restart your Linux Raspbian. If you are remotely logged in your connection will be cut so you'll need to reconnect. If you are using keyboard and screen you'll just get a restart. Go ahead and type the following:

sudo shutdown -r now

Wait about 60 seconds while your RasPi goes through its reboot. 'Shutdown' with the -r means 'Shutdown and Reboot' and the 'now' means do it NOW.

If you have a keyboard and screen you'll be seeing the normal restart stuff. If you are using a remote login you'll have to go through the PuTTY login sequence again.

Once back at the command line we're ready for setting up the Software Defined Radio.

Setting up the SDR.

You may find it just as easy to go through Peter Goodhalls web page on setting up the Raspberry Pi. You can read his page here.

Otherwise, if you want to follow it here, here's what we need to enter.

  1. sudo apt-get install git
  2. git clone git://
  3. sudo apt-get install cmake
  4. sudo apt-get install pkg-config
  5. sudo apt-get install libusb-1.0
  6. cd rtl-sdr/
  7. mkdir build
  8. cd build
  9. cmake ../ -DINSTALL_UDEV_RULES=ON
  10. make
  11. sudo make install
  12. sudo ldconfig

If you have completed the steps above you should now have a Raspberry Pi with all the software needed to use the Software Defined Radio USB stick. You should now do another restart so repeat our shutdown sequence from before.

When you get back to the command line and you are logged in, plug in the DVB SDR stick into the spare USB port where the keyboard is. If you are remotely logged in this will be a lot easier without the keyboard connected. You may also want to consider an external powered USB Hub to provide extra USB ports and extra power for USB devices.

Ok lets start up our SDR stick. Type in the following:


You should see a list of USB devices that are plugged in. One of them should be a Realtek RTL2832U which is our Digital Radio device. If you can successfully see this in the USB device list then go ahead and start the SDR.

rtl_tcp -a 192.168. (whatever your RasPi IP address is).

Our SDR is now receiving and ready
You might like to try an App on your Android phone called SDR Touch. While still buggy and prone to crashing it will interface with your SDR radio tuner and produce received audio from your phone.

On your Windows PC try using SDR Sharp ( This makes a good, easy to install application for Windows users. Go to this page and follow the instructions for installing SDR Sharp on a Windows PC.

SDR Sharp running on Windows 7 connected via the network to my Raspberry Pi and SDR receiver
Spend some time getting used to how SDR Sharp works. For now, this makes a great testing program for your SDR receiver. Later on we should look at other SDR software that can give us even more flexability.

Thats one of the advantages with a system like this. We can swap and reconfigure different parts to get better results. At a later stage we could replace the whole Raspberry Pi and SDR receiver with a different SDR package that could work on frequencies as high as 10 GHz.

I hope for now you have fun with your SDR receiver.


Friday, 31 May 2013

Controlling a Dish Antenna

Actuators and motor drives

One of the tasks we need to do with the Radio Astronomy project is steer the Dish Antenna. The two important parts of this are the hardware motor controller and the software to read position information fed back from the dish.

While I'm still thrashing out the hardware for the Azimuth 360 degree drive I thought I'd look at the Elevation drive for the dish. As I'm using a fairly standard 2.4 Meter C-Band dish and mounting hardware that came with the dish I'm going to use a linear actuator arm which are available from most good Satellite TV suppliers.

Actuator Base - Red reed switch on right
The actuator arm has a 24 inch travel from fully retracted to fully extended. Although it has a 36 volt rated motor I'm going to run it at 24 volts to reduce stress on the motor. I also have a concern with the electrical EMF noise from the motor brushes so I'm hoping a lower voltage will reduce this. I'm also trying to keep the current on the drive under 2 Amps which is my limit for the electronics driving the motor.

Linear actuator arms have two pairs of connections. One pair is the motor power and by swapping polarity of the power the motor can run forward or reverse. This lets us extend or retract the actuator. The other pair of contacts is a magnetic reed switch which is used to count revolutions of the motor drive. A pair of limit switches are also wired up with the motor power to cut off the motor when maximum or minimum positions of the actuator are reached. I intend to use the limit switch signals to tell when Zero Degrees and 90 Degrees are reached on the dish position.

To provide forward and reverse voltages to the actuator arm I am using a device called a 'H-Bridge'. This lets me turn on and off the power to the motor as well as reversing polarity. The controller for the dish aiming hardware is an Arduino Uno R3 that uses an Atmel micro-controller on a prototyping board. The board has plug in connection pins on the edge of the board allowing modular devices called 'Shields' to be plugged in for different tasks. One such Shield is a H-Bridge that is perfect for controlling power to the dish positioning system.

Arduino Uno R3

The H-Bridge shield is a dual output device using an L298 high current switch. With this we can use one output to drive the Elevation motor actuator arm and the other output to drive the Azimuth 360 degree motor.

From the Actuator arm the magnetic reed switch contacts will go back to an Input on the Arduino so we can measure how far in and out the arm has traveled. Using this method of Elevation positioning the Arduino will need to frequently reset the dish back to Zero Degrees by reading the limit switch output. It will also allow Pulse counting of the reed switch between Zero degrees and 90 degrees so the Arduino knows how many pulses to expect as it travels.

For our purposes one of the Automatic Calibration tasks when the system is powered up will be to run the dish from zero to 90 degrees to pre-determine the dish position. The same task will also occur for the Azimuth drive as the Arduino will need to determine the direction in degrees. Therefore we will also need limit switches at Zero degrees North and at 360 degrees North. Azimuth sensing may also be done with a magnetic sensor at the motor drive. More on that part in a later post.

L298 H-Bridge Motor Driver
In my next post we'll be looking at adding the Software Defined Radio USB stick to the Raspberry Pi and getting our computer hardware receiving radio signals.

If you have already jumped in with both feet and followed some of the links in previous posts you may already have your system receiving signals. Thats where it starts to get exciting and our Radio Astronomy Project really starts to take shape.


Rob Arrowsmith

Sunday, 26 May 2013

Receiving From The Stars. Radio Astronomy Station Part 3.

Assembling the Radio Hardware
I thought in this post I would concentrate on the computer side of the Radio Telescope. Many of the parts can readily be assembled and tested without too much mechanical work, in fact none at all.
We'll need our SDR USB stick that we bought on Ebay, our Raspberry Pi and a PC running Windows 7 (you may find it best to use a laptop or PC with an SD card slot that works properly with an SDHC High Capacity 8GB card).

For the benefit of those that might not be computer savvy I've gone into some detail in explaining how to install software in the Raspberry Pi. As this is the important part of the whole system it seems worth it to explain as much as I can.

Step 1. Setting up your Raspberry Pi.
Lets assume you have your new Raspberry Pi in its box. Its just arrived in the mail and you can't wait to see what it does. Mine came from RS Components in a raspberry colored plastic box and packed inside an antistatic bag.

You'll need a good quality 8 or 16GB SD card for your Raspberry Pi operating system. Some laptops come with SD card slots in them. Note that older laptops may not be able to use SD cards larger than 4GB. If yours is one of those then you can still fit everything into a 4GB card (just).

On your laptop head to and select the 'Downloads' link at the top of the page. Select the first option Raspbian Wheezy (direct download) which is probably best for our purposes and save to your laptop Desktop. This is currently a 470MB download so make sure you have a decent internet connection. Note that the download page has options for choosing a mirror site that may be closer to your location and may result in a faster download.

While you are downloading your copy of Raspbian Wheezy, go and get a copy of 'Win32DiskImager' as we need this to write to our SD card. Save the zip file for DiskImager (Windows may pop up a request bar asking if you want to download it). The DiskImager is only 5.7 MB so while we wait for Raspbian, right click on the file and open it. Extract it to the suggested folder. You should now have a new folder on your desktop with DiskImager files in it.

Once you have the Raspbian ZIP file on your desktop extract the folder inside the zip file by right-clicking and choose 'Extract Here'. The file in the download is an IMG file. This 'Image' file is intended to be written or 'burned' to a CD. For our purposes we need to instead write it to our SD card.
On your Windows PC desktop open the 'Computer' or 'MyComputer' icon. If you have your SD card plugged in it will show in this window. Double click the SD card. Some new cards come with 'Extras' in them. Delete all files on the SD card.

Open your DiskImager folder and start Win32DiskImager.exe.
Select your Raspbian Wheezy IMG file and select the SD card with the 'Device' selector. This will probably show up as E:/ or similar. Click on 'Write' and your Raspbian Wheezy Image file should be written to the SD card. The SD card is your 'Hard Drive' for your Raspberry Pi. When your Image is finished being written close DiskImager and eject the SD correctly by right clicking on the SD card in My Computer and selecting 'Eject'. This will close the SD card so files don't get corrupted.

Step 2. Starting your Raspberry Pi.
We now have our Raspberry Pi board and an SD Card with Raspbian Wheezy on it. Fit your SD card and connect a screen to either the Composite Video RCA socket or the HDMI Video port. Plug in a USB Keyboard and Mouse to the two Raspberry Pi USB sockets. Connect an Ethernet cable from the Raspberry Pi to a spare port on your Network Router.

A few points about power supplies. The Raspberry Pi is designed with a Micro USB (mobile phone standard) power connector. If you have a Phone charger just check that the charger will deliver at least 1 amp. Some will only supply 700mA which will probably not be enough. I use a Nokia charger that has 1200mA @ 5V written on it and seems to work well.

Connect your power supply. Fingers crossed and the red PWR led on the Raspberry Pi should light up followed a few seconds later by the other Leds. Your LCD screen should come up with the Raspberry Pi logo followed by a screen full of startup information. Eventually the 'Raspi-Config' window should open giving you several setup options. They are pretty self explanatory. When finished tab to Finish and the Pi should restart.
The default user name is 'pi' and the default password is 'raspberry'. This should be changeable in the Raspi-Config setup program.

Once you log in, type in 'startx' and the Raspberry Pi desktop should start up. Now the fun starts.
But I will save that for the next post.

If you have any issues with the above, look around and Google some answers. I'm happy to answer any queries at the end of this post.


Friday, 24 May 2013

Radio Astronomy Station. Part 2.

Radio Telescope Diagram.

The Radio Telescope consists of a Raspberry Pi computer and DVB TV receiver USB stick mounted in a box at the focal point of the Dish. The Raspberry Pi also communicates with an Arduino Uno mounted in a control box under the Dish to control the azimuth and elevation.

An ethernet cable and power cable run from the Dish back to the control room.
In the control room the main system PC has the Radio Eyes Telescope Control Program, SDR Radio Client and Skypipe digital chart recorder.

A remote operator runs the Radio Eyes program which allows the management of where and when the Dish should be active. The commands for pointing the Dish are then sent to the Telescope Control Program as a 'Task' for later activation.

The receiver connected to the Raspberry Pi can be commanded by the SDR Radio Client to monitor a particular frequency and the signal comes out of the PC audio out socket for monitoring through a local speaker. This audio is fed back into the PC for recording by the Skypipe software and plots the intensity of the received signal.

A remote operator can also log in and see a waterfall display of Frequency/Time/Intensity covering several Megahertz bandwidth.

SDR Receiver

This is the DVB TV receiver I bought on Ebay for less than $20.
Fortunately it has the correct RTL2832 and E4000 devices. Obviously the nifty little infra-red remote control isn't going to be of much use. It also came with a little antenna and magnetic base with cable and plug, also not a lot of use.

Raspberry Pi

The Raspberry Pi is now available in sufficient supply for them to be readily accessible through your local supplier. I bought two in November 2012 and they arrived just before Christmas. Perfect timing for the Holiday break.
I'd recommend getting hold of a Pi and the DVB receiver and getting these two devices working together. My previous post has a link to Peter Goodhalls web page with instructions for getting the Pi talking to the receiver.
You should then be able to remotely log in to your Pi and receive audio and control the Frequency and mode of reception.
I used my Android phone with an app called SDR Touch. This allows entry of the IP address of the Raspberry Pi so you can connect and receive audio.

In the next post I will show some results of the receiver and SDR client software and what we can do with our system so far.


An SDR Radio Telescope. Notes.

Useful Links for Radio Astronomy

I wanted to add some links to reading material that may be useful for anyone contemplating building their own Radio Telescope system.

The document that triggered my excitement regarding this project was one produced by Dr David Morgan in 2011 based on experiments he did with a Software Defined Radio USB Stick called a 'Fun Cube Dongle' that uses parts designed to receive Digital TV and Radio or 'DVB' broadcasts. You can access that document here

The next thing I needed was a way to test if I could get a receiver like the 'Fun Cube' working. I had a Raspberry Pi computer. I bought a DVB Digital TV USB receiver and put them together. The article that got it working was Peter Goodhalls web page on setting up the Raspberry Pi. You can read his page here.

I went looking for information on how to control a Dish Antenna. I knew I'd be using the Radio Eyes software package as the main control system. There's a standard for controlling Astronomical devices based on the ASCOM system of control protocols. Fortunately there's a web site for ASCOM.

I was having a tough time trying to get meaningful answers from the ASCOM site but after some more googling I found a site that has Optical Astronomy software and have kindly provided source code for implementing an ASCOM driver package. Skymap appear to have many different drivers for optical telescopes. There driver page is available here.

I hope the above information is useful and gives you an idea of what is involved.

As promised, the next blog entry will have a block diagram of what we're making.

Thursday, 23 May 2013

Radio Astronomy Station. Part 1.

Whats All This?
I've worked on a few big projects in my life. Mostly as a result of companies I've worked for. I'm not talking 'Death Star' sized projects but the kind of thing you can really get your teeth into and come out the other side feeling exhilarated and the sense of achievement.

I plan to cover the development of a Radio Astronomy station using pretty much off-the-shelf hardware so that capable readers of this blog could quite easily follow instructions and put one together themselves.

Radio Astronomy by the numbers
For the average tech type person this project will involve a number of steps.
  1. Set up a PC with Windows 7. Install the 'Radio Eyes' and 'Skypipe' Radio Astronomy applications. Install a 'Driver' program to talk to the positioning system. This computer will be located near the Dish.
  2. Set up a Raspberry Pi computer running 'Raspbian' operating system. Install the driver software to receive radio signals with it using a DVB USB stick that has an RTL2832 and E4000 devices in it.
  3. Program an Arduino Uno controller board with a Real Time Clock and a L298 H-Bridge motor driver to position the dish.
  4. Set up a C-Band 2.4 meter dish antenna with Elevation and Azimuth motors. Mount the Raspberry Pi and DVB Software Defined receiver at the dish focal point.

The blog is going to detail the above steps and the software for the system will be available free to download except for 'Radio Eyes' and 'Skypipe' which are available through RadioSky Publishing

Putting It Together
Look around for a good sized mesh type C-Band satellite dish. You can find them on Ebay quite cheaply. You'll probably want a good sized pole to mount the dish with as well. Maybe 75mm diameter and 2 meters in length. Depending where you mount this you'll want half a meter in the ground and concreted in. If the soil is soft you may want it deeper. Stability is of utmost importance. Think about adding struts if the pole moves at all.
You should end up with the dish mount at about head height. This makes it easier to work on. An actuator will be mounted under the dish in order to give elevation drive. This should be able to swing the dish from 0 degrees up to 90 degrees. Actuators can be driven with 12, 24 or 36 volts depending on the type available to you. Actuators have two motor wires, usually RED and BLACK. They will also have two sensor wires connected to a reed switch inside the actuator that 'pulses' as the actuator drives the arm in or out.

This is a picture of the 2.4 meter 'JoySky' dish that I am using.

In the next post I'll put up a block diagram of what I'm building so you can get a better idea of how it all goes together.

Cheers 'till then.