The Innovated Battery-Powered Trucks Carrying Drones and Robotic Dogs
by ict2026 in Circuits > Arduino
352 Views, 1 Favorites, 0 Comments
The Innovated Battery-Powered Trucks Carrying Drones and Robotic Dogs
Background:
We need to present the innovative project to new Form one students and their parents on information day. We are interested to make the 3D printed models with the battery-powered circuitry to build the integrated truck-based deployment platform model. The platform can be controlled by using mobile phone or the 5G/WIFI IOT system.
Project Overview:
This project aims to investigate and develop an integrated truck-based deployment platform model, powered by batteries, capable of housing, transporting, and operating designated drone models. The truck will be engineered as a mobile launch, recovery, and support system, enabling drones to be safely stored, automatically deployed, and retrieved during operations. In parallel, the concept will be extended to support the integration of robotic dogs. The truck will function as a mobile carrier and operational hub, providing secure housing, power management, and deployment mechanisms for the robotic units. This integrated system is intended to enhance operational mobility, autonomy, and mission efficiency across diverse environments.
Supplies
- CNC Linear Rail Slide Linear Motion Stage Table 8" 200mm x 2
- CNC Linear Rail Slide Linear Motion Stage Table 8" 100mm x 1
- Wooden boxes 160mm X 160mm X 4500mm x 2
- wires
- FireBeetle 2 ESP32-E x4
- HGX28 Miniature Precision Linear Stage / 28 Stepper Motor Linear Slide Module x 3
- Dupont wires
- Mini drone x1
- 1 inch OLED display i2c
- lipo battery SZ-5200 11.3 3S x3
- lipo battery 300mAh x4
- 1:24 truck x2 (yellow truck and blue truck)
- Unihiker M
- Wifi router
- Mobile phone
- rope
- 3D filament
- 3mm wooden plate
- ENS 160 i2c
- BME 680 i2c
- screws
3D Printed Parts 1 for the Blue Truck
We design the parts by using Tinkercad in this project and then 3D printed the stl models. The joint_2pieces_lift.stl is the lift platform and the joint of the moving platform attached in the table of the Stepper Motor Linear Slide Module in the truck storing the mini drone. The joint of the moving platform is attached in the wooden plate, which is laser cut.
Downloads
Laser Cut Parts
We design the top covers of the wooden container by using Tinkercad and laser cut the slider-cover, cover3, and cover 1. They are installed in the container storing the mini drone.
Assembly of the Truck Carrying the Mini Drone
We renovate the truck using Laser Cut Parts and 3D Printed Parts 1 to enable it to transport the mini drone. The remote controlled truck platform is made.
The Wooden Sliding Plate Opening or Closing the Hatch.
The linear motion table, the 3D printed part (joint) and the wooden sliding plate are installed in the wooden container. The wooden sliding plate can move forward and backward in order to close and open the hatch.
The Lift Platform
The linear motion table is installed at 57 degree, the angle of the depression. 57 degree, the angle of the depression is considered since the length of the smallest linear motion table is greater than the height of the wooden container. The lift platform, powered by this linear motion table, can move upward and download, allowing the mini drone take off from or land within the container.
Inside the Wooden Container, Which Is Transporting the Mini Drone
Inside the wooden container, there is a FireBeetle 2 ESP32 E. There are also two linear motion tables, two DM28 drivers, and LiPo batteries.
5G/WIFI Unmanned Emergency Dispatch Vehicle System Design Blueprint 1 (Mini Drone)
A scale model system is developed by modifying a remote-controlled model cargo truck into a containerized platform. The container integrates a 5G/WIFI-controlled linear motion platform and a 5G/WIFI-controlled electric lifting mechanism, and is further equipped with a compact wifi or a 2.4G mini drone.
A FireBeetle 2 ESP32 E controller is used in conjunction with DM drivers to actuate stepper motors that drive a wooden sliding plate, enabling the opening of the container’s top hatch. In addition, DM drivers control high-torque motors that operate the lifting platform, allowing the mini drone to take off from or land within the container. The IoT server, built on Unihiker, collects user commands to control the movement of the wooden sliding plate and the lifting platform. The webserver, powered by FireBeetle 2E, provides an elegant user interface for users to send commands.
We use firebeetle 2 ESP32 E because of Massive Memory (N16R2 variant): Upgraded with 16 MB Flash and 2 MB PSRAM, providing ample space for complex GUIs (like the LVGL library) and data-heavy IoT tasks, Ultra-Low Power Consumption: Consumes as little as 13 μ A in Deep-sleep mode, making it perfect for battery-powered and mini projects, Onboard Power Management: Features a built-in charging circuit and PH2.0 battery interface, allowing dual power supply (USB and a 3.7 V lithium battery) with automatic switching.
Batch Command User Interface
The webserver, powered by firebeetle 2E, provides the elegant user interface to users to send to commands. Users can connect to the webserver using its IP address and send commands to control the truck. The user interface allows users to send three commands simultaneously. In addition, users can set a time interval between each command so that the second command starts only after the first one finishes. For example, opening the hatch takes about 3 seconds, after which the lift moves upward to allow the mini drone to take off.
Arduino Program 1 - the Truck Carries a Mini Drone
This program is designed for a FireBeetle 2 ESP32-E microcontroller to control a dual-axis motorized system (a "table" and a "lift") using TB6600 DM28 stepper drivers and servos via the IoT protocol MQTT.
Core Functionality
The system acts as an IoT node that connects to a local WiFi network and communicates with an MQTT broker (at 192.168.0.122). It subscribes to the topic control/dev, allowing it to receive and execute text-based movement commands remotely.
Command Parsing Logic
The program features a custom natural language processor. When an MQTT message (e.g., "table forward 10") is received:
- Tokenization: The processSentence function splits the string into individual words and numbers.
- Filtering: It identifies the "machine" (table or lift), the "direction" (forward/backward or up/down), and the "value" (distance in millimeters).
- Validation: It uses strncasecmp to ensure commands match the defined machine names regardless of case.
Hardware Control
- Stepper Motors: The code controls two independent axes.
- Table Axis: Connected to pins 16 (DIR) and 17 (STEP). It operates with a pulse delay of 125 microseconds.
- Lift Axis: Connected to pins 18 (DIR) and 19 (STEP). It operates faster with a pulse delay of 80 microseconds.
- Scaling: It converts millimeters to steps using a constant STEPS_PER_MM (set to 25).
- Servo Motors: Two servos are initialized on pins 13 and 14, likely intended for a gripping arm mechanism. (another project)
- Enable Pin: Pin 5 is used as a global "Enable" signal for the TB6600 drivers, set to LOW to keep the motors active.
Connectivity & Reliability
- WiFi Setup: It handles initial connection and prints the assigned IP address to the Serial monitor.
- MQTT Reconnection: The loop() function continuously checks the connection status. If the broker connection is lost, it automatically attempts to reconnect and resubscribe to the control topic.
- Feedback: The system publishes a "start" message upon successful boot and prints detailed debug information (parsed words and calculated steps) to the Serial monitor during operation.
Downloads
The Movement of the Linear Motion Table Inside the Wooden Container
Using a mobile phone to control the platform's forward and backward movements. It also controls the stage's upward and downward movements.
The Truck Transporting the Drone
The wooden container is installed on the blue truck.
Demonstration of Mini Drone Emergency Dispatch Vehicle
The user sends the command "table backward 2300" to operate a linear motion table, which opens the container's top hatch. Additionally, another command "lift up 4600" operates the lifting platform, allowing the mini drone to take off or land within the container. At the end of this Instructables, we will modify from the text commands to the control lever, which is more user-friendly.
Application: Mini Drone Transport Demonstration via Emergency Dispatch Truck
The emergency dispatch vehicle demonstrates mini drone transport operations, utilizing a lifting platform to accelerate the ascent and descent process.
Mini drone Flight Demonstration with Lift Platform Hatch
A mini drone flight demonstration is conducted from the lift platform with an automated top hatch, enabling efficient take off and landing operations.
To conclude the video, we decide to think outside the box by designing another truck capable of carrying robotic dogs. In addition, the environmental sensors, BME680 and ENS160, will be integrated in this project. The user can obtain the environmental data for monitoring the system.
3D Printed Parts 2 for the Yellow Truck
floor2.stl represents the tailgate of the truck that stores the robotic dog. bearing-flipping_board.stl is the rope bearing attached to the carriage of the stepper motor linear slide module. Finally, connector_motion_table to wire1.stl acts as the fulcrum for pulling the tailgate. All these 3D models are designed using Tinkercad.
Assembly the Truck Carrying the Robotic Dog
The truck is modified by using 3D Printed Parts 2, and rigging rope to facilitate the transport of the robotic dog.
The Design of the Tailgate
The tailgate is designed in Tinkercad. 3D-printed parts and a rope connect the tailgate to the linear motion table.
5G/WIFI Unmanned Emergency Dispatch Vehicle System Design Blueprint 2 (Robotic Dog)
Technical Architecture (Diagram Labels)
- 5G/WIFI Network
- DM 28 Driver
- FireBeetle 2E Controller
- Power Supply: 5–12V
- Stepper Motor (Linear motion table)
System Description
Model Fabrication and Operational Concept
The system model is constructed using 3D-printed components, gears, and connectors. Control commands are transmitted via the 5G/WIFI network. The FireBeetle 2 ESP32-E controller operates the DM motor driver to control the motion platform, which drives the opening of the tailgate of the container truck. Once the tailgate is opened, the robotic dog autonomously exits the vehicle to begin its mission.
Open the Tailgate
Using a mobile phone to pull the tailgate and open the container. The program is amended from const char* machine = "table"; to const char* machine = "tailgate"; and the command is changed from "table forward 200" to "tailgate forward 200"
The Truck Transporting the Robotic Dogs and the Drones
Advantages of using the truck carrying the drones and the robotic dogs
The use of dispatch vehicles as mobile deployment platforms significantly enhances:
- Operational concealment
- Mobility and maneuverability
- Area coverage capacity
This integrated approach enables rapid, flexible, and low-profile deployment of unmanned systems across diverse mission environments, improving overall mission effectiveness and survivability.
Demonstration of Robotic Dog Deployment
Operational Deployment Concept
In addition to mini drone emergency dispatch trucks capable of carrying drones, the same platform can also transport robotic dogs.
An integrated command and control platform autonomously coordinates dispatch vehicles and centrally controls both mini drone and robotic dogs for operational deployment.
3D Printed Parts 3 for the IoT Webserver
The IoT webserver enclosure is designed in Tinkercad and built using 3D-printed parts. The case features an opening to allow the LiPo battery to be charged via a USB Type-C cable.
Assembly the IoT Webserver
The IoT webserver, designed for environmental data monitoring and motion table control, is constructed using two 3D-printed parts and a FireBeetle 2 ESP32 microcontroller. The display of IoT webserver shows the IP address of IoT webserver to facilitate the user to connect the IoT webserver.
Allowing Charging the Battery Inside the IoT Webserver
This 3D-printed case is designed to allow convenient battery charging while connected to the onboard FireBeetle 2 ESP32-E.
The IoT Webserver Is Powered by Firebeetle 2ESP32 E
The IoT web server consists of a FireBeetle 2 ESP32, a 1-inch OLED display, a LiPo battery and 3D-printed parts.
The Logical Flow of Arduino Program for Webserver With Display.
The program, webserver_iot_display part 1.txt and webserver_iot_display part 2.txt, are run to build the webserver to allow the user sending commands and reading the environmental data. It should be webserver_iot_display.ino. However, we cannot upload big program. So, we divide the program into two parts.
Here is an analysis and functional explanation of the provided this program.
Program Overview
This Arduino firmware is designed for the DFRobot FireBeetle 2 ESP32-E microcontroller. It integrates dual IoT capabilities by acting simultaneously as a local HTTP web server and an MQTT client. Additionally, it uses an I2C-connected SSD1306 OLED screen (driven by the optimized U8g2 library) to serve as a physical system diagnostics display.
The application serves two distinct purposes across two separate web routes: tracking real-time environmental telemetry collected via MQTT subscription, and executing an automated sequential batch command interface over an MQTT publishing channel.
Core Components and Architectures
1. Network and Connectivity Layer (setup_wifi and reconnect)
Upon boot, the firmware initializes a hardware serial connection and attempts to connect to a local 2.4 GHz Wi-Fi network. During execution, if a connection drop is detected inside the loop() function, the device initiates an automated reconnection routine.
Once Wi-Fi is secured, the PubSubClient connects to a dedicated MQTT broker (192.168.0.122) using credentials. It modifies the internal payload buffer to 512 bytes via setBufferSize(512) to safely accommodate dense sensor data.
2. Environmental Ingestion Dashboard (/)
The ESP32-E subscribes to the topic Enviro/air_quality. Incoming JSON string payloads are processed in the callback() routine using the ArduinoJson library. It parses dynamic values including temperature, humidity, pressure, altitude, and volatile organic compounds (TVOC, eCO₂, and AQI indexes) into a centralized envData structural variable.
When a user browses to the root URL (/), the internal WebServer handles the request by dynamically building and serving a mobile-responsive HTML/CSS dashboard page. This page features custom grid layouts and color-coded CSS styling blocks that visually represent the severity of the parsed Air Quality Index. The page also features a JavaScript snippet that triggers a client-side reload every 15 seconds to fetch fresh sensor states.
3. Machine Batch Control Pipeline (/control and /send)
Navigating to the /control route loads a form allowing an operator to define up to 3 separate sequential command strings (e.g., tailored for a MechDog robot) alongside distinct delay intervals measured in milliseconds.
When the user submits this HTML form, it dispatches an HTTP POST request to the /send endpoint.
Directly following the redirect, the program enters executeBatch(), which linearly steps through the array, publishing strings sequentially to the control/dev topic. Crucially, it respects user-defined block periods using blocking delay() actions between each transmission. It logs structural boolean flags (Success or Failed) into a feedback tracking array so the user receives confirmation of successful MQTT broker delivery.
4. Hardware Visual Telemetry (updateOLEDStatus)
To maintain reliability in headless environments, an OLED screen updates system health statuses. It utilizes a conservative one RAM frame buffer constructor (_1_). It prints step-by-step progress during boot animations and displays clear, structural text warnings if the Wi-Fi connection fails or drops.
Environmental Sensors and Air Quality Sensors
The 5G/WIFI-enabled drones, truck platform, and robotic dog units are integrated with environmental sensing devices, specifically the BME680 environmental sensor and the ENS160 air quality sensor. Environmental data—including temperature, relative humidity, barometric pressure, VOC, TVOC, eCO₂ concentrations, and AQI values—is transmitted via a 5G/WIFI network to a centralized IoT server. The server employs the MQTT communication protocol to enable reliable, low-latency data collection and processing from the unmanned platforms.
The Environmental Data From BME680 and ENS160 Sensors
The sensors will be installed in the container.
Arduino Program 2 Mqtt Send the Environmental Data
This Arduino sketch configures an ESP32 microcontroller to gather environmental and air quality metrics, then transmits them to an MQTT broker. It integrates two specific hardware sensors over an I2C interface: the DFRobot BME680 (for multi-variable environmental tracking) and the DFRobot ENS160 (for specialized air quality indexing).
1. Initialization and Connectivity
The program begins by including the required headers for Wi-Fi (WiFi.h), MQTT messaging (PubSubClient.h), and I2C serial communication (Wire.h). It instantiates the sensor objects with designated hardware addresses (0x77 for the BME680 and 0x53 for the ENS160).
During the setup() phase, the ESP32 initiates a connection to a local wireless network using the credentials provided in ssid and password. Once connected, it designates an MQTT server at IP address 192.168.0.122 on port 1883. The setup routine also tests the physical connections to both sensors using bme.begin() and ENS160.begin(). If either handshake fails, the program halts and prints error logs to the Serial Monitor. Finally, an optional calibration routine runs: it utilizes a known, precise altitude (525.0 meters) to calculate and establish a baseline seaLevel atmospheric pressure.
2. Sensor Data Retrieval
Within the cyclical loop() function, the script systematically communicates with both sensors:
- BME680 Metrics: The program triggers a measurement conversion and fetches ambient temperature, barometric pressure, relative humidity, gas resistance, and a dynamic altitude reading adjusted by the earlier sea-level calibration.
- ENS160 Metrics: The script reads air quality statistics. This includes the operational status (tracking sensor warm-up phases), the overall Air Quality Index (AQI) rated 1 through 5, TVOC (Total Volatile Organic Compounds) concentration in parts per billion (ppb), and an eCO2 estimation in parts per million (ppm).
3. Data Packaging and MQTT Publishing
Instead of bundling all sensor data into a single, cohesive JSON object, the program processes and transmits each metric sequentially. For every unique metric (e.g., temperature, pressure, AQI), it crafts an independent, localized JSON string payload containing a single key-value pair, such as {"temperature":24.5}.
The payload is printed locally to the Serial Monitor before being sent across the network via client.publish() to the MQTT topic "Enviro/air_quality".
4. Structural Limitations
A key architectural characteristic of this script is its heavy reliance on blocking delays. Between each distinct metric transmission, the code invokes a delay(5000) command. Because there are eight separate payloads published individually per loop cycle, the program accumulates over 40 seconds of artificial idling every iteration. This structural layout limits the frequency of sensor updates and prevents the system from running asynchronous background tasks smoothly.
Downloads
The Environmental Data Is Shown on the Mobile Phone
The sensors collect environmental data. This includes temperature, humidity, pressure, attitude, gas resistance, TVOC, ECO2, and AQI. The data is transmitted to a centralized IoT server via Wi-Fi or 5G.
Demonstration of Data Monitoring by Connecting IP Address of IoT Webserver
Users can read the environmental data by connecting to the IoT server. The server's IP address is 192.168.0.100.
Modification by Using Control Lever in the Webserver
The picture shows the design of the control lever..
System Overview
The provided Arduino firmware transforms an ESP32 microcontroller into a dual-axis motor controller managed wirelessly through an interactive web-based interface. The application is tailored for machine automation, orchestrating the movement of a horizontal "Table" / "Tailgate" axis and a vertical "Lift" axis using stepper motors, alongside two supplementary servo motors. By combining local network hosting with real-time data streaming, the system allows operator inputs on a touchscreen or mouse-driven interface to instantly translate into physical machine actions.
Network & Interface Architecture
At its core, the firmware initiates a local Wi-Fi connection using hardcoded credentials. Once connected, it spins up a dual-layered server ecosystem: an asynchronous HTTP web server operating on port 80 and a WebSocket server operating on port 81.
When a user navigates to the ESP32’s IP address, the HTTP server delivers an embedded HTML and JavaScript webpage. This frontend displays a virtual joystick, or "Control Lever," styled within a dark-mode user interface. The JavaScript layer captures user interaction through event listeners tracking mouse movements and mobile touch events. As the user drags the virtual knob, the script tracks its offset relative to the center, enforces a circular boundary limit, and normalizes the position into standard coordinates ranging from -100 to +100.
Real-Time Data Streaming
To minimize lag, communication relies entirely on the WebSocket protocol rather than traditional HTTP requests. As the joystick moves, the browser packs the two-dimensional coordinates into a comma-separated text string and transmits it over the open WebSocket channel instantly. If the user releases the joystick, a reset function automatically snaps the interface knob back to center and transmits a neutral coordinate package to stop all movement.
Motor Logic & Speed Conversion
On the receiving end, the ESP32 parses incoming WebSocket strings to extract individual X and Y integers. To filter out accidental inputs or touch vibrations, a deadzone threshold is enforced; coordinate values must exceed an absolute value of 10 to trigger any physical movement.
The system utilizes a custom mapping profile to convert joystick intensity into motor speed. Stepper motors are speed-controlled by adjusting the microsecond delays between electrical pulses—shorter delays result in a higher pulse frequency and faster rotation. The mapping logic translates lower joystick displacements into a maximum pulse delay (slow movement) and extreme displacements into a minimal pulse delay (fast movement). The positive or negative sign of the coordinate dictates the logic state sent to the direction pins of the motor drivers.
Motion Execution Loop
The primary control loop acts as the engine of the firmware, executing the continuous operational cycles required by the motors. When a valid speed is set, the loop rapidly switches the hardware step pins from a high voltage state to a low voltage state, producing the precise electrical pulses needed to step the motors. While the configuration defines individual control pins for step signals, direction inputs, and an active-low driver enable toggle, the sequence relies on consecutive microsecond delays to manage pulse timing.
Downloads
Demonstration of Using Control Lever 1
Demonstration of Using Control Lever 2
Two Trucks
Two innovated truck are made. It is amazing.