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

Team Status Report for 9/30/23

The most significant risks that we are currently dealing with are the detection of which string is strummed and that the same note can be played with different fingerings.

We currently have a plan regarding how to detect the user strumming, although we do not have a method yet to determine which string was strummed. We have been brainstorming various methods to do this, all of which have potential. The first is performing capacitive touch sensing of the strings. This may be difficult though since the user may rest their fingers on the strings other than the one they are strumming. Additionally, the strings are already being driven by other signals so we would have to perform some sort of multiplexing on the strings to do this. We have also considered using COTS inductive pickups, although we have yet to find one that has an individual output for each string, which we need. One final method is to use a separate microcontroller with the sole purpose of sampling audio, performing an FFT, and sending this to the Teensy. The Teensy loop is likely going to be on the order of 100Hz, which means it cannot sample audio fast enough.

Regarding determining which finger placement to use, our current plan is to determine the physical distance between the previous note and the various finger positions for the next note, and choose the closest. This will involve creating a simple distance metric that the Teensy can run.

No major changes have been made to the system block diagram or implementation. One minor change is that we originally planned on using a 12V power supply along with a 5V buck converter. This would enable plugging in a 3S LiPo battery for mobile use. This was done to remove the need for a 5V 5A buck converter. In the future, if we would like to use a battery, we can simply add a buck converter with a battery connector on one side and a 5V barrel plug on the other side.

No changes to the schedule have been made

This week’s accomplishments:

  • Tushaar developed a state machine for the Teensy and decoded a MIDI file. He also has been able to run the NeoPixel library on the Teensy and control a series of 16 LEDs
  • Ashwin set up the RPi with Django and has hosted the webapp from it. The webapp currently has the ability to upload MIDI files and delete them. The Pi has been setup so it can be easily accessed via a2superfret.wifi.local.cmu.edu.
  • Owen has finished the design of the fretboard PCB and sent it out for fabrication. He has also created a circuit that can do strum detection with a fairly high accuracy, although this will need to be tested on the actual guitar
  • As a team, we ordered the guitar and discussed exactly what data and signals we want to send between the microcontroller and Pi

This coming week we hope to verify certain aspects of the guitar, such as the continuity of the guitar strings, the string spacing and fret spacing, and analyze the audio picked up by a microphone in the guitar. As a team, we hope to further refine the signals sent between the Pi and Teensy. We also hope to assemble the PCBs if they arrive so that we can begin writing to the LEDs on the boards and writing code to read from the frets.

 

Tushaar’s Status Report for 9/30/2023

This past week, I worked on 3 main things:

  1. Figuring out how the embedded software will work at a high level (state machine) – this involved knowledge from 18-240 for creating an FSM
  2. Getting started with the electronic hardware (Teensy4.1 and making sure I can individually address the LEDs) – this involved
  3. Figuring out how to parse a MIDI file – this involved lots of binary and hex conversion, a 15-122/18-213/18-240 skill

This is the proposed state machine for the embedded code:

Magenta shows inputs that originate as interrupts set by the RPI (teensy reads the input on its digital pins).

Red are inputs to the FSM originating from other parts of the microcontroller software.

 

I am able to address the LEDs individually:

 

 

I got a MIDI file from the web and manually parsed it according to the MIDI file standard to ensure I understood what we were working with. Here are my notes:

This progress is on schedule. I obtained a sample MIDI file by the time outlined in the Gantt Chart. I also procured a Teensy from Owen by the date we set in the schedule. The schedule says to be able to parse a MIDI file by Oct.8, and I am on track for that. We need to individually address each LED by Oct.15th, and I can already do that (but I will need to revisit this when the PCBs arrive).

Tasks for the next week:

  1. Give the Design Review Presentation
  2. Light up LEDs according to the frequency and timing specified in the MIDI file
  3. Implement a preliminary state machine in the embedded software