Author: pjoyce

Team Status Report for 12/10

Class time this week was devoted to the final presentations. We were happy with our presentation and have adapted it to show at the final demo.

Out of class this week, we worked on full integration of the software and on completing our tests. The tests caught a bug in the legality checker that can be easily corrected. We had issues with the software integration that should be corrected tomorrow, or other workarounds will be found. We also added electrical tape to the bottom of the chess pieces, adding friction to improve playability.

The schedule remains the same, not that there’s much room to change anything.

Patrick’s Status Report for 12/10

This week I was able to sort out how to run the program on the RPi on start-up, allowing it to be used in headless mode.

We tried integrating Ryan’s part and my part today and ran into issues calling his python scripts from my program. The system() command frequently causes the entire Pi to crash. Ryan is attempting to work around this with another scripting tool, while I am trying to troubleshoot the system() command. We also found a small bug in the legality check that I will correct tonight. Otherwise, everything between the hardware and the firmware is working great.

Hoping we can fix everything up for the demo on Monday.

Patrick’s Status Report for 12/3

Over Thanksgiving break, I was able to rewrite the firmware with a new library. I ended up using the bcm2835 library after finding out that it still worked on the RPi 4, as it includes both GPIO and SPI functionality.

Vikram and I tested the board with the firmware. After working through some bugs, we are very confident in both the piece detection and legality checking aspects of the project. We also observed that the legality latency is very fast.

I also implemented a function to convert the last played legal move into standard algebraic notation (the most common format of notation). Ryan and I finalized the methods for sending this notation to the website.

After this week, I am back on schedule. I am confident that we will be able to finish integration next week.

Patrick’s Status Report for 11/19

This week I wanted to test my firmware on the RPi. Unfortunately, we discovered that the library I had used to write the RPi SPI and GPIO transactions, WiringPi, is no longer supported and we could not download it onto the RPi. I had to find other libraries – spidev for the SPI transactions and pigpio for the GPIO control.

Therefore, I rewrote the firmware to utilize these libraries. The new libraries are not as straightforward to use as WiringPi was, but I am confident that I understand them now and will be able to get the firmware working all the same. I also ordered some cables for the Pi that I didn’t have, so I can test the firmware with my Pi next week while we’re on break.

The lack of progress this week sets me a bit further behind schedule. That said, I will be staying in Pittsburgh over Thanksgiving break and will have some time to dedicate to getting this back on track. This combined with the slack time we have makes me still confident that we will finish on schedule.

Team Status Report for 11/12

This week, we had the interim demo. Vikram and Patrick were able to show off the sensing functionality of the board and firmware, and demonstrated that it can accurately detect the presence of a white piece, black piece, or no piece on each square. Ryan demo’d the account creation, game creation, and game PGN export features of the website.

The upcoming weeks will involve integration with the RPi and the machining of the final board surface and pieces. Our largest risk is that the remaining integration takes longer than anticipated. We are almost a week behind our initial schedule, which leaves us with one week of slack time remaining. We will be making up some time by running some hardware tests in parallel with integration work. As long as integration is not extremely difficult, we should get it done with time remaining for user testing.

We are not making any changes to our requirements or our design this week.

Patrick’s Status Report for 11/12

We had the interim demos this week, which went well. We were able to get the firmware and board working perfectly, so our sensor demo functioned exactly as planned.

Once the firmware was working on the Arduino, I translated into the c++ that will eventually run on the RPi. This was not too difficult, due to the RPi SPI interface using the WiringPi library being quite similar to Arduino. However, there were some differences that I had to be sure I understood. I also took the opportunity to slightly rearrange the sensor read order – the Arduino firmware writes the sensor data into an array column by column, while the sensors are read row by row, which was confusing and a bit inefficient. The new c++ firmware is easier to read as a result. I was also able to finish implementing the output state logic for the legality check using the GPIO functions of the WiringPi library. The large remaining concern here is that my programs still have to be tested on the RPi itself.

