กลับไปหน้ารวมไฟล์
boat-with-arduino-nano-33-iot-on-arduino-cloud-6ca245-en.md

High-Power IoT Boat Innovation: Cloud Control with Arduino Nano 33 IoT

This project is designed to demonstrate the capabilities of the **Arduino Nano 33 IoT** in connecting to the **Arduino Cloud IoT** ecosystem, focusing on creating an Aquatic Maker project. This presents a challenging task for engineers and embedded system developers, as it requires interdisciplinary knowledge including buoyancy, motion dynamics, and most importantly, the prevention of water ingress into electronic systems (Water Tightness).

Prototype structure of the IoT boat, emphasizing Center of Gravity placement.

In the video below, you will see the boat's performance test as it navigates, controlled via a Dashboard created on Arduino Cloud IoT by Eliezer Neto. We tested basic movement logic such as rotating on axis, moving forward, and turning right.

One engineering problem encountered during testing was "uneven forward movement," caused by RPM mismatch between the two motors, leading the boat to veer off course. If you face this issue, there are two solutions: 1) a **Software solution** by adding a PID (Proportional-Integral-Derivative) algorithm to compensate for RPM, or 2) a **Hardware solution** by using a Voltage Limiter or adjusting the Trimpot on the motor driver to equalize the voltage.

Testing boat control via the Cloud system and the boat's response

Backup Control System (Offline Control System)

In addition to the IoT system, the circuit diagram also includes a grey box with push buttons connected to the Analog port of the Arduino Nano 33 IoT. This part is designed as an Offline control system via a tethered connection for those who want to study the basic logic or use it in areas without WiFi signals. I have prepared separate Source Code for this Offline mode.

Connection diagram for push buttons for Offline control mode

In-depth Look at the Propulsion System's Logic

The core of this project lies in the `engine()` function, which uses **Differential Steering** (similar to a tank) to control two motors, allowing the boat to change direction quickly:

  • Forward: Both propellers must rotate in the direction that pushes thrust backward simultaneously.
  • Turning on Axis: One motor rotates clockwise (CW), and the other rotates counter-clockwise (CCW).
  • Technical Advice: The motor shafts should be extended to ensure the propellers are 100% submerged in water. This will increase propulsion and reduce cavitation, allowing the boat to move at full efficiency.
Determining propeller rotation direction for balanced propulsion

Software Logic and Hardware Analysis

From the analysis of the Code used, we have divided the functionality into the following main modules:

  1. Siren System: Uses the `siren()` function, which calculates values using a Sine Wave (sin() function) to create a smooth and consistent audio frequency via a Buzzer on pin 11, giving the feel of a real rescue boat siren.
  2. Visual Indicators: The `flashes()` function controls red and blue LEDs to alternate every 1,000 milliseconds, using a Non-blocking technique with `millis()` to avoid interfering with the propulsion logic.
  3. Servo Control: The `Servo.h` library is used to control accessories (e.g., laser or camera mount) on pin 9, adding versatility to the boat.

In the initial assembly phase, I chose to use a **Protoboard** to facilitate easy adjustment of component placement. This is because **Center of Gravity (CG)** is crucial when building a boat. If the battery or controller is slightly tilted to one side, the boat will lose balance and either sink or veer off course.

Testing for the Water Line and weight distribution on the Protoboard

If you have questions about the code or waterproofing techniques, feel free to ask in the comments below, or follow my additional work on Instagram: @profsandromesquita.

ข้อมูล Frontmatter ดั้งเดิม

title: "Boat with Arduino Nano 33 IoT on Arduino Cloud"
description: "Double helix boat, controlled by Arduino IoT Cloud with siren, patrol LED and laser cannon."
author: "sandromesquitamecatronica"
category: "Motors & Robotics"
tags:
  - "arduino nano 33 iot"
  - "cloud arduino"
  - "iot"
  - "sandro mesquita"
  - "internet of things"
views: 9203
likes: 4
price: 2450
difficulty: "Intermediate"
components:
  - "1x SG90 Micro-servo motor"
  - "1x Soldering iron (generic)"
  - "1x Hot glue gun (generic)"
  - "1x Multitool, Screwdriver"
  - "1x Solder Wire, Lead Free"
  - "1x Resistor 330 ohm"
  - "1x Plier, Needle Nose"
  - "1x Tape, Electrical"
  - "1x Arduino Nano 33 IoT"
  - "1x 5 mm LED: Red"
  - "2x Dual H-Bridge motor drivers L298"
  - "2x DC Motor, Miniature"
  - "1x Laser Diode, 655 nm"
  - "1x Plier, Long Nose"
  - "1x Buzzer"
  - "1x LED, Blue Green"
  - "1x Jumper wires (generic)"
tools: []
apps:
  - "1x Arduino IoT Cloud"
downloadableFiles:
  - "https://projects.arduinocontent.cc/5785d976-887a-432e-9823-34536bade60d.ino"
  - "https://create.arduino.cc/editor/SandroMesquita/d574e04a-9073-411b-b3e6-82d722430b73"
  - "https://projects.arduinocontent.cc/5785d976-887a-432e-9823-34536bade60d.ino"
documentationLinks: []
passwordHash: "f965ff2484436c5570a23c3140506a4443f1e14ce1f72b6748e7bbf4f5f993e0"
encryptedPayload: "U2FsdGVkX1/uPF39nmJwwPbbo3Hl17unI86x+c1vTf3caCxVX4vx2fgyy48+FCIKMV8pdCwnR+zEokinWr5MIuRvE5+z41hkRv+RSc5ykBQ="
seoDescription: "Double helix boat project using Arduino Nano 33 IoT and Arduino Cloud with siren, patrol LED and laser cannon."
videoLinks:
  - "https://www.youtube.com/embed/EcLwLk65TBk"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/boat-with-arduino-nano-33-iot-on-arduino-cloud-6ca245_cover.jpg"
lang: "en"