Skip to content
Thomas Sarlandie edited this page May 28, 2018 · 10 revisions

Just received your KBox? Here are some important information to help you get started.

Unboxing

KBox with a tinfoil hat

First of all, take KBox out of the anti-static protection bag and look for the black plastic knob that goes onto the encoder. I remove them during transport to avoid any damage.

KBox and its plastic knob - notice the sad looking encoder

Put the knob on the encoder and peel the protection off the screen if it is still on.

Plugging in

There is a USB connector in the top left corner. Use a micro-USB cable to power KBox for the first time and make sure it is still working. All units are tested and programmed at "the factory" before being shipped to you so unless something terrible happened during transport, you will see the battery monitoring screen appears.

KBox Battery Monitor screen

Press the knob once and you will switch to the stats view. This view will be very helpful when first setting up KBox on your boat to make sure that all the connections are working.

KBox Stats screen

Connecting via WiFi

Notice that there is an LED next to the USB connector. At this point, the LED should be blue. It indicates that the wifi is ready to accept connections.

Take your favorite mobile device and search for a network called "KBox" and connect to it.

Now using iNavX or another navigation app, connect to 192.168.4.1 on port 10110 via TCP. You will start receiving data from KBox.

iNavX Configuration for KBox

By default, the data you receive is a combination of:

  • everything received from the NMEA1 input
  • everything received from the NMEA2000 bus (messages are converted to NMEA0183 $PCDIN sentences - iNavX and a few other apps can decode them)
  • battery voltages and barometer information are also sent in the form of $PCDIN sentences

iNavX Configuration for KBox

Note that while you are connected, the LED is green. If your iDevice disconnects, the LED will go back to blue. You can have more than one device connected at the same time (up to 8 at the moment).

Connecting via USB

KBox generates log messages to the USB console. Those can be very handy when you are making changes to the source code, or just to understand what KBox is doing.

To access the logs, you can connect with any serial console and configuration 115200,8,N,1 (speed 115200 bytes per second, 8bits, no parity, 1 stop bit).

If you have platformio installed (see Developer Setup), you can use the integrated serial console with the command platformio device monitor -b 115200. Use Ctrl-C on your keyboard to stop the logs.

This is what the output looks like:

$ platformio device monitor -b 115200
--- Miniterm on /dev/ttyACM0  115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
D main.cpp:53 Starting
D SDCardTask.cpp:31 init sdcard ...
D NMEA2000Task.cpp:86 Sending message on n2k bus - pgn=127508 prio=6 src=0 dst=255 len=8 result=fail
D NMEA2000Task.cpp:89 TX: $PCDIN,01F214,00000000,00,0000000000FFFF00*20
D BarometerTask.cpp:46 Read temperature=98.11 C and pressure=-64681.1 hPa
D NMEA2000Task.cpp:86 Sending message on n2k bus - pgn=130311 prio=6 src=0 dst=255 len=8 result=fail
D NMEA2000Task.cpp:89 TX: $PCDIN,01FD07,00000000,00,0041069104295703*51
D TaskManager.cpp:68 -------------------------------------------------------------------------------------
D TaskManager.cpp:70 ID         TaskName       Runs Total (ms) Average (us)  Min (us)  Max (us)
D TaskManager.cpp:74  0              MFD  536903680          0         0      5233      5181
D TaskManager.cpp:74  1     RunningLight       5181          5         1      5181      5181
D TaskManager.cpp:74  2              ADC       5181          5         1      5181      5233
D TaskManager.cpp:74  3              IMU       5233          5         0      5233      5165
D TaskManager.cpp:74  4        Barometer       5233          5         1      5233      5233
D TaskManager.cpp:74  5         NMEA2000       5233          5         1      5233      5233
D TaskManager.cpp:74  6     NMEA Reader1       5233          5         1      5233      5233
D TaskManager.cpp:74  7     NMEA Reader2       5233          5         1      5233      5233
D TaskManager.cpp:74  8             WiFi       5233          5         1      5233      5233
D TaskManager.cpp:74  9           SDCard       5233          5         1      5233      5233
D TaskManager.cpp:74 10       USBService      23785         23         1      5233      5233
D TaskManager.cpp:78 --   totals (in ms)      36432       1285         0         0       316
D TaskManager.cpp:80 -------------------------------------------------------------------------------------
D NMEA2000Task.cpp:86 Sending message on n2k bus - pgn=127508 prio=6 src=0 dst=255 len=8 result=fail
D NMEA2000Task.cpp:89 TX: $PCDIN,01F214,00000000,00,0000000000FFFF04*24

