AIS Receiver
AIS Receiver Mk1 (RPi1) Pictorial Schematic
AIS Receiver Mk1 (RPi1) Layout
AIS Antenna
AIS Receiver Mk2 (RPi0) Layout
Parts List
Your AIS receiver will require the following items:
Note: Components and cables should be readily available locally or search for their name on eBay.
Create your SDHC Card Image
To simplify the installation process, we have prepared a complete, working image of the Raspbian Buster operating system together with the open-source rtl_ais and aisdispatcher software already installed and enabled as services. The image file is compressed, but will still require a large download and sufficient free space on your PC to unzip it: At least 10GB in total.
Request a link to our AIS receiver software image here and follow the software installation instructions below.
To install our AIS receiver software image do the following on a PC:
- Download the zip file (650MB) using the link provided
- Unzip the zip file to an img file (8GB)
- Download Win32DiskImager (12MB) using the link provided
- Install Win32DiskImager
- Insert an 8GB SDHC or 8GB Micro SDHC card into the PC (Note: A USB SD card adapter may be necessary)
- Start Win32DiskImager
- Select the image file and the SDHC card above. Select Write.
- Eject the SDHC card from the PC when finished
- You can then delete the zip and img files from your PC if desired
Configure your Raspberry Pi
Your Raspberry Pi will have to be configured for the first time using a hard-wired keyboard and monitor. You need to enter your own login password, your WiFi router access credentials and your localization information as follows:
- Power off the Raspberry Pi
- Insert the SDHC card into the Raspberry Pi
- For a RPi1 connect a powered USB hub
- Connect a USB Wi-Fi Dongle (only for RPis without a Wi-Fi adapter)
- Connect a USB keyboard
- Connect an HDMI monitor - You may need an HDMI to micro HDMI adapter
- Do not connect USB RTL-SDR dongle just yet
- Power up the Raspberry Pi using a USB Plug Pack or USB DC/DC Converter connected to a 12V DC Adapter
- Log in:
- Type: pi
- Type: raspberry
- Type: sudo raspi-config. Select and configure the following options for your installation:
- Change your User Password (Very, Very Important!)
- Network Options
- Enter your Wi-Fi SSID and Passphrase for your Wi-Fi Router
- Localization Options
- Locale
- Timezone
- Keyboard Layout
- Wi-Fi Country
- When connected to the Internet, upgrade the operating system:
- Type: sudo apt-get update
- Type: sudo apt-get upgrade -y
- To discover the IP Address of your RPi so you can log-in later:
- Type: hostname -I
- Shutdown your RPi:
- Type: sudo shutdown now
- Power down your RPi
- Connect the USB RTL-SDR dongle
- Connect your 162MHz antenna to the USB RTL-SDR dongle
- Power up the RPi
Calibrate your AIS Receiver
The operating frequency of the USB RTL-SDR Dongle's internal Temperature Controlled Crystal Oscillator (TCXO) may not be precisely on frequency, depending on its quality and other factors. However, you can use the RPi clock to calibrate the RTL-AIS service to account for any frequency offset. Note: The frequency offset is measured in Parts Per Million (PPM). Note: For 1PPM RTL-SDRs this step is hardly necessary as the frequency would only be off by +/- 162Hz.
Do the following on the Raspberry Pi:
- Login:
- Type: pi
- Type: Your password
- Stop the RTL AIS service and run the RTL test
- Type: sudo systemctl stop rtl_ais.service
- Type: rtl_test -p60
- Wait until the cumulative error value (in PPM) remains more-or-less the same for three consecutive minutes
- Note the last cumulative error value (in PPM). As shown below it is -3 PPM in this case.
pi@AIS:~ $ rtl_test -p60Found 1 device(s):0: Realtek, RTL2838UHIDIR, SN: 00000001Using device 0: Generic RTL2832U OEMDetached kernel driverFound Rafael Micro R820T tunerSupported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6[R82XX] PLL not locked!Sampling at 2048000 S/s.Reporting PPM error measurement every 60 seconds...Press ^C after a few minutes.Reading samples in async mode...Allocating 15 zero-copy bufferslost at least 64 bytesreal sample rate: 2048000 current PPM: 0 cumulative PPM: 0real sample rate: 2047993 current PPM: -3 cumulative PPM: -1real sample rate: 2047989 current PPM: -5 cumulative PPM: -3real sample rate: 2047994 current PPM: -3 cumulative PPM: -3real sample rate: 2047995 current PPM: -2 cumulative PPM: -3
3. Update the RTL AIS service with the required correction value in PPM (+3 in this case), which is the opposite of the error value in PPM (-3 in this case) determined above.
a. Type: sudo nano /etc/systemd/system/rtl_ais.service
b. Change: ExecStart=/usr/local/bin/rtl_ais -p 0 to ExecStart=/usr/local/bin/rtl_ais -p 3c. Type: Ctrl-O to save the changes and Ctrl-X to exit the editor
4. Reload and restart the RTL AIS service with the new changes
5. Type: sudo systemctl daemon-reload
6. Type: sudo systemctl restart rtl_ais
Register your AIS Receiver
By default, the AIS receiver software will upload your AIS station data only to the Pocket Mariner, Ship Finder and Vessel Finder AIS servers as an anonymous user. To upload to the AIS Hub and Marine Traffic AIS servers you will have to register with them to get a unique Upload IP Address and Port Number for your AIS station. These AIS servers also provide statistics for your AIS station. You can also register with the Vessel Finder AIS server if you want statistics for your AIS station too. Some AIS servers provide significant benefits to registered AIS station operators like free premium membership for the use of their AIS data and AIS station upload statistics, area coverage, online availability and email alerts. Since AIS servers don't all share your data, please upload to as many as possible. It will make the world a safer place for vessels! Here are the links to some AIS service providers including their IP Address and Port Numbers for anonymous upload:
To add new AIS Server Upload IP Addresses and Port Numbers to the defaults for the AIS Dispatcher service:
- Stop and edit the AIS Dispatcher service
- Type: sudo systemctl stop aisdispatcher
- Type: sudo nano /etc/systemd/system/aisdispatcher.service
- Add each new Upload IP Address and Port Number (Format: AAA.BBB.CCC.DDD:PPPP) to the end of the line below, each separated by a comma and with NO spaces.
- ExecStart=/usr/local/bin/aisdispatcher -u -g -h 127.0.0.1 -p 10110 -H 54.225.113.225:5322,109.200.19.151:4001,195.201.71.220:5964
- Type: Ctrl-O to save the changes and Ctrl-X to exit the editor
- Reload and restart the changed AIS Dispatcher service:
- Type: sudo systemctl daemon-reload
- Type: sudo systemctl restart aisdispatcher
Monitor your AIS Receiver
You can securely log into your AIS receiver over your Wi-Fi network to check its operation from another Wi-Fi enabled PC.
- Use your AIS Receiver's IP address discovered earlier (or check your Wi-Fi router's DHCP leases to find it).
- Open a terminal window
- Type: ssh pi@<Your AIS Receiver's IP Address>
- Type: <Your password>
- Display the AIS data being received in real-time as raw NMEA sentences
- Type: journalctl -u aisdispatcher.service -f
pi@AIS:~ $ journalctl -u aisdispatcher.service -f-- Logs begin at Fri 2020-05-15 19:39:48 AEST. --May 16 01:26:05 AIS aisdispatcher[438]: !AIVDM,1,1,,B,18JslT0014bGF;5bEibtLqqh0D1A,0*3DMay 16 01:27:12 AIS aisdispatcher[438]: !AIVDM,1,1,,B,4@4k1EQvAGgK;:Etkmb:JM7P00S:,0*10May 16 01:27:45 AIS aisdispatcher[438]: !AIVDM,1,1,,B,18JslT0014bGEFkbEnwtCIm:00ST,0*75May 16 01:28:03 AIS aisdispatcher[438]: !AIVDM,1,1,,B,17OetM5P18:GEFwbEp4<=?v80D0U,0*57May 16 01:28:32 AIS aisdispatcher[438]: !AIVDM,1,1,,B,4@4k1EQvAGgLO:Etkmb:JM7P0L1:,0*7DMay 16 01:28:34 AIS aisdispatcher[438]: !AIVDM,1,1,,B,3815F:Uwh0bGHugbG4U:FWW40r7b,0*48May 16 01:29:12 AIS aisdispatcher[438]: !AIVDM,1,1,,B,4@4k1EQvAGgM;:Etkmb:JM7P0H7=,0*0DMay 16 01:29:24 AIS aisdispatcher[438]: !AIVDM,1,1,,B,17OetM5P0w:GDcWbEt>LEwvj08><,0*1AMay 16 01:29:44 AIS aisdispatcher[438]: !AIVDM,1,1,,B,17P4895P15:GD;obEwB<8gwJ0@JB,0*7EMay 16 01:30:03 AIS aisdispatcher[438]: !AIVDM,1,1,,B,17OetM5P11:GDG7bEv6<E?v80<0U,0*1A
b. Type: Ctrl-C to exit
However, to verify that your data is being uploaded to an AIS server you have to log into it and check your upload statistics - if provided.
Install your AIS Receiver
Reconfigure the AIS receiver for stand-alone operation, install it in the enclosure and mount it as follows:
- Disconnect the USB keyboard, HDMI monitor and USB hub, if used
- Assembe the RPi, USB RTL-SDR dongle and 12V to 5V 2A micro USB DC/DC converter in the enclosure
- Connect the 162MHz antenna via the 50 Ohm coaxial cable and an SMA connector to the USB RTL-SDR
- Optionally connect an inline 162MHz AIS Filtered Preamp to amplify the AIS signals and filter out local radio frequency interfrence.
- Connect the 12V DC Adapter via 12V DC Cable to the 12V to 5V 2A micro USB DC/DC converter.
- Mount the enclosure as close to the 162MHz Antenna as possible to reduce coaxial line losses if required. However, inside installations with short lengths of coaxial cable may also be acceptable.
Operate your AIS Receiver
Operating an AIS Receiver station is easy. Just switch it on, let it connect to the Internet and it will receive and upload AIS traffic to the AIS Servers, 24/7.
- Make a backup copy of the RPi SD Card using Win32diskimager.
- Check the operation of the AIS Receiver on a regular basis by monitoring it (as above).
- Check your AIS Servers. Some provide useful AIS Receiver station statistics and on-line maps.
Check the Performance of your AIS Receiver
The AIS receiver will work well on any version of Raspberry Pi with WiFi access - either using the built-in WiFi transceiver or an add-on USB WiFi dongle. Expect the rtl_ais application to run at the following CPU throughput levels:
More information
For more information and credit for the open-source code used in this project please see:
Project Status (Updated: 29 May 2021)
Total number of reported builders: 192
Please update your status by e-mailing us. You can send us pictures and reports of your progress.
AIS Yagi Antenna
In most cases the AIS receiving station is located in-land, or at least on the coast. In these situations, omnidirectional coverage is not needed. Where 90-120 degree beamwidth is adequate, a small Yagi antenna can provide additional gain over a simple omnidirectional antenna.
We have recently developed a simple, low-cost method of Yagi antenna construction for schools: It does not require a drill press or any special tools. This method uses aluminium flat bar elements, which are easy to cut, drill, bend and connect to. The folded-dipole driven element can be formed by rolling it around a 25mm dowel. The boom is made using light-weight aluminium angle. Everything is assembled using M5 x 12mm stainless-steel hex bolts, with shakeproof washers (on either side of the boom for good electrical connection and rigidity) and nylock nuts. These bolts can be fastened, using spanners, to a high torque - to prevent the elements turning. A 25x25x25mm piece of PVC angle is use as an insulator for the feed point. It can be glued to the boom. A quarter-wavelength balun is attached to the boom using cable ties. Coaxial cable connection to the driven-element is made using two, 3mm holes at feed point and 3mm ring-lugs. The coax shield is connected to the boom via a 5mm ring-lug at the feed point. All connections are kept very short.
Feed Point Construction
This 3-Element AIS Yagi Antenna for 162MHz was designed using the VK5DJ Yagi Calculator and constructed using 12x3mm aluminium flat bar elements on a light-weight 1m length of 25x25x3mm aluminium angle boom.
VK5DJ's YAGI CALCULATOR RESULTS
Yagi design frequency =162.00 MHzWavelength =1851 mmParasitic elements contacting a square section metal boom 25 mm across.Folded dipole mounted same as directors and reflectorDirector/reflector strip =12 mm by 3 mmRadiator strip =12 mm by 3 mmREFLECTOR Length 912.6mm. Boom position 30 mmRADIATOR Folded Dipole 25 mm ID. Length 899.9 mm. Boom position 400.1 mm.DIRECTORS Dir 1. Length 824.3 mm. Boom position 538.9 mm. Gain 4.8 dBd. Gain 6.9 dBi.A quarter-wavelength 4:1 balun uses 0.66 velocity factor RG-58C and is 611 mm long.
Balun Construction
AIS 162MHz 3-Element Yagi Antenna with Coaxial Balun
Vertical Mounting on 8.5m Aluminium Mast
Status Reported by Builders
The following is a list of some of the builders who have completed the rotator and sent us their comments or pictures:
Richard Charmers - "Hi all, Just a line to let you know that I have got my AIS receiving station up and running. I used your antenna design, fastened onto the (no longer used) chimney stack. There's a Pi 3A connected to a Nooelec NESDR SMArt v4 SDR located in the attic. I also installed AISHUB's Ais Dispatcher program onto the Pi, which gives me a web page to monitor from any machine on my network. We're located on the southern shore of Broadford Bay, Isle of Skye and are pulling in messages from up the Inner Sound, over to Kyleakin, Raasay and possibly as far as Kishorn. Many thanks, I wish there had been such fun things when I was at school!!! Keep up the good work."
Комментариев нет:
Отправить комментарий