Git Product home page Git Product logo

peterantypas / maiana Goto Github PK

View Code? Open in Web Editor NEW
301.0 62.0 65.0 93.18 MB

MAIANA™ is the first Open Source AIS transponder. It proudly raises an extra long middle finger to the marine electronics industry, government overregulation and everything else that gets in the way of innovation in this space.

License: GNU General Public License v3.0

C 95.57% C++ 3.80% Makefile 0.20% Shell 0.01% Python 0.23% Assembly 0.20% CMake 0.01%
ais-transponder pcba

maiana's People

Contributors

peterantypas avatar ptrbrn avatar rszemeti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maiana's Issues

Build it from modules

Hi,
when I saw this project for the first time I ordered some modules to build a simple AIS from modules. The parts arrived mid 2020 but the project made a lot of progress and changed a lot. As the project is a little bit on hold I wondered if I could use the current source code and build a poor mans versions.
It would be bulky but would give me a simple AIS receiver. The transmission power I to low but might be better than no transmission at all.

What do you think?

The modules:

GN-801 GPS
https://www.aliexpress.com/item/32951163811.html

SX1278 170mhz 1W
https://www.aliexpress.com/item/33044516902.html

SI4463 170Mhz 500mW
https://www.aliexpress.com/item/32802449702.html

Stm32f302cbt6
https://www.aliexpress.com/item/4000906426082.html

SMA cable Y pigtail RG316
https://www.aliexpress.com/item/1005001693573105.html

Front end ?

Hello,
i like this project and probably i will make two kit (single borad version) one for me and one for my friend, but i'm not expertise on AIS solutions, so what's about front end display ?
There are compatible software solutions with this project that can be used on tablet or something like it ?
can be connected to Nmea2000 interface to existing system on boat ?

Incorrect bit padding in NMEA output

For certain single frame messages, the NMEA encoding is not strictly correct, as it lacks the "padding" information at the end.

Example:

!AIVDM,1,1,,B,H5NThl1=LTIB0pE=<0000000000,0*5D

Even though most clients will process this message correctly, an "anal" AIS parser will reject it for having the wrong number of fill bits. In this particular case, the package is 27 AIS bytes long, so it must have 2 bits of padding in order to be a multiple of 6.

The correct encoding is:

!AIVDM,1,1,,B,H5NThl1=LTIB0pE=<0000000000,2*5F

The bug is probably in NMEAEncoder.cpp, which incorrectly assumes that single frame messages are always zero padded:

    if ( numSentences > 1 )
      {
        if ( i == numSentences )
          sentence[k++] = '0' + fillBits;
        else
          sentence[k++] = '0';
      }
    else
      {
        sentence[k++] = '0';
      }

Add hardware based mechanism to prevent runaway transmission

Currently, if anything happens during transmission that causes firmware to stop executing or jump to the ROM bootloader, the most likely outcome is that the transceiver IC will remain in direct TX mode, clocking a constant bit value (probably 0), while transmitting indefinitely.

There needs to be a hardware based mechanism to shut down both RF ICs during reset. Perhaps pullups on their SDN pins?

Tuning is off by 5KHz

It has come to my attention that boards built in the last two months and which have a new crystal (ECS-300-10-33B-CKM-TR) are off by about 5KHz in their tuning. This isn't a big problem. Both RX and TX function well enough. It should, however, be corrected.

The fix will be in a firmware update. The challenge, though, is that I'm not 100% sure which board revisions were affected. I know for a fact that 100% of version 11.5.0 and later boards are based on the new ECS crystal, but it's possible that some boards between 11.3.0 and 11.5.0 had a mix of crystals.

If the crystal on the board looks like this, then FW update 4.1.0 should be applied. If not, it should be skipped.

IMG_1673

Output power calibration

Unfortunately, the current design cannot output a consistent amount of power. I am seeing a significant amount of variance and keep finding myself adjusting the PA bias voltage divider to dial in +33dBm.

So the final (rev 9.4) board will have to incorporate a trimmer in that section like this:

Screenshot from 2020-11-20 11-17-54

The nominal value for R11 is 3K, but I have had to adjust it down to 2.2K or even 1.8K in one board.

This will make it harder for folks to build this board without an RF power meter but I would argue that if you're not properly equipped for this type of work, you should probably just buy the kit when it surfaces. With the kit, you will know that every board has been programmed, tested and tuned.

Help

Very nice Job. I am trying to build the project(firmware folder) in eclipse mars.2 DS-5 Professional Edition
Version: 5.26.2. I just downloaded the eclipse and it dose not show any toolchain in tool chain editor to select. I keep getting this error: make: *** No rule to make target 'all'. Stop.
I tryed to add ARM plug in but I could not do it.
How could I compile and build the project for Arm processor.

