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

22216 views

11 respects

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

Community Robot Arm

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

Community Robot Arm

Comments

Only logged in users can leave comments

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!

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.

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

ricpd

2 years ago

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

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.

ricpd

2 years ago

Now supports IP cameras as well as USB cameras

Anonymous user

2 years ago

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

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

ricpd

2 years ago

Change the relevant line in CBstate.py

Anonymous user

2 years ago

i can't start the code

Anonymous user

2 years ago

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

Anonymous user

2 years ago

If the ardrino code allows it

Anonymous user

2 years ago

But I still have the error (winerror2)

Anonymous user

2 years ago

thank you very much which pins should the servo be on

Anonymous user

2 years ago

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

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

ricpd

2 years ago

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

ricpd

2 years ago

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

ricpd

2 years ago

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

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

ricpd

2 years ago

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

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.

Anonymous user

2 years ago

can you please make a tutorial video

Anonymous user

2 years ago

Now it says cannot access camera I’m using USB

ricpd

2 years ago

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

Anonymous user

2 years ago

I have tried 1-20 and none of them works

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)

Anonymous user

2 years ago

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

ricpd

2 years ago

Please see the CODE section

gizmolind

2 years ago

Now it says cannot access camera I’m using USB

ricpd

2 years ago

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

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)

gizmolind

2 years ago

I have tried 1-20 and none of them works

gizmolind

2 years ago

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

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

ricpd

2 years ago

Change the relevant line in CBstate.py

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.

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

ricpd

2 years ago

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

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

ricpd

2 years ago

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

ricpd

2 years ago

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

ricpd

2 years ago

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

gizmolind

2 years ago

But I still have the error (winerror2)

gizmolind

2 years ago

i can't start the code

gizmolind

2 years ago

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

gizmolind

2 years ago

If the ardrino code allows it

gizmolind

2 years ago

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

gizmolind

2 years ago

thank you very much which pins should the servo be on

gizmolind

2 years ago

can you please make a tutorial video

ricpd

2 years ago

Now supports IP cameras as well as USB cameras

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

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.

ricpd

3 years ago

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