Team Status Report for 10/28/23

Currently, the most significant risk to the project is the functionality of the fretboard PCBs used for finger placement sensing. The issue is that the D-flip-flop shift register is not working as expected and as such, the finger placement sensors are not functioning. Tushaar and Owen have spent around 6 hours working together to resolve the issue, along with Owen working to solder new boards and resolder the existing ones to little avail. Owen believes that he may have a fix for it, but if not, we have a contingency plan for running individual wires to each fret. While not ideal, this approach is simpler and less error-prone. The Pi Hat PCB has been designed with enough GPIO pins that will be feasible. Since the fretboard PCBs have been delayed due to this, we may use some budget to have shipping on them expedited in to ensure that we have sufficient time for assembly of the system.

The main change to the system block diagram is that we are planning on shifting the strum detection from an audio-based system to detecting the electrical contact between the pick and the string. This addresses the previous issue of being able to detect which string is strummed and increases the accuracy of the strum detection system by reducing false-positive detection of strums. This will also reduce the complexity of the system by enabling the firmware to not handle the strumming as an interrupt, but rather read it in during the system’s main loop.

In terms of schedule changes, the main change is that Tushaar and Owen are slightly delayed by the issues with the fretboard finger sensing. The cutoff time for switching to the contingency plan of class time on Monday will enable us to stay on track though, especially considering the contingency plan is easy to execute both in hardware and firmware.

The main progress this week was Owen ordering the Pi Hat board, Ashwin making progress on the web interface displaying notes, and Tushaar making progress on the Teensy state machine.

Ashwin’s Status Report for 10/28/2023

In the last couple of weeks, I have made further progress in the development of the software components of the superfret system. Firstly, I developed a Uart driver that allows the web app being hosted on the Raspberry Pi to communicate directly to the Teensy microcontroller via a simple interface. We have additionally conducted rudimentary tests to check the communication and were able to successfully send entire midi files as well as interrupt signals using the midi driver. Tasks that are left on this component include refining the communication standard more as the hardware develops to enable seamless communication and synchronization between the two processors. This puts me on track with our projected schedule. Additionally, I began working on the dynamic scrolling note feed since our team determined it would be a very nice feature to have from the perspective of our users. This is a much more involved task so I broke it down into separate categories:
– Display Alignment
– Display synchronization
– Midi file parsing and sending
– Translation from note number to fret and string number
Currently, I was able to make significant progress in the Display alignment category. This task involved creating a dynamic webpage with moving shapes. I implemented this behavior using HTML canvas graphics manipulated by frontend JavaScript. I created a demo webpage that helped debug the page and showcases its functionality:

For next week I hope to have made significant progress on the dynamic guitar display. Progress in any of the categories for this task will help improve its functionality and help determine the viability of the feature.

Owen’s Status Report for 10/28/23

This week I primarily worked on the testing of the fret-detection using the fretboard PCBs. This has not gone smoothly and has taken up most of my time for the week. Besides this, the Pi-Hat PCB was tweaked slightly and ordered, along with the required parts from DigiKey.

While I did test the functionality of the fretboard PCBs shortly after assembling them, when Tushaar and I went to test the system with some basic string-fret switches that we made, we ran into some problems. The primary issue was that the output on the D-flip-flop seemed to be going high on some of the flip flops further down the shift register earlier than expected. Tushaar and I first noticed this on Tuesday night and spent from around 7pm to 11pm working on this. The main realizations made was the one stated previously, as well as determining that this issue occurred no matter what the clock speed. We also looked through the timing information on the flip-flop datasheet and ensured that we were not violating any parameters such as hold or setup time.

Before class on Wednesday, I hand soldered some extra D-flip flops to PCBs and tested them, and determined that they were working. Thus, for our Wednesday meeting, Tushaar and I focused on determining what the differences were in the two systems. We came up with the following:
1. The hand soldered boards did not have LEDs on them

2. The hand soldered boards used shorter wires connecting them together

3. The hand soldered boards did not have the current limiting resistor and accompanying diode on their output

4. The hand soldered boards were not put on a hot plate

