brilliant engineering ideas needed!!

Discussion in 'Embedded Systems and Microcontrollers' started by Eric007, Jul 25, 2012.

  1. Eric007

    Thread Starter Senior Member

    Aug 5, 2011
    1,044
    33
    Hi All

    Before I post this I browsed around to find out if it was discussed before and found this link:
    http://forum.allaboutcircuits.com/showthread.php?t=64123&highlight=chess
    which would be a very good starting point as some of my questions have already been answered there but I will have to re-read this for further understanding and questioning.

    First I want to go one step backward and plan my design and stick to it!
    BTW, I am trying to make a robot that would be able to play chess!

    Here's the high level design block diagram I came up with based on the discusion in the above link as seen in attachment hlevel
    Any comments or better suggestion?

    second, I decided to break the above high level into different modules to design separately and to be assembled later (attachment mod1, mod2, mod3). I have categorised them into hardware and software modules.

    The hardware ones has the following ones:
    module1 --> design of chessboard & pieces
    module2 --> design of the controller to move pieces
    As for module2, I am thinking of design an arm that would be used to move and lift the pieces...But this seems to be the most difficult one for me!!!
    And I could not even come up with a good block diagram for it...

    The software one has:
    module3 --> implementation of Chess engine (on a PC) and all that goes with it.
    (still researching/investigating on this one)

    Third, the possible different interfacings between these modules:

    1. interfacing between module1 and module3: I read somewhere (can't remember) parallel port would be easier,...
    2. interfacing between module3 and module2: serial cable, bluetooth,...
    3. interfacing between module2 and module1 (how are the board and the controller 'arm' attached together? this would be mechanical I guess)

    Any suggestion on the different interfacing and their advantages (would definitely choose the one that would make my life easier)

    The system would also have the additional software modules:
    module4 --> communication protocol between module1 and module3
    module5 --> communication protocol between module3 and module2

    Anything missing in my design strategy?

    All comments are welcomed!

    EDIT: Attachement removed!!!
     
    Last edited: May 10, 2013
  2. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,804
    833
    There are commercial robot arm kits that could give you some ideas on how to design the arm. The ones I am thinking of have 6 degrees of freedom (use a minimum of six servos to control the motion). One in its base to rotate the arm left and right. Another in the base to move the upper arm back and forth. One at the elbow to move the forearm. Two at the wrist to move it up and down and rotate. And one in the "hand" to open/close the "fingers/claw".

    I searched for "robot arm kits" and got several good hits. Another search, if I may suggest, is for "gambito the chess playing robot". It is a project similar to the one you are attempting.
     
    Eric007 likes this.
  3. Eric007

    Thread Starter Senior Member

    Aug 5, 2011
    1,044
    33
  4. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Almost everything.

    If you're seriously going to attempt such a complicated project, may I suggest that the "chess engine" be an operator with a laptop, who knows how to play the game? Creating the program for chass strategy is an exercise in AI that could take a significant part of your lifetime to complete!

    Here's what I would do: The operator enters moves into the laptop. The laptop is hte central controller for everything. The chess board has a round hole in every square and each piece has a short peg that fits into a hole. Each time a peg is inserted into the hole, it closes a switch for that hole. The laptop scans the switches to determine which pice has been moved and where. A program keeps track of where each piece is on the board ( I thought about implementing this as a way someone can play a game from his computer to a player who is using a board )

    The laptop tells the arm where the piece is that needs to be moved, and where it needs to go. It uses a coordinate system to communicate to the arm, so the arm can be almost 'dumb' and just follow what the laptop tells it to do. Now, the arm might need to make very small adjustments to the coordinate system to accurately grasp the piece. So, some kind of sensor might be needed here.
     
    Eric007 likes this.
  5. Eric007

    Thread Starter Senior Member

    Aug 5, 2011
    1,044
    33
    Thanks so much for this post!


    :D Not true...definitely some but not everything!

    I am!!!

    Definitely! I mentioned that in my first post. the chess engine already knows how to play chess and is an application running on a PC with a GUI to analyse the game. I am dealing with this! no worry but I am dealing with the hardware first and I have some serious questions about it. And it should be one step at a time otherwise we get lost!!


    This part has been answered in the link i posted in post#1 but I have a question for you! which module does the scanning of the board!? the PC or the MCU?

    coz to me the chessboard and the pieces CANNOT communicate directly with the PC (Chess engine). the chessboard and pieces need to be interfaced with a microcontroller and the MCU is the one responsible for the scanning and will transmit the state of the board to the PC and the chess engine will take over from there and it analyzes the game and decides on the next move and will transmit some kind of signal to the arm (that will do the actual lifting and moving of the pieces) corresponding to the moves wanted!!

    I agree with you here!

    And I disagree about you saying that my design strategy misses everything! coz what you are discussing already is the detailed design (we getting there soon) BUT now all I am doing is planning and KNOWING THE MAJOR COMPONENT FOR EACH MODULE!
     
    Last edited: Jul 25, 2012
  6. strantor

    AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    instead of a robotic arm, would you consider a 2 axis electromagnet under the board? would make things simpler I would think. use small pieces and/or larger size board so the pieces have room to move past eachother without having to leave the board and go up and over. image a CNC machine, minus the Z-axis, upside down, underneath the board with an electromagnet on it.
     
  7. Eric007

    Thread Starter Senior Member

    Aug 5, 2011
    1,044
    33

    Thanks for your idea and I will think of that and get back to you BUT is the robotic arm 'feasible' (designing it for this purpose)?? coz I am thinking of designing it and having technicians build it and I will have to deal with the programming again...
     
  8. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,804
    833
    The robotic arm certainly is feasible. Gambito is an example. In the posts on the robot forum where its designer discussed his project, someone suggested using small magnets in the board and the pieces so that they 'snap' to a uniform position when placed by the arm.
     
  9. strantor

    AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    Almost anything is feasible with enough money and time to throw at it. Laser guided chess pieces launched from a drone plane in the upper atmosphere onto the board is probably feasible (for the government), but also you should consider what is reasonable. It's my opinion that the best solution is the simplest solution that works. A 6 axis robotic arm does not seem like the simplest may to move a chess piece, to me. There is probably even a simpler way than the one I described, but I cannot think of any now.
     
  10. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    When the Pic32 first launched, I was in a competition sponsored by Microchip where one of the contestants tried to do practically the same thing, basically he was designing a chess board where both players could be somewhere else and the board would move the pieces for each player.... well the site has been taken down now so I can not link to it.... He tried to move the pieces with an electromagnet from the bottom of the board with, the issues he ran into was that sometimes the board had to move other pieces out of the way to move the piece to its new position, so he added some extra space around the perimeter of the board to use for moving the players piece around the other pieces if necessary..... anyway, it got overly complicated quick because of the amount of software he had to write to accomplish this, and he dropped out of the competition in the second round....

    Using a robotic arm would not only make things a little easier (you can just pick the piece up and move it over the other pieces...) and it would look "cooler" when moving pieces...... basically you need to start with the arm design (check out lynxmotion for examples) 6 DOF would definitely be cool, you can use RC servo motors to build and design this, as for the gripper, just a simple solenoid driven "clamp" would be sufficient to "grab" and "release" each piece.

    Build this arm on a fixed position relative to the board (Meaning the arm should always be in the same place near the board all the time), then work on getting it to move to each grid coordinate first (see attached sample grid), this will all be done with a uC first, with no interaction from PC yet....

    XY referrence chart.jpg

    This will have very basic functionality built into it, basically it should just be able accept a simple command to move to a specified X,Y location and pick up a piece, then another simple function to move piece to another X,Y location and set it down. And also add a "teaching" routine, so you can "teach" it the grid locations (basically, manually move arm to location, press button to save coordinates, repeat for each grid position, etc.) that way, if you change board size, you can easily have the arm learn it.

    once this is done, then you can move onto the PC comms, then all the Chess engine has to do is send 2 sets of grid coordinates, one for where to pickup piece, and second to where it needs to go.
     
    Last edited: Jul 26, 2012
    Eric007 and strantor like this.
  11. Eric007

    Thread Starter Senior Member

    Aug 5, 2011
    1,044
    33
    Yes the best solution is the simplest one!

    Reducing the cost as much as possible and I must implement something reasonable!!! If any one with a simpler one, its welcomed! I think you described one in post #6...maybe you should elaborate more on that!

    I am actually doing a feasibility study on the movement of the pieces before implementation!

    Thanks!
     
  12. Eric007

    Thread Starter Senior Member

    Aug 5, 2011
    1,044
    33
    Thanks so much Bmorse for your post...I'll comment on that in a moment!!
     
  13. Eric007

    Thread Starter Senior Member

    Aug 5, 2011
    1,044
    33


    Wow



    Lol…I thought about this method as well BUT thought about complexity designing the chessboard with this feature…and discarded it



    I like this paragraph! But my understanding is 6 DOF = 6 servo motors. How much is one servo motor? Anyway I am willing to spend MONEY on this project but of course reducing cost when possible! And if I get you well we won’t use a gripper but a solenoid to grap and drop pieces…that is cool coz that would reduce complexity!



    This makes PERFECT sense! I agree 100%



    Yes but for now as time is a bit critical…I would want it to be based on a fixed size board…and when everything is done I will be more Happy to improve features!



    Exactly! That’s why in my design strategy I broke this down into different reasonable modules also mentioned about interfacing and communication between modules.

    How much (roughly) would this arm cost? And what other major components will be involved?

    I am actually reading around to understand better about designing arm so I can follow when members will be giving their inputs

    Thanks
     
  14. Eric007

    Thread Starter Senior Member

    Aug 5, 2011
    1,044
    33
    I decided to add some of the comments I found interresting in the link I showed in post #1 as I want to use some of the ideas from there!








     
    Last edited: Jul 27, 2012
  15. Eric007

    Thread Starter Senior Member

    Aug 5, 2011
    1,044
    33
    I have a few questions about post #14 but will ask in a few hour as it bedtime here...

    Also the design of this arm will be done right after designing the chessboard and the pieces

    Thanks so much!
     
  16. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    This most likely will need to be implemented to reduce the complexity of the controller code to move the arm to a specific position, if you do not include a "training" routine, you will have to have some sort of algorithm to calculate each individual servo movement to position the arm where you want it, which can get pretty complicated when dealing with a 6 DOF movement.... although for your project I believe you can do it with just a 5 DOF arm.

    If you shop around (like ebay) you should get a pretty good bargain on servo's like these >> http://www.ebay.com/itm/6x-MYSTERY-...Control_Parts_Accessories&hash=item255798abea
    Most of the cost for the arm, will be in the servos, you can pretty much use any lightweight material to make the rest of the arm (Like some ABS plastic, or even balsa wood). The lighter the arm, the less your servos will have to work.....


    As for the Chess engine, have you checked out GNUChess? Or is this what you are using already?
     
  17. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234

    Why not start with an off the shelf board and pieces? Then you can concentrate on the arm and chess engine, once you have that all out of the way, then you can make your own...... It's kind of like "re inventing the wheel" so to speak, there is no need for it right now....
     
  18. Eric007

    Thread Starter Senior Member

    Aug 5, 2011
    1,044
    33
    As Strantor said the best solution is the simplest one! I know everything is possible BUT ‘time’ is athe biggest constraint. I hope to be done with the arm (design + code + simulation) in 4 weeks maximum! Is it a reasonable time? I’ll have some technician build the physical arm (no time to do it on my own). Would you elaborate more on how this ‘training’ of the arm works? Coz when I think of the programming part of it, it makes me sick coz the arm needs to be able to reach the 64 locations in the board and after each move it must return to its initial position.

    Shopping is one of my hubbies…I been shopping on ebay for years…but when it comes to electronic components I prefer Digi-Key (shipping time ->1 week ) and others…
    OK! But I know there will be some calculations involved based on the weight of the pieces, size of the board (workspace of the arm), linkage length, the appropriate servo motor (power,…)
    Well, I am still investigating which chess engine to use and which GUI…any suggestion? I read those chess engine and associated GUI are free but I would like to know where is programming taking place?? (I am not talking about communication about chessboard or arm). What are we really programming here?
    I am not trying to re-invent the wheel and I can even buy a chessboard with pieces but do you agree with me that I will have to customized it for it to communicate with the PC? Coz it will provide the inputs to the PC (chess engine) which will be listening to a port!
    Another thing is while designing/making this. I must answer/solve for the following: how to recognise pieces by feature, ie I must come up with a way to differentiate between black and white pieces, and in each black/white I also need to differentiate between king, queen,…
    And I don’t want to use camera + image processing as not my area + not interested! That ‘s why post #14 is just perfect IMO but I still have to understand a few thing in there!

    Thanks
     
  19. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    Well, so the pieces need to be customized too, but it can be done with existing pieces on the market, most are made up of some sort of plastic material, and can be easilly hollowed..... now, as for it differentiating between pieces and color, a color sensor could be implemented in the actual gripper, by using a white LED(or any color for that matter, but white would work well with black and white pieces) and a CDS photo cell, black pieces will reflect back less light than the white ones. Or, if you really want a way to ID each piece to include color, and shape, etc., then using RFID will be another way to go, the RFID reader can be located on the gripper, with RFID tags imbedded in each piece (this will also allow each piece to not have its own power source too), and a specific unique # ID assigned to each one, then the uC can "identify" each one as it interacts with it then just remember what location it placed that piece in, so it has a way to inform the Chess Engine on where each piece is at on the board..... if you want the board to also verify that there is a piece in that location, then you can place a CDS photocell on each square (light present = no piece, light not present = piece is there, etc.) and use an IC such as the 4051 Analog Demultiplexer IC (for example) to multiplex each grid position to only a few analog channels on the uC. (I am sure there are better demux's out there for the task), or creating an 8x8 matrix with actual switches should not be too complex, but it would be a lot easier than using the CDS photocells, but tactile switches wear out and your pieces would have to weight so much to press the switch, when there is no mechanical parts or contacts to wear out on CDS photcells.....
     
    Eric007 likes this.
  20. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    Well, with the "training" like most industrial robots, would be done with a "pendant" or a way to manually control each axis, so for a 5 DOF arm you would need a way to move each segment with switches, and 1 button for telling the controller to "remember" this position, so you would have a switch for up, and down for each axis (or just have 1 set of switches to use on all axis', and just have the uC switch the input to which ever axis you are controlling), the pendant is usually connected to the actual controller for the arm, so when you "move it" you are just telling the uC to move the servo so many steps in either direction, this way the uC knows how many steps to get to where it is at, so you would manually move each axis until the arm is in position over the piece and once it is in place press the "train" button, then uC will store this data in the appropriate array to use later, the array data will also include the grid X,Y coordinates........
     
Loading...