Omni Robot controlled by Play Station 2 controller
- baotriet110
- Aug 18, 2020
- 2 min read
Updated: Aug 19, 2020
It's is my first published project. Thank for your reading.
This is my introduction how to build a simple robot using omni wheels.
Components:
Arduino nano
1 PS2 controller pack: a joystick + a receiver + an adapter(optional)
1 CNC shield for Arduino Nano
3 stepper Motor Nema 17
3 stepper driver - A4988 (you can use whatever you want, but you should check the pinout and driven current)
3 Omni wheels
3 Nema 17 holders
6 M4 nuts and bolts
1 Lipo battery (3s is recommended)
T jack of Lipo battery to power jack converter
Wire
Step 1: Create the robot frame
You can change the shape of the frame if you want. If not, I provide a 3D printing file and a .dxf for laser cutting. Please see github link for more information.
Size of the frame: 167mm x 167mm

Step 2: Wiring
Notice: you should check the board before using it. Some cloned boards do not support micro step mode because of the wrong schematic. If you want to use this mode, please follow this link to fix it.
Connect the Arduino Nano with the shield, please make sure that the USB port is opposite to the power port of the shield. See the picture as reference.

Next, insert the stepper drivers. You should check the position of the potentiometer knobs, they should have the same side with the power port of the shield. Then, we connect the stepper motors with the CNC shield. The same direction is very important. If not, you have to change everything.

Finally, connect the PS2 controller with the shield. It is easier to use an adapter, but it's OK without it.
With an adapter:
From the adapter ------> To the shield
GND ----------------------> GND
VCC -----------------------> 5V
DAT -----------------------> D12
CMD -----------------------> Z- or Z+ (pin D11 on Arduino Nano)
CS -----------------------> Y- or Y+ (pin D10 on Arduino Nano)
CLK -----------------------> D13
Please check the color of the wires to ensure sure that the connection is right.
Without an adapter:
You should follow this link to connect the receiver.
Notice: You should check the side of the receiver and the logic level.
Step 3: Assemble
Mount the CNC shield to the frame. It's up to you.
Step 4: Coding
In this project, I use 2 libraries including AccelStepper and PS2X_lib for stepper motor controller and PS2 controller. Please read the comment to understand how the code works.
Github: https://github.com/baotriet/Omni_robot_PS2_controller.git
Step 5: Demo
Please see the video to know how to control the robot.
Step 6: Thank you for reading. Enjoy your job.
Comments