I plan on testing my code on the RPi next week. Again, working on firmware integration took longer than expected, so I am about a week behind schedule. I will aim to get the code functioning so that user testing and remaining hardware testing can begin the week of 11/21.

Patrick’s Status Report for 11/5

This week, we decided on our goals for the upcoming design demo on Monday. Our goal for the hardware/firmware side is to be able to read the sensors on the chess board, accurately identify the state of each square (White/Black/No piece), and represent the board graphically (with ascii).

To that end, I spent all of my time this week working with Vikram to get the firmware working and debug the board and code. There were numerous problems that we had to fix, including incorrect SPI usage, a mismatch of the rows and columns in my code, poor connections on the board and more. All in all, we have the board almost entirely working, with just one remaining issue with a piece on square being read as being on two squares. We will tackle this issue tomorrow and hope to have the sensor reading perfect by Monday.

This integration and debugging work took longer than expected, and as a result I was unable to sort out the software interface with Ryan. This goal will be pushed back to next week. I am not concerned by this delay, because it is a lower priority aspect of the project (not needed for the demo) and we have plenty of slack time scheduled.

Patrick’s Status Report for 10/29

I spent this week working on the firmware, which will control the ADC and multiplexers on the board. I learned the basics of SPI, which is used to send/receive data with the ADC. I finished writing the control logic in the legality check program, and used a useful C++ library, wiringPi, to add in the controls for the SPI and GPIO pins on the Pi.

After writing most of that firmware, I realized that I don’t have a micro SD to load the program onto the RPi. I ordered one, but it won’t be here by monday to test with the actual board, so I am translating the program into an Arduino sketch. We can use this simple sketch program to ensure that the ADC, multiplexers, and sensors on the board are functioning as expected. Translating my C++ firmware into Arduino is fairly straightforward, as the wiringPi library was made to be similar to Arduino functions.

Overall I am on schedule, and next week I should be able to start working with Ryan on how to send moves from my program to his webapp/server.

Patrick’s Status Report for 10/22

During the week of 10/9 to 10/15, almost all of my work on the project was directed to the Design Review Report. It took several hours of writing and editing, and in the end I think we created a very thorough description of our design.

I have mostly used the week of fall break to relax, but I was able to spend some time researching and thinking about what I will do to implement the board’s firmware. The firmware will run on the RPi and communicate with the ADC over SPI and control the multiplexers with gpio logic signals. I have never used SPI before, so I read up on it a bit and found a C++ library that should make using it easier. I’m writing the firmware in C++ because I am already using it for the Legality Check software. I’ll hopefully be able to write the firmware next week and test it with the assembled board over next weekend.

All in all, I am on schedule and have no concerns at the moment.

Team Status Report for 10/8

This week we had our design presentation. We received some interesting questions, fortunately none that made us seriously question our decisions. We look forward to receiving the peer review feedback.

We decided to increase the size of the squares on the board to 2 inches, to allow the battery holders to fit better on the underside of the PCBs. This size increase means the PCBs will cost an additional $30, which is not a concern as we are still safely under-budget. The pieces we sourced will be just a bit small for the board, which should be no problem. We also decided that our MVP will be simply detecting white or black pieces, as before. We will leave the ability to differentiate between knights, bishops, rooks and queens for pawn promotion as a stretch goal. For now, we will simply assume that all promotions are to queens (this will cover the vast majority of situations anyway). We also received feedback during the design presentation regarding ways to determine the identity of the promoted piece in software, which we are considering.

The biggest risks that our project faces are still part shipping time and part stock. We are managing these issues by doing schematics and picking parts early as well as by monitoring stock of any components that are low. We are also looking at alternative vendors that may have more stock. We should order the PCBs next week, and our contingency plan if they take a long time to arrive is to get a head start working on the physical board in the meantime. Another risk we identified previously is that something is done incorrectly on the circuit boards. We have been managing this risk, as Vikram shares his progress on the schematic and layout with Patrick and Ryan. We still believe we will have enough money left over to order a second revision if absolutely necessary, but the circuit boards themselves should have room to rework and modify the design.

There have been no changes to the schedule.