Robot guard

This project is about a robot guarding a land property (and also scanning the field for molehills, fallen trees and other anomalies). To do this, the robot will use ultrasonic sensors to detect obstacles and a 6DoF IMU which will both allow to detect the inclination of the ground at the current position and correlate with the wheel actuation (therefore detecting slipping) to approximate the relative position from a starting point. The addition of the Digi XBee3™ NBIOT Cellular module will allow the robot to report the anomalies measured through cellular network from a field where wifi range would prove insufficient. From the receiving side, a computer could then be able to create a map of the field and its anomalies from the measurements that have be sent.

Digi XBee3 Cellular Smart Modem, LTE-M/NB-IoT Development Kit (for setting up the Xbee module)
Digi XBee3 Cellular LTE-M/NB-IoT Global Smart Modem (from the previous kit) for the rest of the project
Arduino Mega 2560
Xbee shield for arduino
L298N driver
2x 12V DC motors
MPU6050 6DoF IMU
4x HC-SR04 Ultrasonic Range Finder
12V Lipo battery

Additional hardware includes 2 high grip wheels, 1 swivel wheel, a plywood board for the frame of the robot, screws and nuts, electrical wires and a DC connector to connect the battery to the DC plug of the Arduino.

We use the Arduino terminology, ie any pin whose name starts with the letter D is a digital I/O pin whereas any pin whose name starts with the letter A is an analog one.


[Start of Disclaimer]
While LTE-M & NB-IoT technologies are easily available in the US (see for instance with detailed price and online purchase), this is different in France where only two of the 4 telecommunication network providers have just started recently the deployment of these technologies. Therefore, Orange (which chose to deploy LTE-M) and SFR (that turned its attention to NB-IoT) only offer access to these networks for companies through a "contact us to discuss your project in details" business model. Consequently, I have not been able to get a hand on a compatible SIM card in order to use the full potential of the Digi XBee3™ Cellular Module.

Anyway, the XBee3™ Cellular Module shares its form factor (see shape of the modem in the BOM), supply voltage of 3.3V and pin assignment with the traditional Xbee ones.
We can therefore still design the system from a hardware point of view. In addition, as one of the powers of XBee modules is that they can be used as a black box handling wireless network communications, we can also develop the appropriate Arduino software with UART serial communications to the module (ie calls to Serial() in Arduino/C++ language).
[End of Disclaimer]

Connecting the Development kit to a computer and starting the XCTU software in order to configure the module quickly shows us the Cellular Module with Serial/USB parameters currently at a Baudrate of 9600 (if necessary, we can increase it) and eight data bits, no parity bit and one stop bit. This is just fine as it is identical to the Arduino default serial parameters SERIAL_8N1. Therefore, we will be able to communicate with the module within a few seconds.
NB : the XCTU software automatically finds a new software and installing it is very straightforward.
For more details, one can use the interactive setup guide or the full documentation of the module/kit which provides clear information about this hardware.

While Cellular communications won't be usable for the reasons previously mentioned, we use XCTU to enable the Bluetooth communications of the module, which will be a substitute for now. A few clicks later (and after setting a password) and the module is already visible by a smartphone with Bluetooth turned on.

[TODO : finish writing]

TODO : Video
(YouTube link will automatically embed it)

Source Code
In order to write the code for the robot, we will need the library developed for the MPU6050 (click on the previous words)
The code for this project will mostly be a construction made from all the basic codes required to communicate with the sensors (ultrasonic range finders, IMU), the actuators (L298N motor driver) and cellular module (Digi Xbee3 Cellular LTE-M/NB-IoT). Of course, this code will also have to handle the measures through an appropriate algorithm.

Paste your project source code here, or upload an attachment.
TODO : CAD Files
Mechanical CAD : (Frame made from the plywood board with required cuts and screw holes + motors adapters) => Technical drawings
Electronic CAD : (Custom Arduino shield to "augment" the xbee one while adding a socket for the IMU and integrating wider conductive track for the 12V of the motors with regard to the current they consume) => PCB layout

(The limitation of 10 attached files prevents from adding all the useful elements for a big project)
  • Like
Reactions: texasdruid

Blog entry information

Last update

More entries in General

Share this entry