-
Notifications
You must be signed in to change notification settings - Fork 6
Hardware Simulator
During desktop testing, it is often necessary to have a source of NMEA data that can be controlled, rather than relying on a real instrument. While it is possible to do this in software with an appropriate USB to RS-422 converter, it is more difficult to provide NMEA2000 data.
The base design here, either in prototype board (i.e., module and through-hole component) or WIBL (surface mount) versions, can be used as a data generator simply by switching the firmware installed on the ESP32 module. The firmware (in the HardwareSimulator sub-directory) generates simulated NMEA0183 data on two channels, and NMEA2000 data over the main transmitter, and can be used to test data loggers directly, including asynchronous arrival of two NMEA0183 streams, etc. Note that the NMEA2000 simulator is very basic, and just sends the same information over and over (it's based on the core example from the support library). The NMEA0183 simulator actually simulates a ship moving, with updating position (GGA), time (ZDA), and depth (DBT). GGA/ZDA are sent on serial channel 2, DBT on serial channel 1.
To set up the data simulator, simply flash the firmware (remembering to set the PROTOTYPE_LOGGER compile-time define if required in the platformio.ini file), and then connect TX1A/B and TX2A/B on the simulator to RX1A/B and RX2A/B on the logger, respectively, and CAN H/L on the simulator to CAN H/L on the logger; you will need to enable CAN termination on either simulator or logger. The simulator flashes one of the indicator LEDs when data is being generated; the logger flashes the same LED when data is accepted for logging.