Thanks.

ng tane traffic quickely enough

Peter

I purchasd the asembled kit and have just set it up which is all very easy and straight forward.

I do not have acces to anoter AIS reveiver to verify only marine traffic

I programed with;
station 250003136,CELT,EIPL4,36,0,0,0,0

it pops up in marine traffic quickly enough but it is displayed as 'C 4 (IE)'
I left it runnig for some time

Do i have an issue ?

ta
JoeW

TX switch may prevent transponder from booting

The current design (including board revs shipped in the kit) directs the "TX_OFF" signal to the GPIO PA12. This was an unfortunate choice, as it turns out, because this pin is USB D+ and the effect of the "TX off" setting is for it to be pulled down to GND hard via a buffer MOSFET.

This causes some boards to hang and draw a significant amount of current during POR. But not every board does this.

The best workaround is to always keep the breakout switch to "TX on" position during power-up.

Contents of nmea messages

I am doing initial testing of my unit and the AIS information that OpenCPN is displaying has location, course, heading, rate of turn, speed, class, flag and MMSI. It is missing the vessel name, dimensions, destination and ETA.
Is that the expected outcome? I could not find any limitations mentioned in the documentation. But it also doesn't give an example sentence or screenshot.
If that normal, please document that.
If I should see all fields populated, I'm happy to debug it I did something wrong. Any hints what could cause this would also be appreciated.

LC79H?

Hello Peter, really cool project!

Have you seen the new LC79H from Quectel? It seems to be in the same price range as the one you are using: https://www.quectel.com/product/gnss-lc79h

With it you would have dual-band L1/L5 and could go from an accuracy of 2.5m CEP to 1m CEP, seems to slice the power consumption in half compared to your current GNSS module as well. I'm not an electrical engineer, but it's the one my company was recommended when building something of similar nature.

maiana setup with extisting VHF antenna

If the boat already has a VHF antenna at the mast head, is it possible/sensible to use this instead of the bundled antenna?

Having two antennas up there would cause some interference, I would guess and it is extra wiring hassle.

Ais class A

Is it possible to build a class A ais with this project?

Switch to a different GNSS module

Telit just confirmed that they're phasing out the SE873 in favor of the SE873Q5. Unfortunately, the Q5 contains a DC/DC switch which literally craps all over the marine VHF band, raising the AIS noise floor by several dB in its vicinity. I have confirmed this with spectrum analyzer and EMC probes as well as an A/B test.

The design will have to change. The good news is that the Teseo and its derivatives should fit, so that's encouraging:

Screenshot from 2020-10-30 12-35-15

Leaving this ticket here for visibility until I resolve this. As always, open to suggestions if you have any.

Missing component values

Hello Peter,

I was just about to order the components to build the hardware.

However, a few of the component values seem to be missing. For example L20, C37 and R1 on the RF board are marked as 0 on the PDF schematic, also the values are not in the SCH file.

USB needs galvanic isolation

When a USB cable is plugged into any breakout, the CH340N IC is on and presents 3.3V at both its TX and RX pins, regardless of the status of the remaining voltage rails.

This means that the a weak USB voltage (which is regulated to ~3.6V via a Zener) leaks into every IC on every board that has a galvanic, direct or indirect connection with the TX/RX pins. This includes both the remote transponder board (in the antenna housing), as well as the local MCU in the NMEA2000 adapter. The end result is that approximately 2V presents itself on the main transponder 3.3V rail, as well as the local board's 3.3V rail, both of which should be at zero.

This is not ideal and it should be dealt with, as it can cause some pretty nasty power-up glitches under the right (or rather "wrong") conditions. An added side effect is that the USB and NMEA0183 breakouts can appear to be "on" with their LEDs dimly lit due to backpowering, when in fact they are not.

Amazing project, but where to get (odd) components

Hi !
This looks like a nice winter project to get going before the boating season starts again next summer.
But there are some unusual components that seems difficult and expensive to source one bye one from different ebay shops. Do you have any plans to sell kits with empty PCBs and the STM32F302, Silicon Labs 4463, GlobalTop LadyBird, NXP BGA2869 and the Skyworks 66100 ?
Best regards,
Gunnar Holm (Stockholm Sweden)

Board availability

This project looks fantastic! I have ordered boards and reflowed them in my toaster over (now dedicated to board reflow) but these components may be too fine pitch for me to do that. How are you guys making your boards for this project?

Thanks...

AIS preamble

Dear Peter,
You have set the PREAMBLE_CONFIG to 0x21 in radio_config_ph.h file which put the si446x to standard preamble mode. whereas the AIS standard requires NRZI coding which led to non standard preamble pattern. could you please explain why?
thanks in advance,
Saman

MAIANA needs its own bootloader

