remix logo

Hacker Remix

Pi Chess Board

303 points by GordonS 6 months ago | 81 comments

programjames 6 months ago

> Functionality and Features

> The Pi Board is an advanced automated chess system powered by a Raspberry Pi, utilizing an XY stepper motor mechanism and magnets to move chess pieces seamlessly across the board. The development process involved several key stages, including precise calibration of stepper motor coordinates, calculating the weight of each piece for accurate handling, integrating a robust chess engine, and optimizing piece-grabbing strategies and movement detection. Special attention was given to selecting the most efficient algorithm to minimize the stepper motors' power consumption.

Is there a reason for the marketing speech? I'm assuming most people interested in this would rather read engineering speech, like so:

> The Pi Board, as the name suggests, uses a Raspberry Pi under the hood to calculate engine moves from <Stockfish? Leela Zero?>, and move the pieces with a series of stepper motors and magnets. We spent a significant amount of effort minimizing power consumption, including weighing the individual pieces to get more efficient grabbing and moving motions for each one.

jstanley 6 months ago

Probably an LLM-assisted blog post.

metal_am 6 months ago

It must be. The part about minimizing the stepper motor power consumption is nonsensical. Steppers use the same current whether moving or stationary.

addaon 6 months ago

You can absolutely adjust the current for a stepper motor. Lower currents use less power, but have less torque, leading to an increased chance of missed steps. In a system like this, the motor torque becomes a linear force to move a belt — and the force required to move the belt depends on if a piece is moving with it, and which piece. It’s perfectly reasonable to bump up motor current when moving a piece, and bump it down when moving just the belt to grab the next piece.

_flux 6 months ago

> Steppers use the same current whether moving or stationary.

You can turn off the power when you're not moving it, assuming it doesn't need to hold anything in its place (like in this application).

E.g. https://www.allegromicro.com/-/media/files/datasheets/a5984-... describes how its current control in general works for this stepper motor driver in page 9 (certainly not using the same current always) and in page 12 how to use its ENABLE signal to control FETs and SLEEP to further reduce power usage.

dymk 6 months ago

Only the most naive stepper driver will drive a stationary motor at full current

throw_pm23 6 months ago

That's an immediate disqualifier for everything (for me) unfortunately.

alykhalid 6 months ago

I would suggest keeping an open mind. I use LLMs to check, my writing and if could be could improved. English is not first language and I am not confident enough to know if what I wrote comes across professionally or not. May be the author of the blog post has the same issue.

throw_pm23 6 months ago

English is my fourth language and I much prefer reading something that is imperfect but written by a human to something auto-generated. That feels as if we someone would say "I'm busy, talk to my agent instead."

seplox 6 months ago

This comes across a little aggressive and braggy. Perhaps a better way to write it would be:

> I much prefer reading something that is imperfect but written by a human to something auto-generated. That feels as if we someone would say "I'm busy, talk to my agent instead."

evoke4908 6 months ago

Condescending to someone who speaks your language as a fourth language about their tone comes off as extremely rude and superior. A better way to write this would be:

""

RIMR 6 months ago

I'm not certain that this blog post is the original. The bottom of the website has contact information for the author, and the hyperlinks for the email and phone number link to different emails and numbers than are listed on the page.

Section 2 has the words "Mars Science Laboratory" (the official name of the Curiosity Rover) printed vertically to the right for no discernible reason.

It's almost as if this were a patchwork of content from multiple sources, maybe glued together by an LLM.

It's hosted on a free hosting platform with no chain of custody. The author is only known as "Tamerlan". Why wouldn't an engineer have their own blog for a project like this?

jihadjihad 6 months ago

Yeah it really does read like something spat out by ChatGPT. They always have to include the word “key” for some reason.

mda 6 months ago

Indeed, I see the word "key" in titles of many click bait LLM generated articles. Probably it is creating a self feedback loop now.

dankwizard 6 months ago

I wish they added some LLM-assisted CSS & Div tags because this layout is atrocious.

gizajob 6 months ago

Hate to be a spoil sport but if when pieces move they nudge other pieces out of the way and then those nudged pieces have to be put back by hand, then there’s still work left to be done. Same goes for capturing - the captured piece should walk itself off the board.

freetonik 6 months ago

My first thought was "those nudged pieces can surely be put back in place automatically using the same exact mechanism!".

themanmaran 6 months ago

I was also thinking that each piece could have a magnet at the base. And when a piece is captured, the underlying gantry could flip the polarity with an electromagnet and sorta launch the captured piece off the board.

