Introduction: Automated Radio Telescope

About: I´m a Portuguese guy that loves making projects in the area of electronics, radio, mechanics and programming.

Hi! Check out before anything else my website to find other cool stuff: https://xval.me

Lately I have had many free hours to dedicate to projects and there was one that I really wanted to do: an antenna to discover the vast Universe. But not a traditional one, that DIY community uses. I wanted something different, that could be more hum... "professional". Basically, an automated radio antenna, that I can control using a computer, to automate the data gathering. Now, I just have to sleep relaxed, while this moving antenna on my roof is collecting everything for me, always. Fantastic!

Step 1: Main Objective

I build it with one objective in mind, but I also used it to other things. The original purpose was to build a horn that could receive signals from the Hydrogen Line from our galaxy, to calculate its speed, but it can also be used to receive signals from geostationary satellites that transmit in well-know frequencies, with a non-encrypted signal.

Step 2: Some Warnings Before Moving On

First things first. English is not my mother tongue so some mistakes here and there may happen. It is also a bit hard to find the English name of many tools, so correct me if I am wrong. Thanks!

On this instructable I am not going to describe everything, piece by piece. I am going to talk about the main things, what I have done, but I will also consider that the reader has an understanding on what I´m talking about. Like, for example, the arduino codes are so trivial and easy to do that I will not place them here. However, I am going to describe, of course, they working principle. I want this instructable like "Look what I´ve done", giving to the reader knowledge if one wants to build something like this and not a complete step by step guide, showing all the details. This is like a challenge to everyone who is reading.

Step 3: What I Expect From the Reader

You don´t need any knowledge to understand my project on the fields I am going to talk, but if you want to build something like this, you really need basic understanding on these topics. At the end of the day, to build this project, I had to use many skills. I am talking about:

-Programing experience in Arduino (Well, everyone can program it. After all, is very simple)

-Software Defined Radio or SDR (Basically, there are dongles that allow us to observe vast areas of the electromagnetic spectrum on our computer, and they are cheap! For instance, the RTL-SDR V3 dongle, allow us to watch from a few KiloHertz to around 1,8Ghz. They are receivers that we can tun the frequency we want via software. I assume the reader knows the basic of this)

-GNU Radio knowledge (For those who don´t know, GNU Radio is an open-source program that works with "blocks" and each blocks has a function. This is extremely useful to automate data gathering and to calibrate the instruments. If you want something simple, like "OMG! I could see the Hydrogen line!" you can use simple software like Airspy. But if you want something deeper you must use GNU Radio. Like every open source program the best advantage is your biggest enemy. You must know what you are doing. There many docs on the web explaining about it, but do not expect to have everything waiting just for you. You will have to do a LOT of research. However, I will place the image of the diagram I made here on the instructable to work as a reference to you.)

-Programming experience on Linux (This is mainly for GNU Radio, since you have to write code connecting GNU Radio and Arduino control of motors)

-Experience working with Aluminum foil. I am talking about bending, cutting and that kind of stuff

-Electronics in general to solve problems with the motors

-Basic astronomy understanding for positioning and coordinates

-Physics in general, if you are going to observe the Hydrogen Line

Step 4: Safety First

Don´t be a fool and hurt your self. I used as the construction material in this project aluminum foil and it can really hurt you if you don´t use it carefully. Before trying something like this, make sure you can handle it and be prepared. I don´t recommend anyone to start using aluminum foil like in a project like this. Don´t do that. Train yourself first and then apply it. I don´t even have to talk about wearing gloves, etc etc. Again, I assume the reader has some familiarity with those things I mentioned before.

Step 5: Lets Start

