logo elektroda
logo elektroda
X
logo elektroda

How do you build your own Marine AIS receiver?

andreyatakum 3180 8

TL;DR

  • Builds a DIY Marine AIS receiver to decode ship transponders, starting with an RTL-SDR setup and ending with a fully self-contained analog receiver.
  • Tunes AIS channels at 161.975 MHz and 162.025 MHz in narrow FM, then feeds audio into ShipPlotter through a sound-card loopback or virtual audio link.
  • The analog version uses an MC3362 with a 10.7 MHz first IF, a 25 kHz ceramic filter, and an Arduino plus si5351 for the local oscillator.
  • When a vessel is within antenna range, ShipPlotter displays decoded ship messages in View > Messages and the receiver emits the characteristic digital signal sound.
  • The stock RTL-SDR antenna is unsuitable, so the article recommends a GP antenna on the roof or a directional antenna aimed at the sea.
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • In previous articles I have already mentioned the possibility of receiving interesting parametric information from aircraft, an air-band receiver for listening to conversations between pilots and traffic controllers. No less interesting may be the data on marine vessels, transmitted by the AIS system. There are websites similar to the popular flightradar24 or flightaware, for example MarineTraffic or VesselFinder.


    Tracking of aircraft or marine traffic: method of data collection .
    The latter use the same method of collecting information and transmitting it to a website, so that any user can check the status of a flight or the voyage of a seagoing vessel. The way it works is that volunteers around the world install a receiver, register it in the system, connect it to the Internet and deliver the data to a server, which processes and shows it in a form that is clear to the user, i.e. as an image on a map.

    In this way, when walking along the sea, we can always check what ship we see on the horizon. However, there are situations when we don't have internet, even mobile internet. For example, on our own small sea vessel - a motor or sailing boat - without a suitable device. In such a case, information on maritime traffic can become not only useful, but lives may depend on it.

    Another issue - some marine vessel owners, most often wealthy government officials, prohibit the display of data on public services. However, to individual viewers they cannot prohibit it. This is legally and technically impossible.

    Anyway, I personally don't own a ship, I have internet almost all the time, but out of curiosity I decided to develop my own Marine AIS receiver.


    Characteristics of the project .
    Having an SDR receiver of the RTL-SDR type does not even require much programming experience. All you need to do is install the appropriate apps on your smartphone or notebook and that's it. I will describe here step by step for beginners the whole procedure, and at the end of the article I will add a schematic and a description of a fully self-contained receiver that avoids the use of an RTL-SDR dongle.

    The aim is to pick up the signal transmitted by the transmitter placed on the ship. The data emission takes place at 161.975 MHz or 162.025 MHz with a bandwidth of 25 kHz, with frequency modulation. Connect the RTL-SDR receiver. We start the Sharp SDR programme, set the frequency, band and modulation mode (narrow FM - 25 kHz). With the presence of a marine vessel within the sensitivity range of the antenna-receiver link, we will see something similar and hear the characteristic sound of a digital signal.

    Computer screen displaying software for receiving radio signals.
    .

    We decode the received data on the computer using the ShipPlotter software. Unfortunately it costs a little (about 100 zl), but you can play around with it free of charge for 3 weeks. By default, this programme receives the sound signal from an analogue receiver or saved in WAV format from another instrument. In our case, the receiver is the same computer on which this application runs. So we can connect the input/output of the sound card and start receiving data. However, often on laptops we have one plug for input and output, you have to solder on the jack wires. The simplest solution would be to use any program that connects the output to the input in a virtual way. There are plenty of programs for this purpose and anyone can use any.

    Personally, when I experiment, I use a physical connection between two computers: one which acts as a receiver and the other as a decoder and data display. It's not a practical solution, but it suits me because I'm going to use a decoder with an analogue receiver, instead of an RTL-SDR dongle, after the experiments.

    Anyway, once this hardware-software complex is up and running, in the ShipPlotter application menu we press View - Messenges. If the hardware and software are working correctly, we get data from the ships.


    Building and operation .
    As for analogue equipment: for several reasons I do not like digital receivers. Especially as in the case with AIS we do not need all their capabilities. I prefer analogue instruments of this type. Especially since in this case the receiver can be very simple.
    For example, it can be realised on the popular MC3362 integrated circuit. In fact, it is developed by Motorola for narrowband receivers. However, this is achieved by a double frequency conversion. The first (usually 10.7 MHz) is used to attenuate the mirror channel, and by the second (455 kHz) we obtain the narrow bandwidth of the audio signal. To extend it, it is sufficient to dispense with the second transformation and to use a broadband filter (25 kHz) at 10.7 MHz in the first IF.
    A typical receiver schematic on the MC3362 looks as follows:

    MC3362 receiver application schematic by Motorola.
    .

    The broadband variant, on the other hand, looks like this:

    Diagram of an AIS receiver based on the MC3362P chip.
    .


    As you can see, the first IF signal from the filter is fed to pin 7, instead of 17. After its amplification, it is detected on the discriminator with inductor L3 and capacitor C12. Obviously, the contour, which consists of these elements, must have the frequency of the first IF. The ceramic filter on 10.7 must have a bandwidth of not less than 25 kHz.
    The heterodyne is to be set to one frequency, which is 161.975 - (or +) IF. A simple quartz oscillator or a frequency synthesiser on an Arduino and si5351 IC can be used:

    Electronic schematic of a receiver on Arduino Pro Mini with SI5351 module.
    .


    The simple code can be found below the spoiler:
    Spoiler:
    #include "si5351.h"
    #include "Wire.h"

    //----------------------------------------------------------------------------
    // LO (heterodyne) frequencies * 10 Hz

    const uint32_t chan_tab[10] =
    {
    15125000,
    15132500,
    };

    Si5351 si5351;
    byte channel;

    #define SELECT_PIN_1 2

    //--------------------------------------------------------------------------------
    byte read_chan_number()
    {
    if (!digitalRead(SELECT_PIN_1)) return 1;

    return 0;
    }

    void set_current_chan()
    {
    byte new_chan;

    new_chan = read_chan_number();
    if (channel != new_chan)
    {
    digitalWrite(LED_BUILTIN,HIGH);
    channel = new_chan;
    si5351.set_freq(chan_tab[channel] * 10000ULL, SI5351_CLK0);
    digitalWrite(LED_BUILTIN,LOW);
    }
    }

    //--------------------------------------------------------------------------

    void setup() {
    Serial.begin(9600);
    bool i2c_found;

    pinMode(LED_BUILTIN,OUTPUT);
    pinMode(SELECT_PIN_1,INPUT_PULLUP);

    i2c_found = si5351.init(SI5351_CRYSTAL_LOAD_8PF, 0, 0);
    if(!i2c_found) // si5351 not found
    {
    while(1)
    {
    digitalWrite(LED_BUILTIN,HIGH);
    delay(200);
    digitalWrite(LED_BUILTIN,LOW);
    delay(100);
    }
    }

    channel = 255;
    si5351.update_status();
    si5351.drive_strength(SI5351_CLK0, SI5351_DRIVE_2MA);
    si5351.set_correction(81000, SI5351_PLL_INPUT_XO);
    set_current_chan();
    si5351.output_enable(SI5351_CLK0, 1);
    }

    void loop()
    {
    set_current_chan();
    Serial.println("channel" + String (channel));
    delay(100);
    }
    .


    Antenna selection .
    An important consideration for this system is the antenna. Common and cheap RTL-SDR receivers are sold with one that is not suitable for anything. It looks like a 500-1000 MHz frequency. AIS reception needs a more efficient solution. In the case with a marine vessel installation, this can be a GP (Ground Plane) type antenna, having omnidirectional radiation in the horizontal plane. It consists of one vertical radiator of length λ/4 (λ as we know is the wavelength, in our case it is about 1.6 m) and several counterweights of length not less than λ/4. The counterweight can be a flat metal roof. When we use the receiver in stationary conditions, i.e. on the shore, it makes sense to use a directional antenna, "looking" towards the sea.
    My GP antenna is located on the roof of an apartment building. It is connected to the receiver with a coaxial cable (as in satellite TV) via an MCX-F-type adapter.

    Portable RTL-SDR receiver on a lace tablecloth
    .

    Cool? Ranking DIY
