Wen Hui’s Status Report for 2/22

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 built the circuit for the RPi on the breadboard for testing purposes. This included the pogo pins, LCD (for row category display) and button (for answer submission). 
  • I also tested the components we received including the pogo pins, regular LCD for row category display, RGB LCD for block word display and the button individually to make sure they were working well as expected. For the button, I utilized the RPi built-in GPIO functionalities to detect the button press by using a callback function. For the regular row category LCD, I utilized the Sparkfun QWIIC SerLCD library to interface with the LCD, allowing me to change the backlight color (when we display the answer) and the text on the screen. The RGB LCD for block word display was purchased from Waveshare and there were starter codes found on the Waveshare website which I referenced to set up the interface between the LCD and the Pico.
  • I also worked on implementing a basic UART communication between one RPi and one Pico via the pogo pins. To program the Pico, I installed Thonny on my computer in order to program the Pico using MicroPython. On the Pico, I utilized the machine library to read from the UART pins of the Pico. On the RPi, I utilized the pyserial library to read from the UART pins of the RPi. 
  • The main issues I was concerned about were transmission latency and accuracy. It seems like latency wasn’t an issue because one cycle of transmission (including sending and waiting for ACK) includes a 100ms delay. This will ensure that in the worst case scenario a block is not present, the RPi will detect this within 300ms. In the future, I might adjust the delay time period to allow for faster communication between the RPi and the Pico. In terms of transmission accuracy, I encountered issues where the Pico would not receive the entire word from the RPi or it might mistake a word that was transmitted twice to be a singular word. As such, I implemented a format for the data sending, by prepending all game words with “#” and all queries with “@” so as to differentiate between the two commands. I also added data parsing to extract the words and commands accurately. I used the highest baud rate of 115200 and managed to achieve accurate transmission between the RPi and the Pico. I simulated the entire game loop by having the RPi send a word to the Pico. (The Pico received the word usually on the first or second attempt by the RPi). Following this, I simulated the RPi querying the Pico for the word and the Pico was able to successfully transmit the word to the RPi and the RPi also changed the text on the row LCD.

  • I also created an FSM diagram to showcase the different states within my program.

  • I also asked Quinn about the PCB Milling Machine and came up with alternatives.

 

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 and I have completed most of the prototyping for one block interface, except for displaying the word on the block’s LCD.

 

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

  • Next week, once the Picos arrive, I hope to experiment with the testing of 2 and more block circuits. This will involve the use of the multiplexer.
  • I also hope to help with the construction of an actual block once the acrylic blocks arrive. The block would consist of a perforated board with the connections soldered to connect the Pico to peripherals such as the LCD and pogo pins (for UART)

Wen Hui’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 crafted the design requirements and made calculations to ensure that our choice of parts fit within the design requirements.
– I helped with creating the block diagram to represent the different components.


– I also helped to design concrete testing procedures in the area of unit tests and integration testing with clear quantitative metrics to measure our project’s success
– Based on our ideation, we have designed that there will be three main components in the central RPi: the WebApp, Game Controller and Embedded Controller. Since I am working on the embedded communications, I created a flow chart for each of the functions of the embedded controller based on the inputs from the Game Controller and the physical hardware peripherals


– Since we received the RPi this week, I set up the RPi, installed the relevant libraries we will be using and set up the basic test programs for UART, I2C and GPIO testing based on the libraries I researched last week. I could only test UART since the components have not yet arrived
– I also designed a simple algorithm together with a message sending protocol to handle the sending of the words between the blocks and the grid.

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 slightly behind schedule as we did not expect that the initial integrated LCD screens with ESP32 would be sold by a banned vendor. As such, we only ordered the new LCDs on Wednesday after researching for alternatives. I will work on some tasks that has to be done next week (such as planning out the circuit connections) before the parts arrive so that I can still be on schedule.

What deliverables do you hope to complete in the next week?
Next week, I have to interface the RPi with the actual components such as Pico and LCDs once the parts arrive. I would be doing individual interfacing between the RPi and each of the peripherals using UART, GPIO and I2C according to the libraries I have tried out this week. I will also start building the breadboard circuitry to establish a prototype grid + single block circuitry.

Wen Hui’s Status Report for 2/8

This week, I prepared for the proposal presentation and conducted research on answering potential QnA questions. In terms of our project, I conducted research on the different LCDs and compared their specifications.

For each of the components that we are using, I also researched about how to interface with them. We will likely be using I2C for the LCD, GPIO library for the buttons to detect a rising edge and UART to communicate with the block microcontroller. I also researched about the libraries to use for the RPi and ESP32 / Pico in terms of UART, I2C and SPI communication. I decided that we can use Python to write our embedded code on the RPi since there is a RPLCD.i2c, RPGPIO and Pyserial libraries which allows us to interace easily with the components from the RPi. Using Python would allow us to integrate easily with the web application code as well since the backend will be written in Python.

I also wrote the implementation flow for how the embedded devices would communicate with one another.

Pre-Game:

During game:

I also drafted out a top level plan in psuedocode for how the implementation would look like on the RPi in terms of the functions and variables required. The main thing I would need to test out on the RPi would be the reliability of the serial communication with the block microcontroller. Since I am trying to implement serial communication with ACK, my current idea would be for the RPi to send a message to the block microcontroller, wait a certain period of time for an ACK and repeat the sending if nothing has been received. I am not sure if this would be the most reliable way to implement the communication until I test it out.

For the block microcontroller, I did research on both Pico and ESP32 as I was not sure which we will be using yet. For ESP32, we can interface with it using Arduino IDE and it also has a local file storage which allows us to store the block’s work. For Pico, we can load Thonny OS onto it to allow it to run MicroPython. It also has a local file system to store the word from the RPi. If we do use Pico, I will have to do more research into the limitations between using C vs Python on the Pico in terms of functionality and latencies.

I am currently on schedule for my tasks. In the next week, I hope to get started on writing the code for the Rpi after finalizing the parts list and procuring the microcontroller + LCD for the blocks.