Chess Playing Robot Arm That Will Beat You!

It uses a 3D printed robot arm from free resources with my code to recognise the human moves and control the arm

Apr 10, 2022

27466 views

13 respects

Immagine

Components and supplies

2

USB Light

1

USB Speaker

1

HP Webcam HD 2300

3

Stepper motor driver board A4988

1

Arduino Mega 2560

1

SG90 Micro-servo motor

1

Raspberry Pi 3 Model B

1

AMS1117

1

Ramps 1.4

3

NEMA 17 stepper motor

Tools and machines

1

3D Printer (generic)

Apps and platforms

1

Raspbian

1

Stockfish chess engine

Project description

Code

Raspberry Pi code for 3D printed chess robot

Downloadable files

Community Robot Arm

Get guides from https://github.com/20sffactory/community_robot_arm

Community Robot Arm

Immagine

Community Robot Arm

Get guides from https://github.com/20sffactory/community_robot_arm

Community Robot Arm

Immagine

Comments

Only logged in users can leave comments

Immagine
Immagine

ricpd

2 years ago

The latest version of this project is at https://www.hackster.io/ricpd/chess-playing-robot-arm-that-will-beat-you-678035, so please comment there!

Immagine
Immagine

deonit

2 years ago

Hey Ricpd me and my friend have only done robotics for about a year we were hoping you could send us a more detailed writing piece on how to build this master piece.

Immagine
Immagine

ricpd

2 years ago

I haven't got anything else in writing, but I will try to help you with specific questions as you go along

Immagine
Immagine

ricpd

2 years ago

Code now also works on Windows (as an alternative to Raspberry Pi)

Immagine
Immagine

ricpd

2 years ago

The RPi or PC is connected to the Arduino by a USB A/B cable (printer cable). Or alternatively via Bluetooth (not BLE), using an HC-05 Bluetooth module.

Immagine
Immagine

ricpd

2 years ago

Now supports IP cameras as well as USB cameras

Immagine
Immagine

Anonymous user

2 years ago

i get this error please help me FileNotFoundError [Errno 2] No such file or directory 'CUsersRichardGithubchess-robotversion2imageschesslog.log'

Immagine
Immagine

ricpd

2 years ago

You can indeed try using the D4 5V GND to the servo on ramps. But a friend stated that that doesn't provide enough power when the servo is under load

Immagine
Immagine

ricpd

2 years ago

Change the relevant line in CBstate.py

Immagine
Immagine

Anonymous user

2 years ago

i can't start the code

Immagine
Immagine

Anonymous user

2 years ago

But can I just use the D4 5V GND to the servo on ramps

Immagine
Immagine

Anonymous user

2 years ago

If the ardrino code allows it

Immagine
Immagine

Anonymous user

2 years ago

But I still have the error (winerror2)

Immagine
Immagine

Anonymous user

2 years ago

thank you very much which pins should the servo be on

Immagine
Immagine

Anonymous user

2 years ago

and i have this error FilenotFoundError: (WinError2) i am using thonny

Immagine
Immagine

ricpd

2 years ago

Or if you think the RAMPS will power the servo OK then D4 https://reprap.org/wiki/File:Rampsv14_wiring_psu.png

Immagine
Immagine

ricpd

2 years ago

Change the line so that it refers to a folder that exists on your system

Immagine
Immagine

ricpd

2 years ago

AMS1117 like this one: https://www.ebay.com/itm/274666664314

Immagine
Immagine

ricpd

2 years ago

This line: mydir = r'C:\\Users\\Richard\\Github\\chess-robot\\version2\\images' + "\\\\"

Immagine
Immagine

ricpd

2 years ago

But what I did was to take yellow to where it says D4, and brown and red to the voltage regulator and from that to where it says 12V Aux

Immagine
Immagine

ricpd

2 years ago

You need a voltage drop for that. I'll take a little while to get the info

Immagine
Immagine

ricpd

2 years ago

I checked this out on the Arduino forum .When the servo is under load it will far exceed the limit on current. This could damage the Arduino.

Immagine
Immagine

Anonymous user

2 years ago

can you please make a tutorial video

Immagine
Immagine

Anonymous user

2 years ago

Now it says cannot access camera I’m using USB

Immagine
Immagine

ricpd

2 years ago

So on Windows it's line 20 for the camera port number

Immagine
Immagine

Anonymous user

2 years ago

I have tried 1-20 and none of them works

Immagine
Immagine

ricpd

2 years ago