Of these, we highly doubted 1 or 3 to be the cause. Our primary theory was that the flip-flops were damaged by the hot plate, so I removed the flip-flops from the non-working PCBs and hand soldered new flip-flops. This did not resolve the issue. Further testing of the original set of working hand soldered boards revealed that under certain conditions, I could cause outputs to appear one clock cycle earlier than expected. This was done by adding capacitance to the clock line, which I believe resulted in the output signal from the previous flip-flop arriving slightly before the clock edge instead of simultaneously. This resulted in the second flip-flop storing the value that was going into the first flip-flop’s input on the clock edge. I added a resistor and capacitor delay circuit to the data line and it appears to have solved the issue, although I have yet to do this to the fully soldered set of PCBs to confirm this works on them as well.

Tushaar and I have discussed contingency plans and have set a cut-off time for switching over to the contingency plan. The plan is to run 14 individual lines, one to each fret. We believe that by doing this with magnet wire, it would not be intrusive to the user at all. This approach requires numerous free GPIO pins on the Teensy. Almost as soon as the issue arose, I began working on revising the PCB to break out a handful more Teensy GPIO pins to ensure that we had enough for this plan. The board ordered on Thursday has these additional pins in place.

This weekend I plan to add the RC delay circuit in between each fretboard PCB to test this solution, and if it works, I will revise the PCBs and order them. If the solution does not work, I will also modify the PCBs accordingly and order them, as we have not found any issues with the LEDs on them.

One other thing that I worked on was a system to detect which string is strummed. This was done using a pick with an electrode on it and connecting the pick to the microcontroller via a flexible wire. This turned out to be extremely accurate for both detecting which string is strummed and when, making the strum detection circuit somewhat obsolete. I have found that especially as am amateur guitar player, I can accidentally create noises when moving my fingers that could trigger the strum detection circuitry. However, using the pick seems to be much more resilient to ignoring these extraneous noises, making it a more reliable solution.

 

Due to the fretboard PCB issues, we are behind schedule on them. We will be ordering them this week. Assembly will likely be faster than originally expected which alleviates some concern, but we may choose to use some of our budget to try and expedite the order. While waiting for the Pi Hat PCBs and fretboard PCBs, I will begin the mechanical modifications of the guitar, mainly planning the mounting of the Pi and determining the best method in which to carve channels for the fretboard PCBs. I believe that this will put me on schedule to mount the Pi and fretboard PCBs in a timely manner once they are received.

As mentioned previously, the main deliverables for this week will be ordering the fretboard PCBs and a full plan for the mechanical mounting of the PCBs and Pi, as well as some progress on this task.

Tushaar’s Status Report for 10/21/23

Since the last update, I was able to:

  1. Continue implementing the state machine and integrate it with the MIDI file receiving and parsing code
  2. Implement the necessary interrupts for the state transitions
  3. Verify that the interrupts trigger the state transitions using an analog circuit

After talking with the teammates more about how the user experience will work, we decided the RPI will do light parsing of the MIDI file (to strip out unnecessary information that the Teensy doesn’t care about), so the Teesny only needs to parse the note and timing info.

Since the last update, I included a much more final version of the state machine, including support for the “file_transmission”  and “pause” interrupts, which will eventually originate from the RPi. Implementing these 2 interrupts was challenging due to being rusty with the Arduino ecosystem, but those 2 alone account for half of all the state transitions. The next interrupts will be easier given that I already know how to do this now.

The above image shows the 2 interrupts I implemented and how they affect the state machine. The following image shows how code is executed in the main run loop based on the state stored in the FSM:

This picture also shows that I have integrated the MIDI file parsing code into the body of the state machine. This unifies 2 previously disparate bits of code.

Since I didn’t have easy access to the RPi (Ashwin is using it for his development), I had to figure out a way to mimic interrupts from the RPI. Since plugging a wire in and out of a breadboard rail will give multiple edges, it was not feasible to generate clean interrupts. Instead, I resorted to a purely analog way of generating the interrupt. By taking the signal that would otherwise contain multiple edges and feeding it through a simple RC low pass filter with a time constant on the order of 1 millisecond (10k resistor + 100nF capacitor), I can achieve “analog debouncing.”

