The gripper mechanism is used to pick up and place chess pieces. It consists of a servo for vertical motion and an electromagnet to hold the pieces.
The electromagnet is attached to the bottom on the rod and can be controlled via Python through A GPIO pin connected to the gate of a transistor. The transistor is connected in circuit with a 12V power supply and a 1” diameter electromaget with 19 lbs. holding force. A detailed spec sheet for the electromagnet can be found here. The electromagnet is from APW Company, who sells tons of different kinds and sizes of electromagnets and other custom coils.
The code controlling the electromagnet can be found in the gripper.py file in the project. The relevant parts of the file are below.
import RPi.GPIO as GPIO electromagnet_pin = 40 GPIO.setmode(GPIO.BOARD) GPIO.setup(electromagnet_pin, GPIO.OUT) def electromagnet(self, on): output = GPIO.HIGH if on else GPIO.LOW GPIO.output(electromagnet_pin, output) # Dynamically turn on/off electromagnet electromagnet(True) # On # ... move piece to another square ... electromagnet(False) # Off
The vertical motion, to pick up and put down pieces, is accomplished with a gear rack kit made out of Actobotics from ServoCity. The Hitec HS-785HB Servo is controlled by the Raspberry Pi via adjusting the PWM signal of a GPIO pin. This rotation moves the aluminum beam that the electromagnet is attached to. Relevant code for controlling the gripper servo in Python is found in gripper.py.
The chess pieces are a set of plastic 3 3/4” Colored Chess Pieces in neon green and orange. The colors provided enough visual distinction for computer vision algorithms. The top of each piece was drilled and a small metal dowel, from a local hardware store, was interted. This allowed the electromagnet to lift the pieces.