Project Overview

My final project is an electric saxophone.

The minimum viable product for this project would be a 3D printed casing with the same dimensions of a saxophone, where a regular mouthpiece can be inserted, with a siphon system to keep moisture outside of the unit, where:

  1. The user's breath inflates a chamber. A sensor detects how much the chamber inflates by reading the distance it travels, and that signals the intensity of the volume to the speaker.
  2. The user presses buttons (keys), generating inputs that get sent to microcontrollers.
  3. The microcontrollers send the inputs to another microcontroller via I2C.
  4. This microcontroller turns the inputs into I2S digital audio data, which it sends to an amplifier.
  5. The amplifier then sends the audio to the speaker.

After being able to integrate all this, it can be spiralled into:

  1. Not only measuring the breath pressure, but also the breath flow, so that the oscillation of both values changes the frequency and pitch of the sound. (In my research, I saw somebody else that was building an electronic saxophone who tried to produce the same effect by putting a force-sensitive resistor sensor between his mouthpiece and reed, where the resistor was half of a voltage divider, so that the voltage in the middle varied with the force on the reed and in turn varied the sound being output. However, I want to be able to use regular mouthpieces in mine so I will go this different way)
  2. Making the buttons as similar as possible to the keys of a regular saxophone in both shape and feeling. Shape-wise it can be easily achieved by scanning the keys on a saxophone and replicating their dimensions when 3D printing. Feeling wise, I can play with the springs on the keys and how they interact with the PCB as switches.

Timeline

Task Deadline Status
Overall electronic system design. April 30th Finished
Electronics PCB design. May 26th In progress
Mechanical parts design. May 26th In progress
Electronics PCB milling and soldering. May 27th Not started
Mechanical parts printing. May 31st Not started
Electronics programming and troubleshooting. June 6th Not started
Mechanical parts assembling. June 6th Not started
Presentation (slide and video) preparation. June 8th Not started
Presentation day! June 10th

Index of Processes Used

2D Design

Electronic systems schematic design in Kicad

PCB design in Kicad

  • Programmer PCB design
  • Motherboard PCB design
  • Daughterboard PCB design
  • Keys granddaughterboard PCBs design
  • Pressure sensor granddaughterboard PCB design

3D Design

Mechanical parts design in Fusion

  • Neck
  • Body
  • Keys
  • Bow
  • Bell

Additive Fabrication

Fillament extrusion 3D printing

  • Neck
  • Body
  • Keys
  • Bow
  • Bell
  • Decorative Pieces

Subtractive Fabrication

PCB CNC milling

  • Programmer PCB milling
  • Motherboard PCB milling
  • Daughterboard PCB milling
  • Keys granddaughterboard PCBs milling
  • Pressure sensor granddaughterboard PCB milling

Embedded Microcontroller PCB

Interfacing

Programming

  • Programmer programming
  • Motherboard programming
  • Daughterboard programming

System Integration: Techniques and Applications

PCB and electrical components mounting

  • Programmer PCB mounting
  • Motherboard PCB mounting
  • Daughterboard PCB mounting
  • Keys granddaughterboard PCBs mounting
  • Pressure sensor granddaughterboard PCB mounting
  • Speaker mounting

Mechanical parts alignment

Wire harnesses guiding

Surface finishing

  • Neck
  • Body
  • Keys
  • Bow
  • Bell
  • Decorative Pieces

Bill of Materials

BoM Level Part Name Description Manufacturer Distributor Unit Price Qty Total Price
1 Electronics Xiao RP2040 Microcontroller Seeed Studio 1
2 Electronics MAX98357 I2S Class-D Mono Amplifier Adafruit Mouser.com 5.65€
3 Electronics AVR128DB32-I/PT Microcontroller Microchip Technology Mouser.com 1.86€

Documentation

Electronics

General Electrical Circuit

Initially, I thought about using the AVR128DB64 microcontroller on a motherboard and having all the inputs go directly into it, like you can see below:

Motherboard V0