So...Time to start explaining how it works. To do that we have to understand what are the different parts of this project. I will talk mostly about Hydrogen Line since I am more focused on that part. The atom of Hydrogen randomly radiates at the frequency of about 1420,4 Mhz. This is due to a spin flip on the Hydrogen atom (There are tons of useful information about this on the internet, so I will only cover the basics).The radiation comes from the hydrogen’s transition between two levels in its ground state, specifically called the ‘spin-flip transition’. The hydrogen’s proton and electron each have their own spin, and they can either spin parallel or antiparallel to each other. The state with parallel spins is slightly higher in energy, so when the spins flip, it releases energy as radiation that we can detect. But this is rare. the chance of this to happen is very small. However, on stars, there are tons of hydrogen atoms (Hydrogen is the most abundant element on the entire Cosmos). Because of this, for us, we will always see a spike on this frequency when observing with SDR, since there will be always at least one atom flipping and emitting frequency. Sometimes this is called 21 cm band since in the vacuum the wavelength of this frequency is of about 1420,4 Mhz. Since the Milk Way is made of tons of stars, and, for us, they are relative together, the signal is stronger. You can also point the horn to the sun but it won´t work, since the Sun is hot and the frequency will be different. Since the Milk Way is light years far from us, we can still receive the cold signal since it traveled all around the space. This signal is actually pretty weak, and we need an antenna.

Step 6: Antenna

So, the first part of the project was making an antenna to improve the signal. I could have used a typical satellite dish, and it would probably work, but I used the design from DSPIRA (Google it if you want the sizes and how to do it etc) that was made just for this case. I made a VERY simple image in paint to show you its shape. I changed a few things (only the size) and the result was a very interesting horn made of aluminum foil (I used the minimum thickness I had at home so the weight is small but it does not really matter). But we are not done yet. This horn will catch all the frequencies on the spectrum, but we only want some. For that, we have to add at the back of the horn an wave guide that will allow us to catch our desired signal and block the frequencies we don´t want. Usually, enthusiasts use F style painting cans, that have a size of around 1 gallon. They are made of aluminum (that is what we want) and the right dimensions to block most undesired frequencies and pass what we want. These numbers are from my head, so before trusting me, research a bit, but most cans will pass, without lowering the power of the desired signal, the frequencies from 1,1Ghz to around 1,9Ghz if I am correct. This is extremely important because will block the frequencies of around 100Mhz, the most used ones, that could have a severe impact on our signal. So, if you are on a budget, you can use an old painting can, cut it on the front, and connect it to the horn. I ended building my own wave guide in aluminum foil since it was easier to connect to the horn and to be perfect, since I did nto have to cut the front part- I just did not make it. From the left side to the right one, that connects with the wave guide (the side without a "wall") I measured it and the final result had 17,2 cm. To calculate the cut-off frequency (the frequency where the signal will be drastically reduced) you can use the formula, that is pretty simple, or use an online calculator. Just google for Wave guide cut off frequency calculator. The cut off frequency in my case is around 871Mhz and the wave guide will alow to pass, almost without attenuation the frequencies from 1Ghz to 1,65Ghz. Perfect.

Step 7: Copper!

Now that we have our wave guide we have to place a small piece of cooper into it. To do that I made a hole on the top of it right in the middle. The distance from the back part of the wave guide and the cooper should be 6,5 cm and, since we want just to collect the frequencies of around 1,42Ghz, the cooper length inside should be of 5.25 (one quarter of the desired wavelength). Make sure the cooper do not touch the aluminum foil, since it works and ground and you won´t get any data. To do that just use some tape.

Step 8: Amplifying Our Signal

