-
Notifications
You must be signed in to change notification settings - Fork 3
Early Hardware Design
During the super early stages of R&D I had a vision of an Arduino based chess computer that was super streamlined with fancy RGB LED's everywhere. This is not what I ended up with at all, here's why.
The Arduino Mega is based on the ATmega2560, with 8k bytes of SRAM, 256k bytes of flash, and a clock speed of 16 Mhz, super fast right? But! How am I going to fit StockFish on that? The answer is you can't, you just can't.... If you can, awesome! But I can't. So the Mega is crossed off the list.
After kicking around things in my head for a few days I hopped on google again. Guess what, they have a chess engine that runs on an 8 bit micro controller, its called Micro-Max. Now H.G Muller did not write this to run on an AVR, but if you hack away at it, it does, AVR chess.
Well I guess I'll base the hardware on an Arduino compatible chip and call it a day. WRONG! This is an avenue I pursued for a good week. What I ended up with was the following. The Adafruit Feather M4, this rocks an ATSAMD51 Cortex M4, with a clock speed of 120Mhz, 512KB flash, and 192KB RAM. This was exactly the thing to run Micro-Max. Guess what, it did. But not the version mentioned above. I ported the original Mico-Max source to the M4 and included the hash tables, and it ran! In fact it ran well. So then what happened? The bloated user interface code happened. After tinkering more, I pinned the M4 running Micro-Max against Chess.com. I was disappointed with the game play. The poor M4 just didn't have the "stuff". Porting StockFish to the Arduino seemed like a waste, and impossible. So I did the only thing I could, I gave up. This was no longer feasible.
After my week or two of giving up, I explored more hardware options. I was looking for the fastest most best-est development platform I could.
- Nucleo
- Raspberry Pi
- Maple
- Tinker Board (Still have my eye on this one)
Since the "single board computers" were looking more attractive than a micro controller type development board, I went that direction. The single board computers had the speed and the space, but came with a big form factor. Not to mention they are pretty complicated little guys. If I was to design my own board, I needed to make sure I had access to all the necessary information to do so.
The Raspberry Pi: The cost was low, the schematic was available, great support base, pretty good specs, familiar operating system. All signs pointed to "YES". I still had one problem, the Raspberry Pi is kinda big, too big for a handheld device. After another afternoon of research I decided the Raspberry Pi Zero was the best candidate. With its small form factor I decided it would be best to use it as a module rather than cloning the design onto a custom PCB. This not only saves me time and headaches, but cost and mistakes down the road; its a very plug and play solution, one I'm glad I found.
- Designing user hardware for the Pi, I can manage this
- Power management for the Pi, at a loss for the moment
- Software?... yeah.. software...