After speaking with Dani, we discussed that a better approach might be to have daughterboard going into the main motherboard so as to simplify things. So instead of a single pcb with a ridiculous amount of inputs, I decided to have the left hand keys go into one board, the right hand keys go into another board, the breath chamber sensors go into another board, and have all 3 of these boards go into the main motherboard. So instead of using the AVR128DB64 microcontroller, I decided to use the AVR128DB32 microcontroller for all 4 boards. Based on this approach, I began by developing the daughterboard for the left hand keys and the granddaughterboard(s) for the input devices going into it.

The overall electronic schematic can be found here.

Programmer

In order to program the AVR128DB32 microcontrollers on all of my daughterboards and the motherboard, I designed a UPDI programmer based off the Quentorres. I removed the original Quentorres' SWD components and turned the UART connector into a UPDI connector, putting the resistors between the TX and RX lines on the board itself. So the design looked like this:

Motherboard V0
Motherboard V0

But since I didn't want to solder the Xiao RP2040 directly into the board, I put vertical pin sockets so that I could remove it if needed. So the PCB design ended up lookig like this:

Motherboard V0

After following the workflow for our in-house production, I got to milling (where I forgot to take a picture), and then soldering the components in, so my programmer looked like this:

Motherboard V0

I followed the instructions on the Quentorres Documentation page to set the programmer up.

Motherboard

Originally, I had thought about using an AVR128DB32 on the motherboard as well as the daughterboards for the sake of continuity, but then I realized that microcontroller cannot transmit digital audio data through I2S, which is the protocol I intend to use. My idea is for the motherboard to be connected to the daughterboards via I2C, then do internal programming from the keys and breath sensor and then send the digital audio into an amplifier connected to a speaker. So I decided to use a XiaoRP2040 as a microcontroller and a MAX98357A as an amplifier. My board is mainly based on this design by Neil, I just added an LED for troubleshooting and the channels for I2C communication. So the design looked like this:

Motherboard V0
Motherboard V0

But since I didn't want to solder the Xiao RP2040 directly into the board, I put vertical pin sockets so that I could remove it if needed. So the PCB design ended up lookig like this:

Motherboard V0

After following the workflow for our in-house production, I got to milling:

Motherboard V0

Then I got to soldering the components in, so it looked like this:

Motherboard V0

Daughterboards

After designing my development board in Week 6 and learning from some mistakes there, I came up with the following schematic for the first daughterboard:

Motherboard V0

To get to this point in the schematic, I started, as always, by diving deep into the datasheet which is available here. So firstly, I familiarized myself with the microcontroller's pinout:

Pinout

Then, I started with understanding the connection to the power supply better:

Power Supply
Power Supply

So after understanding how the microcontroller worked in regards to this, I set up the AVDD and VDD connections to power supply, selecting the components in accordance to what the datasheet recommended:

Power Supply
Power Supply

Then, I set up the reset button by selecting the components in accordance to what the datasheet recommended:

Pinout

Then, I set up the UPDI programming connector by selecting the components in accordance to what the datasheet recommended:

Pinout

Then, I wanted to add an LED light to the board to make troubleshooting easier for myself. So I looked at the datasheet for the one I chose:

Pinout

Based on the datasheet, I used this calculator to determine which resistor to use:

Pinout

Then, it was time for me to switch over to the PCB editor. Due to our in-house limitations, we cannot have gaps thinner than 0.4mm, so I had to modify some footprints to accommodate this. I decided to have the tracks have a width of 0.3mm, but the ones closer to the microcontroller had to be 0.2 in order for me to be able to produce the PCB in-house in a few weeks. So all in all, the final PCB design looked like this:

Motherboard V0

After following the workflow for our in-house production, I got to milling:

Motherboard V0

And finally, soldering:

Motherboard V0

Now, you may see that there is one pin socket connector missing. This is because one of its lines was cut off during the milling process. I still decided to go ahead with this board instead of building another one so that I could use this one for initial testing.

Granddaughterboard

Having the daughterboard ready, I needed the input devices I would be measuring with it, so I designed the general granddaughterboard that each one of the keys would have. The schematic and PCB design looked like this:

Motherboard V0
Motherboard V0

After following the workflow for our in-house production, I got to milling:

Motherboard V0

And finally, soldering:

Motherboard V0

Mechanical Components

Neck

Body

Keys

Bow

Bell

Decorative Pieces