Although it seemed like the author had other issues with using an electromagnet here (i.e. overheating / switching polarity).

sebastiansm 6 months ago

For a hobby project seems like good progress.

Polishing the last 20% of functionalities will take him a lifetime. Maybe other chess/robotic enthusiast could join him to accelerate some border cases.

SamBam 6 months ago

I don't see this as "labor having for the human" but rather as a way to immerse yourself into the fantasy that you're playing another being.

ekianjo 6 months ago

Yeah the videos were far from impressive...

pavel_lishin 6 months ago

On the other hand, it's certainly more impressive than almost anything I've put together in the past five years.

crashbunny 6 months ago

This brings back memories of Regium. A kickstarter scam 5 years ago that used realistic 3d animation videos of an automated chessboard to trick people out of their cash.

chess.com happily took regium's money to advertise their scam to their audience.

It eventually got kicked off kickstarter, and then kicked off some other kickstarter clones before self hosting their own kickstarter clone website. That was a wide ride. searching youtube for "regium chess board" will get a few hits.

Pi board looks like a fun project that I'm sure will be refined over the years.

johtso 6 months ago

Not sure if I missed it, but I didn't see any mention of how player moves are detected. Is there a camera and CV? It's always seemed like a fiddly problem to solve with electronics as you end up needing a matrix of sensors so there's a lot of wiring.

stevenpetryk 6 months ago

I’ve always wanted to try making a smart chess board (with no moving parts; merely detecting moves rather than making them).

I’ve thought of:

- RFID. Have 64 antennas and multiplex them to detect which piece is on which square (idk much about RF so this felt tough)

- Vision with a fiduciary mark under each piece, and an acrylic board

- Hall effect sensors, where instead of knowing which piece is which, it instead assumes the normal starting position and pays attention to which square was picked up from and which square was placed onto to infer which piece moved.

I think with any of these approaches it’d be fun to make a tiny, single-PCB board.

dmurray 6 months ago

> RFID. Have 64 antennas and multiplex them to detect which piece is on which square (idk much about RF so this felt tough)

The professional-level boards by DGT use RFID and retail for about $500.

I looked into building a competitor some time ago. 64 RFID antennas alone would have eaten up that budget. I believe they do something smarter like having 8 antennas and arbitrating the signals. They have some patents in this area.

I've seen Hall effect and barcode-based systems too. They've always been a bit less reliable than DGT. Actually DGT is not all that reliable: if you are broadcasting a 20-player tournament you will need to manually update the broadcast around once per round. However I think the position detecting (hardware side) is solid and they could do with improving the move detection in software.

None of this is meant to deter you from building this as a hobby project! I think all the approaches would be fun to try.

thrtythreeforty 6 months ago

DGT uses a (patented, expired [1]) resonant LC circuit, not RFID.

[1]: https://patents.google.com/patent/US6168158B1/en

stevenpetryk 6 months ago

Extremely interesting, and kind of ingenious. Thank you.

awfulneutral 6 months ago

I was trying to do something like this a while back, our approach was to have a different color underneath each piece, with an elaborate setup to get the colors reflected into a camera, but I could never get the color detection working reliably with the way we were doing it. It was a fun project though, there's got to be some easy way to detect moves and get a cheap-ish internet-enabled board.

moffkalast 6 months ago

Yeah there are some trainer chess boards that use hall sensors to track piece movements. But I think there is a possibility to actually encode pieces with different magnetic field strengths and flip them for each player. That way you can just do stateless reads and you'll always get the correct readout, plus you can recover from illegal states.

I did a project [0] a few years back that did this absolute encoding for senet, since there is only one type of figure and two players so just flipping the magnetic field worked really well once calibrated. I still need to make a proper writeup/video on that thing one day...

[0] https://imgur.com/a/a29CTXl

tzs 6 months ago

Put an ultrasonic emitter and an accelerometer in each piece. When a piece completes a move emit an ultrasonic pulse pattern unique to the piece. Pick that up with 3 ultrasonic microphones places around the board and use the time differences between when the pulses arrive at the 3 microphones to find the location of the piece.

Maybe use 6 different frequencies (one for the white King, one for white pawns, and one for the rest of white, and similar for black) to make it easier to handle moves that affect more than one piece.

The moves that involve more than one piece are captures (one piece of each color), castling (one King and one Rook), and pawn promotion (one pawn, one piece of the same color that the pawn promotes to, and possibly one piece of the opposite color if the pawn captures during the promotion).