How to create an AIS repeater with an Arduino board. This is a hobby project, to remove a PC while sending out the AIS messages to sites like
aishub.net
Hardware
| Components |
Optional |
Example |
|
Arduino (25 euro)
Arduino Ethernet Shield (30 euro)
RS-232 cable to connect to the AIS
7-12V power |
Proto Shield (5 euro)
LCD display (? euro)
Some wires |
 |
Software
The software still needs to be build, it should use the standard Arduino Ethernet and Serial library. See the links part for an example program.
Steps:
- Simple repeat of all AIS NMEA messages and forward them on the Ethernet connection.
- Add CRC checks (modify tinyGPS for this)
- Downsampling
- Statistics (use the LCD for that)
- Diagnostics
- Software configuration change (instead of a recompile to change an address)
Links
Contact
Code
#include <LiquidCrystal.h>
#include <Ethernet.h>
//LiquidCrystal lcs (RS, E, D0, D1, D2, D3)
LiquidCrystal lcd(6, 5, 10, 9, 8, 7);
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192,168,1, 3 };
byte gateway[] = { 192,168,1, 254 };
byte subnet[] = { 255, 255, 0, 0 };
Server server(23);
boolean started = false;
void setup() {
//Start Serial
Serial.begin(4800);
//Start network and server
Ethernet.begin(mac, ip, gateway, subnet);
server.begin();
// set up the LCD's number of columns and rows:
lcd.begin(16,4);
lcd.setCursor(0, 0);
lcd.print("waiting");
}
void loop() {
Client client = server.available();
if (client) {
if (!started) {
lcd.clear();
lcd.print("active");
lcd.setCursor(0,1);
started = true;
}
while (Serial.available() > 0)
{
int c = Serial.read();
server.write(c);
lcd.print(c,BYTE);
}
}
}