Sonar Viz Bot v1

7/16/25

Chassis

Chassis & Mounting Layout

  • Use a caliper to take measurements
    • Chassis: 20.5 cm x 13.0 cm x 5.5 cm
  • Draw Sketch picture 1
Measurements
  • Chassis: 20.5 cm x 13.0 cm x 5.5 cm
Sketch

picture 1

CAD (Solidworks)

picture 29

Tinkercad design (Chloe)

https://www.tinkercad.com/things/lr8VxS2y9I1/edit?returnTo=%2Fdashboard&sharecode=GgRsnzei7CGlOPf53LRodDr3RVC0fpdu-eLudGKORLk

picture 28

Updated assembly

Caster wheel

description

Screws

Caster wheel mounting holes
  • Draw construction rectangle for caster’s mounting plate holes
  • Draw circles with centers coincident with the rectangle corners
    • Clearance hole for screw pass through: 0.17 mm (4.32 in)
  • Cut-Extrude

Motor wheel assembly

Gearbox motor

https://a.co/d/ahxAD8G

Shaft Extension

Pass through holes

  • Make holes for DC motor shaft

3D Print

Prep

  • Go to File → Save As → Choose STL
Caster Wheel mount/adapter
  • Draw a 6cm x 6cm square and extrude 2cm
  • Extude cut through block
  • Change the radius for one hole to 0.3cm to allow ball caster to be screwed on
  • Use Insert → Features → Save Bodies to save just the mounting block
Electrical Setup

Arduino Nano BLE

Warning- Arduino Nano 33 BLE operates on 3.3V

  • The Nano’s 3.3V output may be enough to for the L298D logic pins, but not the VCC pins
  • Never input 5V signals into the Nano BLE

L293D Motor Driver

Wiring

L293D Pin NameL293D Pin NumberNano PinFunction
EN1111 (ENA)Right motor speed (PWM)
IN1213 (IN1)Right motor direction 1
IN2712 (IN2)Right motor direction 2
IN3108 (IN3)Left motor direction 1
IN4159 (IN4)Left motor direction 2
EN2910 (ENB)Left motor speed (PWM)
GND12GNDGround

Code

L293D_motor_driver_nano.ino
// L293D Motor Driver pins for right motor (Motor A)
const int ENA = 11;    // PWM speed control for right motor
const int IN1 = 13;    // Direction control 1 for right motor
const int IN2 = 12;    // Direction control 2 for right motor
 
// L293D Motor Driver pins for left motor (Motor B)
const int ENB = 10;    // PWM speed control for left motor
const int IN3 = 8;     // Direction control 1 for left motor
const int IN4 = 9;     // Direction control 2 for left motor
 
const int switchPin = 7; // Switch to turn robot on/off
 
int motorSpeed = 0; // Starting motor speed
 
void setup() {
    pinMode(switchPin, INPUT_PULLUP);
 
    pinMode(IN1, OUTPUT);
    pinMode(IN2, OUTPUT);
    pinMode(ENA, OUTPUT);
 
    pinMode(IN3, OUTPUT);
    pinMode(IN4, OUTPUT);
    pinMode(ENB, OUTPUT);
 
    Serial.begin(9600);
    Serial.println("To infinity and beyond!");
    motorSpeed = 255;
    Serial.print("Motor Speed: ");
    Serial.println(motorSpeed);
}
 
void loop() {
    motorSpeed = 255;
    // if (digitalRead(switchPin) == LOW) { // Switch ON (pressed)
    if (digitalRead(switchPin) == HIGH) { // Switch OFF 
        rightMotor(motorSpeed);
        leftMotor(motorSpeed);
    } else { // Switch OFF
        rightMotor(0);
        leftMotor(0);
    }
}
 
void rightMotor(int speed) {
    if (speed > 0) {
        digitalWrite(IN1, HIGH);
        digitalWrite(IN2, LOW);
    } else if (speed < 0) {
        digitalWrite(IN1, LOW);
        digitalWrite(IN2, HIGH);
    } else {
        digitalWrite(IN1, LOW);
        digitalWrite(IN2, LOW);
    }
    analogWrite(ENA, abs(speed));
}
 
void leftMotor(int speed) {
    if (speed > 0) {
        digitalWrite(IN3, HIGH);
        digitalWrite(IN4, LOW);
    } else if (speed < 0) {
        digitalWrite(IN3, LOW);
        digitalWrite(IN4, HIGH);
    } else {
        digitalWrite(IN3, LOW);
        digitalWrite(IN4, LOW);
    }
    analogWrite(ENB, abs(speed));
}

Battery pack

  • dimensions: 4” x 2” x 1”
  • nominal voltage: 7.7V
  • max charge voltage 8.4v

Make Assembly

Wheel

  • diameter: 6cm

Grabcad- 65mm Rubber Wheel.SLDPT

Hobby Gear Motor

https://cad.onshape.com/documents/3304df14f1047a5cdcc9ee94/w/2e91bdd099aa410aa079012b/e/f62da644dddc7a47f10d5392

Caster wheel

Screws

description

Assembly

picture 62

Exploded View

picture 64