notes.md (3040B)
1 # Notes 2 3 ## Plan 4 - [x] Test speaker without Arduino 5 - can be done by using a function generator and 3.3V square wave 6 with variable frequency 7 - [ ] Write AVR C code to generate a square wave of varying frequency 8 via Timer1 9 - Timer1 is used so that a pre-scalar and its calculations don't 10 need to be done 11 - [ ] Use a table/array that stores frequencies and the indices correspond to 12 the buttons on the sound board 13 - [ ] Create buffers to add recording/saving/playing functionality 14 - the buffers are a sequence of notes (which are the indices of the previous 15 table) that is terminated by some other byte 16 - [x] Figure out how the LCD in the starter kit is programmed 17 - we did this in lab 10 on April 10 and are allowed to use that code 18 - [ ] Show the current and surrounding notes in the currently selected buffer 19 (or the note of the soundboard button that was just pressed) 20 - [ ] Add a menu on the second row to select the memory buffer (maybe 1-5) 21 - it is controlled by left and right buttons 22 23 ## 2024-03-28 24  25 26 ## 2024-03-30 27 - the speaker was tested with a function generator (from the 28 EspoTek Labrador) outputting a square wave of varying frequency 29 - it is painful above a frequency of 12 kHz and just creates clicks 30 below 30 Hz 31 - it is louder at certain frequencies and quieter at others, and this 32 is not a linear relationship 33 - the speaker's datasheet has a graph of this which can be used to 34 adjust the speaker's volume at the problematic frequencies 35 36 ## 2024-04-03 37 - other speakers sold on DigiKey have more stable frequency response 38 graphs where the volume does not fluctuate very much compared to the 39 speaker included in the kit 40 - those speakers however use sine waves instead of square waves, so our 41 first step should be focused on figuring out how to send sine waves at 42 certain frequencies, perhaps with fast PWM 43 44 ## 2024-04-09 45 - Asked Sam how to use PWM to handle no use of DAC. 46 - Test the new speaker on Friday without DAC to see if it sounds okay enough. 47 - Lets Try and talk to Rashid or other EE professors. 48 - I think we should also try and get a DAC from the Lab! 49 - We looked into how to use the shift register to handle the fact that we have to many 50 buttons for the pins on the Uno. 51 - We can ask same for a shift register. 52 - We looked into how to use the LCD display and got some Pseudo code from GPT to help. 53 54 ## 2024-04-12 55 - tested new speaker and it works very well with square waves 56 - so sine waves via Fast PWM+RC filter no longer needs to be done 57 - soldered speaker to a solderboard 58 59 ## 2024-04-13 60 - started working on the project's poster 61 62 ## 2024-04-14 63 - since we don't know if we can even get the shift registers on time, 64 it's possible to make our own via another Arduino that has all the buttons 65 connected to it and it sends the data over USART to the speaker Arduino 66 - the length of each note can be saved as how many cycles of the square 67 wave note were generated, perhaps with a prescalar if it's a really long 68 and high frequency note