Motor - Weber-State-Submarine-Project/Submarine GitHub Wiki

Hardware ESC Motor Documentation

This section discusses the hardware implementation of the ESC motor controllers, including their connections, operation, and challenges encountered during integration.


TD1.2E 12V Underwater Thruster

ESC


Specifications

Parameter Value
Thruster Size 78mm x 112mm
Motor KV 350KV
Rated Voltage 12V - 14.8V
Thrust Forward 1200g - 2500g
Rated Current 5A - 13A
Power 60W - 312W
Material Nylon Injection Molding, Anti-Corrosion
Components Deflecting Cover and Cap, Propeller, Motor, Cable
Cable Length 50cm
Working Depth 100m
Working Environment Freshwater and seawater
PWM Signal Control 48KHz
PWM Range 1ms - 2ms
Reverse Range 1ms - 1.5ms
Forward Range 1.5ms - 2ms
Neutral Stop 1.5ms

How ESC Motors Work

ESC motors are typically controlled via an ESC controller connected to a receiver. In this project, the ESC controllers are instead controlled by a Raspberry Pi 5, which generates PWM signals to determine the speed and direction of the motors. Before the motors can be controlled, the ESC controller must be armed. According to the datasheet, the arming sequence is as follows:

  1. Connect the wires and turn on the power.
  2. Send a 2ms or 1ms signal (max speed).
  3. Send a 1.5ms signal (stop signal).

Challenges with PWM

Software PWM

Initial attempts to control the ESC on a Raspberry Pi 4 used software-generated PWM signals, which were effective. However, after transitioning to the Raspberry Pi 5, these signals no longer worked reliably. It was determined that software-based PWM struggled to produce precise signals on the new hardware.

Hardware PWM

Attempts to utilize hardware PWM on the Raspberry Pi 5 were also unsuccessful due to the lack of support for the newer hardware in existing libraries.


Implementation of a PWM Hat

A hardware PWM hat was introduced to resolve the PWM signal issues. By connecting the PWM hat to the Raspberry Pi, it became possible to generate accurate signals required to arm and control the ESC motors.

Screenshot 2024-11-18 at 14-07-53 Amazon com MakerFocus PWM Servo Motor Driver IIC Module 16 Channel PWM Outputs 12 Bit Resolution I2C Compatible with Raspberry Pi 4 3B 3B Zero_Zero W_Zero WH and Jetson Nano Electronics


Under-Volting the Motors

Although the ESC specifications recommend a minimum voltage of 12V, testing revealed that the motors could function at voltages as low as 8V. The current implementation uses 8.5V to reduce the boat's speed, allowing other sensors to capture data more effectively during navigation.


Pinout Diagram

ESC_Pinout drawio_V1 3
Description: This pinout diagram illustrates the connections between the Raspberry Pi, ESCs (Electronic Speed Controllers), and the motors. It provides clear details on signal, power, and ground wiring to ensure accurate motor control and system functionality. Use this diagram as a guide during hardware setup and debugging.


Motor Mount

motor_mount
Description: The motor mount securely attaches the ESC motors to the boat, ensuring proper alignment and stability during operation.