Well, I used some software now in this part to calculate how much is the gain of our horn. According to my computer it is about 14-17dB, a value that seems pretty good for a homemade antenna. But this is not enough. We need more gain to increase the power of signal. Of course, we are going also use increase the noise that exists, because nothing is perfect, but the signal-to-noise ratio will be bigger when amplifying the signal. It would be interesting to introduce here the concept of noise figure and noise temperature. The noise figure is the difference in dB between the noise output of the actual receiver to the noise output of an “ideal” receiver. So, basically, the difference between our noise ground, or the reference, and the signal we want. Since the 1420,4Mhz frequency was emitted far far away, the signal will be weak and the noise figure also will be weak. So, we need to find the signal in all that noise. And here is where noise temperature comes in, that is basically the same thing, but we also use the temperature. You can use this calculator here to calculate it. I will not be going into details since everything is freely available in the internet. Astronomers mostly use these units, so get used to it. The reference temperature we use when doing the math is nothing more that the temperature of the system that is going to collect the signal, in this case the temperature of the environment, in Kelvin. I consider it 300K, that is a pretty reasonable number. So, according to many other people who also received this signal, we are expecting the strength of the signal to be of around 100K to 150K. It is a pretty low number, so we need to be careful when amplifying it to not increase too much the other noise we don´t want. To do that, I designed a circuit and made a PCB.

Step 9: Circuit

To increase the gain of our system we use what is called LNA or Low noise amplifiers. These amplifiers have a low noise factor, so they introduce almost no noise in the system, and increase the desired signal. When searching for an LNA, you must be careful with this, since you don´t want a noise factor that is too big, since it will add noise to the system. An "ok" LNA has a noise factor of around 1dB and the best ones have around 0,6 or even 0,56. You can think that they are really expensive and if you are going to buy the best ones online, yes, they are. The common ones have around 1,3dB (this is the max noise factor I would choose if I were really on a budget) and are really cheap. You can buy them on amazon for around 15$. The best ones can go up until around 50 our 60$. BUT, here is where things start to be interesting. You can build your own LNA. If you have experience with PCB design, it is not that hard. I talk from experience since I built my own board. The chips you need are easily available, are chip and...have a noise factor of 0,56dB! Amazing. But, before going into dept on what chips to choose, there is something important here to talk about. We have the horn, that gives us around 14-17dB of gain, we have the LNA, that provides almost 35dB but there are parts missing. After increasing the signal, we need to use a filter to only allow the frequencies we want to pass. We already filtered some frequencies, but we should filter them again, now in a smaller range. To do that I used a pass band filter chip, that I am going to describe together with the LNA. The last stage of our circuit is basically another LNA, the same model, to increase even more the signal. After this, we connect our circuit to the SDR dongle, in my case the SDR-RTL V3, to observe the signal that, now, can be watched.

Step 10: Chips and PCB

So, the signal has to follow this path:

Cosmos>>Horn>>Wave Guide>>First LNA>>BandPass Filter>>Second LNA>>RTL-SDR

The LNAs I used and the bandpass filter are from Mini-Circuits. They have a program called EzSamples and, if you are doing a research project or want to test something, but don´t want to pay huge prices from resellers, you can go directly to their website and ask from samples. The components that are marked with the Ez logo you can request, and they are free. Every 30 days, you can ask a max of 5 different components, and they will send to your home (usually takes 2 weeks) 4 samples of each component. On the image is the packet I received from Mini-Circuits with all those delicious chips. So, for the LNA that would cost around 50-60$, I ended paying only the PCB, since the chips were free. The part number of the LNA is the PMA2-43LN+. Its a SMD chip, with almost 35dB of gain and a super low noise figure (0,56), giving a noise temperature of about 41K. Since the signal has a strength of about 100-150K, this number is perfect for our needs. On my 4 layer PCB (you MUST use a 4 layer PCB to reduce the signal losses and interference) this was the first thing I added. You can´t only use the chip, since it needs some auxiliary components (some inductors, capacitors and resistances). But don´t worry. Mini-circuits made the work for you and you have on the main page of the component all the values and schematics you will need. You don´t have to be a electric engineer to make one of those. After this LNA, I added the band pass filter, a BFCN-1445+, also from Mini-Circuits and I made all the design again for the second LNA. I should add that the noise factor of the second LNA does not really matter. You can use one with a HUGE noise factor and the difference would be like minimal. Like, for instance, the noise factor of the RTL-SDR alone is around 6dB (according to the specs is less, but I never trust what they say), but, since it is the 4th amplifier (the amplifiers are the horn, 1st and 2nd LNA and the dongle itself) no problem at all. The overall noise factor can be calculated using Friis formula for noise, proving what I just have said. At the end of the day, I payed 45$ for the PCBs what I can say I am very satisfied. Since they were 5, I saved here tons of money. If I had bought everything, I would have payed around (50*2 for the LNAs and around 40 for the filter) roughly 150$. With all my work, I made 5 PCBs, that worth, if bough, 700$. I think it was a good investment of time and money. If you want to do a project like this one and want the PCB layout, sorry about that, but I will not place them here. I had to work hard many hours just in research, and another TON of hours to build schematics, and PCB, and soldering everything. If you are really interested, send me a message and talk about your goals. If I see it worth it, I will give the layouts to you.

