Pages

Thursday, October 11, 2012

It's thinking....

Ok, I know I've been away for a few weeks, as luck would have it I got some time in the woodshop and put together the first "BrainBox" for my SishFishPi platform.

First, more on the SishFishPi for those just joining us. It's a basic chess computer built using the Raspberry Pi Linux development board, the amazing Stockfish engine, and commodity LCD/electronics. The SFP integrates with a new software build for the "Sish" chess board.

The end result, a small form factor butt kicking chess machine.


Now I'll put together a more detailed post on how it was built and finished, however just a few details to get you started:

The BrainBox itself is made of red oak finished with roughly a dozen coats of "black shellac" which I purchased from shellac.net. The sides each have a "brain" design cut into them with a scroll saw, behind that design I placed cut pieces of translucent plastic to difuse the light. After that I built a small "light board" inside the case that uses the Pi's GPIO PWM pin to slowly pulse light over a sine wave like design. Here's a picture of the inside..


Lastly an LCD has been added (simple Sparkfun or Adafruit HD44780) which outputs the brainbox's moves.

Here's a video to give you an impression of just how cool this ended up.


video

The end result turned out very cool, and now that the SFP/BrainBox has got a home I'm sure I'll have more time to finish up the code and get something posted up here.

In the meantime enjoy the video!

-hz

Thursday, September 27, 2012

SishFishPiv2

SishFishPiv2

 

This video shows the bulk of it. The SishFishPi is getting much closer, dare I say it's a "2.0" at this point.

It's now capable of playing a game, with fully functional basic clocks, against stockfish, and updates an embedded web server with the game content in realtime!

There's still more to do, I need to get the web server fleshed out so you can use it to set the game parameters, things like:

- Player vs Computer or Player vs Player

- Downloading your pgn files of past games

- Setting clock times, labels for players, etc.

I also need to get the entire code base packaged up in a nice installation package such that it can be installed on any RaspberryPi System.

Lastly I need to get a the new "sishfish" chessboard hex files uploaded and available for the Minimus, Teensy, and Teensy++.

Exciting times ahead.

hz

Wednesday, September 19, 2012

SishFishPi - Getting closer

Thought it was high time to update you on the current status of the SishFishPi project.

For those just joining us, the SishFishPi project involved integrating a version of our hardware usb chessboards specially modified for talking to the Raspberry Pi (Virtual Serial Port). This new setup would allow the Pi to communicate moves from Stockfish to a simple commodity class LCD connected to the Pi's GPIO pins (general purpose i/o).

First order of business was to get the Raspberry Pi into a better case. While I work on building a case out of wood I ordered a very nice acrylic case from built-to-spec.com. Those guys do great work and if you have a Pi it's worth spending the 12$US to get a case from them.

Next I needed to get an LCD working. I purchased a number of LCDs from Sparkfun.com and from Adafruit.com. However in the end I decided to stick with the Adafruit.com LCD. It came with everything necessary to get started and was reasonably priced.

**WARNING**

The Adafruit website contains a great tutorial all about connecting the LCD to the Pi and driving it with python. While the hardware portion is great, I found the software lacking. It appears to have some consistency issues with my LCD (random crashes, garbage, etc). In the end I located the following C/C++ library and built a simple command line tool to update the screen from it.

http://www.ctheroux.com/raspberry-pi/

After I got the LCD functioning it was time to integrate it with a simple Chess engine. For this purpose I chose Stockfish. First and foremost it's open source and easy to get built for the Pi, and secondly because of it's exceptional reputation in the commnunity. Let's be honest, my chess skills are completely dwarfed by my technology skills. Stockfish will have my number for many years to come.

With all this complete, I took a few pictures to better demonstrate where we are today.

 
Using the Built-To-Spec case and wiring up an Adafruit LCD.

 
Jumper wires make life easier.

Playing with Stockfish using one of my custom made chess sets, yes I turn my own pieces.

Here's a blow up of the LCD, nice and easy to read Stockfish's move.
 
 
Lastly I started working with pgn4web. It's an amazing Javascript based web engine for broadcasting pgn games in realtime. After a few modifications to my software I was able to get it outputting moves into a live pgn file on the Pi. Then it was a simple matter of opening up my web browser and I could watch my game in real-time! Very fun stuff.
 

pgn4web showing my game in realtime!
 
Hopefully this is enough to give you an idea where I'm headed. Up next I need to get a simple web/cgi setup to handle further controlling the chess game software (restarting a game, changing settings, etc).
 
I also plan on trying my hand at a wooden case for the Pi, more on that later!
-hz

Friday, September 14, 2012

New hardware from a friend in need

Exciting news today for those of you interested in using something other than the Teensy for your Sish board, we've now got another option, the Minimus AVR board.

How did this come about? It's an interesting story. Seems one of my readers from the UK was very interested in trying out a Sish board of his own, however it was very difficult to get a Teensy in the UK for a reasonable price (having ordered Raspberry Pi's from the UK I understand the frustration).

Simply put he asked if the Minimus AVR board would be a suitable replacement. Seeing as it was another ATMEL chip I figured it would work fine, but would have to make a few adjustments to get a good build working.

Unbelievably he offered to send me two test boards (one backup just in case of emergency) in exchange for building a functional hex file for the Minimus. He packed up the devices and shipped them to me Royal Air Mail and we waited...a very long time! Almost a month later the postman dropped off two shiny Minimus AVR units and it was time for me to hold up my end of the bargin.