The ROM bootloader built into the STM32 MCU has no means of verifying the integrity of application firmware. It simply jumps to 0x08000000 (flash base) if the first 8 bytes contain a valid stack pointer and program counter. So if a previous firmware update failed mid-flight, but the first flash page looks valid, then the MCU will start executing a corrupt application. This will almost certainly brick it.

This presents a real risk for a device like MAIANA which is out-of-reach. If this were to happen, the only way to rescue the unit would be to disassemble it and attach an SWD programmer.

The solution to this is to introduce a minimal bootloader which only performs firmware integrity checking. This program will occupy the first page of flash at 0x08000000, so it will be the first block to be erased and flashed during an update. The page will also contain the metadata for the actual firmware image (address, size, checksum) so it will be completely self-contained.

During reset, this bootloader will check for the presence of a valid application firmware image. If the image passes the integrity check, then it will jump to it. If not, then it will jump to the ROM bootloader for another firmware update. This way, if a previous firmware update failed halfway through, the next reset will always enter firmware update mode rather than execute a corrupt application.

Board 10.5 is not transmiting

Hello Peter,

I bought a kit board 10.5 with nmea183 breackout board last summer but i havent used it yet. Now i am trying to make it work. I assembled everything and i am recieving AIS signals and gps is all working. My problem is with the transmission. I programmed my Station data. The string i sended is this one : station 239108400,AIDA,SY7899,36,12,4,0,0
It is programmed probably because i see the TX led blinking once in a while.
Is there a command to send to test the transmission? I have a chinese clone spectrum analyzer but i cant take it with me and im my garage i dont get gps signal for the board to transmit. I dont have another AIS reciever to check. I see in marine traffic. I had it on on a trip with marine trafic coverage for two hours but i was not on marinetraffic.

How should i procceed ?

Thank you !

Packet LOSS in the presence of adjacent channel

Dear Peter,
In the presence of adjacent channel B (162.025 Mhz) I cannot get more than 30% of incoming packets of channel A (161.975 Mhz), (The receive signal level is about -98 dBm). Most of the packets are rejected for invalid CRC (CRC is calculated in microcontroller and I read the stream through clk/data of si4463), and some are rejected for more than 5 bits '1' sequence.

Could you please help me to properly configure the channel filter or other registers of the si4463?

yours truly,
Saman

Encrypt possibilities?

Is it possible for Maiana to operate under encrypted information?

What I want is for my boat, equipped with AIS, to be able to display on cartography TIMEZERO or another (NMEA sequences) maritime and aerial drones, auxiliary boats, buoys, etc. without anyone else seeing them. Only me. Could we do this?

There is a solution on the market such as Raymarine's AIS5000 but the cost is... absurd.

Thanks in advance!

mSlotNumber

Hello Peter!

Thanks a lot for your project! This is very interesting to me and I'm trying to figure out in detail how it all works. Please tell me how to calculate the slot number in this line of code:

// To keep things simple, we only start the AIS slot timer if we're on an even second (it has a 37.5 Hz frequency)

mSlotNumber = (mTime.tm_sec % 60) * 2250; // We know what AIS slot number we're in

For example, if the current second is valid 10, then the slot number should be 10 * 37.5 = 375.

But if you substitute the value 10 in your formula (mSlotNumber = (mTime.tm_sec % 60) * 2250), then we get the value of the slot 22500, but this value should not be as the slot numbers are from 0 to 2249. Please help me figure it out.

Thanks!

Trying to re-create custom Maiana AIS Rx

Hi all,

I'm in the middle of re-creating Maiana as a custom AIS Rx.
My hardware is consisting of STM32L432KB, Si4463, 30MHz xtal for silabs, EEPROM, without GPS, and without TX amplifier chain.
The schematics are attached
Schematic_AIS Rx STM 4463_2023-02-21.pdf

I'm using firmware from https://github.com/peterantypas/maiana/tree/master/latest/Firmware/Transponder "L432-NewBreakouts".
I've been successfully flash the firmware.
On start-up, the receiver puts out 3 sentences on serial:

$PAISYS,11.x,4.1.0,,STM32L432,1,051
$PAISTN,0,,,0,0,0,0,011
$PAITXCFG,1,0,1,0,0*0A

But nothing else. I have a dummy AIS Tx to test my other AIS receiver, but not been received by the maiana rx. The dummy AIS Tx was always received and decoded by my other AIS Rx.
I probed the SCK, MISO, and MOSI lines between the MCU and the silabs ICs, and there is activity on the start-up (or after reset). No further activity afterward.
I probed the TRX_IC_DATA, TRX_IC_CLK, RX_IC_DATA, and RX_IC_CLK lines, no activity at all.

Are there some steps I missed?

Thank you all.

Regards,
Handiko

Problem with programming the MCU