To connect the output of the amplified signal to the RTL-SDR I used coax cable that is used in high quality boats, with a super good quality, to avoid losses. At the end of the day, the board amplifies the signal by 70dB, according to the manufacturer of the LNA´s chips. The signal was actually amplified by 60dB, which seems pretty good.

The total gain before the SDR dongle is about 75dB. An amazing number!

Step 11: GNU Radio

Since I wanted to receive the hydrogen line, I used GNU Radio to automate all the math and stuff for me. In the image I have the diagram I used. Basically, the signal enters, it is calculated the Fourier Transform, calculating the amount of energy I received in each frequency. To do that, I divided the frequency band into small "bins", where is calculated the amount of energy received in a particular time. I won´t be in details, since this is complicated stuff, but, if you understand GNU-Radio, you can understand what I am doing with more details. With the "bins", I can then calculate the speed of the galaxy, for example, using the red shift.This is called power spectral density, which is the power per unit frequency, given as a function of the frequency. My goal on GNU Radio was to make a spectrometer that could do this in frequencies of about 1420Mhz. The big part of the receiver is calibration and auxiliary systems, to support the core of the receiver. If you are having problems with GNU Radio, comment, so we can all learn together while solving problems. Sorry about he image, but I could not get any better one, when trying to print my screen.

Step 12: Supporting the Horn

Since I decided to use aluminum foil as the building material for this project, I made all the supports and bases made of aluminum as well. As you can see, I build 2 supports, one in one side of the horn. I later built 2 small pieces on the top of the horn so I could pass a cable trough them to support it. To do that I found the center of mass of the horn, to make sure the system is stable when not being used.

Step 13: Supporting the Horn

The 2 supports one the side are fixed on a base that is made of aluminum foil. At the beginning I though the thickness of the base would be enough for all the weight but I realized that I needed it to be even stronger. To make it better, I added a large aluminum foil, with a bigger thickness, on the bottom, to support it. I can´t understand why, but Instructables website always change the rotation of the last photo. I could not put it right. Sorry-

Step 14: Rotation System

Now, lets talk about how is the system going to rotate. We need an xy axis rotation system, and a z axis rotation system. This last one takes care of the angle of the observation and the other of the direction that the horn if facing. The xy was mounted on a wood platform, from an old table, to support, and a motor makes it spin, spinning the platform that have the supports of the horn. On the top of the bottom of the support for the horn there is another motor that controls the angle.They both are controlled by an arduino and motor shields to control them.

Step 15: XY Axis

Since the horn + the supports to the horn + the base of the supports have a big weigh, a normal DC motor would not take care of the job to rotate this. To solve this problem, I dismounted an old hand drilling machine, that uses a 12V battery. And another problem appeared. I was planning of using a L298N motor driver to control the motor from the arduino, but I ended blowing up the 2 I had at home because of the current. The max current they can handle is 2 Amp and a drilling machine can use up to 5 Amp. I had forgot about this completely and it took me hours to understand the problem. When I figured out, I had lost 2 drivers. To solve this problem I made an H-Bridge with 2 relays, that allow me to change the polarity of the current and then to change the spinning direction of the motor. There is an image explaining how it works. Since 12V would spin the motor too fast, I decided to use a 9V power source that could handle 5 Amp, so...forget about the typical chargers you have at home. The motor is then connected to "that red thing". Don´t ask me its name because I don´t know. If anyone could give me the name of "that thing" I would really appreciate. It basically changes the direction that the motor is spinning too, in this case, 90 degrees. Words are hard to explain it, with the image you will get it easily. I had to fix it to the table and then connect it to the motor.

