Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Bluetooth-Controlled Robotic Vehicle with Brushless Motor and Servo Steering

View and Edit Project In Cirkit DesignerImage of Bluetooth-Controlled Robotic Vehicle with Brushless Motor and Servo Steering

Circuit Documentation

Summary

The circuit in question is designed to control multiple DC motors, a brushless motor, and a servomotor using an Arduino Nano as the central microcontroller. It includes a Bluetooth module for wireless communication, an L298N motor driver to control the DC motors, an Electronic Speed Controller (ESC) for the brushless motor, and a LiPo battery as the power source. The circuit is intended for applications where precise motor control is required, such as in robotics or remote-controlled vehicles.

Component List

Wiring Details

DC Motors

LiPo Battery

Brushless Motor

L298N DC Motor Driver

Servomotor MG90S

Electronic Speed Controller (ESC)

HC-05 Bluetooth Module

Arduino Nano

Documented Code

Arduino Nano Code

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

This code is a placeholder and should be replaced with the actual logic to control the motors and communicate with the Bluetooth module.

Brushless Motor Control Code (Attached to ESC)

#include <Servo.h>

Servo esc; // Create a servo object to control the ESC

void setup() {
  esc.attach(9); // Attach the ESC on pin 9
  esc.writeMicroseconds(1000); // Send the minimum signal to the ESC
  delay(1000); // Wait for 1 second
}

void loop() {
  int throttle = 1500; // Set the throttle signal (microseconds)
  esc.writeMicroseconds(throttle); // Send the throttle signal to the ESC
  delay(10000); // Run the motor at the set throttle for 10 seconds

  esc.writeMicroseconds(1000); // Stop the motor by sending the minimum signal
  delay(5000); // Wait for 5 seconds before the next loop iteration
}

This code is designed to control the brushless motor via the ESC. It sets a throttle value and runs the motor for a specified time before stopping.

Servomotor MG90S Control Code

#include <Servo.h>

Servo myservo;  // create servo object to control the MG90S

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}

void loop() {
  myservo.write(90);  // sets the servo position to 90°
  delay(1000);        // waits for a second
  myservo.write(0);   // sets the servo to position 0°
  delay(1000);        // waits for a second
}

This code is used to control the position of the Servomotor MG90S. It alternates the servo position between 0 and 90 degrees.

Note: The code provided for each microcontroller is specific to its function within the circuit. The Arduino Nano code is a template and should be completed with the appropriate logic for the desired application. The ESC and Servomotor codes are examples of how to control these components using the Arduino Nano.