The following picture shows a bank of such RC filters so I can mimic multiple interrupts. The “paper flags” indicate the name of the interrupt being simulated. The yellow wires that arch over are plugged into and out of the breadboard power rails to create rising and falling edges. Pull-down resistors (not pictured) pull the interrupt pins down to 0V so they are not floating when the yellow wires are not connected to either logic level.

 

This progress is on track as I finalize the structure and implementation of the code. The next big tasks are verifying fret detection (this has actually slipped) and creating the user experience modes (scale + song).

 

As you’ve now established a set of sub-systems necessary to implement your project, what new tools are you looking into learning so you are able to accomplish your planned tasks?

As I integrate more with Ashwin’s web-app, I might need to learn about his code. This may involve learning web-app frameworks in Python (something I have never done before) so I can understand what his code does and how it can easily input the data that will flow between it and the Teensy. Also, since we decided to offload some parsing onto the RPI, I may need to learn about low-lever byte manipulation libraries in Python, so I can communicate with Ashwin about how he can transition my existing C++ parsing code to Python. I don’t have much experience with such python libraries, so that will be new.

Team Status Report for 10/21/23

The most significant risks we are facing with our project are still detecting which string is strummed and also indicating to the user how long to play a note/when the next note is coming.

The solution we currently plan to implement for determining which string is strummed is to put a metal contact on the guitar pick and detect when it is in contact with one of the strings the same way the finger placement is detected. Owen has constructed some guitar picks with metal tips that we can test out for this purpose, as shown below

For the other main risk, we currently have plans to indicate the tempo to the user, but songs have rests and notes that last more than 1 beat, so we need an indication to users regarding when to play a note. One potential solution to this is to have a set of LEDs on the fretboard not dedicated to showing you where to place your fingers, but showing you when to play the next note in the song.

The main change to the system block diagram has been that the Pi-Hat PCB will no longer contain the strum-detection circuitry, and this will instead be done on a perfboard. This will enable more flexibility and modification to the circuit in the future and reduces the risk of an issue affecting the circuit. The strum detection circuitry will interact with the Teensy via pads on the Pi-Hat

There have been no changes in the schedule and progress is on track.

The main team accomplishments this week consisted of Owen assembling the fretboard PCBs, which Tushaar was then able to control and light up to the rhythm of Twinkle Twinkle Little Star. The rhythm was determined by a MIDI file, which Tushaar and Ashwin are able to communicate between the Pi and Teensy. This week, we hope to test the finger placement sensing and perform further integration of the Pi and Teensy communication.

This image shows 3 of the 5 assembled fretboard PCBs being controlled by a microcontroller to light up in a pattern.

Owen’s Status Report for 10/21/23

As you’ve now established a set of sub-systems necessary to implement your project, what new tools are you looking into learning so you are able to accomplish your planned tasks?

To accomplish the hardware tasks planned for this project, I have had to learn how to use various software tools, along with a handful of physical tools.

The main software tool that I have been learning to design the PCBs for the project has been KiCAD. In the past, I have worked with Altium and EasyEDA but I wanted to branch out and learn more tools. EasyEDA served me well for a handful of designs but I wanted slightly more professional software, and one with a larger community. Although I also have experience with Altium, I personally do not enjoy it for personal projects, and I wanted to familiarize myself with the workflow associated with software other than Altium.  Learning KiCAD primarily consisted of familiarizing myself with the location of various options and menus, such as customizing the DRC rules to match those of JLCPCB. I also had the opportunity to learn how to import symbols from Digikey and create/import footprints for parts. In the past I have either been able to find parts in the built-in catalog or in my company’s parts library, so it was good to learn the process of creating my own parts. I also had to learn how to create a precise board outline and mounting holes, which I have not had experience with in the past. In previous projects, I have just created a board and then created a mount to fit it in CAD, but for this project, my boards must mount onto existing hardware such as a Raspberry Pi. I have also been learning new skills in Arduino to test my hardware. For example, I have learned how to use the NeoPixel library to run the LEDs on the PCBs as well as learned how to detect interrupts with the Teensy and operate the D-flip-flops on the PCBs in order to accelerate my testing.