So I set to work this evening getting the code adjusted and tested. In the end it took a few tweaks and updates, but here's a link to the Wiring Diagram for a minimus Sish board, as well as the hex file for the minimus-sish (see the side panel).

Thanks again for sharing those boards with me, I really appreciate it.

Lastly, before I forget, the ATMEL/Minimus needs a FLIP program to install the hex file.

http://www.atmel.com/tools/FLIP.aspx -> Download the first FLIP program from the list of options, you will need the Java Runtime if you don't already have it installed.

Follow the instructions in this PDF to install a hex file and put the Minimus in "programming" mode.

http://www.minimususb.com/minimus_v14.pdf

Lastly, your computer (if it's Windows 7) most likely won't have the drivers for the device, so you'll want to install these drivers following the instructions in the prior pdf.

http://www.minimususb.com/files/minimus_x64_drivers.rar

If you have a different board you'd like to see about getting a Sish built for let me know, perhaps we can work the same deal again!

-hz

Friday, September 7, 2012

Success!

I now have a functional SishFishPi!

It's still pretty simple today, however it can talk to the sish board (using a new hex file) and send the Stockfish moves to the LCD.

It's not the most visually appealing setup at this point, but now that I've got it working the breadboard will come out and I'll start working on wiring up this LCD cleaner. For now I can't begin to tell you how fun this was to play with this evening.

Still exploring options for displaying the game on an embedded web server on the Pi, and looking at how I can possibly modify the software further to show the clock, handle promotions, and start a new game cleanly.

As always lots to do, but it's high time I posted some pictures.

 
The above photo shows the breadboard and Raspberry Pi setup. The Pi is in a sweet case from Built to Spec. It rocks. 

 
There's stockfish's move from the Pi, it's on the LCD screen, I'm sorry but that's just so cool.

 
This should give you an idea of the commandline output on the sishfishpi, think of this as the debug information, when I'm done you won't have to connect to this interface unless you want to.
 
 
Lots to think about still, in order of preference here's what I'm working on right now.
 
1. Signaling start of a new game, I'm trying to avoid wiring another button up to the Teensy, but I at this point I haven't come up with a better plan than that.
 
2. Coding in promotions, I'm thinking you'll have to promote by moving the pawn to the 8th rank, then the SishFishPi will prompt you with "Promotion to?", then you'll press the square of what you are promoting to (d1,c1,b1,a1 -> Queen,Bishop,Knight,Rook) opposite if you are black of course.
 
3. Game Saving. The SishFishPi needs to save your game in pgn format and make in available on an embedded web server.
 
4. Game Display (in realtime) The SishFishPi also needs to show the game in realtime as we progress through it via an embedded web server.
 
That's about all I've got at present. I'll explore Git and look at making a repository for this stuff in the near term, or at least posting an SD card image for the Pi and the hex file for the Sish board once I get further along.
 
Thanks!
 
hz

Monday, September 3, 2012

Back at it, working with Raspberry Pi and LCDs

Sorry it's taken so long to get back to this, however as you can expect building electronic chess boards is not my full time occupation! :)

I can tell you however that I've carved out a little time over the last few weeks and have a couple of additional builds in process, there's no new hex files to share yet, but let me tell you what's in the works.

Sishnovag


After working closely with Bryan @ USB Chessboards I started reviewing the Novag Citrine protocol, especially how it interacts with the Arena Windows Chess application. As such I now have a "sishnovag" build that speaks serial commands to Arena and receives move responses. The goal here is to next wire up an LCD to the Sish and get it to output the moves provided by Arena on that LCD. If this works we'd never have to look at the computer screen! So far I've got the hex file sending moves to Arena just fine, however I'll have to wait until later in the week when I get my LCDs from Sparkfun.com.

Sishfish


I've got a Raspberry Pi! Yes I was one of those crazies that ordered the extremely cheap development board earlier this year and now have it sitting on my desk. I was able to put together a new sish build that speaks raw HID to the Raspberry Pi. This build which I'm calling "sishfish" is being designed to talk to Stockfish on the Pi. Again it's my hope that I can readily wire an LCD to the Raspberry Pi and get move output from Stockfish straight to the LCD. In a perfect world I'd get a mini-webserver up on the Raspberry Pi that would show the game in realtime, but that's a project for another day.

Just wanted to share that with you all, also if you have built a sish board please tell me, I'd like to get a gallery going here for Sish boards and their makers. :)

Thanks all!

-hz

Monday, April 16, 2012

Next step, a brain?

Word on the street is the RaspberryPI ARM based development boards are shippping. Now I'll believe that when I see it, but if the news outlets are right I should be seeing mine in the next week or so.

What is the Raspberry PI? It's an ARM based single board computer capable to running an ARM compiled version of Debian Linux.

There's way more on the Raspberry PI on their website here.

My plan, should the one I order arrive in a reasonable period of time, is to build a simple interface between it and my DIY USB Chessboard. The end result being I would be able to play a game against different open source engines, without powering up my computer. In fact, since the RaspberryPI is so small I might be able to attach it directly to a future board.

We'll see how that goes, in the meantime enjoy the link and watch the videos, it's interesting stuff for sure.

-hz