Mechanum Wheel Robot (Work in Progress)

by efe aycakmak in Workshop > 3D Printing

50 Views, 1 Favorites, 0 Comments

Mechanum Wheel Robot (Work in Progress)

WhatsApp Görsel 2024-11-29 saat 17.02.21_b8aafd23.jpg
back.jpg
IMG-20241213-WA0025.jpg

We built a robotic vehicle equipped with Mecanum wheels, controlled via an Arduino Mega and a motor driver shield. To enhance its functionality and aesthetics, we integrated three programmable LED strips for dynamic lighting effects. The vehicle features a custom-designed exterior frame that gives it a distinctive appearance and protects internal components. Looking ahead, we aim to refine this design by adding more features.

Supplies

Arduino Mega

Mecanum Wheels x 4

DC Motors (TT Motors or Yellow Geared Motors) x 4

Adafruit Motor Shield (L298N-based)

Bluetooth Module (HC-05)

Battery Pack (LiPo)

WS2812B Addressable LED Strips x 3 (Each with 6 LEDs)

Jumper Wires

Plexiglass Chassis

100nF Ceramic Capacitors x 4

Design of the Chasis and Exterior Frame

Ekran görüntüsü 2024-12-13 223003.png
Ekran görüntüsü 2024-12-13 223013.png
Ekran görüntüsü 2024-12-13 223349.png
Ekran görüntüsü 2024-12-13 223402.png

We used the Autodesk Inventor program to design the robot's outer case. We adjusted the design so that it would fit perfectly on the plastic design on the base where the Arduino was placed. First, we extruded the correct model on the appropriate sketch on the base. Then, we cut some sections from the side to adjust the front and back. Thus, the front and back bumpers emerged. We also cut the model towards the inside using the offset command for the glass areas. In the next stage, we opened a flat strip-shaped headlight area to be able to put LEDs on the front and back of the robot. Finally, we added sections to the bottom of the model so that it can be easily mounted. Thus, the outer design of the robot was completed.

  1. Exterior_Frame.stl: 3D model for 3D printing.
  2. Mecanum_Chasis.dxf: 2D layout for laser cutting.

Chasis Assembly

unassembled.jpg


In this step, we assembled the custom-designed chassis for our Mecanum-wheeled robot. Before mounting the motors, we completed some critical soldering tasks to ensure proper motor performance and reduce electrical noise.


Soldering Capacitors:

We soldered 100nF ceramic capacitors to each DC motor. These capacitors help reduce electrical noise and prevent interference with other electronic components by stabilizing the motor's power supply.


Wiring the Motors:

After soldering the capacitors, we soldered wires to the motor terminals to prepare them for connection to the motor shield. This step ensures reliable electrical connections for smooth motor operation.


Laser-Cut Chassis:

The design mentioned in the previous step was laser-cut from plexiglass for precision and durability.


Mounting the Motors:

Each DC motor was positioned into the designated slots on the chassis, and we secured them in place using screws and nuts. Proper alignment of the motors is essential to ensure that the Mecanum wheels will function as intended.


These steps form a solid foundation for the robot's mobility, providing stable motor connections and a robust chassis ready for further assembly.

Wiring and LED Assembly

IMG-20241213-WA0026.jpg
IMG-20241213-WA0027.jpg

In this step, we focused on wiring the electronic components and assembling the LED strips for the robot.

  1. Motor Connections:
  2. We connected the DC motors to the Adafruit Motor Shield.
  3. Bluetooth Module:
  4. The HC-05 Bluetooth module was wired to the Arduino Mega’s pins for wireless communication.
  5. LED Assembly:
  6. We installed the WS2812B addressable LED strips to the chassis and the exterior frame.
  7. The LED wires were connected to their respective data pins:
  8. Front LEDs to pin 48
  9. Rear LEDs to pin 50
  10. Police LEDs to pin 46
  11. Power and Capacitors:
  12. 100nF capacitors were soldered to the motors to reduce electrical noise and interference.
  13. The LiPo battery pack was connected to power the Arduino and motors.
  14. Securing Wires:
  15. All wires were neatly routed and secured with electrical tape to prevent loose connections during movement.