In terms of physical tools, I have been learning to work with PCB stencils and surface mount soldering. I have dealt with some surface mount soldering of 0402-0805 resistors and capacitors, but not in large quantities or anything more complex. Additionally, in the past I have always hand-soldered these parts. However, since we need around 14-15 of the fretboard PCBs, I am learning how to use PCB stencils, solder paste, and hot plates in order to expedite the soldering process. I have also been learning about a variety of sensors in our quest to find solutions to some of our sensing problems. This consists of learning how capacitive touch sensors work, as well as how the inductive and piezoelectric pickups used in many guitars function.

For the future, I am mainly interested in learning how MIDI files work a bit more so that I am more familiar with the work being done by software and firmware and can better integrate the hardware with these systems.

Weekly Update

This week I primarily worked on the assembly and testing of the fretboard PCBs and the design of the Pi-Hat.

The assembly of the fretboard PCBs went well. This was done using the SMD stencil and a hot plate. In total 5 were assembled for Tushaar to use for testing. The pad for the current limiting resistor was replaced with a surface mount diode. The resistor will be added between the fret pad and the fret, so the safety of the system is not compromised by this. The functionality of the LEDs was tested, along with the D-flip-flops used for driving each fret high.

Top: One of the fretboard PCBs on a hot plate
Bottom: Initial tests of the LEDs on the fretboard PCB

There are a couple of changes that need to be made to the PCB, most of which were implemented this week. The first change is adding a pad for the SMD diode in series with the current limiting resistor. The next change was to switch out the through-hole pads with pads on just the surface of the PCB. If solder flows though the through-hole pad it can result in an uneven bottom of the board, making mounting it more difficult. The next change was to make the PCB narrower by around 1.5mm. The initial measurements of the PCB were taken from a photo, and as a result, the PCB is slightly too wide to fit next to the 14th fret. The final change that needs to be made is to adjust the spacing of the LEDs. Currently, the spacing is reasonable for the middle of the guitar, but by making a few variants of the board, we can better match the spacing of the strings. The updated board layout is shown below

D1-D4 on the left are the LEDs. The top pads are the connections for the LEDs, and the bottom right ones are for the fret-driving flip-flop, which is on the right side of the board.

This week I also worked on the Pi-Hat PCB. The main change to the plan for the PCB is to offload the strum detection to a perfboard. The circuit needs a lot of tuning and this can be better done on a perfboard. This reduces the risk of the strum detection not functioning.
The PCB consists of the following components:

  1. A 5V barrel jack connector with filter capacitors. The 5V directly powers the Pi and LEDs and the Teensy is powered through a Schottky diode. This prevents backpowering the micro USB port on the Teensy, allowing the Teensy to be plugged into a computer while the system is also powered. It also prevents the USB port from attempting to drive the LEDs, which would draw too much current.
  2. The Teensy 4.1. A handful of the I/Os are sent directly to pads for future needs. 4 pads have external pull-down resistors and will be connected to the strings of the guitar. 10 of the I/O are routed directly to Pi GPIO pins allowing for communication. There are currently no plans to use all 10 of these, but this enables expansion in the future.
  3. A header to mate directly to the header on the Pi. In addition to the GPIOs routed to the Teensy, 4 I/O pins are broken out to pads for future use
  4. An active buzzer driven off a Teensy PWM pin. We can PWM the power to the buzzer to control the volume of the buzzer. A resistor pad is also included for current limiting the buzzer, although the current plan is to place a jumper on this pad.
  5. A 3.3V to 5V logic level converter to convert the 3.3V signal from the Teensy to a 5V signal for the LEDs. This may or may not be needed according to testing, but according to the LED datasheet the signal should be at least 3.6v

The current layout of the board is shown above. The Pi header is on the right side and the Teensy is the component to the left of the headers. The top left is the power barrel jack. Along the left side is I/O and at the bottom of the board is the buzzer.

For the most part my progress is on track. The fretboard PCBs still need their LED spacing revised, but this can be done fairly quickly once the desired spacing is determined. The Pi-Hat PCB design is ahead of schedule. These boards will likely be ready to be sent out in the same order, reducing the shipping costs incurred. The PCB assembly turned out to be faster than I expected, so this will not take as long as indicated on the schedule.

The DigiKey cart has also been compiled for the PCB orders, so that can be sent out this week.