For a more advanced way to interact with KBox over USB see the kbox.py command line utility in the tools folder.

Installing KBox on your boat

Power

You can power KBox directly from a 12V source. If you have a NMEA2000 network on your boat, you can use the power provided by the NMEA2000 network. KBox will not use more than 150mA of current which is equivalent to 3 NMEA2000 LEN (Load Equivalency Number). If you want to keep an independent ground - or just an independent switch to power KBox, you can of course provide a separate 12V power supply.

The Ground and +12V contacts are the first two on the large screw terminal.

KBox terminals

KBox is protected against reversed polarity voltage and can work with voltages up to 40V but keep in mind that it is designed for a 12V bus. You should not plan on using voltages higher than 20V because that will impact other components of KBox.

You can connect USB and +12V at the same time without problems. When you do the ground of your USB connection will be connected to the ground of your boat.

NMEA2000 connection

To connect KBox to your NMEA2000 network, I recommend taking a NMEA2000 drop cable of your favorite style and cutting it in two.

It will have:

  • a black and red wire for power
  • a blue and white wire for data
  • a yellow wire (Raymarine only, for Seatalk )

The blue wire goes into CAN - and the white wire into CAN +.

NMEA2000 Cable

About SeaTalk

You can connect the yellow wire into 'NMEA IN2 +' if you are interested in receiving SeaTalk data. KBox supports this. You will need to recompile with support for 9bit data. Read this great description of Seatalk for more information.

NMEA0183 Inputs

KBox has two NMEA inputs. By default, they are both configured at 38400 and all data received will be forwarded via WiFi.

The first one should be connected to an AIS receiver or to a GPS. For example, the Standard Horizon GX2200 is a VHF radio with GPS and AIS receivers included.

About NMEA0183 wiring

If you do not understand why the inputs have a - and + but the output have a GND, - and + I strongly recommend reading Actisense NMEA0183 "bible". It's succinct, clear and exhaustive!

NMEA0183 Outputs

By default, they are not used but feel free to connect any equipment, we will see how to configure the outputs later.

NMEA0183 baud rate

One important note is that the NMEA1 Output will always work at the same speed as the NMEA1 Input, and the same is true for NMEA2. So you can have NMEA1 and NMEA2 at 38400 bauds, NMEA1 at 38400 and NMEA2 at 4800 but you cannot have NMEA1 Input at 38400 and NMEA2 Output at a different speed.

Analog inputs

BAT1, BAT2 and BAT3 are three analog inputs that will measure the voltage relative to GND. You can for example use them to measure the voltage of your engine battery, your house battery and your solar panel output.

The maximum voltage that can be measured is 21.78V but it will not damage the input if the voltages go higher.

Protect your batteries! Save your boat from fire! Install a fuse

You can get simple in-line fuse holder on Amazon. The current going through this wire will be extremely small so you can install the smallest fuse you will find, and use a small gauge wire. The fuse must be installed as close as possible to the battery.

Imagine that this wire comes loose for some reason during navigation. On one end it's connected directly to your battery and on the other end, it's going to move around, short with ground somewhere and the wire will surely melt. That is a great way to set your boat on fire!

Please talk to a marine electrician if you are not sure what you are doing!

Note that KBox also measures its supply voltage so we actually have 4 analog inputs.

Current Shunt connection

KBox can measure the current going in and out of a battery. If you have a current shunt, connect the side that is close to the battery to SHUNT-BAT and the side that is connected to your boat 12V bus to SHUNT-LOAD. KBox will measure the voltage of the battery, and the current being drawn from (or charged into) the battery.

Note: We do not have a display for this at the moment. Coming soon!

Next Steps

Your KBox can be configured by editing a file on the SDCard. See Configuring KBox for more information.

If you are a developer, you should look at the Developer Setup to learn how to re-compile KBox firmware.