Arduino Code


This code controls our Mecanum-wheeled robot with Bluetooth commands and provides LED feedback using the Adafruit Motor Shield and the FastLED library. Here's a summary of each component and function:

1. Libraries and Definitions

  1. AFMotor.h: Controls the motors via the Adafruit Motor Shield.
  2. FastLED.h: Manages the WS2812B LED strips.
  3. BTSerial: Defined as Serial1 for Bluetooth communication on the Arduino Mega.

2. LED Configuration

  1. Three LED Strips:
  2. strip1: Front LEDs (6 LEDs).
  3. strip2: Rear LEDs (6 LEDs).
  4. strip3: Police lights (6 LEDs).
  5. Pins:
  6. DATA_PIN_STRIP1 = 48
  7. DATA_PIN_STRIP2 = 50
  8. DATA_PIN_STRIP3 = 46

3. Motors

Four DC motors are defined for Mecanum wheel movement:

  1. Front Left: motorFrontLeft(2)
  2. Front Right: motorFrontRight(1)
  3. Rear Left: motorRearLeft(3)
  4. Rear Right: motorRearRight(4)

4. State Variables

  1. Movement States:
  2. turningLeft, turningRight, reversing, braking, moving

5. LED Control Functions

  1. updateFrontLeds():
  2. Controls front LEDs for movement and turn signals.
  3. White LEDs when moving; Yellow LEDs for left and right turn signals.
  4. updateRearLeds():
  5. Controls rear LEDs for braking and reversing.
  6. Red LEDs for braking/reversing; Yellow LEDs for turn signals.
  7. updatePoliceLeds():
  8. Alternates red and blue LEDs every 500 ms to simulate police lights.

6. Setup Function

  1. Bluetooth: Initializes BTSerial for Bluetooth communication.
  2. LEDs: Initializes the three LED strips.
  3. Motors: Sets motor speeds to zero and stops them.

7. Loop Function

  1. Bluetooth Command Handling:
  2. Checks if there is an available Bluetooth command and calls handleCommand().
  3. Depending on the command, the robot performs different movements:
  4. W: Move Forward
  5. S: Move Backward
  6. A: Move Left
  7. D: Move Right
  8. Q: Move Diagonally Forward-Left
  9. E: Move Diagonally Forward-Right
  10. Z: Move Diagonally Backward-Left
  11. X: Move Diagonally Backward-Right
  12. G: Rotate Left
  13. H: Rotate Right
  14. F: Stop
  15. LED Updates:
  16. Calls updateFrontLeds(), updateRearLeds(), and updatePoliceLeds() to keep the LEDs synchronized with the robot's state.

8. handleCommand(char command) Function

  1. Resets State Variables before executing a new command.
  2. Updates LEDs based on the current state.


This code integrates Bluetooth control, motor movement, and LED feedback for a Mecanum-wheeled robot. The robot can move in various directions, including diagonal and rotational motions, while the LED strips provide visual feedback for movement, braking, and turn signals.

Downloads

App Design Using MIT App Inventor

WhatsApp Görsel 2024-11-28 saat 21.38.44_8cd77dd3.jpg

This project involves developing a mobile application to control a small Arduino-based vehicle created as part of the MAKErobot certification program.


At the beginning of the project, the application’s design was created. During this phase, a user interface was built by placing buttons, organizing the layout, and making the application simple and user-friendly. The buttons on the interface were designed to control the vehicle’s movements (e.g., forward, backward, left, right).


Next, necessary codes and Bluetooth functionality were added to each button. These codes enable the vehicle to operate according to the commands received from the buttons. With Bluetooth technology, the user can remotely control the vehicle through their mobile device.


As a result, this application serves as an effective control tool to manage the vehicle’s movements effortlessly. This project provided both a practical experience in developing a mobile application and a functional connection between robotics control and Arduino.

Downloads