The final thing that I worked on was the strum detection circuitry. It is mostly working on a breadboard so I hope to perform some final testing of that before soldering it up.

My main deliverables for next week will be ordering the PCBs and sending out the DigiKey order. I also hope to solder the strum detection circuit on perfboard.

Team Status Report for 10/7/23

The most significant risk for the project is still the sensing of which string was strummed. We are confident in our ability to detect strumming, but which string is a much greater challenge. We have been brainstorming solutions to this issue, including using a capacitive touch sensor on each string to sense when the user touches them. The main issue with this approach is that it would falsely report values if the user was resting their fingers on strings other than the one being strummed. Additionally, the sensors are often slow to react and would not work well with the strings being driven to 0 and 3.3V. We have also thought about using inductive pickups under the strings. The main challenge with this solution so far has been finding pickups that individually sense each string instead of combining the signals together. To mitigate risks, we have come up with a solution that will work but is slightly more intrusive for the user. This solution would involve applying a voltage to a metal guitar pick. This would occur when all the D-flip-flops are outputting low, so if the pick contacted a string, the string would be brought from 0V to 3.3V. This would allow us to detect where the pic is. Combining this with the strum detection, this will allow us to determine when the user strums and what string is strummed.

 

Design Presentation block diagram:

The most significant change made to our design presentation block diagram is that some of the MIDI parsing will likely be switched to the Teensy. This is because the note and timing data needs to be sent to the Teensy somehow, and it will be easier to do this using an existing format rather than making our own method of conveying this information. The Pi will potentially also be performing some MIDI parsing in order to display to the user things like where they are in a song, what notes they are getting wrong, etc., but the raw MIDI file will also be sent to the Teensy. Since Ashwin is becoming more confident with Django and HTML/CSS, we are expanding the webapp to include visuals indicating the user’s performance, such as if they are incorrectly timing notes, what percentage of notes they fingered correctly, etc.

The most significant change in the schedule is that the assembly and testing of the PCBs for the fretboard will not be able to start until likely Monday since the shipping was delayed slightly. Ideally by Tuesday at least one of the boards will be ready so that Tushaar can help test it. Progress on the UART communication between the Teensy and Pi, along with the interrupts, is ahead of schedule, which should hopefully allow for the user interface and experience to receive additional attention at the end of the semester.

Overall team progress consists of Ashwin being able to send MIDI files to the Teensy with the press of a button on the web app. There is occasionally some loss during this transfer so we need to determine the cause of this. Tushaar is able to light up LEDs in response to a MIDI file on a set of RGB LEDs, and this will hopefully be able to be tested on the fretboard PCBs when Owen gets them assembled. The guitar should be in by Monday so we expect to be able to verify the strum detection concept and the sizing of the PCBs very soon.

The main goals for this week are to continue working on the UART communication between the Pi and Teensy, establish more of the interrupts used to control the Teensy, and for Owen to work on a PCB that will connect the Teensy, Pi, and I/O in accordance with the needs of Tushaar and Ashwin.

Weekly Status Report Question:

While developing a more detailed plan of our implementation for the design presentation, our team used numerous principles of science, engineering, and mathematics. While developing plans for our individual components of the project, it was important to keep the principle of integration in mind. While we each have an area of expertise on the project, each of our systems will be interacting with each other’s. For example, the fretboard PCB board PCBs need to be able to interact with the 3.3V logic level of the Teensy, which will allow for the firmware on the Teensy to control the LEDs and read from the fretboard. Similarly, the firmware on the Teensy will be playing the songs, but in order to do this, it needs the actual data for the songs to be sent by the Pi. Similarly, the Pi will be displaying statistics on the webapp, but in order to do this, it needs to be able to receive and interpret the data sent by the Teensy. As a result of these factors, it has been absolutely essential that our team is in constant communication regarding design choices and intentions. Otherwise, when we go to assemble our final product, the systems will not be able to interact with each other properly. Our weekly meetings allow us to take what we have been working on independently, explain it to each other, and work on integrating the systems together. This week, we were able to take Ashwin’s web app interface to send interrupts to the Teensy, which Tushaar was able to read and react to. We were also able to test and debug the UART communication between the Pi and Teensy.

