Electronics

Robot 4WD Smart Robot Car Double Layers Kit Green

Out Of Stock

1

Description

The 4WD Smart Robot Car chassis kit is a great project for those interested in robotics and DIY electronics. The kit comes with all the necessary parts to assemble a functional robot car.

 

Package includes:

  • 4 Tires
  • 6 Fasteners
  • 2 Smart car chassis
  • 4 DC gear motors
  • 4 encoders
  • 1 Set of Screws, Nuts, and Copper Pillars

 

To assemble the robot, follow these steps:

  1. Start by assembling the chassis. Take the two smart car chassis and use the screws and nuts to attach them together.
  2. Once the chassis is assembled, attach the four DC gear motors to the bottom of the chassis using screws and nuts.
  3. Attach the four encoders to the DC gear motors using the provided screws and nuts. Make sure they are securely attached.
  4. Attach the four tires to the DC gear motors. Each tire should be attached to the shaft of the corresponding gear motor.
  5. Once all the motors and tires are attached, connect the wires from each motor to a motor driver board or microcontroller. Follow the instructions provided with your specific motor driver or microcontroller to make the necessary connections.
  6. Finally, power up the robot using a battery or power supply, and test its movement by sending commands to the motor driver or microcontroller.

Circuit:

To connect the L293D 4 motor shield to your Arduino, you will need to make the following connections:

  1. Connect the motor shield's VCC pin to your Arduino's 5V pin.
  2. Connect the motor shield's GND pin to your Arduino's GND pin.
  3. Connect the motor shield's IN1, IN2, IN3, and IN4 pins to the arduino pins in the table bellow
  4. Connect the motors to the motor shield's M1, M2, M3, and M4 ports. Each motor should have two wires that you will need to connect to the appropriate terminals on the motor shield. The positive wire should be connected to the motor shield's A terminal, and the negative wire should be connected to the motor shield's B terminal.

  L293D 4 Motor Shield Arduino Uno
--------------------- --------------
VCC -> 5V 5V -> 5V
GND -> GND GND -> GND
IN1 -> D2 D2 -> Digital Pin 2
IN2 -> D3 D3 -> Digital Pin 3
IN3 -> D4 D4 -> Digital Pin 4
IN4 -> D5 D5 -> Digital Pin 5
M1A -> Motor 1 + -
M1B -> Motor 1 - +
M2A -> Motor 2 + -
M2B -> Motor 2 - +
M3A -> Motor 3 + -
M3B -> Motor 3 - +
M4A -> Motor 4 + -
M4B -> Motor 4 - + 

 

Library:

To use the L293D 4 motor shield with your Arduino, you will need to install the appropriate library. Here are the steps to install the library:

  1. Download the L293D motor shield library from this link: https://github.com/adafruit/Adafruit-Motor-Shield-library
  2. Extract the downloaded zip file to a folder on your computer.
  3. Open the Arduino IDE.
  4. In the Arduino IDE, select "Sketch" from the top menu, then select "Include Library", then select "Add .ZIP Library".
  5. Navigate to the folder where you extracted the zip file in step 2, and select the "Adafruit_Motor_Shield_library-master.zip" file. Click "Open" to install the library.
  6. Once the library has been installed, you should see a message in the Arduino IDE indicating that the library was installed successfully.

 

Code:

 Arduino code using the L293D 4 motor shield to control a 4WD robot:

// Include the AFMotor library
#include "AFMotor.h"

// Create motor objects for each of the four motors
AF_DCMotor motor1(1, MOTOR12_64KHZ);  // Motor 1 is connected to M1 and M2
AF_DCMotor motor2(2, MOTOR12_64KHZ);  // Motor 2 is connected to M3 and M4
AF_DCMotor motor3(3, MOTOR34_64KHZ);  // Motor 3 is connected to M1 and M2
AF_DCMotor motor4(4, MOTOR34_64KHZ);  // Motor 4 is connected to M3 and M4

void setup() {
  // Set the serial communication baud rate to 9600
  Serial.begin(9600);

  // Initialize the motor shield
  AFMS.begin();  // Default frequency is 1.6KHz

  // Set the maximum speed for each motor (0-255)
  motor1.setSpeed(200);
  motor2.setSpeed(200);
  motor3.setSpeed(200);
  motor4.setSpeed(200);
}

void loop() {
  // Move the robot forward
  moveForward();
  delay(1000);

  // Stop the robot
  stopRobot();
  delay(500);

  // Turn the robot left
  turnLeft();
  delay(1000);

  // Stop the robot
  stopRobot();
  delay(500);

  // Turn the robot right
  turnRight();
  delay(1000);

  // Stop the robot
  stopRobot();
  delay(500);

  // Move the robot backward
  moveBackward();
  delay(1000);

  // Stop the robot
  stopRobot();
  delay(500);
}

void moveForward() {
  // Set the direction and speed of each motor to move forward
  motor1.run(FORWARD);
  motor2.run(FORWARD);
  motor3.run(FORWARD);
  motor4.run(FORWARD);
}

void moveBackward() {
  // Set the direction and speed of each motor to move backward
  motor1.run(BACKWARD);
  motor2.run(BACKWARD);
  motor3.run(BACKWARD);
  motor4.run(BACKWARD);
}

void turnLeft() {
  // Set the direction and speed of each motor to turn left
  motor1.run(FORWARD);
  motor2.run(FORWARD);
  motor3.run(BACKWARD);
  motor4.run(BACKWARD);
}

void turnRight() {
  // Set the direction and speed of each motor to turn right
  motor1.run(BACKWARD);
  motor2.run(BACKWARD);
  motor3.run(FORWARD);
  motor4.run(FORWARD);
}

void stopRobot() {
  // Stop all the motors
  motor1.run(RELEASE);
  motor2.run(RELEASE);
  motor3.run(RELEASE);
  motor4.run(RELEASE);
}

 

Specifications:

  • Working Voltage: DC 3V/5V/6V
  • Working Current: 100mA/100mA/120mA
  • No-load speed (with wheel): 100 RPM/190 RPM/240 RPM
  • Speed (no-load): 20 m/min, 39 m/min, 48 m/min
  • Noise: <65 db
  • Wheel Diameter: 66 mm(approx)
  • Dimensions(LWH): 25.515.56.5 cm(approx)

Note: the robot's performance may vary depending on the specific motor driver or microcontroller used, as well as the power source and programming.