About Author
andreyatakum
Level 15  
Offline 
andreyatakum wrote 720 posts with rating 1032. Live in city Antalya. Been with us since 2021 year.
  • ADVERTISEMENT
  • #2 21287859
    satanistik
    Level 27  
    Posts: 1930
    Help: 61
    Rate: 759
    OPEN CPN can also receive this signal and plot the position on a map, and it is free. I wonder if it would be possible to receive everything if the processor tuned between these channels alternately. I wonder what the channel the ship is transmitting on depends on.
  • ADVERTISEMENT
  • #3 21287874
    andreyatakum
    Level 15  
    Posts: 720
    Rate: 1032
    satanistik wrote:
    I wonder what the channel the ship is transmitting on depends on.


    The second channel (162.025 MHz) is the data exchange between ships.
    satanistik wrote:
    . I wonder if if the processor tuned between these channels alternately it would be possible to receive everything.
    .
    For an SDR type receiver this is no problem. As for analogue we need two, or a quick switch between two channels. In the case with my synthesiser variant this is possible as much as possible. You can connect an n-p-n transistor with the collector to pin D2 with the emitter to ground. And control from the computer. Or add a couple of lines to the code so that the synthesiser connects channels depending on the presence of an audio signal on one of the analogue pins.

    Added at 49 [seconds]: .

    satanistik wrote:
    OPEN CPN can also receive this signal and plot the position on the map and it is free.
    .
    Thanks! I will look for this programme immediately
  • ADVERTISEMENT
  • #4 21287918
    satanistik
    Level 27  
    Posts: 1930
    Help: 61
    Rate: 759
    Link .

    Here is an interesting receiver design on 2 SI4362 chips and an STM proc. The chip listens to both channels and transmits data via UART.
    There are program sources and a schematic and PCB. I don't really see somewhere a description of how to make the inductance, but maybe the author or someone from the shortwave forum could help something.
  • #5 21288006
    andreyatakum
    Level 15  
    Posts: 720
    Rate: 1032
    satanistik wrote:
    I don't really see somewhere a description of how to make the inductance but maybe the author or someone from the krutkofalarz forum would help something.
    .
    Exactly that is not a problem.
  • ADVERTISEMENT
  • #6 21290184
    ArturAVS
    Moderator
    Posts: 26022
    Help: 2295
    Rate: 7720
    VHF is a rather short range. If one lives near the sea/ocean then ok. By the way, Si4362 is not even recommended by the manufacturer for new receivers. @andreyatakum Why in the example code, did you not add a quartz calibration option for the Si5351?
  • #7 21290421
    andreyatakum
    Level 15  
    Posts: 720
    Rate: 1032
    ArturAVS wrote:
    VHF is a rather short range. If one lives near the sea/ocean then ok.
    .
    True, even for me, living just off the sea shore, catching signals from sea vessels checks the problem, because the trails are in the distance. An example on the map. My place of residence is marked in red. As you can see, the head track is about 50 nm to the south. An RTL-SDR receiver with a cable of approx. 25 m is not very suitable.

    Map of the Mediterranean coast with marked ships and a red square indicating the place of residence.
    .

    ArturAVS wrote:
    Why, in the example code, did you not add a quartz calibration option for the Si5351?
    .
    Because I forgot. I used this scheme for a receiver on the low frequency bands (3.5 MHz) and for a CB radio. There the inaccuracy does not matter much.
  • #8 21290992
    satanistik
    Level 27  
    Posts: 1930
    Help: 61
    Rate: 759
    I was thinking of a receiver to build a navigation computer. On a sailboat, every watt of power counts so grinding out that SDR which requires constant fast calculations may not be optimal. As for the Si chip - it is still on sale and I think that a few pieces for the needs of amateurs will be found for some time yet. In general nowadays circuits are short lived not like NE555. There is a project on google for a colinear antenna which is almost 2m long - maybe it would help with shore reception.
  • 📢 Listen (AI):

    Topic summary

    ✨ The discussion revolves around building a Marine AIS receiver, focusing on the technical aspects of signal reception and data processing. Participants mention the use of software like OPENCPN for visualizing AIS data on maps. Key components discussed include SDR (Software Defined Radio) receivers, specifically the SI4362 chip for dual-channel listening, and the Si5351 for frequency calibration. Challenges such as limited VHF range and signal reception from distant vessels are noted, along with suggestions for improving reception, such as using a collinear antenna. The conversation also touches on the longevity of electronic components and the need for efficient power usage in marine applications.
    Generated by the language model.

    FAQ

    TL;DR: A DIY Marine AIS receiver can work with 2 channels at 161.975 MHz and 162.025 MHz, and "all you need" for a beginner setup is an RTL-SDR, Sharp SDR, and decoding software. This FAQ helps hobbyists and boat owners build a simple receiver, choose between SDR and analog designs, and improve real-world reception near the coast. [#21283499]

    Why it matters: AIS reception can give you nearby vessel traffic data even when you do not have mobile internet on a small boat.

    Option Main parts Power/use case Strength Limitation
    RTL-SDR setup RTL-SDR + Sharp SDR + ShipPlotter/OpenCPN Better for experiments on PC Easy to start, flexible Needs a computer and suitable antenna
    Analog MC3362 MC3362 receiver + 10.7 MHz filter + LO Better for low-power boat installs Simpler dedicated hardware Single channel unless switched or duplicated
    Dual-chip receiver 2× Si4362/Si4463 + STM32 Dedicated embedded design Listens to both AIS channels at once More complex build

    Key insight: Antenna quality and line-of-sight matter more than decoder choice. A weak antenna or a 25 m feed line can make AIS reception fail long before the software becomes the bottleneck.

    Quick Facts

    • AIS traffic in the thread is received on 161.975 MHz and 162.025 MHz, with 25 kHz bandwidth and narrow FM at the receiver stage. [#21283499]
    • The thread cites ShipPlotter at about 100 zł, with a 3-week free trial for decoding and message display. [#21283499]
    • The suggested AIS shore or boat antenna is a quarter-wave GP: the wavelength is about 1.6 m, so the vertical radiator is about λ/4. [#21283499]
    • One real installation problem appears at distance: the author reports the main sea route is about 50 nautical miles away, and an RTL-SDR with ~25 m cable is "not very suitable" there. [#21290421]
    • A dual-channel embedded alternative mentioned in the discussion uses two Si4362 chips and an STM processor, then outputs decoded data over UART. [#21287918]

    How do you build a simple Marine AIS receiver with an RTL-SDR dongle and ShipPlotter step by step?

    You build the simplest AIS receiver by using an RTL-SDR as the RF front end and ShipPlotter as the decoder. 1. Connect the RTL-SDR, open Sharp SDR, and tune to 161.975 MHz or 162.025 MHz with 25 kHz narrow FM. 2. Route the receiver audio into ShipPlotter, either by a cable or virtual audio link. 3. In ShipPlotter, open View -> Messenges and check whether ship data appears. The thread says this path needs little programming skill and works well for beginners. [#21283499]

    What is AIS and what kind of vessel information can you receive on 161.975 MHz and 162.025 MHz?

    AIS is a marine identification system that sends vessel data over VHF so software can show ships on a map. In the thread, the receiver targets 161.975 MHz and 162.025 MHz, then forwards decoded traffic to software similar in purpose to MarineTraffic or VesselFinder. The practical result is vessel status and voyage-related position data visible to the user. This lets you identify a ship on the horizon or monitor nearby traffic when you are near the sea. [#21283499]

    How can I decode AIS audio from Sharp SDR into ShipPlotter on a laptop with a combined audio jack?

    You can decode AIS by sending Sharp SDR audio into ShipPlotter through either a physical jumper or a virtual audio connection. On a laptop with one combined audio jack, the thread suggests soldering the jack wiring if you want a physical link. A simpler method uses software that routes output to input virtually. The author also uses two computers during experiments: one receives RF and one decodes audio, which avoids local audio routing issues but is less practical onboard. [#21283499]

    Which is better for a low-power boat installation: an RTL-SDR AIS receiver or an analog receiver based on the MC3362?

    An analog MC3362 receiver is better for a low-power boat installation when you want dedicated hardware without constant SDR processing. The thread author prefers analog gear because AIS only needs a narrow task, not the full flexibility of an SDR. Another poster also notes that on a sailboat every watt matters, so an SDR doing constant fast calculations may be a poor fit. Use RTL-SDR for easy testing on a PC, and MC3362 when low power and simplicity matter more. [#21290992]

    What is a GP ground plane antenna, and how do you size it for AIS reception around 162 MHz?

    "GP ground plane antenna" is a vertical VHF antenna that uses one quarter-wave radiator and several counterpoises, giving omnidirectional horizontal coverage. In the thread, AIS is around 162 MHz, where the wavelength is about 1.6 m. That makes the vertical element about λ/4, and the counterweights should be not less than λ/4. For a boat, this type suits all-around coverage. For a shore station, the thread says a directional antenna aimed at the sea can make more sense. [#21283499]

    How do you modify a typical MC3362 narrowband receiver into a broadband 10.7 MHz IF AIS receiver?

    You modify the MC3362 design by skipping the second conversion and widening the first IF path. In the thread, the first IF output from the 10.7 MHz filter goes to pin 7 instead of pin 17. After amplification, detection happens in the discriminator stage. This keeps the signal broad enough for AIS instead of using the usual narrow 455 kHz path. The required filter at 10.7 MHz must pass at least 25 kHz bandwidth. [#21283499]

    Why does AIS reception range on VHF drop so much when the sea route is 50 nautical miles away from my antenna location?

    AIS range drops because VHF coverage is strongly limited by path loss, antenna efficiency, and feed-line losses over long coastal paths. The thread gives a concrete case: the main route is about 50 nautical miles away, and an RTL-SDR with about 25 m of cable was "not very suitable." That means the weak link may be the antenna system, not the decoder. If the sea lane is far offshore, a better antenna, lower-loss feed, or higher antenna placement matters more than changing software. [#21290421]

    What does the ship's AIS transmit channel depend on, and how are channels 161.975 MHz and 162.025 MHz actually used?

    In this thread, 162.025 MHz is described as the ship-to-ship data exchange channel, while AIS reception overall uses both 161.975 MHz and 162.025 MHz. The practical takeaway is simple: if you monitor only one channel, you can miss traffic carried on the other. That is why SDR reception is convenient, and analog reception needs either two receivers or fast switching. For a complete local picture, plan for both frequencies rather than treating one channel as optional. [#21287874]

    In what way can OpenCPN receive AIS data and plot vessel positions on a map for free?

    OpenCPN can receive AIS data and place vessel positions on a map without paid decoding software. The thread states that OpenCPN can receive the signal and plot position, and it is free. That makes it an attractive alternative to ShipPlotter if your goal is onboard navigation display rather than experimentation. In practice, you still need a receiver and a usable AIS data stream, but the chart display side does not require the paid program. [#21287859]

    How would you switch an analog AIS receiver between both AIS channels with an Arduino and an Si5351 synthesizer?

    You can switch channels by changing the Si5351 local-oscillator frequency under Arduino control. The thread proposes connecting an NPN transistor with collector to D2 and emitter to ground, then controlling switching from the computer. It also suggests adding code so the synthesizer changes channels when audio appears on one of the analog inputs. That gives you a fast two-channel scanner without building two full analog receivers, although truly simultaneous listening still needs two RF paths. [#21287874]

    What ceramic filter bandwidth should I use at 10.7 MHz for AIS, and why is 25 kHz important?

    Use a 10.7 MHz ceramic filter with not less than 25 kHz bandwidth. The thread states this directly because AIS reception here is handled as a 25 kHz wide signal path, and a narrower filter would clip useful modulation energy before detection. In the MC3362 broadband variant, the widened first IF is the whole point of the redesign. If you keep the filter too narrow, decoding quality drops even when the RF signal is present. [#21283499]

    How do you calibrate the Si5351 crystal in an Arduino AIS synthesizer so the local oscillator frequency is accurate enough?

    You calibrate the Si5351 by applying a crystal correction value in code before you rely on the oscillator frequency. The thread code already contains set_correction(81000, SI5351_PLL_INPUT_XO);, and the author later says he forgot to add a proper quartz calibration option in the example. He also explains that the same circuit was reused for 3.5 MHz and CB work, where inaccuracy mattered less. For AIS near 162 MHz, crystal correction becomes more important. [#21290421]

    What is the discriminator circuit with L3 and C12 doing in an MC3362 AIS receiver, and how do you tune it to the first IF?

    "Discriminator circuit" is a detector stage that converts frequency variations into audio or baseband, using a tuned network at a defined intermediate frequency. In the MC3362 AIS version, L3 and C12 form that tuned network. The thread says this circuit must be set to the first IF, because detection now happens after the 10.7 MHz broadband path rather than after the usual second IF chain. Tune L3 and C12 to the first IF frequency, or the receiver will not demodulate properly. [#21283499]

    What are the pros and cons of a dual-channel AIS receiver using two Si4362 or Si4463 chips and an STM32 compared with a single-channel design?

    A dual-channel design hears both AIS channels at the same time, while a single-channel design can miss messages unless it switches quickly. The thread mentions a receiver built with two Si4362 chips and an STM processor, with schematic, PCB, sources, and UART output. That is its main advantage over a single-channel MC3362 or single-LO design. The tradeoff is complexity and part choice: another poster notes the Si4362 is not recommended by its maker for new receivers, even though parts are still available to hobbyists. [#21290184]

    What is the best antenna option for shore-based AIS reception: a quarter-wave GP antenna, a directional antenna, or a long collinear design?

    For shore-based AIS reception, a directional antenna aimed at the sea is the best option in this thread. The author says a GP works well on a vessel because it is omnidirectional in the horizontal plane, but for a fixed coastal site it makes sense to use a directional antenna looking toward the sea. Another poster suggests a collinear antenna almost 2 m long as a possible improvement for shore reception. Choose GP for all-around boat coverage, and directional or long collinear when offshore lanes are distant. [#21290992]
    Generated by the language model.
    ADVERTISEMENT