Another principle that we used extensively this week was management. In order to ensure the smooth completion of the project, it is essential that everyone knows what tasks they are responsible for, when/how it will be completed, and how it will affect them. This involves constant communication between team members to ensure that everyone is on the same page. Our weekly meetings help us to recap with each other how progress is going so we can verify that tasks are being completed. They also allow us to talk through any potential modifications that need to be made to our plans/tasks for the future. This allows us to be confident that we will be able to successfully navigate around any unexpected challenges or setbacks and end the semester with a completed project.

Ashwin’s Status Report for 10/7

This Week I worked more on the website in order to implement the backend functionality that would eventually allow us to send MIDI files to the guitar via a web interface as well as stop and start songs. The work primarily consisted of creating database endpoints and linking the front end to the backend via Javascript.  More specifically:

Here is the website without any songs in the database (we would have pre-downloaded files for final user experience). Clicking on the add file button allows you to add a file:

Here you can designate a name, a file, and whether it is a song or a scale file.

After you click submit, the file will appear in the list that you chose. This is significant as it means the file is stored on the Pi itself allowing us to parse it and display it on the guitar in real-time. You can then delete the file if you no longer wish to use it or start the file to theoretically begin the song on the guitar.

Upon clicking the start button, the webpage freezes and a popup appears indicating that a session is in progress. The user can then stop the song at any time using the stop button.

This completes most of the basic functionality for the GUI which puts me on schedule. However, in the future, we plan to implement a scrolling guitar dynamic display (like that from Guitar Hero) on the website. This would allow the user to refer to both the guitar and the website for guidance. For next week, I hope to implement a UART driver that allows the Raspberry Pi to communicate with the microcontroller.

 

Tushaar’s Status Report for 10/7/23

This week, I accomplished 4 main tasks:

  1. Rehearsed and presented our design review
  2. Wrote code for the Teensy to parse a MIDI file and light up LEDs according to the rhythm of Twinkle Twinkle Little Star.
  3. Able to get the Teensy to read in a MIDI file from the RPi
  4. Modified the state machine design and did a first pass at implementing it on the Teensy

 

Able to programmatically parse MIDI file and use it to light up LEDs:

 

Able to get the Teensy to read in a MIDI file from the RPi over UART:

I implemented an interrupt on the Teensy to look for a signal indicating when it should start listening for bytes making up a MIDI file. I also got the Teensy to read in bytes over UART (Serial channel 2). During testing, I found some interesting behavior:

  1. At 9600 and 19200 baud, the Pi can reliably send a MIDI file to the Teensy:
  2. At 115200 baud, some bytes tend to get lost in the middle. In other words, the Teensy will receive the starting bytes of the file, most of the file’s body, and the end bytes, but the total number of bytes received is less than the file size.  So, some bytes are getting lost in the middle. Somehow, faster baud rates cause bytes to be dropped either at the receiving or sending end.

 

I modified the state machine and implemented it on the Teensy:

Before:

After:

State Machine code:

I used 2 engineering principles while implementing this week’s tasks:

  1. Making the system modular: By separating the code for the state machine, parsing the MIDI file, handling interrupts, and lighting the LEDs, I could test each function separately. This was especially helpful when developing functionality that would eventually depend on external hardware and sensors that I didn’t have at the moment. For example, the state machine relies on interrupt signals from the Pi. However, by abstracting the state machine into its own class that is updated through a member function, I can avoid having the logic of the state machine strewn across the bodies of several Interrupt Service Routines.
  2. Considering the system as a whole when debugging: When trying to test UART communication from the Pi to the Teensy, the Teensy would not receive any bytes from the RPI. It turns out the RPi was not blocked for the duration that it was transmitting the MIDI file, so it proceeded with its program to prematurely toggle the file_transmission interrupt pin low. This caused the Teensy to think the file was done being sent, even though the RPI hardware was still transmitting the file. By realizing the hardware and software of the RPi operated on different timelines, I realized that adding a delay before toggling the pin low could help the bytes have time to leave the Pi before the interrupt when low. This ended up working.

 

This week’s progress is on schedule. I closed a task on the Gantt Chart – “Read in song data from Pi”.

 