Hello. At first I have to thank you for this repository and for your efforts.
I built and assembled your hardware and then I tried to compile the firmware.
I was able to install required toolchain for compile project in Eclipse after many attempts. I installed 2021-9 version of Eclipse IDE for c\c++ developers. Then I installed CDT and "GNU MCU Eclipse plugin" from "http://gnu-mcu-eclipse.netlify.com/v4-neon-updates".
Then I installed latest version of arm-none-eabi-gcc from developer.arm.com.
After that I open your project in Eclipse (application directory in legacy directory, Eclipse detected it as an arm project with this name: ais_transponer)
Then I chose "CDT internal builder" as current builder in "Toolchain Editor" in properties menu of the project.

Finally I build the project and I get .elf output file. I set some settings in properties menu of the project and I get .hex output file too!

I program both of files (.elf and .hex) on the hardware with j-link programmer (with j-flash software) and st-link programmer (with st-link utility software).

The microcontroller detects and programs very well, but unfortunately I did not get any sign that the program is working.

So I tried to write a simple blinking program in Eclipse. I wrote that and build it. Then I program .hex file on my stm32f4-discovery board. But unfortunately I did not get any response.

So what should I do at this step? How can I write a simple program in Eclipse and compile it?
And which programmer and software should I use to program the output of Eclipse?

Thanks very much.

RX performance degrades after running for a few hours

I confirmed it twice by checking the RX status indicator on the boat system. Will need to attach a serial terminal next time to debug further. Power-cycling the system restored things. This is a regression. Board 4.3 worked flawlessly for months.

ESP32 as a wifi gateway for NMEA2000

Hi there, sorry for the off topic issue but I wasn't sure how to reach you @peterantypas

I'm wondering if you've given any thought to using an ESP32 as an NMEA gateway. It seems like a simple and obvious choice given the 3.3v logic, great library support, great wifi and Bluetooth performance, and low power usage.

Do you have any input for me before I start a project like that? I don't know much about the NMEA2000 protocol, or the protocol used by wifi gateways. Hopefully it is just the NMEA data over a socket, or something.

Thanks!

2020 Project Status?

Peter, this looks like an incredibly cool project. I have a boat, and I'd love to build one of these as the commercial options are expensive, bloated, and gobble up energy.

What's the status of this project?
Have you built and used one, and if so, what has been your experience using it?
Do you want/need contributors to this project? For one thing, a blog, and/or some current documentation might be nice.

So this ticket is really all about asking for a quick refresh of the docs, project status, project needs, etc.

AIS Transponder Full Development Kit

Dear Peter,

Do you have a complete set assembled development kit for ais transponder?
Thank you, hope hear from you soon.

Best Regards,

Boby H.

Non standard Preamble

Dear Peter,
As you know the Preamble in AIS in 24-bit non standard (1010... pattern), so the AFC and BCR of Si4463 cannot settle correctly as it has mentioned in the application notes. I am wondering if you have achieved good sensitivity? have you tested the sensitivity test or have you compared receive quality with commercial devices like Garmin or Comar?
thanks,
Saman

MAIANA must not operate without a proper GND connection

One of the pitfalls of designing low power circuits is that said circuits can be inadvertently back-powered from weak power sources.

As it turns out, if the CAT5 cable's "GND" connector is severed, MAIANA can actually run via the UART with its I/Os acting as a "false ground", despite the fact that these pins feature 1.1 KOhm series resistors. This causes unsafe voltages to appear at the adapter and can damage it.

Right now, I'm leaning toward redesigning the main board to use a fully isolated DC/DC module plus appropriate isolators for all of its I/Os. This will push all galvanic isolation into the main board and away from the adapters. It will also require a supercapacitor for the transmitter as well as slightly higher power draw than before.

If anyone has a simpler idea, please leave a comment here.

Any plan for just AIS Receiver

Hi
Do you have any plan for just the 2 channel AIS receiver without Transmission and GPS.
So it will be used for fishing boats and cost effective.

License?

What license is this published under? Repository does not have a license.md file.

wxPython based GUI utility for configuring and maintenance of the unit.

wxPython based GUI utility for configuring and maintenance of the Maiana AIS unit.
Forms can be easily designed using wxFormBuilder (included in bareboat necessities OS ver >= 2022-01-04)

There is something in openplotter which is not standalone and tightly coupled with OP.
(So it can't be used as-is by any generic unix distribution)

Thanks!

Reduce instructions in bit clock ISRs

There is too much going on in the Receiver::onBitClock() method, which can cause significant delay and loss of bits from the other IC. I confirmed this by removing RSSI measurement and observing an instant boost in message count.

Will need to re-architect firmware to perform a single GPIO read in the ISR and then queue the bit value for processing in thread mode (or RTOS task).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.