Build a SUPER SMART Chessboard! Play online or against Raspberry Pi
HTML-код
- Опубликовано: 17 июл 2024
- How to build this 3D printed super smart Chessboard, play against the built in chess engine or connect with a friend or loved one over the internet and play head-to-head with real chess pieces.👇 More info below 👇 This project was kindly sponsored by PCBWay. Take advantage of PCBWays 10 free pieces for new members at www.PCBWay.com
Not only is this project low cost, but it's also very feature rich. It also:
■ Referees your game and warns you when you don't play by the rules
■ Provides a 'hint' if you want a suggested move whilst you learn
■ Built in backlighting provides feedback whilst looking amazing in low light
■ Power it from a simple low cost USB battery pack and play anywhere
■ Uses low cost common components
List of items used in this project and where to find them:
■ (x86) Neopixels/WS2812b on a 30 per meter roll. - geni.us/5mWS2812B30m
■ (x10) 6x6x5mm tactile momentary push buttons - geni.us/6x6TactileButton
■ (X1) Arduino Nano - geni.us/ArduinoNanoV3
■ (X1) Raspberry Pi (Zero W can cope but I recommend model 3 A+) - geni.us/RaspberryPiAPlus
■ (X1) Micro SD Card 8Gb or higher for Raspberry Pi - geni.us/Micro-SD
■ (X1) Logic level shifter - geni.us/TXS0108E-Shifter
■ (x2) Wiring blocks for at least 6 wires each. I used the Wago 243 series - geni.us/Wago-243
Some Wire - geni.us/22AWGWire
■ (x12) M3x6mm bolts - geni.us/NutsAndBolts
■ (x4) M2.5 x 6mm bolts (for securing Raspberry Pi) - geni.us/PiBolt
■ Some filament for the printed parts (I used PLA, including the wood infused lumberjack from 3D Jake) - www.3djake.com
■ (x1) USB female DIP board - geni.us/FemaleMicroUSBDIP
■ (X1) 0.96 Inch OLED screen - geni.us/0-96OLED
(As an Amazon Associate I earn from qualifying purchases. This helps to pay for the next project.)
These are some of my favorite tools I use and can recommend:
■ Battery-powered glue gun: geni.us/BoschBatteryGlueGun
■ Bosch Bit Driver: geni.us/Bosch-Screwdriver
==========
The code, 3D printable parts, wiring diagram and written software setup can all be found for free here: www.diymachines.co.uk/smart-c...
Please consider supporting my projects by printing these chess pieces perfectly sized for the board: www.etsy.com/uk/listing/10817...
Discord server for the project: / discord
diymachines.co.uk/
==========
SAY THANKS:
Provide continual and dependable support through Patreon:
Support us on Patreon: / diymachines
Buy me a coffee to say thanks: ko-fi.com/diymachines
SUBSCRIBE:
■ / @diymachines
INSTAGRAM: diy_machine...
FACEBOOK: / diymachines
==========
List of camera and lighting equipment I use:
Sony A7 III: geni.us/Sony-Alpha7-III
Tamron 28-75mm F2.8 RXD A036SF Lens for Sony-FE : geni.us/TamronRXD-28-75mm
Aputure Amaran HR672C: geni.us/AputureAmaranHR672C
Aputure MC: geni.us/FAPGL
RØDE VideoMic Pro+: geni.us/RodeVideoMic-ProPlus
Blue Snowball iCE: geni.us/BlueSnowball-iCE
Philips Hue Lightstrip Plus: geni.us/PhilipsHue-LightStrip
Disclaimer:
This video is shared for demonstration purposes only. - Хобби
I found this channel last night and can say that it is VASTLY underrated. You deserve far more love in the make space!
Wow, thanks nckmccauley28. I'll keep working at it for as long as I can. 😊
This channel is a hidden gem!
Thanks!
absolutely. i love those you tube gems
oh just WAIT till you see diy PERKS
Thank you so much for sharing this project! I really hope you keep uploading the awesome videos you upload and I wish you the best with your future projects! I can't wait to see more of them!
Thank you, I will keep working hard at designing and sharing them.
@@DIYMachines What are the dimensions of the base of the chessboard? I want to know if this will print on a Prusa MINI+ printer.
Amazing! Thanks so much for such a beautiful, detailed and simple to implement project.
I'm thinking about making this for my science fair project, and I think it will be EPIC! Thank you so much for making this!
So neat!!!! All projects on this channel are so well designed and building explanations are top class. Great video. Thanks
Glad you like them! Thanks for letting me know. :)
Never seen the video that very well explained like videos on your channel before. You're the best of the best!!!
Wow, thanks!
You are fantastic bro'! Thank you very much for this awesome video! Just watch the drawing machine yesterday, now this! I am going to be VERY busy for the next weeks!
I've always wanted something like this, thank you! This will be a great father son project.
Your welcome. I hope you both enjoy it.
Impressive project, impressive production quality of the video too!
Thank you very much, I'm really glad you liked it. :)
That is something to look forward to! Looks impressive.
Thanks Richard, I'm really proud of it. I've been working on it for three months.
I love everhing about you sir, and I watched the whole video not knowing how to use anything but stockfish. Your energy is amazing, and it's so calming :)))
I appreciate that! Thank you.
Amazing project, thank you very much
Glad you like it!
that's awesome!
Chess is one of my greatest passion
I know nothing about eletronics and i knoe very little about coding
I've just started with 3D printing and obvioulsy one of the first things I printed was a couple of chess pieces.
I hope one day I can use this project as basis and inspiration for my own creation
I want to make something like a Mephisto pocket, but with either auto movement pieces or square sensibility instead ld having to type in coordinates, as well as online playability
That would be a hell of a dream come true
But still too much to learn
Congratulations on all your worked, I really loved watching this video
Clever idea to use buttons for your chess notation input! Definitely makes it easier for a DIY project, I've made a chessboard with sensors under each square, and that just adds a lot of complexity. Also, I love the sleek design, I'm looking forward to seeing more of your machines in the future.
Thank you. I have another prototype I'm working on with sensors - this is how this one started out but then I realised I could provide the majority of the features for much less cost and complexity if I used the buttons for input. So I made this budget friendly but high in features version and hope to make the 'deluxe' one another project in the future.
@@DIYMachines awesome! can't wait to see your solution!
@@DIYMachines can’t wait to see it. Nicely done man
You always come up with so extraordinary projects. I am still waiting for the robotic mower. ;) As always, superb job and thank you for sharing your knowledge with us.
Thank you very much! I'm still outlining my design for the mower - I want to ensure it has a simple but effective perimeter/boundary system. I like my plants and would be very upset if my own creation decided to mow the flower beds! :)
@@DIYMachines it would be nice if it could detect hedgehog as well and stop. Those poor poor thorny bastards.
I like how you called them poor, yet a thorny bastard! Hehe
Good one!!
Thanks!
i love it when people use a raspberry pi in their project. idk why, but i absolutely love the rpi and i'm only 11 lol. i installed windows 10 (not, i repeat NOT iot version) on my own 3b+ once and also got android 9 working on it
best Channel out there
An awesome project!
Thanks, it's helped a lot with good LEDs. :)
Great work mate. Will be waiting for the reed switches version!
It's a some time away as at the same time I want to have the pieces move by themselves. Before that I have some other projects I would like to build and share. :)
Absolutely awesome
Thanks. :)
May be installing a translucent film of checkerboard pattern on the board finish is a good idea to increase contrast. It will make this board usable in a bright light setting or in a sunny environment.
That's great. Now additionly, if you could build something with the functionality of a DGT Electronic Chess Board, that would be awesome.
Very well-made video, and an excellent project. Thank you. What printer are you using for the 3D prints?
Thanks, I use a Prusa i3 Mk3s.
this is incredible effort...please let me know if i can buy one of these chess kit...i hope you can implement take back moves and force certain opening that would awesome for training .
Thats a realy cool board!
Thank you. :)
Awesome bro
Thanks.
Isn't there a version with the raspberry pi and a lcd, without the need of a board, like the old computers of ajadrez, a fabulous project, thanks for sharing it.
You're a very talented man
Thanks Justin. :) It does take me an awfully long time to design these (been working on this since Christmas) so it might be more down to perseverance!
@@DIYMachines I appreciate the effort your projects are really cool.
you are a GENIUS
What a nice project! What about built a chess clock? I'll subscribe right now!
hi i need know amperage of the clock numérique 3d for my end of studies project . thank you so much 🙏🏻🙏🏻🙏🏻
Hi i need know amperage of the clock numérique 3d for my end of studies project . thank you so much
Holy cow, nice work. I'd try and install some detection to skip out on all the buttons tho, making the chess board detect pieces on its own. The software could keep track on where each piece are located, I'm sure.
Thanks. You're perfectly correct - I started building it with self detecting pieces but the costs and complexity increased so I decided to try and design something with a lot of features for a lower cost of building.
@@DIYMachines I see, understandably. Would love too see a video on it someday, perhaps you find a way in future projects on how to do this in a less complex and expensive way.
Great work!
Hi! Great video. I'm actually building one currently but I have a problem with my raspberry pi 3. Whenever I try to run it after I've done all your instructions it doesn't run the code. And the Oled screen wont even turn on. I already used a multimeter to check if the oled wires work. But I can't tell why the raspberry pi 3 isn't working.
Looks interesting...
Thanks
Wow what a thinking ❤️
Thanks Rahul
This board looks realy awesome - is it somehow possible to do a revision2 maybe with pressure or magnetic sensitive parts, to get rid of entering the moves with the buttons? i would love to build such a diy board for my son :)
Thanks. The first version of my protype had this feature, but it was going to result in a lot of soldering and parts so I opted for simplicity. I hope to make one with the features you mentioned and some more sometime in the future.
awesome job, yet I think that one can reduce both the Nano and the level shifter IC's and handle the 10 push buttons and the LED strip with the RPI only
Thanks Ronen, I believe it would definitely be possible. I'm more comfortable in Arduino land so I decided to handle a lot of the human IO with the Arduino - they are also more forgiving when interacting with other electronics.
Stockfish run at what deph on a raspberry pi?? I think that maybe it's too slow?? Can you tell me how much time take it to 20 deph for example? Thanks!
I've been trying to make something like this for ages! But with magnetic reed switches and stuff
I thought about going down that route but decided to aim for low cost, low effort, but useful project. If it's popular I think I'll do a more lavish one which can auto detect pieces and move them automatically like a Jumanji board.
@@DIYMachines yeah I just didn't have the time to solder all the reed switches into their grids, too fiddly. I wanted one that would detect the movements through a wooden chess board with wooden pieces so that my grandfather could play across the internet and not be confused with all the high tech looking stuff. I know you can buy usb sensor boards for £10-30 but they're all really cheap plastic and too sensitive. Probably controlled with a combo of esp32 acting as an Arduino and back up WiFi and Bluetooth connectivity, as well as handling the engine code, then a pi zero or maybe a full size pi, a zero should be fine though, as the esp32 is handling the engine, the zero just has to interface with the lichess API or whatever.
Good video
Glad you enjoyed it.
Any chance you can point me on what rasbian to use bullseye or buster and which version (year),
If you can link it. Because some of your codes do not work for me.
@DIY Machines I finished this project can you make this chess using magnetic sensor will you make such a video please make a chess board using magnetic sensor
A very nice idea.
Can I install chess on a Raspberry Pi OS Lite and play with a computer in a terminal?
So awesome!!! Is there a left handed version (panel on the left) available for printing? That would be nice for us lefties. 🙈😆
Thanks, I'm sorry but I did not make a LH panel version - not very inclusive of me! :/
Every time we try to upload the code it seys showChessboardMarkings not declared in this scope
You can actually use the lichess api to play with physical boards so you could mod this to play online chess with anyone on lichess.
I’d love to be able to play chess with my family remotely!
That's one of the reasons I made it. :)
In the listed items in description it says you have the 30m roll of the first thing but they don’t do more than 5m?
I'm not sure if you already have your next project planned, but one thing that I really want to make is an Arduino or Raspberry pi arcade claw machine. That would be so fun to play with, and it can be used in parties for the guests to win cool prizes. It can even have custom 3d printed tokens! :)
That is a good idea. I’ll add it too my list of projects. What would the claw be trying to pick up?
@@DIYMachines We can fill it with prizes that we like. Candy, small trinkets, balls, and stuffed animals can be fun to try to catch. Maybe at a party we can put fortune cookies so it is like you are picking your fortune :)
Thanks for the great video! I'm trying to build this myself, but I have two issues I don't really know how to solve:
One of them is that when I power everything through the micro usb power, the pi does not seem to boot up. I solved this issue temporarily by powering the pi directly and then powering the other components with the micro usb power (I unplugged the pi from the external usb power), but I was wondering if there is a way to fix this.
The more severe issue is the buttons are not doing anything. The board boots up fine, but I get stuck at the first choose opponent screen, and hitting the buttons do not do anything. I checked the wiring multiple times and it seems to be fine, and I have all the required libraries on both the arduino and the pi. I am not sure what the issue is here.
Thank you!
Update: the arduino and buttons now seem to be working, but now python throws an error saying "utf-8 cant decode byte 0xd0 in position 1: invalid continuation byte". Why is this happening, and how can I fix this?
Can you do this with a picoW instead of the nano
ok, being as you can't buy or get a RPi for a decent price these days.. I"m looking at an Orange Pi Zero 2 which has 1GB ram.. wifi etc.. I'm wondering if it would be possible to convert the Rpi over to the Opi ? .. I think it's doable? I'm just not sure , as I didn't design the original? lol .. do you THINK it's worth attempting? or am I wasting my time cuz it's not powerful enough? etc?
Excellent travail bravo 👏 👏 👏 🤕👍
Thank you. :)
Forgive my 3d printing ignorance, but does one require a minimum bed size for the 3d printer to be able to print the board?
Nice
Thanks
Brilliant tutorial - just wondering and apologies that this is a very silly newbie question but I cannot figire it out. How does the code know which square to light up? Because the LED's are in a long strip and I'm striggling to visualise it. Thank you
Thanks. No problem, the LED's are 'addressable' which means they have three wires going to them. One for power, one for ground and one for signal. The signal wire tell's the Led's what colour and brightness to light up. learn.adafruit.com/adafruit-neopixel-uberguide/the-magic-of-neopixels
@Dıy Machines Hello, I started to do the smart chess board project, I am having the following problem: the screen is green, the screen is green, it asks me what to play, I choose against the computer, then it asks for the level and time, after entering them, the screen goes black after saying new game, and when I enter my own move, when I press the ok key, the stockfish does not respond and waits and waits with the screen blackened, can you help me, I did everything in the manual, but it does this, please reply as soon as possible
Omg this need more views. There is no chess set with those features for even 1000 bucks
Thanks, I hope it gets more views too. :)
Hi great tut just wondering have you looked at the esp32 to replace the raspberry?
have you ever heard of an esp32 being able to run a resource intensive chess engine? think not
Releases at 6am 😭😭
I'll watch when I wake up though! 👍👍
Sorry, I try to pick a time that is as social as possible for people. It works out as 8pm on Sunday here in the UK.
@@DIYMachines it's fine! Still have a good video to watch and this time works out better for more people including you!
Got busy with exams, great project I am waiting for you to make 3D printer
Hello, yes it's still on the list but it is going to be sometime yet.
@@DIYMachines early waiting for that video to come out.
I am having a hell of a time getting the system working. I got all the exact parts in the video. Any chance of someone with a working board sharing a "Clone" of their pi sd card? Also i had 3 errors on the final script for the Arduino. I used chatgtp to help me with that. Could the final working code for the Arduino also be possible. My wiring is correct (tripled checked - also the arduino test code works fine). I really need the help otherwise this goes into the pile of unfinished projects. Thanks
Great video and great idea. You should sell it as a kit.
Maybe one day, but for now I'm more excited about being able to start working on the next project to share. :)
@@DIYMachines If not the wohle kit at least the microsd card with the program loaded?. I have completed the 3D printing and assembly BUT, having problem with it running, seems to bootup but doesnt start the game.
How Can you light a single case with a led stripe?? How do you connect it online??
Great project. I was going to build some of these but Pis are stupid expensive right now. I hope they recover.
Thanks, yes they are very hard to come by. I have a handheld games machine project which is on hold until the Pi situation improves. :/
@@DIYMachines Could you use the "BigTreeTech Manta M8P" with the Pi hat instead?
Can you just buy all the electronics assembled from somewhere?
i hade the same idea OMG CAN I RE MAKE YOUR PROJECT AND UPLODE TO MY CHANNEL WITH SOME MORE IDEA SIR PLEASE ANSWER AND THIS IS MY FIRST TIME CING YOUR CHANNE AWSOME WORK LOVE THIS ONE I WILL BE WATCHING ALL THE REST OF YOUR VIDEOS I WILL GIVE THE CREDETS TO THIS VIDEO THANK YOU
Hi, yes of course you can. Just put an obvious credit near the beginning of your video. Send me a link when you publish it, I’d love to see what you make of it. 🙂
I would need an option to enter the WLAN access data externally.
My goal was to send one of the game boards to a friend.
(Who lives in another country)
He knows chess, but he doesn't know anything about "internet configurations".
At best, he could type in his access data from the router.
Hi Don, if they told you their SSID and password you can preconfigure it for them before sending it. (Just put a new wpa config file on the SD card with their credential in it). They could also connect the Pi to a monitor, USB keyboard and mouse and enter the wifi data using the Pi's desktop environment.
How do those LED strips work? You can light arbitrary locations with arbitrary colors with only 3 wires? It seems they must have more than just LEDs on them....some electronics to decode a digital signal sent on one of the wires that tells it which LED to light with which color?
It's exactly as you expected. Each LED has a microcontroller that reads what brightness and colour it should be. The data is sent as a long list of values. The first LED reads this receives the entire list on the data wire, looks at the value for the first LED and reacts to that. It then discards the first LED's data from the information and passes it to the next LED. This repeats this process of following the first instruction line, discarding it and then passing the rest of the file on. This way each LED does not require a specific address, they kind of 'take one pass it on'. :)
@@DIYMachines Wow, cool! Thanks for explaining. As someone who played around with electronics in the 70's my first thought for lighting up the squares was incandescant panel bulbs and a lot of wires to some TTL driver chips. (Well, hey, at least I do have some experience with ICs, if only stone age ones :-) And sawing up pieces of wood for the partitions, when here you go with the magic of 3d printers! Amazing what you can get these days. Keep up the awesome work!
Hello,
maybe my question is stupid, but forgive me,
wouldn't it be better to use sensors for the movement of the pieces, so as to avoid always pressing buttons?
Is it a complicated thing?
Hi Volendo, my first prototype used magnetic sensor to detect parts and magnets in the chess pieces. However, I decided to remove this feature as it required a lot of soldering and parts, one of my design goals was to make it as accessible as possible and some of this result in minimising soldering and cost.
I have a doubt does stockfish move is printed on the oled along with lighting up of led ? If yes it will be really making this project affordable for me. I don't need some fancy lights but need only to input moves and get moves back
Yes, stockfish's move is printed on the OLED screen and confirmation of yours is printed also.
@@DIYMachines tq very much its really appreciated.Can i ommit the rgb and just assemble everything like u told and,what code should I remove for it work.basically i want to kake standalone chess engine where i will use wooden chess board and use raspberry pi with oled and Arduino for stockfish
@@MANNUELTUTTU There is no need to adjust the code. Just omit the RGB LED. I would recommend adding the small amount beneath the control panel if you can as these help guide you through what the board is expecting next by lighting different area of the control buttons up at different stages of the game. You only need six WS2812B LEDs for the control panel.
@@DIYMachines wow really really u r saviour thank you
Just finished the build. What should be the boot sequence, with respect to the board lights?
unleash your creativity lol :)
I have built the chess board and am ready to enjoy it. But have not been able to merge the two
sketches for the Ardunio nano board. Can you supply the merged sketch or point me to someone
that has been able to do this? Was able to get the test sketch to work with no problems.
Hi Leon, you don't need to merge the two files, you just first open Chess_sim.ino and then open the second file as a new tab. Take a look here to see how: arduino.land/FAQ/content/7/42/en/how-to-use-multiple-tabs.html
@@DIYMachines In file included from C:\Users\Leon\Documents\Arduino\chessboard_LEDs\chessboard_LEDs.ino:2:0:
C:\Users\Leon\Documents\Arduino\libraries\Adafruit_NeoPixel/rp2040_pio.h:9:10: fatal error: hardware/pio.h: No such file or directory
#include "hardware/pio.h"
^~~~~~~~~~~~~~~~
compilation terminated.
Compilation error: exit status 1}
Why don't you use a usb cable between the nano and the pi, instead of a serial connection with extra level shifter?
That is a good question. Originally I was going to use a USB cable but the internal size constraints made it easier to use the level shifter. I could have probably found a fancy right angled, ultra short cable but I decided it would be easier for others to follow if I used the more common shifter instead of a harder to source cable.
The next version could have a pcb😉
I've just started to learn to design PCB's and can certainly see how it would simplify things. :)
Could this have been extended with 32/64 hall effect sensors and magnets for automatic input?
I did consider it when designing it, but wanted to make my first one low cost and I wanted minimised the amount of work required. I might make a more lavish fancy one in the future which includes auto detection of pieces and moves the pieces itself.
@@DIYMachines Auto detection sounds easy, auto move not mo much?
@@DIYMachines I would love that! Would you consider using the raspberry pi pico in place of the Arduino? Or is this a non trivial replacement?
I built smart chess very cool game
But does it work???, I built mine also, and am about to throw it the JUNK pile
Is this for sale ?
Would this work with a Rasp-Zero? Or maybe even an ESP32?
It does work with. Raspberry Pi Zero. I included mounting holes for its smaller form factor in the print as shared. It takes longer to start up (about 50 seconds) though.
@@DIYMachines I am currently considering whether a large part of the prints could also be lasered. Primarily to save time. I will take a closer look at the stl files.
so easy
Thanks
está todo menos el programa de arduino, por què?
I need a code ?!....
Hi Lewis, are you able to support this project , because I see so many requests and no replies, many to do with the green light and no action after that, Hope all is well. Looking forward for an early reply
I have made the device and it is functioning properly somewhat.Oled display shows mode choice,spead choice and time choice properly.Then the screen shows new game then screen gets blank and nothing happens afterwards
How is your machine, Is ithe error been solved?
@@dilishnv sorry everything is same
@@MANNUELTUTTU Hi Mannuel, thanks for raising this as an issue on Github and Discord. Once we have figured out what's playing up with your board I'll amend the written guide on my site to advice other what to check for.
Well done Lewis, once again you have outdone yourself with this superb project! We loved it so much that we featured it in this weeks episode of The Electromaker Show: ruclips.net/video/zKZmQcmGcco/видео.html
🔥😍👍
5:11
What's up with the UK/USA in the thumbnail?
It was to show that the boards can connect over the internet and play chess remotely between two people. :)
Can use this on chees.com
Not with the code I have written - but in theory you could right code to enable it to interact with a website like chess.com
Brah you can easily be a millionaire
ha 🤞
Who wants to make some money and print all the 3D printed parts for me!? Lol
+