Tasks for next week:

  1. Finish the state machine and test it with the rest of the interrupts from the pi
  2. Detect finger placements on hardware that should come in this week.

Owen’s Status Report for 10/7/23

What did you personally accomplish this week on the project? Give files orphotos that demonstrate your progress. Prove to the reader that you put sufficienteffort into the project over the course of the week (12+ hours). Is your progress on schedule or behind? If you are behind, what actions will betaken to catch up to the project schedule? What deliverables do you hope to complete in the next week?

This week I primarily worked on the initial design of the main PCB for the guitar that will connect the Teensy, Pi, and the the various sensors/outputs. The current plan for the PCB is to provide power via a 5V barrel jack. This will be split and sent to the Pi, Teensy, and LEDs. 3.3V will be supplied by the Teensy’s onboard linear regulator, and the ~200mA limit is more than enough for our 3.3V needs. The Pi to Teensy communication will be done simply through a handful of traces connecting pins on the Teensy to Pi GPIO pins. These will be used for both UART communication and for interrupts sent from the Pi.  The current plan is for 1 UART channel and around 10 general-purpose lines running between the Teensy and the Pi. This should be sufficient for the number of interrupts we are currently planning for, and allows for expansion in the future or the addition of some other form of communication between the Pi and Teensy. Both the Teensy and Pi will have a handful of their GPIOs brought to solderable pads to enable additional sensors to connect in the future. These will be accompanied by sets of GND and 3.3/5V pads on the board to power external sensors/devices.

The main other components on the board will be a 3.3V-5V level shifter for the LEDs, an active buzzer to serve as an easy-to-control metronome, and the strum detection circuitry. Since the guitar shipping from Amazon took longer than expected, the fine-tuning and testing of the circuit has been delayed a bit. Due to how sensitive the circuit is, I will likely try to keep as many of the components identical to what I used on the breadboard tests. I could switch to SMD versions of the components, but this introduces risks that could hinder the performance of the circuit. I also plan to include a handful of potentiometers throughout the circuit to fine-tune the performance on the PCB.

The overall shape of the board has been one challenge

I believe that I currently have the outline constructed and the mounting holes in the correct locations. As Tushaar and Ashwin establish communication between the Teensy and Pi, I have been picking out what GPIOs to route where on this PCB. The top right section will be used for connecting to the LEDs and will house the level shifter for them. All components in this area will be low profile so the USB port on the Teensy is not impacted. The empty space on the left will be used for the active buzzer and the strum detection circuitry. The edges of the board will be populated with various pads to enable connections to things such as the fret PCB D-Flip-Flops. Any major circuitry that needs to be added on will only need power, ground, and a handful of I/O pins, which will be available on the board. The circuitry can be put onto external perfboard/PCBs and wired up.

I also worked on testing a handful of methods of detecting the specific string that is strummed. I tested a capacitive sensor but I think the delay of that will be too high, and it will not operate correctly with something else driving the string. We did have one other idea; connect a GPIO to a metal guitar pick and every ~10ms drive it high (while the frets are all driving low) and check if the pick is in contact with any of the strings. Combined with the strum sensing, this would enable you to tell when the user strums and what string. This would have the same safety features as the fret sensors, so there is no hazard to the user.

I also did a bit of testing with active buzzers. While they are not typically designed to have their volume controlled by PWM, it is possible to control the volume of an active buzzer quite well as long as the PWM frequency is sufficiently higher than audible frequencies. This means that we would be able to have the user be able to customize the metronome volume if we choose to use an active buzzer.

Due to shipping delays, I will not be able to assemble the PCBs until next week. I hope to get them on Monday and assemble at least 1-2 by Tuesday night before our team meeting. This will allow Tushaar to begin to test their functionality. I believe if we can get this done before break we will be in good shape.  I will also test the strum detection circuitry on the actual guitar so that I can finalize the values and put them on the PCB. I hope to finish up the rough layout of the PCB this week and fine-tune it over break so it can be ordered soon.

My main deliverables for next week will be a couple assembled fret-sensing PCBs, more finalized values and layout for the strum detection, the strum detection tested on the guitar, and a rough layout for the Pi-Hat PCB