Step 16: Fixing the Motor

Since a lot of tension is on the motor, I had to fix it to the table.I also had to change the came of the motor, to connect it to the "red thing".

Step 17: Some Testing on the Motor

Step 18: Wheels

Since "that red thing" is very small, all the weigh from the top is being "canalized" to it, forcing even more the motor. To spread the weigh I added 4 little wheels on the corners of the base, that have a small inclination, so they can rotate in a circle. Now, the system is more stable and, instead of only one support, I have now 5.

Step 19: How It Looks Like

Step 20: Z Axis

Now the Z axis, or the inclination. To rotate the horn added a stepper motor that pushes a fishing line that is connected to the horn, changing its angle. You can see that in my amazing Piece of Art paint image. The position in the image is the normal one, with the center of mass aligned. If I want to increase the angle, I turn on the motor, that starts spinning, pushing the fishing line, represented by blue color. It starts becoming shorter, creating tension and then rotation the horn. The maximum angle I can get is around 80 degrees, which is pretty good to analyze a big part of the Cosmos.

Step 21: Control

As I mentioned before, I am not going to write here the arduino code but I will explain to you how the system works. Basically, I created a function with 2 variables that I input: the direction angle and the rotation angle. The first one is the angle that I want to spin in the xy axis and the other one is the right ascension angle. The xy axis is the most tricky because we don´t have an exact way to point to one direction. I could have used a compass chip, but it would give me trouble just to configure it to, since the north pole is not the magnetic north pole, and I would be a mess. I ended up using a gyroscope module that came with an acceleration meter. With that, I can measure the acceleration and, with the time that it is rotating with that acceleration, I can calculate the angle that it rotated, until reaching the desired angle. There are many tutorials on the internet about that. Of course, there is an error margin, caused by noise. Even when the system is stopped, the acceleration meter will say that there is acceleration. But, since it only moves small distances, there is no problem with the noise created, because every time it needs to rotate, its made a reset. The Z axis is simplest one. Since I have the gyroscope integrated on the same board with the acceleration meter, its 2 in 1. The gyroscope basically tells me the angle it is in the 3 dimensions. In this case I only need 1, the Z axis. When I ask my telescope to change its angle, it starts the stepper motor, pushing the fishing line. The angle will slowly start increasing and, when it reaches the desired angle, it stops spinning. It is important to mention that the motor is stepper, so, when I turn it off, it won´t rotate backwards because of the weight of the horn. It must be in tension and being a stepper it can maintain it.

Step 22: Sweet Dreams Are Made of This

Well, now the system, in terms of hardware, is ready. Now, I can do what I want with it. The main goal was to gather data to be studied after during the night, in an automated way. But there is something missing here. The connection between the arduino and the GNU Radio. To do that, I created a simple python file that controls both things. It launches the arduino code with the angles, that are given by it, and then launches the GNU Radio, gathering the data and storing it on a folder with all the information for a given angle. I wrote it to to being spinning during the night for all the angles possible, giving a margin of 5 degrees. Like, at the XY axis it spins 5 degrees each time, in a total of 72 times. The Z axis is the same, from 0 to 80 degrees, witch gives 20 times. for each time on the XY axis it repeats 20 Z axis angles, writing a ton of information. At the end of the day, it takes some hours to collect the information from all the possible angles. I am currently working on this data, trying to analyze it, and then I am not going to talk about that part on this instructable. This is only about gathering data.

Step 23: Finishing

So...this is what it looks! A M A Z I N G

If you are reading this part I know that you enjoyed this report about my project. Comment something! See you next time!

Space Challenge

Participated in the
Space Challenge