Is the camera listed in Settings...Devices? On Windows 10 this is Settings...Devices...Bluetooth & other devices. Also, in the right column click on Devices and Printers. Then right click on the camera icon then Properties ... Hardware... USB Composite Device should give the port number We have these lines: cameraportno = 1 #cameraportno = 0 #cameraportno = 'http://192.168.1.189:8080/video' #cameraportno = 'rtsp://tapoadmin:tapoadmin@192.168.1.127:554/stream1' cameratype = 'usb' #cameratype = 'ip' and as above all lines should be commented out except cameraportno = 1 cameratype = 'usb' (and then you try different values of cameraportno)

Immagine
Immagine

Anonymous user

3 years ago

Hello, can you help me by sending the complete source code for this project because I want to design this project

Immagine
Immagine

ricpd

2 years ago

Please see the CODE section

Immagine
Immagine

gizmolind

3 years ago

Now it says cannot access camera I’m using USB

Immagine
Immagine

ricpd

2 years ago

So on Windows it's line 20 for the camera port number

Immagine
Immagine

ricpd

2 years ago

Is the camera listed in Settings...Devices? On Windows 10 this is Settings...Devices...Bluetooth & other devices. Also, in the right column click on Devices and Printers. Then right click on the camera icon then Properties ... Hardware... USB Composite Device should give the port number We have these lines: cameraportno = 1 #cameraportno = 0 #cameraportno = 'http://192.168.1.189:8080/video' #cameraportno = 'rtsp://tapoadmin:tapoadmin@192.168.1.127:554/stream1' cameratype = 'usb' #cameratype = 'ip' and as above all lines should be commented out except cameraportno = 1 cameratype = 'usb' (and then you try different values of cameraportno)

Immagine
Immagine

gizmolind

2 years ago

I have tried 1-20 and none of them works

Immagine
Immagine

gizmolind

3 years ago

i get this error please help me FileNotFoundError [Errno 2] No such file or directory 'CUsersRichardGithubchess-robotversion2imageschesslog.log'

Immagine
Immagine

ricpd

2 years ago

You can indeed try using the D4 5V GND to the servo on ramps. But a friend stated that that doesn't provide enough power when the servo is under load

Immagine
Immagine

ricpd

2 years ago

Change the relevant line in CBstate.py

Immagine
Immagine

ricpd

2 years ago

I checked this out on the Arduino forum .When the servo is under load it will far exceed the limit on current. This could damage the Arduino.

Immagine
Immagine

ricpd

2 years ago

Or if you think the RAMPS will power the servo OK then D4 https://reprap.org/wiki/File:Rampsv14_wiring_psu.png

Immagine
Immagine

ricpd

2 years ago

Change the line so that it refers to a folder that exists on your system

Immagine
Immagine

ricpd

2 years ago

But what I did was to take yellow to where it says D4, and brown and red to the voltage regulator and from that to where it says 12V Aux

Immagine
Immagine

ricpd

2 years ago

AMS1117 like this one: https://www.ebay.com/itm/274666664314

Immagine
Immagine

ricpd

2 years ago

You need a voltage drop for that. I'll take a little while to get the info

Immagine
Immagine

ricpd

2 years ago

This line: mydir = r'C:\\Users\\Richard\\Github\\chess-robot\\version2\\images' + "\\\\"

Immagine
Immagine

gizmolind

2 years ago

But I still have the error (winerror2)

Immagine
Immagine

gizmolind

2 years ago

i can't start the code

Immagine
Immagine

gizmolind

2 years ago

But can I just use the D4 5V GND to the servo on ramps

Immagine
Immagine

gizmolind

2 years ago

If the ardrino code allows it

Immagine
Immagine

gizmolind

2 years ago

and i have this error FilenotFoundError: (WinError2) i am using thonny

Immagine
Immagine

gizmolind

2 years ago

thank you very much which pins should the servo be on

Immagine
Immagine

gizmolind

3 years ago

can you please make a tutorial video

Immagine
Immagine

ricpd

3 years ago

Now supports IP cameras as well as USB cameras

Immagine
Immagine

SkiBum326

3 years ago

Hey ricpd! Awesome project! I would love to invite you to also share your project on WikiMakes (www.WikiMakes.com) to get additional visibility for your work! Austin

Immagine
Immagine

ricpd

3 years ago

The RPi or PC is connected to the Arduino by a USB A/B cable (printer cable). Or alternatively via Bluetooth (not BLE), using an HC-05 Bluetooth module.

Immagine
Immagine

ricpd

3 years ago

Code now also works on Windows (as an alternative to Raspberry Pi)