Tarek’s Status Report for 2/15

What did you personally accomplish this week on the project? Give files or photos that demonstrate your progress. Prove to the reader that you put sufficient effort into the project over the course of the week (12+ hours).

I was sick for the majority this week and had to visit the hospital which hindered the amount of work I was able to do. That being said, I was able to complete the majority of my tasks.

I researched how to implement the through-board LED system. I thought of using a MAX7219 multiplexing LED chip, but after our faculty meeting and our pivot to magnetically controlled chess pieces, I realized this may actually be more complex than anticipated, as the electromagnet may destroy components of this circuit when moving pieces. As this is not a quality-of-life feature, and not a critical element of our design, I set this aside and focused on other tasks this week.

I ordered the Arduino Mega 2560 as well as cables to connect devices for the team. I also designed the communication protocol between the Arduino and Jetson. The Jetson will communicate over UART with the Arduino sending out messages as fast as the model can estimate gaze in the following format:

'''{row}{col}\n'''

The Arduino will only parse a line after seeing a newline character so that we can detect where messages start. We avoid fragmentation by discarding messages that don’t end in a newline character. The Arduino will select a move origin (or destination) as soon as it receives a complete coordinate message AND the user is using the lock-in mechanism (button/pedal).

I also researched libraries and implementation methods in case gaze estimation at our required accuracy is not possible and we are forced to pivot to having the user look at a screen. If this were the case, we would implement the eye-tracking and UI in Python. The eye-tracking would most likely be powered by the EyeGestures library. This would take in live webcam input from the user’s desktop machine and use it to output a coordinate of where on the screen the user is looking at. I would write a simple Python applet that displays a live-feed of a bird’s eye view of the board using the OpenCV Python library (this is just a commonly used live-feed library, OpenCV would not be actually using Computer Vision in this version of our project), then overlay the EyeGestures coordinate over the screen using tkinter to display where the user is looking. EyeGestures can also capture blinks, which the user would use to lock into a move.

Finally, I worked on designing and delivering the design presentation, which I will be giving unless my Monday morning doctor’s appointment takes too long, in which case Trey will give the presentation.

Is your progress on schedule or behind? If you are behind, what actions will be taken to catch up to the project schedule?

My progress is mostly on schedule. My illness and the change of plans to using magnets to move the pieces meant that I was not able to put enough time into finalizing the design of the through-board LED UI subsystem. I will park this aside for the time being and focus on the mechanical aspects of our system until the design report is due. Once that is working, I can go back to working on quality-of-life improvements.

What deliverables do you hope to complete in the next week?

Next week we will present our design presentation and receive the components we ordered. My main goal for next week is setting up the Arduino and figuring out how to use it to control the stepper motors.

Tarek’s Status Report for 2/8

What did you personally accomplish this week on the project? Give files or photos that demonstrate your progress. Prove to the reader that you put sufficient effort into the project over the course of the week (12+ hours).

This week, I continued to do research into my specific subsystem of the project: the microcontroller. This is the component that will take in gaze information from the Jetson and the user, and use it to control the UI LEDs and the piece-moving robot. As a stretch goal, it will also keep the state of the game and provide move validation.

This week I focused on choosing a microcontrolle boardr. Given our use case, I considered the following factors:

  • Ready to use out of the box: With all the output and input pins and ports it needs, minimizing the time between opening the box and testing code on it.
  • Ease of use: Should be easy to set up and use, widely available documentation, easy to code on using C/C++/Python.
  • Number of pins: Considering we will be interfacing with board LEDs, two stepper motors, an undefined piece pick-up mechanism, and potentially a keypad/keyboard for the opposing user to manually type in their moves. We need a lot of pins of several types.
  • USB with UART: The board will communicate with the Jetson via UART, it would be ideal to do this over UART using a built-in USB port.
  •  Enough power for all peripherals: The device should have enough power to control all peripherals it is connected to.
  • Price: Lenient, as this is a key element of the design, but should avoid boards over $85.

Given the readily available documentation and help criteria being critical for speed of development, I narrowed the choice down to three extremely popular microcontroller boards under $85: the Arduino Mega 2560, the Raspberry Pi 4 Model B, and the ESP32-DevKitC V4. I made the following table to assist me in making a decision.

Criteria Arduino Mega 2560 ESP32 DevkitC V4 Raspberry Pi 4
Ready to use out of the box – Preloaded bootloader
– All pins available without additional configuration
– Simple USB connection for programming and power
– Preloaded bootloader
– Simple USB connection for programming and power
– No external programmer required
– Requires installing an OS
– Takes longer to set up
– May need additional components (e.g. SD card)
Ease of use – Arduino IDE is easy to use
– Extensive documentation and examples
– Large community support
– Simple programming in C/C++
– Supports multiple frameworks (Arduino, ESP-IDF, MicroPython)
– Extensive documentation and examples
– Large community support
– More complex pin setup
– Runs a full OS, offering high-level programming (Python, C++, etc.)
– Tons of documentation and tutorials
– May feel complex for simpler tasks
Number of pins – 54 digital pins, 16 analog inputs
– SPI, I2C, and UART available
– More than enough for multiple peripherals
– ~36 GPIOs (specific numbers depend on variant)
– Multiple SPI/I2C/UART interfaces
– Limited by multiplexing certain functions
– GPIO pins available (26)
– Plenty of USB and peripheral options through the OS
– Requires GPIO expansion for many dedicated connections
USB with UART – Built-in USB for programming and serial communication
– USB-UART bridge ready to go out of the box
– Onboard USB-to-serial converter
– Simple UART communication via USB port
– Several USB ports available
– Multiple UARTs possible via GPIO or USB serial adapters
– Requires additional configuration for UART over GPIO
Enough power for all devices – Provides 5V power via onboard regulator
– Can power LEDs, drivers, and basic peripherals
– May require external power for high-current motors
– 3.3V logic
– Capable of driving multiple devices
– Proper external power supply needed for motors and heavy loads
– Powered via a 5V USB-C port
– More than enough current for onboard peripherals
– May need dedicated motor controllers for high-power motors
Price ~$45 ~$10 ~$40

I will finalize my decision this week, but given the speed of development, number of pins, and power capabilities, I am strongly leaning towards the Arduino as a worthy investment.

Other tasks I did this week included peer reviewing presentations, and starting to research how to control the chessboard UI LEDs. I have not made a formal decision on this but rather than connecting each row and column to the board, I may export this labor to a LED matrix chip like the MAX7219 which is typically used to control 7 segment displays. This way, only three connections to the board, instead of 16, are necessary.

Is your progress on schedule or behind? If you are behind, what actions will be taken to catch up to the project schedule?

My progress is on schedule.

What deliverables do you hope to complete in the next week?

I will make a decision as to which microcontroller to use early next week, as well as picking an LED matrix control chip, and making a circuit schematic to go with it. After that, I will spend the rest of the week researching backup libraries in case we cannot do on-board gaze detection and have to have the user face a screen with a virtual chessboard instead. I will also start preparing to give the design presentation.