ECEN 1400 Freshman Project
In the fall semester of 2018, I took the course ECEN 1400: Intro to Digital and Analog Electronics, taught by Dr. Robert McLeod. The course introduced engineering students to the laws associated with electronic circuits; the behaviors and uses of basic components, such as resistors, capacitors, and diodes; and how to examine signals in both the time and frequency domains. In addition to learning about basic components, students assembled an Arduino-like microcontroller. This microcontroller was used in various exploratory activities throughout the semester, and was eventually employed in the final project. The project needed to utilize multiple inputs and outputs, so my partners, Tim Bauer and Gabriel Villalobos-Saenz, and I decided to design a wireless speaker with sound-reactive lights.

Our project aimed to combine two products commonly used by teenagers and young adults into one convenient package. We created the following design requirements:
  • Play music from a Bluetooth-enabled device
  • Easy pairing/connection
  • Adjustable volume
  • Auto-adjust light brightness
  • Flash LEDs to the beat of the music
In order to satisfy these requirements, we drew a block diagram showing the general types of components we would need: We then proceeded to research the specific components we needed to order. We tried to look for the components that would provide the highest quality results while still staying within a reasonable price range. Eventually, we came up with the following parts list and put online orders in: After receiving all of the parts, we split the project up into three smaller tasks: Bluetooth connectivity with the speakers, software to make the LEDs react to the audio signal, and the enclosure.

While Gabriel and Tim worked on the software and the enclosure, I began researching how to wire the XS3868. Using the datasheet and several online wiring guides, I wired up a basic test circuit to see if the device would power on. It would power on at first, but no option to connect would show up on the Bluetooth settings section of our phones. After about fifteen seconds, the module would power off until power cycled. After hours of researching and testing out different wiring configurations, we thought it best to just scrap this module and order a different one. We ended up buying the slightly more expensive, but much easier to use KRC-86B module. This device arrived in two days, and within minutes of wiring it up, we were able to connect to it and could see our audio output on an oscilloscope. The pinout of the board is shown here: The next step was to wire the audio signal from the KRC-86B to the PAM8610 amplifier, which was pretty straightforward. The board has 3 pins labeled L_IN (left channel input signal), R_IN (right channel input signal), and AGND (audio ground). These get connected to the corresponding output pins from the KRC-86B. The amplifier has 4 output pins that are also fairly self-explanatory: L+, L-, R+, and R-. These were connected to the two speakers, one for the left channel and one for the right. Below is a picture of the PAM8610 with labeled pins: Finally, the +12V and GND pins were connected to the respective contacts of the barrel power jack, and it was ready to go. Upon powering on the circuit, the KRC-86B would blink until connected to a phone or other Bluetooth device, then audio would play out of the speakers.

While I was doing this, Gabriel and Tim were having trouble getting the LED strip to work properly. Once I was finished with the Bluetooth circuitry, I tried to help them figure out what was wrong, but we could never get it fully functional. At some point during our testing, we must have overloaded part of the LED strip, because by the deadline, only the first 7 out of 60 LEDs would power on. Using the remaining LEDs, Tim adapted some example code from the Neopixel library to work with our strip, while also coding in functionality for auto-adjusting the brightness of the LEDs based on the ambient light using a photoresistor.

After getting all the electronics working together, Gabriel and I put together a box-shaped enclosure with approximate dimensions of 28 x 3.5 x 3.5". The base and sides were made of pine wood, with 1/8" acryclic covering the top and front so the light from the LEDs was visible. Gabriel sanded the acryclic to make it frosted, which gave the light a nice diffused look. We left the back open so that we could showcase the electronics at the Project Expo that took place in the Engineering Center on December 8, 2018. This project taught me a lot about abstraction of problems and debugging via research, datasheets, multimeters, oscilloscopes, etc. From the beginning, we thought we would be able to tackle the entire construction of the speaker in a couple of hours. In reality, we ran into multiple unexpected issues that forced us to work together and budget our time effectively. This project was my first taste of engineering on a team and the challenges and triumphs that accompany it.