Work Blog

Week of Feb 21

  • Just finished lab 5 and ordered parts. We looked at two different RGB LED matrixes and decided to go with this one. Went over the process we would like to do. We want to look at how to activate the microphone and then work the LED

Week of Feb 28

  • The board arrived on Saturday March 3 but we realized that it was meant for the Arduino and used a driver shield that was meant to only plug directly into an Arduino. We order a new board of 16x32 LEDs immediately, and began looking at the microphone and the code to start that.

  • The microphone documentation is very limited but we know we need to use SAI interface to communicate and the microphone provides a digital signal in PDM format so we start to look into how to decipher this. We try some things but it does not work at all.

  • We start looking for documentation to start the microphone beginning with some demo code here.

Week of March 7

  • We receive the new LED matrix and it is a lot more complicated then we initially intended. We realize that the board might be too big and we literally don't have enough pins to control everything we need to control. Our initial idea was to use SPI to send a signal through to one of the LEDs and then that LED would forward to every oncoming LED. We also need to initialize a clock to run the LED lights over that clock.

  • We tried to drive our LED matrix using this for reference, per a TA's recommendation, since a Nucleo board was used. However, this project was built using a GUI from the STM32CubeMX software, and looking into the code repository, and the initializations given are completely different from what we are used to, and we simply could not get the OE or LAT pins to work as we thought. We were, however, able to confirm the board's functionality during this time, because based on the row select pins ABC, we were able to select the first set of rows (row 1 and row 9), and output colors briefly.

  • For demoing the audio, the demo code included a guitar tuner and a sound meter, of which we wanted to modify for use in frequency grabbing, and signal intensity, respectively. However, with the Keil compiler we use, these specific modules are not loaded, but an audio recorder was (which only saves recorded audio to a file), which was not helpful in our applications. We received an email about this from the TAs, but because we responded late, this was never gotten back to. We did try to use the recommendation, but the results were fruitless.

Week of March 14

  • We decide to only drive the LED. The ABC pins correspond to the row select, (000 would be row 1 and 9, 111 would be row 8 and 16), and with the onboard LED controller, we daisy-chained the RGB0 and RGB1 (shift register) pins, per the Instructables tutorial. The OE and STB were connected through more GPIO, and the MOSI/SCK pins for SPI. The alternate functions were used for the SPI pins.

    • The board operates by receiving an SPI signal to upload the data, setting OE to high to disable the LED, driving the ABC pins for line selection, and the STB(latch) pin would be pulled to low to latch the data to the shift registers. Then OE would be set to low to re-enable the LED, and the cycle repeats. The LED brightness should be powered by PWM, which can be implemented after.

    • We also tried to implement DMA interrupts (despite not having learned this in class), because it is supposed to write data from incrementing memory pointers to the same SPI address, thus pushing an image to the board.

    • Looking at many other repositories for running the matrix, many others used similar implementations, but all of the rest of them also used HAL, which we are completely unfamiliar with.

  • Audio became a secondary priority, since we decided to put all of our efforts into making the LED Matrix work.

  • We could not get the LED matrix working on the STM32, so we also tried to simply hook it up to a Raspberry Pi, using tutorials and attempting to load some given code, with the pinout looking like below:

  • We could not get the Raspberry Pi to work, so we went back to attempting to debug the LED Matrix on the Discovery board.

  • In the end, we were able to drive some signal to the board, but nothing that would produce a coherent image.

    • However, we were able to verify proper control of the rows, since the demo video shows that rows 1 and 9 are being lit up.