Home Contents Start Prev 1 2 3 4 5 6 7 8 9 10 11 Next

Telemetry

Moana had a two way telemetry mechanism using Xbee modules. It was possible to monitor logging as well as send commands to the mower. For Kupe, initially at least, I am going to simplify this mechanism. I just need remote logging. I have several spare channels on the Radio Control, so I will use those to send commands to Kupe.

However, for Pi-to-arduino communication, I aim to create a separate serial interface that will use a simple API similar to that used in Moana.

I aim to reuse the Xbee modules I used for Moana. Theses run at the default 9600 baud rate. I could increase this but a lower rate gives better reliability and I will not be sending a lot of logging data.

Using the standard arduino serial port will allow log statements to be transmitted back to a laptop with an associated XBee dongle. It is possible to send program uploads over Xbee, although that will require some minor hardware modifications. I dont really see this as being that useful, especially as I may need to reload programs into the Pi when it is added. So I will switch out the Xbee on the TX/RX pins when I need to reprogram. The Xbee board I am using allows for this. In one positions (DLINE) it disconnects the Xbee and allows direct connection to the USB port allowing unhindered programming. After programming, it can be changed to the UART position to connect the arduino pins back to the Xbee. I've been here before, it saves a lot of grief having a simple switch!

XBee Modules

I am using Series-1 Xbees as simple point-to-point (effectively wireless UARTS). These devices have reach EOL with the introduction of Series 3 Xbees. However, I have a few Series 1 devices and so will make use of them. Much of the setup and programming is described in Moana Telemetry so I will not repeat it here. One advantage I have is that the XCTU program is now Mac-native, unlike when I first tried to use it! Regardless, these are the current settings:

xbee panid myid destidH destidL
1 (laptop) 5555 1357 0 2468
2 (kupe) 5555 2468 0 1357

Serial Communications

The Arduino is programmed via the UART on pins 0 (Arduino Rx) and 1 (Arduino Tx). This is the same on both the Uno and the Mega. The Serial Monitor also sends logging output through this interface. The aim is to insert XBees in this data path to allow wireless communication. In Kupes case, I am only interested in one-way, from kupe to the laptop for remote logging.

To send a log output through the Xbee back to the computer is no different to logging normally

Serial.print("log without a linefeed");
Serial.println("log with a linefeed");

As it turns out, XCTU makes configuration very simple. I now have telemetry between the robot and my laptop working.


November 2025


Home Contents Start Prev 1 2 3 4 5 6 7 8 9 10 11 Next