New Zealand Local Weather Forum
Weather Discussion => Hardware Software and Technology => Projects => Topic started by: davidrg on February 10, 2017, 09:07:37 PM
-
Had some spare time this week so I built a 137.5MHz quadrifilar helix antenna:
(http://fremont.zx.net.nz/~david/images/antenna.jpg)
Its made from some PVC pipe from Bunnings (50mm and 15mm) plus some scrap RG-59/U coax I had lying around. Currently held together with friction, terminal blocks and firewood - once I've finished testing I'll glue, solder and mount it somewhere higher up than my lawn. Its connected to a Realtek USB TV Tuner acting a software-defined radio which is just plugged into my PC at the moment. I'm hoping to move it to a Raspberry Pi 3 later and automate it all so it can run unattended uploading satellite imagery to my website.
And here is a false-colour image received from NOAA-18 today (10 feb) at 8:18pm:
(http://fremont.zx.net.nz/~david/images/noaa-18-02100716-mcir.jpg)
Both passes of NOAA-15 tonight were a bit rubbish, but NOAA-19 at 4:36pm wasn't too bad:
(http://fremont.zx.net.nz/~david/images/noaa-19-02100333-mcir.jpg)
-
Top stuff David, & your lawn looks way better than mine too!
Any links to give some of us any ideas?
Cheers
-
That is really cool!
-
Ok, here follows some quick notes about doing this. It looks like a lot but really it was quite easy. The hard part was building the antenna with the bulk of my time spent messing with the drill templates and measuring/drilling/cutting the PVC pipes. This was just done with a dremel. It probably took me a bit over a day all up. The antenna wasn't constructed very accurately (a drill press and a miter saw would have helped) but it doesn't seem to matter too much if you're off by a few mm.
For building the antenna, I partially considered these instructions:
http://www.instructables.com/id/NOAA-Satellite-Signals-with-a-PVC-QFH-Antenna-and-/
Main construction difference from those steps (aside from different size pipes) is the outer and inner elements are aligned at the top (as in the cutting template) rather than the middle (like in those instructions). I've also not used PVC glue either - mainly so I could adjust it while testing. Friction is holding it together fairly well for now so later I might just add some hot glue so things cant easily be bumped out of alignment. The cutting template was generated by this website:
http://www.jcoppens.com/ant/qfh/calc.en.php
I just used the default settings at the top of the page with the pipe diameters set further down for the cutting template.
The template it generates is intended for using copper pipe or some other fairly solid wire as the antennas elements where as I'm using fairly flexible coax. So I'm using support pipes at the top and bottom as well (which the coax runs through, seems to be a fairly common approach). The cutting templates generated by that website have small holes at the top and bottom with only large holes for the support pipes in the middle. I don't know how the instructables guy overcame this but I ended up just printing off the cutting template twice. First one was with the default values and second one I set my conductor diameter to 15mm (the diameter of my horizontal support pipes). First template had 15mm holes in the middle, second template had 15mm holes in the top and bottom.
For wiring it all up, the antennas elements don't need to be coax or to even have multiple conductors - if I had some thick copper wire lying around I would have just used that instead. So I've just twisted the center and braid together on both ends of the two coax cables making up the antennas elements. These are jammed into terminal blocks and attached to the coax feed line using the instructions on this site:
https://sdrsatellitesounds.wordpress.com/2015/04/14/building-a-easy-to-make-homemade-qfh-antenna-from-coax/
My antenna doesn't have a balun and I've not decided if I'm going to add one yet. For overhead passes the antenna seems to work fairly well as-is. Perhaps a balun would improve reception of satellites that don't pass so closely. But probably putting it up higher would do more - currently its surrounded by trees and a house on all sides which will block its view a fairly large chunk of the sky (causing the noise at the top and bottom of those images).
The antenna feed line is terminated with an F connector (didn't have any BNC connectors lying around and didn't really want to butcher an antique 10base2 network cable). That is connected to a pigtail I got as part of this from amazon in 2015:
https://www.amazon.com/gp/product/B00RF15070/
Which is hooked up to one of these radios I got at the same time:
https://www.amazon.com/gp/product/B00QFCNNV0/
Neither is available anymore but I guess the current equivalents are https://www.amazon.com/RTL-SDR-Blog-RTL2832U-Software-Telescopic/dp/B011HVUEME/ and https://www.amazon.com/RTL-SDR-Blog-Pigtail-Adapters-Bundle/dp/B0132N1DM0/ which probably work as well as or better than what I'm using right now. More info here: http://www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/
In order to make this DVB-T TV Tuner act as a software defined radio rather than just a TV tuner on Windows you need a 3rd-party driver plus some SDR software (I'm using SDR#). The quick-start guide covers this: http://www.rtl-sdr.com/rtl-sdr-quick-start-guide/. Windows 10 will find and install the TV tuner driver itself so you'll have to replace the existing driver. IIRC the mentioned batch file (install-rtlsdr.bat) doesn't download the required SDR# plugin (rtlsdr.dll). I ended up getting it from http://osmocom.org/attachments/download/2242/RelWithDebInfo.zip in the rtl-sdr-release\x32 directory. Just copy the DLL into the SDR# directory and then continue with the getting started guide.
The software for decoding the APT transmissions from the satellite is wxtoimg: http://www.wxtoimg.com/. It seems to be discontinued now so the author has published the upgrade keys. The keys currently up there don't seem to work though, but the keys that were on the website back in early 2016 do: http://web.archive.org/web/20160313081919/http://www.wxtoimg.com/. You'll need to set the ground station coordinates, recording and auto processing settings. I didn't need to do the sample rate calibration the instructions talk about on my PC. You'll need to update keplers (from the file menu). If you entered an upgrade key you should be able to set it to automatically update Keplers from the GUI Options screen.
When wxtoimg is setup it will give you the times when the three satellites (NOAA-15, NOAA-18, NOAA-19) will be passing nearby (Satellite Pass List in the File menu). I'm also using GPredict (http://gpredict.oz9aec.net/) to watch the satellites. In GPredict I found I had to check the "Always use real time for pass predictions" option under Edit > Preferences > Predict > Pass Conditions for it to generate accurate pass times. Orbitron (http://www.stoff.pl/) is another option which seems to be recommended frequently.
To get the audio from SDR# into wxtoimg I'm just using the stereo mix. If its not enabled these instructions should work on windows 7 through 10:
http://www.rtl-sdr.com/tutorial-how-to-enable-stereo-mix-in-windows-7/
A few minutes before the satellite appears I just open SDR# and tune into the satellites frequency. These are:
- NOAA-15: 137.62MHz
- NOAA-18: 137.9125MHz
- NOAA-19: 137.1MHz
Settings in SDR# are mostly the defaults except:
- Under RTL-SDR Controller (gear button next to volume slider) I have gain set to around 40dB - required setting will vary. Other settings are left to defaults.
- Under Radio: WFM, bandwidth of 40000
Then I just set wxtoimg recording and it produces those images (along with a bunch of of others depending on what you've turned on under Options > Auto Processing Options).
There are instructions out there for automating this so that Orbitron controls SDR# to tune it to the right frequencies when one of the NOAA satellites approaches and as long as wxtoimg is left in recording mode it will generate images for each satellite as it passes by. This requires a dedicated Windows PC (and probably a relatively fast one at that - not some old Windows XP thing) to be running 24/7. You could use your main PC if you usually leave it on 24/7 and don't use your speakers for anything but listening to satellites. I tend to use Spotify a bit though so not really an option for me.
So my plan is to try and get this all running on a Raspberry Pi 3 which is cheap and low power. The Pi 3 seems fast enough to run the experimental ARM build of wxtoimg, the radio works fine there as long as you remove the TV tuner kernel module (sudo rmmod dvb_usb_rtl28xxu) and I guess probably blacklist the module so it doesn't get loaded again after a reboot. The rtl_fm command (from the rtl-sdr package) looks like a reasonable option for controlling the radio. Now I just need to find a way of getting audio from rtl_fm into wxtoimg. Either I need to find some ALSA equivalent to the stereo mix option on windows, or I need to use a USB sound card with a cable running from line out to line in. I'm currently trying this approach by just playing back a satellite recording I made earlier but wxtoimg seems to be struggling - maybe the 3.5mm patch cable I'm using is introducing some noise? Or possibly because the sound card only supports a sample rate of 44.1KHz where as wxtoimg really wants 11.025KHz I need to go through the slant correction thing the calibration instructions talk about. Once that's sorted out I need to find some way of getting wxtoimg to start rtl_fm at the right time. wxtoimg can control external radios via a serial port so my plan is to setup a virtual serial port (might have to use the tty0tty kernel module so the virtual port looks like a real one - a user-mode option like socat doesn't seem to be recognized by wxtoimg) with a bit of custom software at the other end which will receive the radio commands from wxtoimg and start/stop rtl_fm as necessary.
-
Wow David, very decent of you to spend the time putting that together, & for sharing.
I would need to find a spare month or so to give it a chance of sinking in.
Thanks so much, really appreciated.
Cheers
-
Very impressive David - thanks. Will follow with interest!!
Graeme
-
So I've given up on running wxtoimg interactively and having it handle the satellite recording. I was able to get loopback audio working but wxtoimg was still unhappy about it for some reason and the images weren't decoded properly.
Since the 11th I've been using autowx (https://github.com/cyber-atomus/autowx) to handle recording the satellites. It basically just gets satellite predictions from a library (pypredict), runs rtl_fm at the right time to record the signal, then runs the console version of wxtoimg to make the images. It works fairly well but doesn't quite meet my requirements.
For images to appear on weather.zx.net.nz they need to get into the database somehow. At first I was going to slightly modify autowx to do this but the codebase wasn't really structured in a way that was easy to modify. What started out as a minor refactoring exercise ended up being a near rewrite to remove the global variables, make it more portable, separate the various parts into modules to make testing parts in isolation easier and adjust the coding style to comply with PEP-8 (official python style guide). Some parts of it are still fairly identifiable as being based on autowx but much of it is effectively a new application at this point.
Last night I upgraded the software that runs weather.zx.net.nz to handle satellite images (noticed a few new bugs in that already) and this morning I switched from original autowx to my rewritten autowx. Now its just a case of fixing the bugs as they appear and getting that antenna off my lawn.
Latest satellite images now appear on weather.zx.net.nz against the Ruakura station (http://weather.zx.net.nz/s/rua2/, bottom of the page), archived images are available against the day page for whatever day they were taken on (eg, http://weather.zx.net.nz/s/rua2/2017/february/21/) going back to the 11th.
This page explains the various enhancements wxtoimg produces: http://weather.zx.net.nz/s/rua2/apt_enhancements.html
And there is also this secret testing page (http://weather.zx.net.nz/s/rua2/images.html) which will show you all images for the Ruakura station. Its not paged or anything so it not for use on your cellphone and will get fairly unusable in a few weeks when there are more images. But for now its neat to be able to scroll through them all on one page.
And below should be whatever the most recent false colour image in the database is:
(http://weather.zx.net.nz/data/rua2/images/rsgs/latest/full)